summaryrefslogtreecommitdiff
path: root/drivers/net/wireless (follow)
Commit message (Collapse)AuthorAge
...
* | | | wil6210: fix race conditions between TX send and completionMaya Erez2016-06-08
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There are 2 possible race conditions, both are solved by addition of memory barrier: 1. wil_tx_complete reads the swhead to determine if the vring is empty. In case the swhead was updated before the descriptor update was performed in __wil_tx_vring/__wil_tx_vring_tso, the completion loop will not end and as the DU bit may still be set from a previous run, this skb can be handled as completed before it was sent, which will lead to double free of the same SKB. 2. __wil_tx_vring/__wil_tx_vring_tso calculate the number of available descriptors according to the swtail. In case the swtail is updated before memset of ctx to zero is completed, we can handle this descriptor while later on ctx is zeroed. Change-Id: Ia6584de897c366032251033aa8e03c54e9d899bb Signed-off-by: Maya Erez <qca_merez@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com> Git-commit: eb26cff148f5449972121e46e403f549d71f6f49 Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git CRs-Fixed: 1015627 Signed-off-by: Maya Erez <merez@codeaurora.org>
* | | | wil6210: add support for device led configurationMaya Erez2016-06-07
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add the ability to configure the device led to be used for notifying the AP activity (60G device supports leds 0-2). The host can also configure the blinking frequency of the led in three states. Change-Id: I3b7770b0cbaec634ca566a82ccc648b6835d75a0 Signed-off-by: Maya Erez <qca_merez@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com> git-commit: 10d599ad84a1b98450c8867ce548ea4bf0f6df1a Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git CRs-Fixed: 1015627 Signed-off-by: Maya Erez <merez@codeaurora.org>
* | | | wil6210: prevent deep sleep of 60G device in critical pathsMaya Erez2016-06-07
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In idle times 60G device can enter deep sleep and turn off its XTAL clock. Host access triggers the device power-up flow which will hold the AHB during XTAL stabilization until device switches from slow-clock to XTAL clock. This behavior can stall the PCIe bus for some arbitrary period of time. In order to prevent this stall, host can vote for High Latency Access Policy (HALP) before reading from PCIe bus. This vote will wakeup the device from deep sleep and prevent deep sleep until unvote is done. Change-Id: Ic6bbe8b2aee53d019013159cd21597c2fa0f298f Signed-off-by: Maya Erez <qca_merez@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com> git-commit: 349214c1e7d718684e19dc3559dffe4e62f55296 Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git CRs-Fixed: 1015627 Signed-off-by: Maya Erez <merez@codeaurora.org>
* | | | wil6210: unmask RX_HTRSH interrupt only when connectedMaya Erez2016-06-07
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | RX_HTRSH interrupt sometimes triggered during device reset procedure. To prevent handling this interrupt when not required, unmask this interrupt only if we are connected and mask it when disconnected. Change-Id: I9fa0e28d91d0962fc7f05b2cf92c99c2431a2295 Signed-off-by: Maya Erez <qca_merez@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com> Git-commit: 54eaa8c69e72dca4c824cd390b616cb48b2c4e30 Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git CRs-Fixed: 1015627 Signed-off-by: Maya Erez <merez@codeaurora.org>
* | | | wil6210: print debug message when transmitting while disconnectedMaya Erez2016-06-07
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Network stack can try to transmit data while AP / STA is disconnected. Change this print-out to debug level as this should not be handled as error. This patch also adds wil_dbg_ratelimited, used to limit the above print-out. Change-Id: I41eecc91730c60a1851969f8fecf7c201b8b2050 Signed-off-by: Maya Erez <qca_merez@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com> Git-commit: d8ed043accdee611bce8be7c4224b4e26bdc2ab5 Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git CRs-Fixed: 1015627 Signed-off-by: Maya Erez <merez@codeaurora.org> [merez@codeaurora.org: fixed merge conflicts]
* | | | wil6210: change RX_HTRSH interrupt print level to debugMaya Erez2016-06-07
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When using interrupt moderation RX_HTRSH interrupt can occur frequently during high throughput and should not be considered as error. Such print-outs can degrade the performance hence should be printed in debug print level. Change-Id: I570b66886edf949c3d77027d0dc8baf820c5cf0f Signed-off-by: Maya Erez <qca_merez@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com> Git-commit: b523d35b5bffda70bf149cb6ae87c7eb1013dcdd Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git CRs-Fixed: 1015627 Signed-off-by: Maya Erez <merez@codeaurora.org>
* | | | wil6210: support regular scan on P2P_DEVICE interfaceLior David2016-06-07
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | P2P search can only run on the social channel (channel 2). When issuing a scan request on the P2P_DEVICE interface, driver ignored the channels argument and always performed a P2P search. Fix this by checking the channels argument, if it is not specified (meaning full scan) or if a non-social channel was specified, perform a regular scan and not a P2P search. Change-Id: If1cdfdb2086ff7e3dbf02e9a5920ef3ed0a31280 Signed-off-by: Lior David <qca_liord@qca.qualcomm.com> Signed-off-by: Maya Erez <qca_merez@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com> Git-commit: 321a000bfadd5535089a198b42d714a8bf8469b7 Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git CRs-Fixed: 1015627 Signed-off-by: Maya Erez <merez@codeaurora.org>
* | | | wil6210: add function name to wil log macrosMaya Erez2016-06-07
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add __func__ to wil_err and wil_info for easier debugging. Signed-off-by: Maya Erez <qca_merez@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com> Git-commit: 290206fa7e04ea4c1620aea2624e4d998bc27a0a Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git CRs-Fixed: 1015627 Signed-off-by: Maya Erez <merez@codeaurora.org> [merez@codeaurora.org: fixed merge conflicts] Change-Id: Ib7ff8f1debd6873069df42efd7d832db64701258
* | | wil6210: allow empty WMI commands in debugfs wmi_sendLior David2016-05-31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There are many valid WMI commands with only header without any additional payload. Such WMI commands could not be sent using the debugfs wmi_send facility. Fix the code to allow sending of such commands. Change-Id: I581e099db5d2ee81be4345101aa54352b1d9564f Signed-off-by: Lior David <qca_liord@qca.qualcomm.com> Signed-off-by: Maya Erez <qca_merez@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com> Git-commit: 69218a48005d0c93b8e9ec483f42ead481a43034 Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git CRs-Fixed: 1015627 Signed-off-by: Maya Erez <merez@codeaurora.org>
* | | net: cnss: add dual cnss platform driver support for dual WiFiSarada Prasanna Garnayak2016-05-31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For dual WiFi both cnss sdio and pcie platform needs to be enabled. Added changes below to support dual platform driver for dual WiFi. Refactor the common api and data structure to avoid namespace collision compilation error. Refactor sdio and pcie bus specific kernel api and removed conditional compilation config flag. The platform driver at run time identifies the wlan bus type from the PHY device pointer passed by the wlan driver through vos api and cnss platform driver redirects the cnss api according the bus type. Remove conditional compilation flag from cnss common api and update cnss makefile for dual platform driver compilation with single config flag. CRs-Fixed: 988871 Change-Id: I8205c2979c857c2f3845ba2dc397d2f9dd1afa3b Signed-off-by: Sarada Prasanna Garnayak <sgarna@codeaurora.org> Signed-off-by: Ryan Hsu <ryanhsu@codeaurora.org>
* | | net: cnss: remove redundant and dead code from platform driverSarada Prasanna Garnayak2016-05-31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The cnss subsystem restart and pm qos export API has been refactor in respective platform driver according to the bus type SDIO/PCIe. Remove redundant and dead code from platform driver to avoid the namespace collision compilation error. Refactor the recovery work handler according to bus type. This feature adds support for dual cnss platform driver support for dual WiFi. CRs-Fixed: 987560 Change-Id: I0e1b5ff0e9970a40ad9d0619dcb7f8cbae241656 Signed-off-by: Sarada Prasanna Garnayak <sgarna@codeaurora.org>
* | | net: cnss: add bus bandwidth support for sdio wlan moduleSarada Prasanna Garnayak2016-05-31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add cnss sdio platform driver support to vote for bus bandwidth as per throughput requirement from wlan driver. The cnss sdio platform driver export bus bandwidth api for wlan host driver. CRs-Fixed: 990173 Change-Id: Ied2e5a78487b6f6076cd19f32c959a69050e055c Signed-off-by: Sarada Prasanna Garnayak <sgarna@codeaurora.org>
* | | wil6210: add oob_mode module parameterLior David2016-05-27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add module parameter oob_mode. Takes effect the next time the interface is brought up and FW is loaded. Puts the FW in special "out of the box" (OOB) mode which is used for diagnostics and certification. Change-Id: I561e4ab26c8ac74d6fbcf19492b01751033b64d9 Signed-off-by: Lior David <qca_liord@qca.qualcomm.com> Signed-off-by: Maya Erez <qca_merez@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com> Git-commit: 1f1a361abf73edfb94ca010c51587de378bc7c68 Git-repo: https://github.com/kvalo/ath.git CRs-Fixed: 982931 Signed-off-by: Maya Erez <merez@codeaurora.org>
* | | wil6210: pass is_go flag to firmwareLior David2016-05-27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When starting a PCP, pass the is_go flag to firmware in wmi_pcp_start. This flag indicates whether we started a PCP which is also a GO(P2P group owner) or just a regular PCP. Change-Id: I619abba9ef6e6fda3ea5fecd5ee87652b8ef37a5 Signed-off-by: Lior David <qca_liord@qca.qualcomm.com> Signed-off-by: Maya Erez <qca_merez@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com> Git-commit: b4944f2c081ea0e2fa7bc8bb510e1e6e5667f30b Git-repo: https://github.com/kvalo/ath.git CRs-Fixed: 982931 Signed-off-by: Maya Erez <merez@codeaurora.org>
* | | wil6210: fix no_fw_recovery mode with change_virtual_intfLior David2016-05-27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When FW crashed with no_fw_recovery mode enabled, user space could still call wil_cfg80211_change_iface quickly to change interface type, and this would cause recovery to proceed and FW crash logs may be lost. Fix this problem by not resetting the FW in case no_fw_recovery is enabled. Change-Id: I139a5e846555e30666f96675400c6db6e1999e05 Signed-off-by: Lior David <qca_liord@qca.qualcomm.com> Signed-off-by: Maya Erez <qca_merez@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com> git-commit: 375a173fc1524eb569c7e8f9cf331126a9d29033 Git-repo: https://github.com/kvalo/ath.git CRs-Fixed: 982931 Signed-off-by: Maya Erez <merez@codeaurora.org>
* | | wil6210: clean ioctl debug messageLior David2016-05-27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix a debug message related to IOCTL that was incorrectly logged with the MISC category, and move it inside wil_ioctl so it will always be logged even if we call wil_ioctl from other places. Change-Id: I3cf69b18f195e5db01a1f5832013342c9f481286 Signed-off-by: Lior David <qca_liord@qca.qualcomm.com> Signed-off-by: Maya Erez <qca_merez@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com> Git-commit: 6777e71ca91ea488488362a919900488e0ade3f2 Git-repo: https://github.com/kvalo/ath.git CRs-Fixed: 982931 [merez@codeaurora.org: fixed conflict due to android private ioctl] Signed-off-by: Maya Erez <merez@codeaurora.org>
* | | wil6210: fix race conditions in p2p listen and searchLior David2016-05-27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix 2 race conditions found during test runs of P2P discovery: 1. Because wil_p2p_cancel_listen was not protected, user space could start a new P2P listen/search before wmi_stop_discovery completed. This caused a crash in the firmware. 2. In P2P listen, when listen timer expires and user space calls cancel_remain_on_channel at the same time, code could send the cfg80211_remain_on_channel_expired notification twice. Added protections with wil->mutex to several places that call wmi_stop_discovery. Change-Id: I692113c222f278d6c4d4c282b4df0e28b0933556 Signed-off-by: Lior David <qca_liord@qca.qualcomm.com> Signed-off-by: Maya Erez <qca_merez@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com> Git-commit: 280ab987ef21d1c196acb3af4663a99f94d9da00 Git-repo: https://github.com/kvalo/ath.git CRs-Fixed: 982931 Signed-off-by: Maya Erez <merez@codeaurora.org>
* | | wil6210: P2P_DEVICE virtual interface supportLior David2016-05-27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Added support for the P2P_DEVICE virtual interface. This interface is intended for P2P management operations such as discovery and GO negotiation. Normally it is implemented by drivers to allow a separate interface for P2P management with its own MAC address, but for 11ad drivers it is needed to support P2P search, since it cannot otherwise be separated from normal scan. Since we only support a single interface/MAC address, we can't easily separate between primary and P2P_DEVICE interfaces. For example when a management packet arrives we can't tell for which interface it is intended. To work around this, we store a pointer to the interface where the last "radio operation" was triggered such as scan or remain on channel, and we forward management packets and scan results to this interface. Change-Id: Ief04b007c0507f9240d8f0b02b98fe7712213a0e Signed-off-by: Lior David <qca_liord@qca.qualcomm.com> Signed-off-by: Maya Erez <qca_merez@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com> Git-commit: 4332cac17b5c0cb80d8b99fda33a0faad3238b0e Git-repo: https://github.com/kvalo/ath.git CRs-Fixed: 982931 [merez@codeaurora.org: conflict in wil_cfg80211_add_iface definition] Signed-off-by: Maya Erez <merez@codeaurora.org>
* | | wil6210: p2p initial supportDedy Lansky2016-05-27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | supporting p2p_find, p2p_listen and p2p_connect Use updated cfg80211_get_bss API (additional argument) Change-Id: I847ccd10da574bdc83c7eec8c8315c4e0d207d8b Signed-off-by: Dedy Lansky <qca_dlansky@qca.qualcomm.com> Signed-off-by: Lior David <qca_liord@qca.qualcomm.com> Signed-off-by: Maya Erez <qca_merez@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com> Git-commit: e6d68341e7286386451adf14cebb635a52b0effe Git-repo: https://github.com/kvalo/ath.git CRs-Fixed: 982931 Signed-off-by: Maya Erez <merez@codeaurora.org>
* | | wil6210: basic PBSS/PCP supportLior David2016-04-12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | PBSS (Personal Basic Service Set) is a new BSS type for DMG networks. It is similar to infrastructure BSS, having an AP-like entity called PCP (PBSS Control Point), but it has few differences. For example, stations inside a PBSS can communicate directly, and the PCP role can be transferred between stations. This change adds PBSS support, and has 2 main parts: 1. When starting an AP, add an option to start as a PCP instead. This is implemented by a new PBSS flag which is passed as part of the cfg80211_ap_settings structure. 2. When connecting to a BSS, add an option to connect to a PCP instead of an AP. This is again implemented by a new PBSS flag, added to the cfg80211_connect_params structure. Change-Id: Ibfcbeb2df9857fecab4d42f0725d70d2a2fa4b98 Signed-off-by: Lior David <qca_liord@qca.qualcomm.com> Signed-off-by: Maya Erez <qca_merez@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com> Git-commit: eabb03b4a37cc7945ca62453402c74a0622e5a05 Git-repo: https://github.com/kvalo/ath.git CRs-Fixed: 982931 Signed-off-by: Maya Erez <merez@codeaurora.org>
* | | wil6210: disable PCIe relaxed orderingMaya Erez2016-04-05
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In previous commit cd958296acba ("wil6210: enable WA for PCIe HW errata") relaxed ordering (bit 5) was set, in addition to the 'No snoop" setting. Enabling relaxed ordering can cause a race condition between the write transactions and interrupts when using INT instead of MSI. As relaxed ordering is not required to resolve the PCIe HW issue, it should be disabled. CRs-Fixed: 998870 Change-Id: I53113d6454de577d4e68f226975a078889d6b2c3 Signed-off-by: Maya Erez <merez@codeaurora.org>
* | | cfg80211: basic support for PBSS network typeLior David2016-04-05
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | PBSS (Personal Basic Service Set) is a new BSS type for DMG networks. It is similar to infrastructure BSS, having an AP-like entity called PCP (PBSS Control Point), but it has few differences. PBSS support is mandatory for 11ad devices. Add support for PBSS by introducing a new PBSS flag attribute. The PBSS flag is used in the START_AP command to request starting a PCP instead of an AP, and in the CONNECT command to request connecting to a PCP instead of an AP. Change-Id: I9f26a8ff8433268240eb9443befadc0d279a0293 [liord@codeaurora.org: added missing attributes to nl80211.h that were added in upstream kernel before the PBSS attribute, in order to keep the ABI compatible] Signed-off-by: Lior David <liord@codeaurora.org> Signed-off-by: Johannes Berg <johannes.berg@intel.com> Git-commit: 00807f28573a101dc2833f0075e806b9874f306c Git-repo: https://github.com/kvalo/ath.git CRs-Fixed: 982931 Signed-off-by: Maya Erez <merez@codeaurora.org>
* | | wil6210: switch to generated wmi.hLior David2016-04-05
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Switch to auto-generated version of wmi.h which is maintained by FW team. This will allow better sync between teams in the future and avoid bugs because of unexpected API changes. The wmi.h will have many differences but most are cosmetic. It also includes these real differences: 1. is_go parameter added to BCON_CTRL and START_PCP commands. 2. max_rx_pl_per_desc added to CFG_RX_CHAIN command. 3. various small API updates that are not currently used by driver. Change-Id: I20921a97b02dce0507f58c4951ce539a2aae5597 Signed-off-by: Lior David <qca_liord@qca.qualcomm.com> Signed-off-by: Maya Erez <qca_merez@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com> Git-commit: b874ddecae0a087aee024ef808c63060434a2d50 Git-repo: https://github.com/kvalo/ath.git CRs-Fixed: 987415 Signed-off-by: Maya Erez <merez@codeaurora.org>
* | | wil6210: add support for discovery mode during scanLior David2016-04-05
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add support for discovery mode during scan. When discovery mode is active, station transmits special beacons while scanning. This can optimize the scan mainly when there is only one AP/PCP around. Discovery mode is implicitly used by firmware during P2P search. Since there is currently no use case where user space has a reason to directly control discovery mode, we expose it only through a debugfs flag. Also fix name confusion in the wmi_scan_type enumeration. The type previously called WMI_LONG_SCAN is actually WMI_ACTIVE_SCAN. Change-Id: I05b99ec66b0da41697f41c547aab0b0497dd9be6 Signed-off-by: Lior David <qca_liord@qca.qualcomm.com> Signed-off-by: Maya Erez <qca_merez@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com> Git-commit: 74997a53d257e327699e359b78b3ecfd33f80cab Git-repo: https://github.com/kvalo/ath.git CRs-Fixed: 982931 Signed-off-by: Maya Erez <merez@codeaurora.org>
* | | wil6210: replay attack detectionVladimir Kondratiev2016-04-05
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Check PN for encrypted frames. Maintain PN data for Rx keys, pairwise per TID and group. Print PN's in the debugfs "stations" entry, like: [0] 04:ce:14:0a:3c:3d connected [ 0] ([32] 0 TU) 0x0fe [____________________________|___] total 252 drop 0 (dup 0 + old 0) last 0x000 [ 0] PN [0+]000000000000 [1-]000000000000 [2-]000000000000 [3-]000000000000 [GR] PN [0-]000000000000 [1+]000000000000 [2+]000000000000 [3-]000000000000 Rx invalid frame: non-data 0, short 0, large 0, replay 0 Rx/MCS: 0 110 65 65 65 0 12 0 0 0 0 0 0 [1] 00:00:00:00:00:00 unused [2] 00:00:00:00:00:00 unused [3] 00:00:00:00:00:00 unused [4] 00:00:00:00:00:00 unused [5] 00:00:00:00:00:00 unused [6] 00:00:00:00:00:00 unused [7] 00:00:00:00:00:00 unused Change-Id: Ie6684664743694f004289da9ec041f685ec0c05e Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com> Signed-off-by: Hamad Kadmany <qca_hkadmany@qca.qualcomm.com> Signed-off-by: Maya Erez <qca_merez@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com> Git-commit: 58527421489dcc1110f6bcfd3b50d479199af4e0 Git-repo: https://github.com/kvalo/ath.git CRs-Fixed: 987415 [merez@codeaurora.org: add missing IEEE80211_GCMP_PN_LEN definition] Signed-off-by: Maya Erez <merez@codeaurora.org>
* | | wil6210: Set permanent MAC address to wiphyHamad Kadmany2016-04-05
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | MAC address of wil6210 was not set in wiphy Change-Id: I5018f40be6a71b4b8c7c3ee94c8e70cfa1fb373a Signed-off-by: Hamad Kadmany <qca_hkadmany@qca.qualcomm.com> Signed-off-by: Maya Erez <qca_merez@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com> Git-commit: b42f11963f7bd8c54d0a28d679c13d9e83b85357 Git-repo: https://github.com/kvalo/ath.git CRs-Fixed: 987415 Signed-off-by: Maya Erez <merez@codeaurora.org>
* | | wil6210: AP: prevent connecting to already connected stationMaya Erez2016-04-05
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | wmi_evt_connect doesn't check if the connect event is received for an already connected station. This can lead to memory leak as a new vring is allocated without freeing the previously allocated vring and to unexpected behavior of nl80211 layer due to unexpected notification of a new station. Add a check in wmi_evt_connect in AP mode to verify that the requested CID is not associated to an already connected station. Change-Id: I0e438d437154b1b47c572218072a736da5013c80 Signed-off-by: Maya Erez <qca_merez@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com> Git-commit: 3d287fb398c03189a1394778162f6404e4d44ad2 Git-repo: https://github.com/kvalo/ath.git CRs-Fixed: 982882 Signed-off-by: Maya Erez <merez@codeaurora.org>
* | | wil6210: remove BACK RX and TX workersMaya Erez2016-04-05
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | WMI synchronous handling has changed and WMI calls that provide a buffer for the reply are completed in the WMI interrupt context. This allows sending the RX and TX BACK commands from the WMI event handler without the need for the worker thread. This is a better approach as it can decrease the handshake time in the connect flow and prevent race conditions in case of fast disconnects. An example for such a race is handling of wil_back_rx_handle during a disconnect event, as wil_back_rx_handle is not protected by the wil mutex and a disconnect can be handled after sta->status is verified as connected. Change-Id: I7d6e3cf5e8abab45da5febc0129fb67830d9e6cb Signed-off-by: Maya Erez <qca_merez@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com> Git-commit: 361486b27c7e57dab657dbffd1e17818c7911c72 Git-repo: https://github.com/kvalo/ath.git CRs-Fixed: 982882 Signed-off-by: Maya Erez <merez@codeaurora.org>
* | | wil6210: add support for platform specific notification eventsMaya Erez2016-04-05
| | | | | | | | | | | | | | | | | | | | | | | | | | | Add the ability to notify the platform driver on different events, such as FW crash, pre reset and FW ready. Change-Id: I796b06fae4376cda792d7f26a430ad4580899846 CRs-Fixed: 986135 Signed-off-by: Maya Erez <merez@codeaurora.org>
* | | wil6210: TX vring optimizationHamad Kadmany2016-04-05
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Tx vring needs to be enlarged to get better performance for traffic over 2Gbps. Change-Id: Ia78ddf6f5243a8d28c3bfdfc29e0eb512658d0a7 Signed-off-by: Hamad Kadmany <qca_hkadmany@qca.qualcomm.com> Signed-off-by: Maya Erez <qca_merez@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com> Git-commit: ee5dfe0d240e21afe63bdd77bf1d4a386203aa6e Git-repo: https://github.com/kvalo/ath.git CRs-Fixed: 982882 Signed-off-by: Maya Erez <merez@codeaurora.org>
* | | wil6210: protect synchronous wmi commands handlingMaya Erez2016-04-05
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In case there are multiple WMI commands with the same reply_id, the following scenario can occur: - Driver sends the first command to the device - The reply didn’t get on time and there is timeout - Reply_id, reply_buf and reply_size are set to 0 - Driver sends second wmi command with the same reply_id as the first - Driver sets wil->reply_id - Reply for the first wmi command arrives and handled by wmi_recv_cmd - As its ID fits the reply_id but the reply_buf is not set yet it is handled as a reply with event handler, and WARN_ON is printed This patch guarantee atomic setting of all the reply variables and prevents the above scenario. Change-Id: I7eac78d7beb90436d24468547aeb789f7c8ec878 Signed-off-by: Maya Erez <qca_merez@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com> Git-commit: fe5c271e2878fb080f1b32fec5b4e3f7a6070152 Git-repo: https://github.com/kvalo/ath.git CRs-Fixed: 982882 Signed-off-by: Maya Erez <merez@codeaurora.org>
* | | wil6210: wait for disconnect completionVladimir Kondratiev2016-04-05
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | cfg80211_ops.disconnect() should wait for disconnect flow to complete. If it does not, internal state becomes out of sync with one in cfg80211. If one does stress test connect/disconnect sequence, cfg80211 will issue next connect before disconnect completed internally. Change-Id: I66a6a23239710c85b9cdb5824c205692c4b53866 Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com> Signed-off-by: Maya Erez <qca_merez@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com> Git-commit: 78771d76f826202012201d700028a2d866d03fb3 Git-repo: https://github.com/kvalo/ath.git CRs-Fixed: 982882 Signed-off-by: Maya Erez <merez@codeaurora.org>
* | | wil6210: prevent access to vring_tx_data lock during its initMaya Erez2016-04-05
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | wil_tx_vring locks the vring_tx_data lock before accessing the TX vring to check if it is enabled and valid for use. In case of quick disconnect / connect events for the same station, spin_lock(&txdata->lock) can be called during the lock initialization in the vring init function. To prevent such a race, the TX vrings spin lock should be initialized once during wil6210 driver initialization. Change-Id: I11fa67f7040c4a728f0cd7633f4fbb829ac165d0 Signed-off-by: Maya Erez <qca_merez@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com> git-commit: 875e94392ad2be9776c8325d3573160eb1455a2b Git-repo: https://github.com/kvalo/ath.git CRs-Fixed: 982882 Signed-off-by: Maya Erez <merez@codeaurora.org>
* | | cnss: Add Pinctrl Framework to control antenna sharing GPIO 38Komal Seelam2016-03-25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Initialize PinCtrl Framework for SDIO platforms to support antenna sharing. The antenna sharing is enabled only for platform which has PCIe QCA and SDIO QCA chipsets. CRs-Fixed: 990796 Change-Id: Ib3da0ce52ef46deae2ba49e4f39808effe18457d Signed-off-by: Komal Kumar <kseelam@codeaurora.org>
* | | net: cnss: add cnss common api support for dual WiFiSarada Prasanna Garnayak2016-03-25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add common api support of subsystem restart and bus bandwidth for dual wifi. This feature redirect the cnss export api according to the bus type SDIO/PCI. CRs-Fixed: 986275 Change-Id: Iaf13d6c6d68ef62b7e4f6581899ec8325c5e9696 Signed-off-by: Sarada Prasanna Garnayak <sgarna@codeaurora.org>
* | | wcnss: Access boot remap address registerSunkad, Anand Ningappa2016-03-25
| | | | | | | | | | | | | | | | | | | | | | | | | | | Dump boot remap address register for having more debug information about boot remap address for pronto. CRs-Fixed: 989321 Change-Id: I072718da718cc2553d0234af327662958e1758b9 Signed-off-by: Sunkad, Anand Ningappa <asunka@codeaurora.org>
* | | cnss: Implement API to store WLAN MAC address in platform driverKomal Seelam2016-03-25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | WLAN Functional Drivers Queries cnss platform driver to get the MAC Address. If the OEM doesn't provide the valid MAC address, the WLAN Driver fallbacks to use other approaches to get MAC address. This works under CONFIG_CNSS_MAC feature flag, which will be enabled only on the OEM platforms. For internal platforms, CNSS driver doesn't hold any valid mac addresses. CRs-Fixed: 985585 Change-Id: I1e8a030a32a640cec84cadd6b36b37938d5fe6be Signed-off-by: Komal Kumar <kseelam@codeaurora.org>
* | | net: cnss: add subsystem restart support for dual WiFiSarada Prasanna Garnayak2016-03-25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Subsystem device add support for subsystem restart recovery and ramdump device for cnss firmware dump collection before the subsystem restart. Refactor subsystem restart wrapper APIs to avoid the name space collision in cnss platform driver compilation in dual WiFi mode. CRs-Fixed: 983677 Change-Id: Ib4a8d1a6d0ce8f1faa43ce0aa8312823b1ca3c15 Signed-off-by: Sarada Prasanna Garnayak <sgarna@codeaurora.org>
* | | net: cnss: add PM QoS support for dual WiFiSarada Prasanna Garnayak2016-03-25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | PM QoS adds support to improve the wlan throughput. The cnss platform driver export PM QoS API to wlan host driver. Refactor PM QoS wrapper APIs to avoid the name space collision in cnss platform driver compilation in dual WiFi mode. CRs-Fixed: 983653 Change-Id: Id7a486f2f111476e73d5707eba36611a3530e9cf Signed-off-by: Sarada Prasanna Garnayak <sgarna@codeaurora.org>
* | | net: cnss: add DFS NOL support for dual WiFiSarada Prasanna Garnayak2016-03-25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Store WiFi DFS NOL list and return to wlan host driver on query. It adds support for no link operation on radar detection. This export symbol supported by both SDIO and PCIe platform driver. So add this API as a common API for both SDIO and PCIe interface based wlan module and remove the duplicate API from the SDIO and PCIe platform driver. CRs-Fixed: 983618 Change-Id: Idc25806de6f919b88130a1633adbb7bc1048ecd5 Signed-off-by: Sarada Prasanna Garnayak <sgarna@codeaurora.org>
* | | net: cnss: add unsafe channel list support for dual WiFiSarada Prasanna Garnayak2016-03-25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Store WiFi unsafe Channel list and return to wlan host driver on query. It adds support WiFi unsafe Channel list for LTE-WiFi coexistence. This export symbol supported by both SDIO and PCIe platform driver. So add this API as a common API for both SDIO and PCIe interface based wlan module and remove the duplicate API from the SDIO and PCIe platform driver. CRs-Fixed: 983607 Change-Id: I1698df3fb689ef17294e00032adde5ae635e76de Signed-off-by: Sarada Prasanna Garnayak <sgarna@codeaurora.org>
* | | wcnss: Access A2xb split timeout limit registerSunkad, Anand Ningappa2016-03-23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Dump A2xb split timeout limit register, while dumping pronto register dumps during pronto subsystem restart. To check a2xb split time out value configured. CRs-fixed: 975027 Change-Id: I1480d23b14f26dad59a552293e38bad9916ef0e4 Signed-off-by: Sunkad, Anand Ningappa <asunka@codeaurora.org>
* | | cnss: Use correct regulator APIs for 4.4 kernelYue Ma2016-03-23
| | | | | | | | | | | | | | | | | | | | | | | | In 4.4 kernel, regulator_set_optimum_mode() is replaced by regulator_set_load(). Hence update it accordingly for CNSS driver in 4.4 kernel to avoid compilation issue. Signed-off-by: Yue Ma <yuem@codeaurora.org>
* | | cnss: Expose dump stack functionalityAbhishek Singh2016-03-23
| | | | | | | | | | | | | | | | | | | | | | | | | | | Add changes to expose dump stack functionality which can be used by driver to dump stack information when it requires. CRs-Fixed: 979886 Change-Id: Ib929ad0a510b996ac54d17afd2957ea487c62851 Signed-off-by: Abhishek Singh <absingh@codeaurora.org>
* | | cnss_prealloc: Dump the call stack if there is no memory availableYue Ma2016-03-23
| | | | | | | | | | | | | | | | | | | | | | | | Dump the call stack if there is no memory available from the prealloc pool in order to get the source of the memory allocation. Change-Id: I0b523e82638410ea679f1d9d3f4bb56703ed9100 Signed-off-by: Yue Ma <yuem@codeaurora.org>
* | | net: cnss: refactor PM QoS request wrapper APISarada Prasanna Garnayak2016-03-23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Make PM QoS request API generic to pass the type of latency requirement needed by the client instead of hard coding latency type. Add latency type as a function parameter. CRs-Fixed: 972761 Change-Id: Ic912148d2068fe8a758b6a4b3be570ccf870f03a Signed-off-by: Sarada Prasanna Garnayak <sgarna@codeaurora.org>
* | | net: cnss_prealloc: Add memory for high latency SDIO interfaceSarada Prasanna Garnayak2016-03-23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | wlan driver transport layer pdev handler needs 128kb pre allocated memory in a single block memory allocation for transmit/receive descriptor initialization in wlan startup for the wlan module with high latency(SDIO) based hardware interface. CRs-Fixed: 978073 Change-Id: I0dbe047a7b64e96bf32470702d1b3e3088bffcf7 Signed-off-by: Sarada Prasanna Garnayak <sgarna@codeaurora.org>
* | | net: cnss_sdio: add PM QoS support in cnss sdio platform driverSarada Prasanna Garnayak2016-03-23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | To improve the wlan throughput add power management quality of service support in cnss sdio platform driver. The cnss sdio platform driver export PM QoS API to wlan host driver. CRs-Fixed: 970872 Change-Id: Idcea4cde74b280b26706be1bd88b822de80c0ff3 Signed-off-by: Sarada Prasanna Garnayak <sgarna@codeaurora.org>
* | | cnss: Update prealloc memory tableYue Ma2016-03-23
| | | | | | | | | | | | | | | | | | | | | | | | | | | The memory size of a slot in the prealloc table should be order of 2, otherwise some memory will be wasted since kernel only allocates contiguous physical memory in pages by order of 2. Change-Id: I762ad490d300f8b622a3ed1f9ccbe2af2d926c49 Signed-off-by: Yue Ma <yuem@codeaurora.org>
* | | cnss: Fix a boundary check bug in cnss prealloc driverYue Ma2016-03-23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently the driver gives a memory slot only if its size is greater than the memory requested by the caller. This will waste a bigger slot if the memory requested is equal to the slot size. Hence fix it by adding the equal check when a memory slot is requested. Change-Id: Ib48477607e9332c8942894301ead606a31fa3284 Signed-off-by: Yue Ma <yuem@codeaurora.org>