summaryrefslogtreecommitdiff
path: root/drivers/staging/cw1200/wsm.c
AgeCommit message (Collapse)Author
2011-10-13cw1200: Fixing corrupted direct probe requests.Dmitry Tarnyagin
Direct probe used shared SKB buffer after headers were stripped by mac80211 layer. Fix reimplements (and significantly simplifies) direct probe handling, using the same technique as for other "special" frames. Change-Id: Ibec9b72ccb497ae385d315b68001c5e23ef05701 Signed-off-by: Dmitry Tarnyagin <dmitry.tarnyagin@stericsson.com> Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/33775 Reviewed-by: Philippe LANGLAIS <philippe.langlais@stericsson.com>
2011-10-13cw1200: Add 2byte hole in TXreq for unaligned bufAjitpal.Singh
Adds a 2 bytes hole in the WSM Transmit request when skb->data is aligned at 2 bytes.This will make the transmit request 4byte aligned. This optmisation is need for DMA. The firmware is informed about the hole by setting BIT7 in the WSM Transmit Request flags. ST-Ericsson ID: 357764 ST-Ericsson FOSS-OUT ID: NA Change-Id: Idbb60459ca645575c2afc74f2421b0fa86121cf0 Signed-off-by: Ajitpal.Singh <ajitpal.singh@stericsson.com> Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/33668 Tested-by: Dmitry TARNYAGIN <dmitry.tarnyagin@stericsson.com> Reviewed-by: Philippe LANGLAIS <philippe.langlais@stericsson.com>
2011-10-13cw1200: Requeue special frames.Dmitry Tarnyagin
Some frames require special handling in wsm, for example offchannel, wep, join... Requeue for offchannel and wep frames was missing, leading to queue entry leakage and unexpected drop of frames. Fix implements requeue for special frames. Change-Id: Iba5c41496f898e30b4261db3888bba384504df50 Signed-off-by: Dmitry Tarnyagin <dmitry.tarnyagin@stericsson.com> Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/33596 Reviewed-by: Bartosz MARKOWSKI <bartosz.markowski@tieto.com> Reviewed-by: Philippe LANGLAIS <philippe.langlais@stericsson.com>
2011-10-13cw1200: Syncing ALK and GLK tracks.Dmitry Tarnyagin
Change-Id: I111ab2cb92dc5fad3eb8938ceb76b7db715b54cc Signed-off-by: Dmitry Tarnyagin <dmitry.tarnyagin@stericsson.com> Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/33545 Reviewed-by: Bartosz MARKOWSKI <bartosz.markowski@tieto.com> Reviewed-by: Philippe LANGLAIS <philippe.langlais@stericsson.com>
2011-10-13cw1200: Fix checkpatch warnings.Dmitry Tarnyagin
Change-Id: Ibda6002f9ce429dabcc098bb2a88a4ca7e3cf5a4 Signed-off-by: Dmitry Tarnyagin <dmitry.tarnyagin@stericsson.com> Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/33543 Reviewed-by: Bartosz MARKOWSKI <bartosz.markowski@tieto.com> Reviewed-by: Philippe LANGLAIS <philippe.langlais@stericsson.com>
2011-10-13cw1200: Accurate reporting of TX status.Dmitry Tarnyagin
* Accurate reporting of TX status is implemented (needed for UAPSD and PSPOLL). * Leaking of TX rate policies is fixed. * skb destructor is implemented. * Time to live for queued frames is implemented. * cw1200_tx is split by separate TX handlers (like in mac80211). * cw1200_skb_to_wsm is not existing anymore. * BT coex: null frames are prioritized as management frames. * Debug: added printing of rate policies in use. ST-Ericsson ID: 354950 ST-Ericsson ID: 360749 Change-Id: I920d398418df99c21b37a16ef16591e58a82151d Signed-off-by: Dmitry Tarnyagin <dmitry.tarnyagin@stericsson.com> Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/33542 Reviewed-by: Bartosz MARKOWSKI <bartosz.markowski@tieto.com> Reviewed-by: Philippe LANGLAIS <philippe.langlais@stericsson.com>
2011-10-13cw1200: AP PS refactoring.Dmitry Tarnyagin
* buffered_multicasts_lock was renamed to ps_state_lock. Previous name was quite confusive. * Per-STA rx_queue was created for early RX-ed frames. Not that we really need these frames, but PM status they are holding is important. * priv->tx_suspend_mask was removed, driver is not using it. It was intended for UAPSD and is not needed in current implementation on mac80211. * Fix: cw1200_queue_unlock() was not called from cw1200_queue_clear() when queue was internally locked. ST-Ericsson ID: 360749 Change-Id: I61346db485d34f761d80af786b716d8c73e8b600 Signed-off-by: Dmitry Tarnyagin <dmitry.tarnyagin@stericsson.com> Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/33541 Reviewed-by: Bartosz MARKOWSKI <bartosz.markowski@tieto.com> Reviewed-by: Philippe LANGLAIS <philippe.langlais@stericsson.com>
2011-10-13cw1200: queue dependency refactoring.Dmitry Tarnyagin
According to the driver design queue should know as less as possible about other components. Last commits violate this "rule" by transpatent arguments like tid. This patch is fixing these violations. No functional changes in this commit. Change-Id: I078835dc0263ef71fa2d50a1d9bfae2c04bab440 Signed-off-by: Dmitry Tarnyagin <dmitry.tarnyagin@stericsson.com> Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/33540 Reviewed-by: Bartosz MARKOWSKI <bartosz.markowski@tieto.com> Reviewed-by: Philippe LANGLAIS <philippe.langlais@stericsson.com>
2011-10-13cw1200: Remove WARN_ON on possible execution pathDmitry Tarnyagin
WARN_ON was used to pin-point TXing of a frame with unexpected link_id. This is a valid case when driver is being stopped and it leads to a confusing printout. Change replaces WARN_ON() with wiphy_warn() Change-Id: I78690af3b564a21eb7289cad9c7352817d9d72f0 Signed-off-by: Dmitry Tarnyagin <dmitry.tarnyagin@stericsson.com> Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/32500 Reviewed-by: Bartosz MARKOWSKI <bartosz.markowski@tieto.com> Tested-by: Bartosz MARKOWSKI <bartosz.markowski@tieto.com> Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/33535 Reviewed-by: Philippe LANGLAIS <philippe.langlais@stericsson.com>
2011-10-13cw1200: Adaptation to U-APSD/AP support as on Thu, Sep 22, 2011Bartosz Markowski
New mac80211 API for reporting buffered frames in SoftAP mode is supported. SoftAP stability is significantly improved by that. ST-Ericsson ID: 355584 Change-Id: I0f12c71fff05f7f6b79cd508181b7daab6838c7e Signed-off-by: Dmitry Tarnyagin <dmitry.tarnyagin@stericsson.com> Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/31927 Reviewed-by: Bartosz MARKOWSKI <bartosz.markowski@tieto.com> Tested-by: Bartosz MARKOWSKI <bartosz.markowski@tieto.com> Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/33530 Reviewed-by: Philippe LANGLAIS <philippe.langlais@stericsson.com>
2011-10-13cw1200: UAPSD in AP mode is implemented.Bartosz Markowski
U-APSD in SoftAP is fully offloaded to the mac80211 wireless stack. Driver provides a transparent virtual link (with link_id = CW1200_LINK_ID_UAPSD) which bypases powersave buffering. Mac80211 stack takes care to provide UAPSD data when it is needed. ST-Ericsson ID: 355584 Change-Id: Iabd65e7effcecc5564e76e05e081b8f6a98b4ddb Signed-off-by: Dmitry Tarnyagin <dmitry.tarnyagin@stericsson.com> Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/30661 Reviewed-by: Bartosz MARKOWSKI <bartosz.markowski@tieto.com> Tested-by: Bartosz MARKOWSKI <bartosz.markowski@tieto.com> Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/33529 Reviewed-by: Philippe LANGLAIS <philippe.langlais@stericsson.com>
2011-10-13cw1200: PM state in AP mode could be out of sync.Dmitry Tarnyagin
PM state is controlled separately by firmware and driver. Firmware does not update own PM state when STA is removed, so PM state of the driver and firmware could be out of sync. The patch implements resyncronization of the PM state. ST-Ericsson ID: 354923 Change-Id: Ie2d8f54bc9d6dc1578aead31eecdb04c9ce7505e Signed-off-by: Dmitry Tarnyagin <dmitry.tarnyagin@stericsson.com> Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/29404 Reviewed-by: QABUILD Reviewed-by: Bartosz MARKOWSKI <bartosz.markowski@tieto.com> Tested-by: Bartosz MARKOWSKI <bartosz.markowski@tieto.com> Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/33518 Reviewed-by: Philippe LANGLAIS <philippe.langlais@stericsson.com>
2011-10-13cw1200: Fix incorrect usage of wait_event_interruptible_timeout.Dmitry Tarnyagin
In many places in the driver wait_event_interruptible_timeout was wrongly used instead of wait_event_timeout. It caused several problems when upper layer received signals. A typical one was: [ 4553.767944] [BH] wakeup. [ 4553.768035] kernel BUG at drivers/staging/cw1200/wsm.c:1069! [ 4553.768066] Unable to handle kernel NULL pointer dereference at virtual address 00000000 ... [ 4553.770507] [<c003d550>] (__bug+0x1c/0x28) from [<bf0d8780>] (wsm_cmd_send+0x270/0x2cc [cw1200_core]) [ 4553.770538] [<bf0d8780>] (wsm_cmd_send+0x270/0x2cc [cw1200_core]) from [<bf0d9a5c>] (wsm_remove_key+0xf0/0x114 [cw1200_core]) ... [ 4553.771972] [<c03cb964>] (sock_sendmsg+0xa0/0xbc) from [<c03cbee8>] (sys_sendmsg+0x1b0/0x20c) [ 4553.772003] [<c03cbee8>] (sys_sendmsg+0x1b0/0x20c) from [<c0039680>] (ret_fast_syscall+0x0/0x30) Change-Id: Ie0c2ded7348379a324f1f23fae4416014c272530 Signed-off-by: Dmitry Tarnyagin <dmitry.tarnyagin@stericsson.com> Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/29164 Reviewed-by: Bartosz MARKOWSKI <bartosz.markowski@tieto.com> Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/33513 Reviewed-by: Philippe LANGLAIS <philippe.langlais@stericsson.com>
2011-10-13cw1200: Fix for firmware crash/hang in SoftAP with powersave.Dmitry Tarnyagin
* Firmware does not support block ACK in SoftAP mode and crashes when BA-enabled settings are applied. Fix completly disables BA when firmware is in SoftAP mode. * Proper register is used for firmware assert line number diagnostic message. * wsm_update_ie is implemented (cosmetical change). Change-Id: I93bff4e59a1a6ab35f537097a46199cb8a1c34fa Signed-off-by: Dmitry Tarnyagin <dmitry.tarnyagin@stericsson.com> Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/29064 Reviewed-by: Bartosz MARKOWSKI <bartosz.markowski@tieto.com> Tested-by: Bartosz MARKOWSKI <bartosz.markowski@tieto.com> Reviewed-by: QATEST Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/33510 Reviewed-by: Philippe LANGLAIS <philippe.langlais@stericsson.com>
2011-10-13cw1200: Print firmware exception information.Dmitry Tarnyagin
WSM firmware reports exception information in exception indication message. Code added for printing this informarion in human-readable format. Change-Id: I1bbd208521166021fd7d38229b8dbeff8490d244 Signed-off-by: Dmitry Tarnyagin <dmitry.tarnyagin@stericsson.com> Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/28957 Reviewed-by: Ajit Pal SINGH <ajitpal.singh@stericsson.com> Reviewed-by: Bartosz MARKOWSKI <bartosz.markowski@tieto.com> Tested-by: Bartosz MARKOWSKI <bartosz.markowski@tieto.com> Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/29062 Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/33508 Reviewed-by: Philippe LANGLAIS <philippe.langlais@stericsson.com>
2011-10-13cw1200: PSPOLL is supported.Dmitry Tarnyagin
Handling of PSPOLL frames in SoftAP mode was missing until now. This commit implements PSPOLL support. Change-Id: I9b18554ee8fca296793af4db168c458276d45f82 Signed-off-by: Dmitry Tarnyagin <dmitry.tarnyagin@stericsson.com> Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/28849 Reviewed-by: Bartosz MARKOWSKI <bartosz.markowski@tieto.com> Tested-by: Bartosz MARKOWSKI <bartosz.markowski@tieto.com> Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/29060 Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/33506 Reviewed-by: Philippe LANGLAIS <philippe.langlais@stericsson.com>
2011-10-13cw1200: Allow TXing in monitor modeDmitry Tarnyagin
Forced-join firmware mode, previously used for offchannel TXing, has number of limitations and does not work well. The patch re-implements offchannel TXing in monitor aka p2p-dev mode. Change-Id: Id5327792ab78f8515ece575639b02ddb70d4a73f Signed-off-by: Dmitry Tarnyagin <dmitry.tarnyagin@stericsson.com> Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/28492 Reviewed-by: Bartosz MARKOWSKI <bartosz.markowski@tieto.com> Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/28695 Tested-by: Bartosz MARKOWSKI <bartosz.markowski@tieto.com> Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/33503 Reviewed-by: Philippe LANGLAIS <philippe.langlais@stericsson.com>
2011-10-13cw1200: Missing interrupt detection.Dmitry Tarnyagin
Missing interrupt (or slow response?) was observed on wsm_reset() call. Indication: [ 106.596252] ADDRCONF(NETDEV_UP): wlan0: link is not ready [ 108.681884] WARNING: at kernel/net/compat-wireless/drivers/staging/cw1200/ap.c:654 cw1200_bss_info_changed+0x2dc/0x9f8 [cw1200_core]() ... [ 108.931396] WARNING: at kernel/net/compat-wireless/drivers/staging/cw1200/wsm.c:1141 wsm_handle_rx+0x9bc/0x9f4 [cw1200_core]() ... [ 109.021667] WARNING: at kernel/net/compat-wireless/drivers/staging/cw1200/bh.c:411 cw1200_bh+0x718/0x95c [cw1200_core]() [ 109.095275] [BH] Fatal error, exitting. The patch implements missing interrupt detection and also increases timeout for the wsm_reset() call. Change-Id: I3fb9ad92ab62bc1be831c835fd16a7c600793bb6 Signed-off-by: Dmitry Tarnyagin <dmitry.tarnyagin@stericsson.com> Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/28336 Reviewed-by: Bartosz MARKOWSKI <bartosz.markowski@tieto.com> Tested-by: Bartosz MARKOWSKI <bartosz.markowski@tieto.com> Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/33502 Reviewed-by: Philippe LANGLAIS <philippe.langlais@stericsson.com>
2011-10-13cw1200: Do join if upper layer is trying to TX in monitor mode.Dmitry Tarnyagin
Change-Id: Idf79762b48f37fc6ac315ef1cecdf3a28c2e38f4 Signed-off-by: Dmitry Tarnyagin <dmitry.tarnyagin@stericsson.com> Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/28326 Reviewed-by: Bartosz MARKOWSKI <bartosz.markowski@tieto.com> Tested-by: Bartosz MARKOWSKI <bartosz.markowski@tieto.com> Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/33501 Reviewed-by: Philippe LANGLAIS <philippe.langlais@stericsson.com>
2011-10-13cw1200: Allow proberesponse frame to be txedAjitpal.Singh
Added change for allowing probe response frame to be txe'ed Probe Resp frames are generated by the supplicant during p2p find process. Change-Id: If36fb07d3aabf38870e32f4c7ce21a317551badb Signed-off-by: Dmitry Tarnyagin <dmitry.tarnyagin@stericsson.com> Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/28272 Tested-by: Janusz DZIEDZIC <janusz.dziedzic@tieto.com> Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/33499 Reviewed-by: Bartosz MARKOWSKI <bartosz.markowski@tieto.com> Reviewed-by: Philippe LANGLAIS <philippe.langlais@stericsson.com>
2011-10-13cw1200: Minor fixes.Dmitry Tarnyagin
* Driver unloading without prior "ifconfig wlan0 down" caused warnings in cw1200_remove_interface() and cw1200_setup_mac(). * Entering SoftAP mode caused a warning in cw1200_set_tim_impl(). * Scan request failed with timeout if current BSS was out of range. * wsm_set_pm is failing if scanned BSS is out of range, and it is not a fault. * Some state wariables were not reset to initial state in cw1200_stop(). ST-Ericsson ID: ER354873 ST-Ericsson ID: ER354919 Change-Id: I7f12748c0570de5c6f25aa8bf83b6012b44d87de Signed-off-by: Dmitry Tarnyagin <dmitry.tarnyagin@stericsson.com> Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/28232 Reviewed-by: Bartosz MARKOWSKI <bartosz.markowski@tieto.com> Tested-by: Bartosz MARKOWSKI <bartosz.markowski@tieto.com> Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/33496 Reviewed-by: Philippe LANGLAIS <philippe.langlais@stericsson.com>
2011-10-13cw1200: Fix for buffered multicasts in AP-PS mode: bugfix.Dmitry Tarnyagin
Bugfix of Change-Id I15b134bf847913a907f00293ae99d7a71bbc7343. + Locking semantic is simplified. + Overcomplicated check of aid0_bit_timestamp removed: FW is doing it. + wsm_get_tx_queue_and_mask() mistakely ignored suspend_multicast. Change-Id: I0152fefd167dbb8a6fdc8dd8f5582b10fb645006 Signed-off-by: Dmitry Tarnyagin <dmitry.tarnyagin@stericsson.com> Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/28152 Reviewed-by: Bartosz MARKOWSKI <bartosz.markowski@tieto.com> Tested-by: Bartosz MARKOWSKI <bartosz.markowski@tieto.com> Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/33492 Reviewed-by: Philippe LANGLAIS <philippe.langlais@stericsson.com>
2011-10-13cw1200: Off-channel sending of action frames is implemented.Dmitry Tarnyagin
Action frames sending is required for P2P group negotiation. Due to firmware limitation TXing is possible only when device is "joined" (logically linked) to the AP. Join with "force" flag is used for sending action frames. Change-Id: Ic52b181f4b22d527dda27d0185b1ecc4ba488efe Signed-off-by: Dmitry Tarnyagin <dmitry.tarnyagin@stericsson.com> Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/27775 Reviewed-by: Bartosz MARKOWSKI <bartosz.markowski@tieto.com> Tested-by: Bartosz MARKOWSKI <bartosz.markowski@tieto.com> Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/33489 Reviewed-by: Philippe LANGLAIS <philippe.langlais@stericsson.com>
2011-10-13cw1200: Fix for buffered multicasts in AP-PS mode.Dmitry Tarnyagin
Refactoring of multicast handling: * When multicast is coming, driver sets aid0 bit in TIM IE and puts multicas in the queue with "AFTER_DTIM" link id. * When WSM indicates DTIM beacon, driver verifies if aid0 indicating beacon was sent and sends buffered multicasts. * Driver clears aid0 bit in the TIM IE when no more multicasts are available. + A stilistic change: 1 << shift is replaced by BIT(shift) Change-Id: I15b134bf847913a907f00293ae99d7a71bbc7343 Signed-off-by: Dmitry Tarnyagin <dmitry.tarnyagin@stericsson.com> Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/27306 Reviewed-by: Bartosz MARKOWSKI <bartosz.markowski@tieto.com> Tested-by: Bartosz MARKOWSKI <bartosz.markowski@tieto.com> Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/33488 Reviewed-by: Philippe LANGLAIS <philippe.langlais@stericsson.com>
2011-10-13cw1200: Fix for firmware exception on requeued TXed frames.Dmitry Tarnyagin
TX sequence number was not cleared properly in requeued frames. Firmware checked it and triggered exception. Fix clears TX sequence part of id field before applying (or-ing) a new sequence number. Also handling of TX confirmation frames with "requeue" status was slightly changed with respect to PS flow control (suspend/resume link). Note that multicast TX-ing in SoftAP mode still be completly broken, to be fixed later. Signed-off-by: Dmitry Tarnyagin <dmitry.tarnyagin@stericsson.com> Change-Id: I4eacfa3e6cf8dc6e63e161489977228d8016c8d8 Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/27305 Reviewed-by: Bartosz MARKOWSKI <bartosz.markowski@tieto.com> Tested-by: Bartosz MARKOWSKI <bartosz.markowski@tieto.com> Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/33485 Reviewed-by: Philippe LANGLAIS <philippe.langlais@stericsson.com>
2011-10-13cw1200: Wakeup on wireless (WoW) is implemented.Dmitry Tarnyagin
+ Core and SDIO power management is implemented as defined in wireless-next v3.0-rc4. + SDD is cached to avoid disk access at suspend/resume time. TODO: - WoW conditions and filtering are not yet implemented. - BUG: Late interrupts (coming after suspend() callback but before the actual suspend) are not detected as wakeup sources. Universal (Android/GLK) way of waking up halfly-suspended system to be found. Signed-off-by: Dmitry Tarnyagin <dmitry.tarnyagin@stericsson.com> Change-Id: Ib4931a261e592f2927455e988055cd673250ec81 Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/27297 Tested-by: Bartosz MARKOWSKI <bartosz.markowski@tieto.com> Reviewed-by: Bartosz MARKOWSKI <bartosz.markowski@tieto.com> Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/33484 Reviewed-by: Philippe LANGLAIS <philippe.langlais@stericsson.com>
2011-10-12cw1200: Dynamic power save is offloaded to the firmware.Dmitry Tarnyagin
Signed-off-by: Dmitry Tarnyagin <dmitry.tarnyagin@stericsson.com> Change-Id: Iff214651c82fe1f7203f3ce016e7646e41cccc35 Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/27071 Reviewed-by: Bartosz MARKOWSKI <bartosz.markowski@tieto.com> Tested-by: Bartosz MARKOWSKI <bartosz.markowski@tieto.com> Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/33478 Reviewed-by: Philippe LANGLAIS <philippe.langlais@stericsson.com>
2011-10-05cw1200: Multi-tx confirmation is implemented.Dmitry Tarnyagin
Multi-tx offloads SDIO interface by reducing number of TX confirm messages. Multiple PDUs are acknowledged by a single multi-tx confirm message. Change-Id: Ie152a2dc9fc3ca18e2a8042965f626a6c2ec6409 Signed-off-by: Dmitry Tarnyagin <dmitry.tarnyagin@stericsson.com> Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/24478 Reviewed-by: Robert MARKLUND <robert.marklund@stericsson.com> Tested-by: Robert MARKLUND <robert.marklund@stericsson.com> Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/25618 Reviewed-by: Philippe LANGLAIS <philippe.langlais@stericsson.com>
2011-10-05cw1200: fix for locked datapath after deauth.Dmitry Tarnyagin
When AP sent more than one deauth requests in a row, datapath was remaining locked after deauthentication/unjoin. Result code of queue_work() was not checked and datapath was not unlocked if unjoin_work was already pending execution. Signed-off-by: Dmitry Tarnyagin <dmitry.tarnyagin@stericsson.com> Change-Id: I9c8394acd75e1aa828fad04c33bda118893ba031 Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/25615 Reviewed-by: Philippe LANGLAIS <philippe.langlais@stericsson.com>
2011-10-05cw1200: listening mode implementationDmitry Tarnyagin
Listening mode is required for off-channel operations (P2P use-cases). Listening is implemented as WSM Start with WSM_START_MODE_P2P_DEV. Change-Id: I1dd90c433a0eb557ec39b2684912e4c937fb84cf Signed-off-by: Dmitry Tarnyagin <dmitry.tarnyagin@stericsson.com> Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/23804 Reviewed-by: Bartosz MARKOWSKI <bartosz.markowski@tieto.com> Reviewed-by: Philippe LANGLAIS <philippe.langlais@stericsson.com>
2011-10-05wlan: cw1200: .flush mac80211 API is implemented.Dmitry Tarnyagin
- .flush mac80211 API is implemented (expected to be called from mac80211 off_channel code). - TX queue statistics is implemented. Signed-off-by: Dmitry Tarnyagin <dmitry.tarnyagin@stericsson.com> Change-Id: If228ceccd856b699236999122c9989d0eca1e98d Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/23604 Reviewed-by: Philippe LANGLAIS <philippe.langlais@stericsson.com>
2011-10-05cw1200: Spin lock usage review.Dmitry Tarnyagin
Expensive spin_lock_irqsave calls are replaced by more adequate spin_lock / spin_lock_bh. Locking strategy: queue: spin_lock_bh event_queue: spin_lock tx_policy: spin_lock_bh wsm_cmd: spin_lock sdio handlers: spin_lock_irqsave Signed-off-by: Dmitry Tarnyagin <dmitry.tarnyagin@stericsson.com> Change-Id: I3a13ef337ac125c0533de00651e54a4b4a45ba16 Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/23603 Reviewed-by: Bartosz MARKOWSKI <bartosz.markowski@tieto.com> Reviewed-by: Philippe LANGLAIS <philippe.langlais@stericsson.com>
2011-10-05WLAN: CW1200: Support for HREF/HREFV60/Snowball.Dmitry Tarnyagin
1. Added support for HREF/HREFV60/Snowball platforms. 2. Configuration cleanup. Signed-off-by: Dmitry Tarnyagin <dmitry.tarnyagin@stericsson.com>
2011-10-05WLAN: CW1200: Power management is implemnted.Dmitry Tarnyagin
Power management is on in this commit. Device is configured in quiescent mode when idle and in dose mode when operating. BH always checks if device is awake before trying to access it. Timeout for putting device back to sleep is 1 second after last device access. Verification with WSM_A21.05.0288 shows that device is staying awake even in quiescent mode. Bug in firmware? To be investigated. Signed-off-by: Dmitry Tarnyagin <dmitry.tarnyagin@stericsson.com>
2011-10-05WLAN: Initial commit of the STM CW1200 WLAN driver.Dmitry Tarnyagin
LL IO API is defined and implemented. TX queue is designed and implemented. WSM API subset is defined. mac80211 API is implemented partly. FW downloading is working. BH is _not_ implemented. RX BH is implemented. 1. RX WSM API is defined and stubs are created. 2. RX BH is implemented (not verifiyed yet). Reference WSM API implementation. wsm_configuration / wsm_configuration_confirm. Not veryfied yet. BH and WSM TX, basic WSM notification. Device startup is finished. TODO at mac80211 layer: - start - add_interface - config - config_tx - config_filter - hw_scan - remove_interface - stop TODO in general: - proper (random?) MAC address TODO in WSM: - datapath Basic mac80211 STA interface is implemented (not verified yet, but should be working). Random MAC address is implemented. Defined and implemented: - cw1200_start - cw1200_stop - cw1200_add_interface - cw1200_remove_interface - cw1200_config - cw1200_conf_tx FW code is moved to fwio.[hc] STA code is moved to sta.[hc] AP code is moved to ap.[hc] TODO: - configure_filter() - hw_scan() - datapath Some bugfix. Piggyback RX-ing. Bugbix: wrong buf_id_rx calculation. Finaly! RX datapath is implemented. TX datapath is implemented. HW scan is implemented. TODO: - hw_scan: little refactoring. I hate gotos. - Join - Unjoin - SKB pool - BH monitor / chip restarter Development. + Proper handling of scan IEs Join. TX/RX should be working now. Development. + Proper handling of scan IEs + Ping is working!!! (with some hacks) Development. + TX rate policy cache is implemented. + TX rate policy table uploading is implemented. + TX queues stop/resume. + WSM STA API (except MIBs) is 100% finished. + Direct TX-ing of probe requests is converted to start-scan WSM cmd (workaround against FW "feature"). + All work moved to an own workqueue. + Scan timeout is implemented (workaround against a known bug in FW). + set_key is implemented. TODO: - Full WSM API support. - Join refactoring - Assoc status updates. Verification and bugfixing. + Direct probe is verified. Some bugs fixed. + TX timeout is implemented... and rolled back: no way to cancel TX. + TX hang is fixed: FW hangs if tx->more is set but no more data available. + TX rate table uploading is moved into a separate workitem: can't schedule in datapath. + TX status reporting is enabled. + Removed hacks from Join: should be able to connect to any AP now. + TX rate cache bugfix: incorrect handling of policies like 100000000008900000000000. + TX rate cache optimization: upload only changed policies. + Unjoin is implemented for TX and RX. + Join is triggered for auth. frames only. + Join timeout is implemented. + wsm_set_bss_params is called from assoc notification. + wsm_set_association_mode is called from assoc notification. + set_beacon_wakeup_period is called from assoc notification. + HT information is now available in priv->ht_cap, priv->association_mode + CTS protection is set. + RTS threshold is set and verified. + Warning cleanup. + TODOs for compat-wireless-2010-07-16 API change. + Very basic RSSI subscription. However reporting is NIY. + Some bugfix for minestrel. F.e. policy like 10:9 11:9 0:1 0:1 -1:0 should be handled ok. + MaxTxCount (short/long) is implemented and verified. + Channel switch is protected now. + OverrideInternalTxRate is implemented.. and rolled back: internal rate controlselection is better. TODO: - Security is not validated yet - Set HT parameters of TX data according to priv->ht_cap, priv->association_mode. - Strange: set_beacon_wakeup_period is called with DTIM 1 always. Why??? - RSSI subscription events. - How to do unjoin? Style changes. Modifications to make the code compatible with checkpath. Not finished yet. 1. // -> /* */ 2. whitespaces 3. formatting 4. warning- & error fix No functional changes in the commit. Verification. + RSSI reporting is working. + WEP is working. Dynamic WEP key switching is implemented to select TX WEP key on-fly + WPA/CCMP and WPA2/CCMP are working. + WPA/TKIP and WPA2/TKIP are working. + MIC failure event is implemented. + Unjoin is implemented as a reset. Why not? + wsm_flush_tx() added to flush TX port after wsm_lock_tx_async(). + race condition in wsm_lock_tx()/wsm_flush_tx() is fixed. + RSSI subscription is under research. + Event reporting is implemented. + Beacon loss event is prepared (but not sent) + Link loss is implemented. TODO: On target.. + Bugfix: DMA from non-DMAble memory in FW downloading. + RSSI subscription is finished. + RSSI event reporting is implemented. + Beacon loss event is reimplemented with respect to scan. + Memory leak in WSM event processing is fixed. + Code is verified on target. Set CW1200_U8500_PLATFORM to build for target. + Scan turns on powersave to prevent AP from TXing. + Spinning of direct_probe work is fixed. + Workaround is implemented for "FIXME: we can't use 'more' at all: we don't know future." TODO: Verification on device. + Correct deinitialization of async work. + New WSM API. + WMM is verified and fixed (queue prioritization). + Bug in TX is fixed (freezing of TCP traffic). + STE CQM extensions are implemented. + HW revision detection is implemented. + A crash/hangs in scan is fixed. + 802.11 slot time is set + 11n: first steps: Mixed mode is working. + 11n: Block ACK config. + Keep-alive work is implemented (but it is not doing anything yet). TODO: - Copyright statements and COPYING - STE API for power-save - Need to deinit bt_thread, isn't it? Copyright statements and bt_thread deinitialization. + Copyright statements + bt_thread deinitialization (NOT TESTED ON DEVICE AT ALL!!!) Cumulative TODO: - COPYING - STE API for power-save - Set HT parameters of TX data. 11n verification. - SKB pool - reuse previously allocated SKBs - BH monitor / chip restarter - IBSS - AP mode - U-APSD configuration - Memory leak verification, coverity, checkpatch = It looks like that's it. Mainline to compat-wireless-20010-12-03 No functional changes in this commit. + Changes in compat-wireless API. + Changes in kerner API. + Changes in kernel header structures. TODO: - New code in cw1200_bss_info_changed() needs to be verified. - ht_operation_mode needs to be cached in priv. Some HT refactoring. + ht_operation_mode is cached in priv + channel_type is cached in priv + New header for HT-related code: ht.h + Greenfield mode is used for TX if possible. + HT flags are reported back to rate control correctly. TODO: - Verify A-MPDU factor settings in cw1200_band_2ghz. SKB cache is implemented. Firmware loading refactoring. + CUT 2.0 detection is implemented. + Standard firmware loading API is used. + Firmware loading path is changed to /lib/firmware/cw1200/ + Firmware is put to the project: ./firmware/ TODO: - Firmware copying at build time. Bringup after mainlining. + FW downloading is working now. TODO: - BH thread can't read data block from device. Init: removing GPIO toggling. Not needed anymore. WLAN: Fix for missing GPIO_HIGH, GPIO_LOW The patch defines CW1200_GPIO_{HIGH|LOW} as replacement of GPIO_{HIGH|LOW}, which might be absent on the target platform. Also it allows build without compat wireless tree. Added cw1200 to drivers/staging Kconfig and Makefile. Added two CONFIG_ flags: + CONFIG_CW1200 - Enables the generic cw1200 module + CONFIG_CW1200_U8500_PLATFORM - U8500 platform integration Removed binary firmware files, they do not belong in the kernel tree. Added TODO file for cw1200 staging driver. Added more help text to Kconfig Removed checkpatch warnings. There is still one left. Removed all checkpatch warnings for cw1200.h Removed checkpatch warnings from cw1200_stdio.c. There is still one left. Removed checkpatch warnings for fwio.h Removed checkpatch warning for hwio.c Removed checkpatch warnings for main.c There are still some warninges left. Removed checkpatch warnings from queue.c There are still some warnings left Removed checkpatch warnings for queue.h Removed checkpatch warnings for sbus.h Removed checkpatch warnings for scan.c Removed checkpatch warnings for scan.h Removed checkpatch warnings for sta.c Removed checkpatch warnings for txrc.c Removed checkpatch warnings for txrx.h Removed checkpatch warnings from wsm.c Lots of "line over 80 char..." warnings left. Minor checkpatch warning cleanup on wsm.c WLAN: CW1200: Development: SoftAP mode WLAN: CW1200: AP development. + Basic open AP is woking (prototyping done). TODO: - Check AP scan & assoc with sniffer - WSM API: TxPowerLevel in scan requests. - WSM API: Frame in TX and RX indication. - WSM API: Flags in set_bss_params. - WSM API: IGTKGroupKey in key info. - WSM API: MultiTX confirm - WSM API: Config block ACK - WSM API: BA timeout indication. CW1200: WLAN: Fix for a merge error. This commit fixes build error introduced by WLAN: CW1200: AP development. WLAN: CW1200: Fix for a warning in net/mac80211/rx.c WLAN: CW1200: Add / remove key refactoring for AP mode. Keys are cached in the driver and loaded after wsm_start() is called. Verified (AP mode): + Open security: OK + WEP40: OK + WEP104: FAIL (WSM_STATUS_DECRYPTFAILURE) + CCMP: FAIL (MIC failure detected by STA. STA->AP decrypted OK) + TKIP: FAIL (MIC failure detected by STA. STA->AP decrypted OK) WLAN: CW1200: Proper handling of stop request in the AP mode. WLAN: CW1200: Firmware-driven keep-alive is implemented. CW1200: SDIO card detection is implemented. Removed dependency to u8500_sdio_detect_card(). New moule parameter "device" is implemented to point to the SDIO interface device is connected to. WLAN: CW1200: Checkpatch cleanup. + wsm.c is cleared. + sta.c is cleared. + ap.c is cleared. + bh.c is cleared. + cw1200_sdio.c is cleared. + main.c is cleared. + queue.c is cleared. + scan.c is cleared. + txrx.c is cleared. + cw1200.h is cleared. + hwio.h is cleared. + ht.h is cleared. + wsm_get_tx is (finally!) redesigned. TODO: - wsm.h WLAN: CW1200: Checkpatch cleanup. + wsm.h is cleared. Code is ready for submission. WLAN: CW1200: Module parameter for MAC address. New module parameter for cw1200_core.ko: "macaddr". Usage: modprobe cw1200_core macaddr=0x00,0x80,0xE1,0x30,0x40,0x50 Random MAC address by default. WLAN: CW1200: Fix for a crash in skb_release_data(). WLAN: CW1200: Fix for a too short WSM timeout in stressed condition. WLAN: CW1200: Bugfix after regression testing. Datapath is verified (several gigabytes of downloaded data). WLAN: STA mode development. + AP API sta_add/sta_semove is implemented. + wsm_suspend_resume_indication is implemented. + Unique link ID is allocated for STAs in AP mode as WSM requires. + wsm_map_link is implemented. + wsm_reset is modified to support multiple link IDs. + cw1200_suspend_resume handler is implemented in the ap.c. + no more hardcoded SSIDs + Debug logs functionality is exposed to the kernel config. + Suspend / resume is supported by queue. + TKIP multicast TX (AP mode) is fixed. TODO: - AP mode with powersave is not verified. WLAN: Support for non-power-of-two SDIO transfer. WLAN: AP mode verification and bugfixing. + Fix for broken broadcasts. + Redesign of PS implementation in AP mode. + set_tim() is implemented. + sta_notify() is implemented. WLAN: IV/ICV injection fixed. Fixed: skb was modified prior to sanity check. There is also a workaround against a bug in WSM_A21.05.0288 firmware in this commit. In AP mode FW calculates FCS incorrectly when DA is FF:FF:FF:FF:FF:FF (was seen with TKIP and CCMP security). Workaround checks DA and replaces FF:FF:FF:FF:FF:FF with multicast address 01:00:5E:00:00:16. Workaround is disabled by #if 0 (can be used only for verification, should not be enabled in production). WLAN: Disabling debug printouts (STA/AP). WLAN: Updating u8500_defconfig with CW1200 driver. WLAN: AP mode fine-tuning. + Explicitly set broadcast bit in TIM when broadcasts are available. + Split handling of management frames (link ID = 0) and buffered multicasts (link ID = CW1200_LINK_ID_AFTER_DTIM) Signed-off-by: Dmitry Tarnyagin <dmitry.tarnyagin@stericsson.com>