summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ath/wil6210/main.c
Commit message (Collapse)AuthorAgeFilesLines
* wil6210: convert symbolic permissions to octal permissionsMaya Erez2017-01-271-8/+8
| | | | | | | | | Symbolic permissions are no longer recommended. This patch changes the symbolic permissions in wil6210 driver to octal permissions. Signed-off-by: Maya Erez <qca_merez@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
* wil6210: protect against false interrupt during reset sequenceHamad Kadmany2017-01-271-0/+3
| | | | | | | | | | | | | During reset sequence it is seen that device is generating an interrupt eventhough interrupts are masked at device level. Add workaround to disable the interrupts from host side during reset and clear any pending interrupts before re-enabling the interrupt. 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>
* wil6210: remove __func__ from debug printoutsLazar Alexei2017-01-271-27/+23
| | | | | | | | | | __func__ is automatically added to printouts by dynamic debug mechanism and by wil_info/wil_err macros. Remove __func__ from debug printouts to avoid duplication. Signed-off-by: Lazar Alexei <qca_ailizaro@qca.qualcomm.com> Signed-off-by: Maya Erez <qca_merez@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
* wil6210: support loading dedicated image for sparrow-plus devicesLazar Alexei2017-01-271-4/+4
| | | | | | | | | | | Driver may be used in platforms where some use sparrow cards while other use sparrow-plus cards, where different FW image is needed. Add the capability to load dedicated FW image in case sparrow-plus card is detected and fallback to default image if such does not exist. Signed-off-by: Lazar Alexei <qca_ailizaro@qca.qualcomm.com> Signed-off-by: Maya Erez <qca_merez@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
* wil6210: add disable_ap_sme module parameterDedy Lansky2017-01-271-3/+7
| | | | | | | | | | | | | | | | | | | | By default, AP SME is handled by driver/FW. In case disable_ap_sme is true, driver doesn't turn-on WIPHY_FLAG_HAVE_AP_SME and the responsibility for AP SME is passed to user space. With AP SME disabled, driver reports assoc request frame to user space which is then responsible for sending assoc response frame and for sending NL80211_CMD_NEW_STATION. Driver also reports disassoc frame to user space which should then send NL80211_CMD_DEL_STATION. NL80211_CMD_SET_STATION with NL80211_STA_FLAG_AUTHORIZED is used by user space to allow/disallow data transmit. Signed-off-by: Dedy Lansky <qca_dlansky@qca.qualcomm.com> Signed-off-by: Maya Erez <qca_merez@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
* wil6210: delay remain on channel when scan is activeLior David2016-12-011-0/+2
| | | | | | | | | | | | | | Currently it was possible to call remain_on_channel(ROC) while scan was active and this caused a crash in the FW. In order to fix this problem and make the behavior consistent with other drivers, queue the ROC in case a scan is active and try it again when scan is done. As part of the fix, clean up some locking issues and return error if scan is called while ROC is active. 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>
* wil6210: support NL80211_ATTR_WIPHY_RETRY_SHORTLior David2016-11-231-0/+15
| | | | | | | | | | | | Add support for setting retry limit for short frames, using NL80211_CMD_SET_WIPHY with the attribute NL80211_ATTR_WIPHY_RETRY_SHORT. Update wiphy->retry_short from the FW default when interface is brought up. 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>
* wil6210: add support for abort scanMaya Erez2016-11-231-24/+32
| | | | | | | | | | Implement cfg80211 abort_scan op to allow the upper layer to abort an ongoing scan request. In addition, notify wil6210 device on scan abort request instead of just ignoring the scan response. Signed-off-by: Maya Erez <qca_merez@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
* wil6210: fix deadlock when using fw_no_recovery optionLior David2016-11-231-7/+8
| | | | | | | | | | | When FW crashes with no_fw_recovery option, driver waits for manual recovery with wil->mutex held, this can easily create deadlocks. Fix the problem by moving the wait outside the lock. 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>
* wil6210: fix net queue stop/wakeDedy Lansky2016-11-231-3/+9
| | | | | | | | | | | | | Driver calls to netif_tx_stop_all_queues/netif_tx_wake_all_queues are inconsistent. In several cases, driver can get to a situation where net queues are stopped forever and data cannot be sent. The fix is to stop net queues if there is at least one vring which is "full" and to wake net queues if all vrings are not "full". Signed-off-by: Dedy Lansky <qca_dlansky@qca.qualcomm.com> Signed-off-by: Maya Erez <qca_merez@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
* wil6210: extract firmware version from file headerLior David2016-08-311-0/+1
| | | | | | | | | | | | | Currently the FW version is taken from the sw_version field of the FW ready event. This version is based on internal version control revision and it is difficult to map to actual FW version. Fix this by using the actual FW version stored in the FW file header record. 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>
* wil6210: extract firmware capabilities from FW fileLior David2016-08-311-2/+2
| | | | | | | | | | | | | | | | When driver is loaded, extract a capabilities record from the FW file. This record contains bits indicating which optional features are supported by this FW. The driver can use this information to determine which functionality to support and/or expose to user space. The extraction is done before wiphy structure is registered, because the capabilities can affect information published by the this structure. 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>
* wil6210: fix protection of wil->scan_requestLior David2016-08-311-0/+4
| | | | | | | | | | | | | | | Currently the places that check wil->scan_request and call cfg80211_scan_done are not consistently protected, so there is a risk that cfg80211_scan_done will be called with NULL scan_request, causing a kernel crash. Fix this by using p2p_wdev_mutex in few other places that access scan_request. This makes sense since scan_request may point to p2p_wdev, and it is not worth the extra complexity of adding a new mutex. 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>
* wil6210: fix wiphy registration sequenceLior David2016-08-191-0/+3
| | | | | | | | | | | | | | | Currently wiphy structure is initialized and registered in wil_if_alloc, before some information is available such as MAC address and capabilities. As a result there is a small chance user space will get incorrect information from calls such as NL80211_CMD_GET_WIPHY. Fix this by seperating the registration and moving it to wil_if_add which is executed later, after all relevant information is known. 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>
* wil6210: Fix driver down flowLazar Alexei2016-08-191-14/+2
| | | | | | | | | | | | | | | Stations disconnection is executed as part of wil_reset so no need to do it in wil_down. Removal of the disconnect operation will also preserve the lock of wil->mutex during the whole reset flow and prevent handling of connect event while resetting. Set wil_status_resetting in earlier stage in the flow to prevent double resetting call in case communication with FW fails while bringing the interface down. Signed-off-by: Lazar Alexei <qca_ailizaro@qca.qualcomm.com> Signed-off-by: Maya Erez <qca_merez@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
* wil6210: fix stop p2p device handlingMaya Erez2016-08-191-1/+1
| | | | | | | | | | | fix stop p2p device handling to identify between search and listen and update the upper layers with the appropriate notification. The stop of p2p radio operations also needs to be performed in __wil_down. Signed-off-by: Maya Erez <qca_merez@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
* wil6210: change HALP logging category to IRQLior David2016-08-191-13/+13
| | | | | | | | | | | | | | Change the logging category of HALP functions from MISC to IRQ, since the HALP mechanism is closely related to interrupts. Both HALP and IRQ create a heavy load of logging messages when enabled, so their logging is typically disabled during normal debug scenarios. Having them in the same logging category will make it easier to disable logging for both in one go. 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>
* wil6210: fix HALP handling in case of HALP vote time-outMaya Erez2016-08-191-2/+5
| | | | | | | | | In case HALP vote times out, we need to mask the HALP IRQ, as done in case the interrupt is received, as this interrupt should be set until completion of the low latency operation. Signed-off-by: Maya Erez <qca_merez@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
* nl80211: support beacon report scanningAvraham Stern2016-07-061-2/+10
| | | | | | | | | | | | | | | | | | | | | | | | | Beacon report radio measurement requires reporting observed BSSs on the channels specified in the beacon request. If the measurement mode is set to passive or active, it requires actually performing a scan (passive or active, accordingly), and reporting the time that the scan was started and the time each beacon/probe was received (both in terms of TSF of the BSS of the requesting AP). If the request mode is table, this information is optional. In addition, the radio measurement request specifies the channel dwell time for the measurement. In order to use scan for beacon report when the mode is active or passive, add a parameter to scan request that specifies the channel dwell time, and add scan start time and beacon received time to scan results information. Supporting beacon report is required for Multi Band Operation (MBO). Signed-off-by: Assaf Krauss <assaf.krauss@intel.com> Signed-off-by: David Spinadel <david.spinadel@intel.com> Signed-off-by: Avraham Stern <avraham.stern@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* wil6210: add support for device led configurationMaya Erez2016-05-111-0/+3
| | | | | | | | | | 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. Signed-off-by: Maya Erez <qca_merez@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
* wil6210: prevent deep sleep of 60G device in critical pathsMaya Erez2016-04-261-3/+72
| | | | | | | | | | | | | | | | | 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. Signed-off-by: Maya Erez <qca_merez@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
* wil6210: unmask RX_HTRSH interrupt only when connectedMaya Erez2016-04-261-0/+17
| | | | | | | | | | | 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. Signed-off-by: Maya Erez <qca_merez@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
* wil6210: add oob_mode module parameterLior David2016-03-071-0/+16
| | | | | | | | | | | 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. 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>
* wil6210: fix no_fw_recovery mode with change_virtual_intfLior David2016-03-071-0/+5
| | | | | | | | | | | | | 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. 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>
* wil6210: fix race conditions in p2p listen and searchLior David2016-03-071-1/+1
| | | | | | | | | | | | | | | | | 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. 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>
* wil6210: P2P_DEVICE virtual interface supportLior David2016-03-071-0/+1
| | | | | | | | | | | | | | | | | | | | | 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. 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>
* wil6210: p2p initial supportDedy Lansky2016-03-071-0/+6
| | | | | | | | | | supporting p2p_find, p2p_listen and p2p_connect Use updated cfg80211_get_bss API (additional argument) 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>
* wil6210: add support for platform specific notification eventsMaya Erez2016-03-071-2/+30
| | | | | | | | Add the ability to notify the platform driver on different events, such as FW crash, pre reset and FW ready. Signed-off-by: Maya Erez <qca_merez@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
* wil6210: replay attack detectionVladimir Kondratiev2016-03-071-2/+7
| | | | | | | | | | | | | | | | | | | | | | | | | 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 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>
* wil6210: Set permanent MAC address to wiphyHamad Kadmany2016-03-071-0/+2
| | | | | | | | MAC address of wil6210 was not set in wiphy 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>
* wil6210: remove BACK RX and TX workersMaya Erez2016-03-071-10/+0
| | | | | | | | | | | | | | | | 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. Signed-off-by: Maya Erez <qca_merez@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
* wil6210: wait for disconnect completionVladimir Kondratiev2016-02-021-19/+9
| | | | | | | | | | | | 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. 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>
* wil6210: prevent access to vring_tx_data lock during its initMaya Erez2016-02-021-0/+3
| | | | | | | | | | | | | 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. Signed-off-by: Maya Erez <qca_merez@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
* wil6210: handle multiple connect/disconnect eventsMaya Erez2016-01-261-45/+36
| | | | | | | | | | | | | | | | | In the current solution wil6210 configures the vring in a worker and holds only one pending CID. This implementation may lead to race conditions between connect and disconnect events of multiple stations or fast connect/disconnect events of the same station. In order to allow the removal of the connect worker and handling of WMI_VRING_CFG_DONE_EVENTID in the connect event, the WMI replies that provide the reply in a given buffer needs to be handled immediately in the WMI event interrupt thread. To prevent deadlocks, WMI replies that requires additional handling are still handled via the events list. Signed-off-by: Maya Erez <qca_merez@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
* wil6210: fix a warning message conditionDan Carpenter2015-12-311-1/+1
| | | | | | | | "iter" is -1 at the end of the loop and not zero. It means we don't print a warning message. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
* wil6210: prevent external wmi commands during suspend flowMaya Erez2015-12-081-1/+3
| | | | | | | | | | | | In __wmi_send we check if fw is ready at the beginning of the function. While we wait for the completion of the previous command, system suspend can be invoked and reset the HW, causing __wmi_send to read from HW registers while it is not ready. Taking the wmi_mutex in the reset flow when setting the FW ready bit to zero will prevent the above race condition. Signed-off-by: Maya Erez <qca_merez@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
* wil6210: hold wil->mutex while managing vringsVladimir Kondratiev2015-11-161-5/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | To prevent race when connect flow may run in parallel with the disconnect event. Scenario leading to the bug is: while running connect flow on the AP, STA sends disconnect. log follows. <7>[ 668.736269] wil6210 0000:01:00.0: wlan0: DBG[ WMI]Configure for connection CID 1 <7>[ 668.736269] wil6210 0000:01:00.0: wlan0: DBG[MISC]wil_vring_init_tx() max_mpdu_size 2048 <7>[ 668.736301] wil6210 0000:01:00.0: wlan0: DBG[MISC]wil_vring_alloc() <7>[ 668.736363] wil6210 0000:01:00.0: wlan0: DBG[MISC]vring[1024] 0xffbe8000:d962ce08 0xdb244000 <7>[ 668.736394] wil6210 0000:01:00.0: wlan0: DBG[ WMI]Head 0x00880300 -> 0x00880308 <7>[ 668.736394] wil6210 0000:01:00.0: wlan0: DBG[ WMI]WMI command 0x0821 [28] <7>[ 668.736426] DBG[ WMI]Cmd 00000000: 20 00 24 00 00 00 00 00 00 00 21 08 00 00 00 00 .$.......!..... <7>[ 668.736426] DBG[ WMI]cmd 00000000: 00 00 00 00 00 00 5f 5c 00 00 00 00 00 04 00 08 ......_\........ <7>[ 668.736457] DBG[ WMI]cmd 00000010: 01 01 00 00 00 00 00 00 00 00 ff 0f ............ <7>[ 668.736488] wil6210 0000:01:00.0: wlan0: DBG[ IRQ]Pseudo IRQ 0x00000004 <7>[ 668.736519] wil6210 0000:01:00.0: wlan0: DBG[ WMI]Handle WMI 0x1824 (reply_id 0x1821) <7>[ 668.736519] wil6210 0000:01:00.0: wlan0: DBG[ IRQ]wil6210_mask_irq_pseudo() <7>[ 668.736519] wil6210 0000:01:00.0: wlan0: DBG[ IRQ]ISR MISC 0x20000000 <7>[ 668.736551] wil6210 0000:01:00.0: wlan0: DBG[ WMI]Handle WMI 0x1003 (reply_id 0x1821) <7>[ 668.736551] wil6210 0000:01:00.0: wlan0: DBG[ WMI]Disconnect 04:ce:14:00:07:70 reason [proto 3 wmi 4] <7>[ 668.736582] wil6210 0000:01:00.0: wlan0: DBG[MISC]wil6210_disconnect() <7>[ 668.736613] wil6210 0000:01:00.0: wlan0: DBG[ IRQ]Thread IRQ <7>[ 668.736613] wil6210 0000:01:00.0: wlan0: DBG[ IRQ]Thread ISR MISC 0x20000000 <7>[ 668.736644] wil6210 0000:01:00.0: wlan0: DBG[ IRQ]MBOX event <7>[ 668.736644] wil6210 0000:01:00.0: wlan0: DBG[ WMI]Mbox head 00880330 tail 00880328 <7>[ 668.736676] wil6210 0000:01:00.0: wlan0: DBG[ WMI]Mbox evt 001a 0010 0000 00 <7>[ 668.736676] wil6210 0000:01:00.0: wlan0: DBG[ WMI]WMI event 0x1821 MID 0 @3255145 msec <7>[ 668.736707] DBG[ WMI]evt 00000000: 1a 00 10 00 00 00 00 10 00 00 21 18 69 ab 31 00 ..........!.i.1. <7>[ 668.736707] DBG[ WMI]evt 00000010: 01 01 00 00 00 00 00 00 ........ <7>[ 668.736738] wil6210 0000:01:00.0: wlan0: DBG[ WMI]queue_work -> 0 <7>[ 668.736738] wil6210 0000:01:00.0: wlan0: DBG[ WMI]wmi_recv_cmd -> 1 events queued <7>[ 668.736769] wil6210 0000:01:00.0: wlan0: DBG[ IRQ]wil6210_unmask_irq_pseudo() <7>[ 668.736832] wil6210 0000:01:00.0: wlan0: DBG[MISC]Disconnect 04:ce:14:00:07:70, CID=1, reason=3 <7>[ 668.736832] wil6210 0000:01:00.0: wlan0: DBG[MISC]wil_disconnect_cid(CID 1, status 1) <7>[ 668.736894] wil6210 0000:01:00.0: wlan0: DBG[MISC]wil_vring_fini_tx() id=1 <7>[ 668.736894] wil6210 0000:01:00.0: wlan0: DBG[MISC]free Tx vring 1 [1024] 0xffbe8000:d962ce08 0xdb244000 <7>[ 668.736957] wil6210 0000:01:00.0: wlan0: DBG[ WMI]Handle WMI 0x1821 (reply_id 0x1821) <7>[ 668.736988] wil6210 0000:01:00.0: wlan0: DBG[ WMI]Complete WMI 0x1821 <7>[ 668.737019] wil6210 0000:01:00.0: wlan0: DBG[ WMI]wmi_call(0x0821->0x1821) completed in 0 msec <3>[ 668.737019] wil6210 0000:01:00.0: wlan0: Tx config failed, status 0x01 <7>[ 668.739518] wil6210 0000:01:00.0: wlan0: DBG[MISC]wil_cfg80211_del_station(04:ce:14:00:07:70, reason=2) <7>[ 668.739550] wil6210 0000:01:00.0: wlan0: DBG[MISC]wil6210_disconnect() <7>[ 668.739550] wil6210 0000:01:00.0: wlan0: DBG[MISC]_wil6210_disconnect(bssid=04:ce:14:00:07:70, reason=2, ev-) <7>[ 668.739581] wil6210 0000:01:00.0: wlan0: DBG[MISC]Disconnect 04:ce:14:00:07:70, CID=-2, reason=2 <7>[ 668.742705] wil6210 0000:01:00.0: wlan0: DBG[MISC]free Tx vring 1 [1024] 0x (null):d962ce08 0x (null) <3>[ 668.742736] __dma_free_remap: trying to free invalid coherent area: (null) 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>
* wil6210: handle failure in Tx vring configVladimir Kondratiev2015-10-291-1/+1
| | | | | | | | | | | | When configuring Tx vring for new connection, WMI call to the firmware may fail. In this case, need to clean up properly. In particular, need to call cfg80211_del_sta() in case of AP like interface. Perform full "disconnect" procedure for proper clean up Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
* wil6210: Do no schedule firmware recovery during reset flowHamad Kadmany2015-10-091-0/+8
| | | | | | | | | | During reset flow, ignore firmware errors detected prior to the actual hardware reset as the recovery flow would make additional unnecessary reset. Signed-off-by: Hamad Kadmany <qca_hkadmany@qca.qualcomm.com> Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
* wil6210: treat broadcast bssid as "disconnect all"Vladimir Kondratiev2015-10-091-2/+4
| | | | | | | | | | Hostapd request disconnect for broadcast bssid when it wants to disconnect all stations from the AP. Detect this and really disconnect all connected stations. Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
* wil6210: support future boot loadersVladimir Kondratiev2015-08-061-22/+7
| | | | | | | | Boot loader versions as backward compatible, starting from v1 Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
* wil6210: report boot loader errorVladimir Kondratiev2015-08-061-1/+36
| | | | | | | | | | Boot loader reports error starting from the struct v2. Print error info before reset (power up state) in debug mode, and print same info as error if target reset timed out. Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
* wil6210: use inline functions for register accessVladimir Kondratiev2015-08-061-53/+41
| | | | | | | | | | | | Replace macros like "R", "W", "S", "C", defined multiple times, with inline functions "wil_[rwsc]". Use "readl" and "writel" instead of "ioread32" and "iowrite32" since it is granted that memory transactions are used, not port ones like IN/OUT Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
* wil6210: skip HW version check for chip debuggingVladimir Kondratiev2015-08-061-3/+3
| | | | | | | | When loading with debug_fw flag, do not bail out on unknown chipId Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
* wil6210: use wil_fw_error_recovery()Vladimir Kondratiev2015-08-061-2/+1
| | | | | | | Use function wil_fw_error_recovery() instead of inline equivalent code Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
* wil6210: support boot loader struct v0 & v1Vladimir Kondratiev2015-08-061-17/+68
| | | | | | | | | | | | | | There are 2 versions of boot loader struct: v0 and v1. In the v1, boot loader build version added; as well as RF status. Support both versions. Boot loader structure v1 has RF status; ignore RF error if firmware not going to be loaded; driver can still be used to interact with the HW Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
* Merge tag 'modules-next-for-linus' of ↵Linus Torvalds2015-07-011-2/+2
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux Pull module updates from Rusty Russell: "Main excitement here is Peter Zijlstra's lockless rbtree optimization to speed module address lookup. He found some abusers of the module lock doing that too. A little bit of parameter work here too; including Dan Streetman's breaking up the big param mutex so writing a parameter can load another module (yeah, really). Unfortunately that broke the usual suspects, !CONFIG_MODULES and !CONFIG_SYSFS, so those fixes were appended too" * tag 'modules-next-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux: (26 commits) modules: only use mod->param_lock if CONFIG_MODULES param: fix module param locks when !CONFIG_SYSFS. rcu: merge fix for Convert ACCESS_ONCE() to READ_ONCE() and WRITE_ONCE() module: add per-module param_lock module: make perm const params: suppress unused variable error, warn once just in case code changes. modules: clarify CONFIG_MODULE_COMPRESS help, suggest 'N'. kernel/module.c: avoid ifdefs for sig_enforce declaration kernel/workqueue.c: remove ifdefs over wq_power_efficient kernel/params.c: export param_ops_bool_enable_only kernel/params.c: generalize bool_enable_only kernel/module.c: use generic module param operaters for sig_enforce kernel/params: constify struct kernel_param_ops uses sysfs: tightened sysfs permission checks module: Rework module_addr_{min,max} module: Use __module_address() for module_address_lookup() module: Make the mod_tree stuff conditional on PERF_EVENTS || TRACING module: Optimize __module_address() using a latched RB-tree rbtree: Implement generic latch_tree seqlock: Introduce raw_read_seqcount_latch() ...
| * kernel/params: constify struct kernel_param_ops usesLuis R. Rodriguez2015-05-281-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Most code already uses consts for the struct kernel_param_ops, sweep the kernel for the last offending stragglers. Other than include/linux/moduleparam.h and kernel/params.c all other changes were generated with the following Coccinelle SmPL patch. Merge conflicts between trees can be handled with Coccinelle. In the future git could get Coccinelle merge support to deal with patch --> fail --> grammar --> Coccinelle --> new patch conflicts automatically for us on patches where the grammar is available and the patch is of high confidence. Consider this a feature request. Test compiled on x86_64 against: * allnoconfig * allmodconfig * allyesconfig @ const_found @ identifier ops; @@ const struct kernel_param_ops ops = { }; @ const_not_found depends on !const_found @ identifier ops; @@ -struct kernel_param_ops ops = { +const struct kernel_param_ops ops = { }; Generated-by: Coccinelle SmPL Cc: Rusty Russell <rusty@rustcorp.com.au> Cc: Junio C Hamano <gitster@pobox.com> Cc: Andrew Morton <akpm@linux-foundation.org> Cc: Kees Cook <keescook@chromium.org> Cc: Tejun Heo <tj@kernel.org> Cc: Ingo Molnar <mingo@kernel.org> Cc: cocci@systeme.lip6.fr Cc: linux-kernel@vger.kernel.org Signed-off-by: Luis R. Rodriguez <mcgrof@suse.com> Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
* | Merge ath-next from ath.gitKalle Valo2015-06-151-0/+2
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | Major changes: wil6210: * add modparam for bcast ring size * support hidden SSID * add per-MCS Rx stats
| * | wil6210: modparam for bcast ring sizeVladimir Kondratiev2015-06-091-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | Control Bcast ring size in similar way as Rx and Tx ones, through "bcast_ring_order" modparam, actual ring size is 1 << order Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>