dect
/
linux-2.6
Archived
13
0
Fork 0
Commit Graph

69 Commits

Author SHA1 Message Date
Patrick McHardy 70711d2235 Linux 3.8
-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2.0.19 (GNU/Linux)
 
 iQEcBAABAgAGBQJRIsBOAAoJEHm+PkMAQRiGqq8IAKQvtCu/V3jVpEHDg6CwvKkT
 0gNjWyBO1gKyYwxTOLy9mtzu+4dgeGqhg5KdTPi4GIqWLHqjw3cSk+MbEqh64cz4
 WXSYvKL5EUDdbU8GCn/UIGgUA/9Yc3ORN8NuF3yMoqqY2oqvoYdxdL5LRu2tKcUV
 JzgziX1MCxKyOQG8XXgiMaJJapIO43YvkOE1hwMVQHAlew2lX8ki7oUXk52CGAs6
 TFXDVqWRZibsP5mA4BPtXyA7YGJDqTXrmtnHygmz2lrxn5yLICkQ8qC2KjQBHbbP
 N62dz2bj042WF60yj3BE5PlkG/vzf34BDKd9C+nZrw7Y0PgIVQElemvWoV6vwmE=
 =7k5r
 -----END PGP SIGNATURE-----

Merge tag 'v3.8' of /home/kaber/src/repos/linux

Linux 3.8

Signed-off-by: Patrick McHardy <kaber@trash.net>

Conflicts:
	include/linux/Kbuild
	include/linux/netlink.h
2013-03-31 18:10:34 +02:00
Patrick McHardy a6f3c814f9 dect: coa: fix firmware for PCMCIA devices
Reduce the size by merging the Receive- and ReceiveSync paths and
re-enable a few instructions necessary for the PCMCIA device.

Signed-off-by: Patrick McHardy <kaber@trash.net>
2011-10-05 17:10:27 +02:00
Patrick McHardy 477bd356e8 dect: coa: add P640j support
Signed-off-by: Patrick McHardy <kaber@trash.net>
2011-07-22 15:55:12 +02:00
Patrick McHardy 3b15b97a7a dect: coa: remove support for P32P packet format
Can be implemented in software if needed, for the space is required for
P640j support.

Signed-off-by: Patrick MCHardy <kaber@trash.net>
2011-07-17 13:06:07 +02:00
Patrick McHardy 84c198f221 dect: coa: fix race condition in firmware patching
Use atomic writes to make sure the DIP doesn't read the new
opcode before the operand has been written to memory.

Signed-off-by: Patrick McHardy <kaber@trash.net>
2011-07-17 13:06:06 +02:00
Patrick McHardy ea49abac60 dect: fix scanning regression
Commit e783777 (dect: coa: write BMC configuration when setting
channel mode) moved writing the BMC configuration to the mode
setting callback.

The MAC CSF layer however didn't set the channel mode to SCANNING
when initiating a scan since BMC configuration was done during
initialization and mode setting in dect_transceiver_enable(). With
the above mentioned commit the BMC is never properly configured,
meaning the scan fails.

Properly set the mode of DECT_SCAN_SLOT to DECT_MODE_SCANNING when
initiating a scan to fix this.

Additionally get rid of the unnecessary BMC initialization when
initializing the DIP, this is done immediately afterwards anyways.

Signed-off-by: Patrick McHardy <kaber@trash.net>
2011-06-17 07:01:09 +02:00
Patrick McHardy 463f33bcc1 dect: coa: fix syncying in PP/slave mode
The SyncLoop needs to manually reinitialize the radio since the
individual receive functions don't do this anymore.

Signed-off-by: Patrick McHardy <kaber@trash.net>
2011-05-13 15:41:04 +02:00
Patrick McHardy a5bec753cc dect: coa: optimize per-slot memory layout
- merge DCS state and DCS IV/Key space: the IV and key are reinialized
  on every slot, so we can re-use their space for the DCS state at the
  end of the slot.

- pack radio configuration and BMC control data and move adjacent to
  the DCS space.

