summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ath/wil6210/cfg80211.c
Commit message (Collapse)AuthorAgeFilesLines
* wil6210: manual FW error recovery modeVladimir Kondratiev2014-10-021-0/+4
| | | | | | | | | | | | | | | | | | | | Introduce manual FW recovery mode. It is activated if module parameter @no_fw_recovery set to true. May be changed at runtime. Recovery information provided by new "recovery" debugfs file. It prints: mode = [auto|manual] state = [idle|pending|running] In manual mode, after FW error, recovery won't start automatically. Instead, after notification to user space, recovery waits in "pending" state, as indicated by the "recovery" debugfs file. User space tools may perform data collection and allow to continue recovery by writing "run" to the "recovery" debugfs file. Alternatively, recovery pending may be canceled by stopping network interface i.e. 'ifconfig wlan0 down' Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* wil6210: fix for oops while stopping interfaceVladimir Kondratiev2014-09-111-11/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When interface stopped while running intensive Rx traffic, the following oops observed: [89846.734683] Call trace: [89846.737117] [<ffffffc00083aa64>] dev_gro_receive+0xac/0x358 [89846.742674] [<ffffffc00083ae94>] napi_gro_receive+0x24/0xa4 [89846.748251] [<ffffffbffc1c2f88>] $x+0xec/0x1f8 [wil6210] wil_netif_rx_any [89846.753547] [<ffffffbffc1c4830>] $x+0x34/0x54 [wil6210] wil_release_reorder_frame [89846.758755] [<ffffffbffc1c48ac>] wil_release_reorder_frames+0x5c/0x78 [wil6210] [89846.766044] [<ffffffbffc1c4bf8>] wil_tid_ampdu_rx_free+0x20/0x48 [wil6210] [89846.772901] [<ffffffbffc1bedc8>] $x+0x190/0x1e8 [wil6210] [89846.778285] [<ffffffbffc1c0ed4>] wmi_event_worker+0x230/0x2f8 [wil6210] [89846.784865] [<ffffffc0000b0bc8>] process_one_work+0x278/0x3fc [89846.790591] [<ffffffc0000b1218>] worker_thread+0x200/0x330 [89846.796060] [<ffffffc0000b6664>] kthread+0xac/0xb8 [89846.800836] Code: b940c661 f9406a62 8b010041 f9400026 (f8636882) [89846.807008] ---[ end trace d6fdc17cd27d18f6 ]--- Reason is the following: when removing Rx vring (wil_netdev_ops.ndo_stop -> wil_stop -> wil_down -> __wil_down -> wil_rx_fini), Rx interrupt occurs. It trigger Rx NAPI, calling wil_rx_handle() that reaps (already cleaned) buffer, causing skb referring to garbage memory being set into reorder buffer. Then, network stack trying to access this buffer and fails. Prevent Rx NAPI from being scheduled if device going to stop. Bit wil_status_napi_en reflects NAPI enablement state, check it when triggering Rx NAPI. Testing shows that check for wil_status_napi_en sometimes gets negative, and new error message get printed - in this case kernel oops would be observed. Original oops is no more reproducible. This change requires also changes in the AP flows. Properly enable/disable NAPI for the AP. Make sure Rx VRING is disabled when resetting target. For this, promote __wil_up() and __wil_down() to the module scope, and use it in the relevant flows. Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* wil6210: specify max. IE lengthVladimir Kondratiev2014-09-111-0/+15
| | | | | | | | | | Expose firmware limit for the max_scan_ie_len; also do actually set IE's for the probe request max_scan_ie_len used to be 0, this blocks scan requests with non-zero IE's Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* wil6210: add change_beacon() driver callbackVladimir Kondratiev2014-09-111-0/+40
| | | | | | | | This allows updating IEs (e.g. from hostapd) when AP is already started Signed-off-by: Dedy Lansky <qca_dlansky@qca.qualcomm.com> Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* wil6210: send connect request IEs to FW also for non-secure connectionVladimir Kondratiev2014-09-111-11/+11
| | | | | | | | | | Driver is sending connect request IEs to FW only for secure connection and ignores them for non-secure connection. This is fixed by always sending the IEs to FW upon connect request Signed-off-by: Dedy Lansky <qca_dlansky@qca.qualcomm.com> Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* wil6210: add more debug printoutsVladimir Kondratiev2014-09-111-2/+6
| | | | | | | | added misc printouts in some init/uninit functions for better traceability Signed-off-by: Dedy Lansky <qca_dlansky@qca.qualcomm.com> Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* wil6210: coding style fixesVladimir Kondratiev2014-09-111-2/+2
| | | | | | | | | - parentheses, indentation, typos - seq_puts() instead of seq_printf() with single argument - sizeof(var) vs. sizeof(type) Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* wil6210: print more information when connectingVladimir Kondratiev2014-09-111-0/+18
| | | | | | | when connecting, print some info about BSS Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* wil6210: fix false "scan timeout"Vladimir Kondratiev2014-08-251-1/+3
| | | | | | | | When sending scan request, if hardware is not ready, scan timer was started and scan timeout mis-reported. Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* wil6210: update copyright year 2014Vladimir Kondratiev2014-08-251-1/+1
| | | | | | | Fix Copyright headers in all files changed in 2014, to mention 2014 Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* wil6210: add 'freq' and 'link' debugfs entriesVladimir Kondratiev2014-06-191-2/+2
| | | | | | | Expose operational frequency and link info Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* wil6210: debug print when scan request state changesVladimir Kondratiev2014-06-191-0/+1
| | | | | Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* wil6210: print debug info when starting APVladimir Kondratiev2014-06-191-1/+42
| | | | | | | | | | In the wil_cfg80211_start_ap(), debug print selected data: - beacon (before and after fix-up) - crypto parameters - mark start/stop AP invocation Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* wil6210: indicate mgmt_tx statusVladimir Kondratiev2014-06-191-4/+9
| | | | | | | Inform cfg80211 about Tx result Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* wil6210: Tx mgmt frame from debugfsVladimir Kondratiev2014-06-191-4/+3
| | | | | | | | | | | | | | | | Provide 2 files on the debugfs: - "rxon": write channel (1..4) to open Rx on it, 0 to rxoff - "tx_mgmt": write binary frame, starting from MAC header one need to care about turning receiver on/off before/after tx_mgmt Correct sequence is: echo $channel > rxon cat mfmt_frame > tx_mgmt echo 0 > rxon Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* wil6210: detect scan timeoutsVladimir Kondratiev2014-05-291-0/+1
| | | | | | | | | | If scan has not finished in some reasonable time (10sec), interpret it as if firmware error occurs but was not reported. Firmware should report scan completion for every scan request, so it is error condition indeed. Perform firmware recovery procedure. Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* cfg80211: constify MAC addresses in cfg80211 opsJohannes Berg2014-05-191-2/+2
| | | | | | This propagates through all the drivers and mac80211. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* wil6210: fix race between disconnect and Tx NAPIVladimir Kondratiev2014-03-171-0/+4
| | | | | | | | | | | | | | | | | | | | | When disconnecting some CID, corresponded Tx vring get released. During vring release, all descriptors get freed. It is possible that Tx NAPI working on the same vring simultaneously. If it happens, descriptor may be double freed. To protect from the race above, make sure NAPI won't process the same vring. Introduce 'enabled' flag in the struct vring_tx_data. Proceed with Tx NAPI only if 'enabled' flag set. Prior to Tx vring release, clear this flag and make sure NAPI get synchronized. NAPI enablement status protected by wil->mutex, add protection where it was missing and check for it. During reset, disconnect all peers first, then proceed with the Rx vring. It allows for the disconnect flow to observe proper 'wil->status' and correctly notify cfg80211 about connection status change Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* wil6210: serialize fw_recovery and start_apVladimir Kondratiev2014-03-171-4/+11
| | | | | | | | These methods can change device state, serialize with others similar ones like up/down Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* wil6210: fix secondary connectVladimir Kondratiev2014-03-171-0/+4
| | | | | | | | when STA receiving connect() when already connected, it should return error Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* wil6210: fw error recoveryVladimir Kondratiev2014-03-171-1/+7
| | | | | | | | | upon fw error interrupt - in STA mode, disconnect/cancel scan and then reset FW/HW added module param - no_fw_recovery which is false by default Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* wil6210: reduce printingVladimir Kondratiev2014-03-171-2/+2
| | | | | | | Convert 2 often printed messages to dynamic ones Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* wil6210: enable scan while connectedVladimir Kondratiev2014-03-171-6/+2
| | | | | | | New firmware do support scan while connected. Enable it. Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* wil6210: fix smatch warning in wil_cfg80211_get_station()Vladimir Kondratiev2014-03-031-1/+1
| | | | | | | | Smatch suggests to propagate error code from wil_find_cid(), and, indeed, it is a good idea. Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* wil6210: single station disconnectVladimir Kondratiev2014-02-281-0/+9
| | | | | | | | implement del_station() method in the struct cfg80211_ops It allows to disconnect single peer from the AP Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* wil6210: Provide signal strength indicationVladimir Kondratiev2014-02-281-3/+4
| | | | | | | | | When notifying about Rx mgmt (ex: during scan), extract signal strength reported by the hardware. signal is not MBM, it is arbitrary units 0..100 Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* wil6210: per-connection statisticsVladimir Kondratiev2014-02-281-3/+33
| | | | | | | Calculate statistics per connection, report with "iw station dump" Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* wil6210: dump_station initial supportVladimir Kondratiev2014-02-281-16/+66
| | | | | | | Rx stats is not calculated per STA - just give some number Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* wil6210: multiple connect - initial supportVladimir Kondratiev2014-02-281-2/+6
| | | | | | | | | | Enable multiple (up to 8 - HW/FW limitation) simultaneous connections. Each connection has its own CID (connection ID) that describes chip's beam-forming entity. Tx Vring should refer to correct CID for frame to reach its destination. Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* wil6210: Tx management frameVladimir Kondratiev2014-02-281-0/+72
| | | | | | | | Implement management frame passing. In order to receive frame on the other side, remain_on_channel() should be implemented as well Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* net:drivers/net: Miscellaneous conversions to ETH_ALENJoe Perches2013-10-021-2/+2
| | | | | | | | | | | | Convert the memset/memcpy uses of 6 to ETH_ALEN where appropriate. Also convert some struct definitions and u8 array declarations of [6] to ETH_ALEN. Signed-off-by: Joe Perches <joe@perches.com> Acked-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* wil6210: Init Rx vring right after resetVladimir Kondratiev2013-06-121-2/+5
| | | | | | | | | at the vring initialisation, memory pool get allocated in the FW. Make it 1-st because FW need this memory pool to precess next commands Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* wil6210: Derive IE's for APVladimir Kondratiev2013-06-121-0/+27
| | | | | | | | When starting secure AP, in some cases wpa_s provides probe template but not probe/assoc IE's. In this case, derive missing IE's from probe. Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* wil6210: Don't use wdev->sme_stateVladimir Kondratiev2013-05-291-0/+4
| | | | | | | | sme_state is private wdev's variable. Track connection state internally Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* wil6210: sync with new firmwareVladimir Kondratiev2013-03-131-9/+3
| | | | | | | | | | | | | | | Adjust driver for changes in the FW API. Noticeable changes in the FW are: - temperature sensing - infrastructure for multiple connections - infrastructure for P2P - signal strength indication This commit introduces only changes that are required to support same functionality as previous firmware, no new features. Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* wil6210: headers clean-upVladimir Kondratiev2013-03-131-9/+0
| | | | | Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* wil6210: use WLAN_CAPABILITY_DMG_TYPE_MASKVladimir Kondratiev2013-03-131-1/+1
| | | | | Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* wil6210: do not set IE's for beaconVladimir Kondratiev2013-03-131-2/+7
| | | | | | | | | On the DMG band, there is no 'normal' beacon frame. Instead, transmitted is short 'DMG beacon' frame, that do not include IE's So, beacon IE's are not relevant for the DMG band. Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* wil6210: remove unused including <linux/version.h>Wei Yongjun2013-03-131-1/+0
| | | | | | | | Remove including <linux/version.h> that don't need it. Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn> Acked-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* cfg80211: pass wiphy to cfg80211_ref_bss/put_bssJohannes Berg2013-02-111-1/+1
| | | | | | | | | This prepares for using the spinlock instead of krefs which is needed in the next patch to track the refs of combined BSSes correctly. Acked-by: Bing Zhao <bzhao@marvell.com> [mwifiex] Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* wil6210: checkpatch warningsVladimir Kondratiev2013-01-301-1/+0
| | | | | Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* wil6210: fix checkpatch CamelCase warningsVladimir Kondratiev2013-01-301-2/+2
| | | | | Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* wil6210: remove raw wil_dbg() callsVladimir Kondratiev2013-01-301-4/+4
| | | | | | | | Introduce debug category "MISC", convert all raw wil_dbg() to this category. This improves dynamic debug manageability Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* wireless: add new wil6210 802.11ad 60GHz driverVladimir Kondratiev2013-01-041-0/+573
This adds support for the 60 GHz 802.11ad Wilocity card through a new driver, wil6210. Wilocity implemented the firmware, QCA maintains the device driver. Currently supported: - STA: with security - AP: limited to 1 connected STA, security disabled - Monitor: due to a hardware/firmware limitation either control or non-control frames are monitored Using a STA and AP with this drive, one can assemble a fully functional BSS. Throughput of 1.2Gbps is achieved with iperf. The wil6210 cards have on-board flash memory for the firmware, the cards comes pre-flashed and no firmware download is required. For more details see: http://wireless.kernel.org/en/users/Drivers/wil6210 Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com> Signed-off-by: Luis R. Rodriguez <mcgrof@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
OpenPOWER on IntegriCloud