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>
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>
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>
- 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>
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>
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>
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>
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>
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>
- 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>
Use P_SC on reception in PP mode to keep the clock synchronized to the FP.
This reduces the phase offset between two coa devices from 15kHz to < 0.5kHz.
Signed-off-by: Patrick McHardy <kaber@trash.net>
Apparently the Type II cards don't work properly unless the Codec is
disabled - scanning, channel hopping etc. is performed, but no FPs
are found at all.
Signed-off-by: Patrick McHardy <kaber@trash.net>
Rename all files, constants and functions to reflect the fact that the
driver handles the 14424 as well.
Signed-off-by: Patrick McHardy <kaber@trash.net>