This results in 87 bytes of free space for the B-Field data.

Signed-off-by: Patrick McHardy <kaber@trash.net>
2011-04-20 16:25:41 +02:00
Patrick McHardy e783777ac8 dect: coa: write BMC configuration when setting channel mode
Write the BMC configuration when setting the channel mode. This allows
to reserve memory for only a single configuration for both RX and TX.

Additionally it will in the future be used to configure S-field error
parameters dynamically.

Signed-off-by: Patrick McHardy <kaber@trash.net>
2011-04-20 16:25:21 +02:00
Patrick McHardy 34b95935ff dect: coa: reduce A-field receive size by one bit for ReceiveSync
Since a JMP to the generic P00 receive function is done, we need to
wait one bit less than usually.

Signed-off-by: Patrick McHardy <kaber@trash.net>
2011-04-20 16:23:15 +02:00
Patrick McHardy 16faf2d44c dect: coa: support operation on all slots
Support operation on uneven slot numbers. The firmware is rewritten to
follow the following scheme:

- each slot has an entry in the SlotTable consisting of two
  intructions

- idle slots use WT 1 + WNT 1

- for active slots the previous slot is programmed to switch
  to the proper memory bank and initialize the BMC/radio

- the actual slot is programmed to jump to one the receive or
  transmit functions

The transceiver layer takes care of scheduling operation only
on slots that are surrounded by idle slots based on the
DECT_TRANSCEIVER_SLOW_HOPPING feature flag.

Signed-off-by: Patrick McHardy <kaber@trash.net>
2011-04-12 02:39:20 +02:00
Patrick McHardy 2bcb0143d1 dect: coa: fix firmware array size in Makefile
The size is 510 not 509 bytes. Also fix range argument to p2bin.

Signed-off-by: Patrick McHardy <kaber@trash.net>
2011-04-12 02:38:41 +02:00
Patrick McHardy 77a5606155 dect: coa: reduce banktable size
Reduce the size of the bank table and make it usable for uneven
slots as well.

Signed-off-by: Patrick McHardy <kaber@trash.net>
2011-04-12 02:38:29 +02:00
Patrick McHardy 648ed7b1c1 dect: replace transceiver slotmask by features flag and use to compute blind slots
Use DECT_TRANSCEIVER_SLOW_HOPPING feature to calculate blind slots.

Signed-off-by: Patrick McHardy <kaber@trash.net>
2011-04-12 02:31:15 +02:00
Patrick McHardy 8e819940f0 dect: coa: don't load BMC config twice on TX
Move RX BMC configuration from the radio initialization to the
receive functions to avoid double configuration on TX.

Signed-off-by: Patrick McHardy <kaber@trash.net>
2011-04-12 02:27:35 +02:00
Patrick McHardy 4edecd8551 dect: coa: firmware: save two instructions
Fall through to the main RX/TX function in the encrypted variants
instead of branching.

Signed-off-by: Patrick McHardy <kaber@trash.net>
2011-04-06 21:41:54 +02:00
Patrick McHardy a8d83344b0 dect: coa: fix oops on module unload
Copy sc1442x_base to a local variable to unmap it since we have to
free the transceiver that contains the pointer before that.

Additionally (in case of the PCMCIA driver) call pcmcia_disable_device()
before freeing the transceiver since we may still receive interrupts until
that point.

Signed-off- by: Patrick McHardy <kaber@gtrash.net>ZZ
2011-04-06 21:32:38 +02:00
Patrick McHardy 2e21102c9c dect: coa: firmware: use symbolic constants for P_SC argument
Signed-off-by: Patrick McHardy <kaber@trash.net>
2011-04-06 15:34:09 +02:00
Patrick McHardy 83463f3ec3 dect: coa: reduce firmware size
Save a couple of instructions by moving the protected B-field transmission
and reception code directly into the calling functions. With this change all
receive and transmit functions call their respective B-field processing
functions in a similar fashion, allowing to remove the WT 1 for the last
A-field bit after Receive/Transmit, saving a total of 6 instructions.

Signed-off-by: Patrick McHardy <kaber@trash.net>
2011-04-06 15:22:51 +02:00
Patrick McHardy 7bff85f263 Revert "dect: ccf: add support for software ciphering"
This reverts commit 3253b4dd51.

Accidentally committed, code is not ready yet and only works
occasionaly.

Signed-off-by: Patrick McHardy <kaber@trash.net>
2011-03-19 02:34:29 +01:00
Patrick McHardy 3253b4dd51 dect: ccf: add support for software ciphering
Signed-off-by: Patrick McHardy <kaber@trash.net>
2011-03-17 11:04:08 +01:00
Patrick McHardy d7d20e77fb dect: com_on_air_pci: fix oops on module unload
BUG: unable to handle kernel paging request at ffffc9000007da08
IP: [<ffffffffa00bb089>] sc1442x_write_cmd+0x29/0xa0 [com_on_air]
PGD 4cc36067 PUD 4cc37067 PMD 4cc38067 PTE 0
Oops: 0002 [#1] PREEMPT SMP
last sysfs file: /sys/module/dect_csf/initstate
CPU 0
Modules linked in: dect_raw dect_ccf com_on_air_pci(-) com_on_air dect_csf dect loop ide_cd_mod i2c_i801 processor rng_core i2c_core evdev serio_raw cdrom fan thermal uhci_hcd rtc_cmos thermal_sys ehci_hcd button [last unloaded: dect]

Pid: 4850, comm: rmmod Not tainted 2.6.38-rc6+ #8
RIP: 0010:[<ffffffffa00bb089>]  [<ffffffffa00bb089>] sc1442x_write_cmd+0x29/0xa0 [com_on_air]
RSP: 0018:ffff88004b669c98  EFLAGS: 00010082
RAX: 0000000000000000 RBX: ffff88004acc6758 RCX: 0000000000000002
RDX: 0000000000000008 RSI: 0000000000000008 RDI: ffff88004acc6758
RBP: ffff88004b669c98 R08: 0000000000001a00 R09: ffffc9000007da08
R10: 000000000000298a R11: 0000000000000046 R12: ffff88004acc6898
R13: ffff88004acc604c R14: 0000000000000000 R15: 0000000000000000
FS:  00007fe3f3340700(0000) GS:ffff88004ec00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 000000008005003b
CR2: ffffc9000007da08 CR3: 000000004b51d000 CR4: 00000000000006f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
Process rmmod (pid: 4850, threadinfo ffff88004b668000, task ffff88004b0650c0)
Stack:
 ffff88004b669cf8 ffffffffa00bc002 ffff88004b669cc8 00ffffffa008a3a7
 ffffffff00000000 ffffffffa008d040 ffff88004b669ce8 0000000000000040
 0000000000000001 ffff88004acc6000 ffff88004acc6000 0000000000000001
Call Trace:
 [<ffffffffa00bc002>] sc1442x_set_mode+0x162/0x190 [com_on_air]
 [<ffffffffa00a740b>] dect_irc_disable+0x9b/0x110 [dect_csf]
 [<ffffffffa00a749e>] dect_cell_detach_transceiver+0x1e/0x70 [dect_csf]
 [<ffffffffa00af32b>] dect_transceiver_notify+0x4b/0x70 [dect_csf]
 [<ffffffffa00af37b>] dect_unregister_transceiver+0x2b/0x50 [dect_csf]
 [<ffffffffa001a159>] coa_remove+0x7e/0x86 [com_on_air_pci]
 [<ffffffff811eebd7>] pci_device_remove+0x37/0x70
 [<ffffffff8127d2c6>] __device_release_driver+0x66/0xc0
 [<ffffffff8127d3f0>] driver_detach+0xd0/0xe0
 [<ffffffff8127c1d1>] bus_remove_driver+0x91/0x100
 [<ffffffff8127dbc2>] driver_unregister+0x62/0xa0
 [<ffffffff811eee84>] pci_unregister_driver+0x44/0xa0
 [<ffffffffa001a0d9>] coa_pci_exit+0x15/0x17 [com_on_air_pci]
 [<ffffffff810891b0>] sys_delete_module+0x1a0/0x2a0
 [<ffffffff8139edd9>] ? trace_hardirqs_on_thunk+0x3a/0x3f
 [<ffffffff81002fab>] system_call_fastpath+0x16/0x1b
Code: 00 00 55 48 89 e5 0f 1f 44 00 00 44 0f b7 87 8c 01 00 00 8b 47 0c 01 f6 85 c0 46 8d 0c 06 75 52 45 0f b7 c9 4c 03 8f 80 01 00 00 <41> 88 11 44 0f b7 87 8c 01 00 00 8b 47 0c 85 c0 41 8d 74 30 01
RIP  [<ffffffffa00bb089>] sc1442x_write_cmd+0x29/0xa0 [com_on_air]
 RSP <ffff88004b669c98>
CR2: ffffc9000007da08

Unregister the transceiver before unmapping the IO memory.

Signed-off-by: Patrick McHardy <kaber@trash.net>
2011-02-28 18:56:32 +01:00
Patrick McHardy 4521f18cae dect: com_on_air_cs: fix compilation on recent kernel versions
Signed-off-by: Patrick McHardy <kaber@trash.net>
2011-01-03 08:04:54 +01:00
Patrick McHardy 7819c618e9 dect: coa: warn on unsupported slots
Signed-off-by: Patrick McHardy <kaber@trash.net>
2010-10-06 19:17:27 +02:00
Patrick McHardy d921b41838 dect: coa: fix compilation of pcmcia driver
Signed-off-by: Patrick McHardy <kaber@trash.net>
2010-09-21 01:14:00 +02:00
Patrick McHardy cca4ba902f dect: mac: implement PP handover
Trigger handover based on indicated slot errors as per ETSI EN 300 175-3
section 11.4.5. Sliding collision indications based on the Q1/Q2 bits is
currently ignores since there appears to be a bug in the sc1442x firmware
in transmitting the Z-field. Additionally bearer-reattempt rate-limiting
is currently missing.

Signed-off-by: Patrick McHardy <kaber@trash.net>
2010-09-10 16:58:57 +02:00
Patrick McHardy 3a5d82dee0 dect: coa: clear interrupts on shutdown
Clear interrupt on shutdown instead of on init to avoid spurious interrupts
when probing the device.

Signed-off-by: Patrick McHardy <kaber@trash.net>
2010-09-04 09:34:05 +02:00
Patrick McHardy ec15ddfabb dect: add DECT standard cipher
Not integrated yet though.

Signed-off-by: Patrick McHardy <kaber@trash.net>
2010-08-22 19:12:21 +02:00
Patrick McHardy b4b93a19e8 dect: coa: clear all pending interrupts on init
Occasionally after an error the card will deliver spurious interrupts when
reloading the driver. Clear all pending interrupts to avoid this.

Signed-off-by: Patrick McHardy <kaber@trash.net>
2010-08-17 17:39:53 +02:00
Patrick McHardy 4b22db81c9 dect: coa: use register definitions for clarity
Signed-off-by: Patrick McHardy <kaber@trash.net>
2010-08-11 03:59:11 +02:00
Patrick McHardy 9064dc69e2 dect: coa: remove unnecessary pcmcia_release_window()
Everything is cleaned up by pcmcia_disable_device().

Signed-off-by: Patrick McHardy <kaber@trash.net>
2010-06-17 04:48:55 +02:00
Patrick McHardy 8f74a2300c dect: fix up for 2.6.35-rc changes
Signed-off-by: Patrick McHardy <kaber@trash.net>
2010-06-17 00:34:41 +02:00
Patrick McHardy 043090cc70 dect: coa: support switching to scanning mode from locked state
Patch the slot table to jump to the scanning functions when unlocking
the transceiver.

Signed-off-by: Patrick McHardy <kaber@trash.net>
2010-05-27 03:45:06 +02:00
Patrick McHardy fdfac4129d dect: coa: toggle LEDs based on frames received and transmitted
Signed-off-by: Patrick McHardy <kaber@trash.net>
2010-05-27 03:44:28 +02:00
Patrick McHardy 912ef7a21d Merge upstream
Signed-off-by: Patrick McHardy <kaber@trash.net>
2010-01-17 13:37:48 +01:00
Patrick McHardy ee4666b5b9 dect: coa: fix firmware patching for secondary FP transceivers
Ciphering and synchronization options are similar to the primary
transceiver (the sync bearer is handled seperately), only the
entry points of primary and secondaries differ.

Signed-off-by: Patrick McHardy <kaber@gw.localnet>
2009-12-31 17:28:30 +01:00
Patrick McHardy 74189d6e53 dect: csf: fix static system information slotnumber range check
Valid values are 0-11.

Signed-off-by: Patrick McHardy <kaber@trash.net>
2009-12-28 15:48:11 +01:00
Patrick McHardy 647ee2ecbb dect: coa: add clock sync support for secondary transceivers
Signed-off-by: Patrick McHardy <kaber@trash.net>
2009-12-04 11:04:12 +01:00
Patrick McHardy d183201d51 dect: coa: fix P00 reception
Apparently the sc1442x doesn't properly update the BMC status information unless
reception of the B-field is begun. This causes P00 slots to be incorrectly detected
as out of sync.

Add two (otherwise unnecessary) commands to finish the A-field and begin reception
of the B-field before disabling the receiver.

Signed-off-by: Patrick McHardy <kaber@trash.net>
2009-11-28 14:47:32 +01:00
Patrick McHardy 53bb9793bc dect: coa: add ciphering support
Signed-off-by: Patrick McHardy <kaber@trash.net>
2009-11-27 18:32:05 +01:00
Patrick McHardy 1cf568130f dect: clean up firmware a bit and add P00 receive function
- rename Receive and Transmit functions to RX_ and TX_

- add P00 receive function. This is necessary for channel measurement,
  which should measure only over the real packet length.

Signed-off-by: Patrick McHardy <kaber@trash.net>
2009-11-26 10:03:17 +01:00
Patrick McHardy d11b2d6f9e dect: coa: don't reinitialize radio configuration
There's no need to reinitialize the radio configuration when changing
channel modes, just initialize it once in sc1442x_init_slot().

Signed-off-by: Patrick McHardy <kaber@trash.net>
2009-11-26 10:03:16 +01:00
Patrick McHardy 634dac446d dect: maintain X-crc error statistics
Signed-off-by: Patrick McHardy <kaber@trash.net>
2009-11-26 03:16:22 +01:00
Patrick McHardy 80f8beda34 dect: coa: change memory pointers in sc1442x_{from,to}_dmem() to void *
void * is the proper type to use for a memcpy-like function.

Signed-off-by: Patrick McHardy <kaber@trash.net>
2009-11-24 02:38:40 +01:00
Patrick McHardy a531b99614 dect: add A-field CRC error statistics counter
Signed-off-by: Patrick McHardy <kaber@trash.net>
2009-07-18 07:49:33 +02:00
Patrick McHardy a3e905288a dect: coa: fix IRQ mask to include timer
Signed-off-by: Patrick McHardy <kaber@trash.net>
2009-05-30 11:50:24 +02:00
Patrick McHardy 2f73d018c5 dect: coa: disable phase adjustment in FP mode
Signed-off-by: Patrick McHardy <kaber@gw.localnet>
2009-05-29 04:17:02 +02:00
Patrick McHardy fc542b4100 dect: coa: fix typo
Signed-off-by: Patrick McHardy <kaber@trash.net>
2009-05-29 02:33:12 +02:00
Patrick McHardy 76e2a79484 dect: coa: move LED toggling out of loop
Signed-off-by: Patrick McHardy <kaber@trash.net>
2009-05-28 17:52:17 +02:00
Patrick McHardy 1449f2c279 dect: coa: add some symbolic constants, LED support
Signed-off-by: Patrick McHardy <kaber@trash.net>
2009-05-28 17:06:46 +02:00