summaryrefslogtreecommitdiff
path: root/drivers
AgeCommit message (Collapse)Author
2014-08-28ath9k: Fix channel context eventsSujith Manoharan
Check if channel context usage is enabled before calling ath_chanctx_event() from various parts of the driver. Also, make sure that ath_chanctx_event() is compiled only when CONFIG_ATH9K_CHANNEL_CONTEXT is enabled. Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-08-28ath9k: Make ath_chanctx_switch staticSujith Manoharan
Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-08-28ath9k: Make ath_chanctx_get_oper_chan staticSujith Manoharan
Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-08-28ath9k: Make ath_chanctx_offchan_switch staticSujith Manoharan
Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-08-28ath9k: Conditionally compile more functionsSujith Manoharan
Use CONFIG_ATH9K_CHANNEL_CONTEXT to exclude: ath_scan_complete() ath_roc_complete() ath_offchannel_next() ath_scan_next_channel() ath_scan_channel_duration() Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-08-28ath9k: Exclude more functionsSujith Manoharan
Use CONFIG_ATH9K_CHANNEL_CONTEXT to exclude more functions: ath_offchannel_channel_change() ath_scan_channel_start() ath_scan_send_probe() Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-08-28ath9k: Conditionally compile a few functionsSujith Manoharan
Exclude these functions when CONFIG_ATH9K_CHANNEL_CONTEXT is not enabled: ath_chanctx_send_vif_ps_frame() ath_chanctx_send_ps_frame() ath_chanctx_defer_switch() ath_chanctx_set_next() Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-08-28ath9k: Cleanup mgd_prepare_tx callbackSujith Manoharan
Rename the callback from ath9k_chanctx_force_active() to ath9k_mgd_prepare_tx(). Also, move it to main.c and group it with the other callbacks. Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-08-28ath9k: Make ath_chanctx_work staticSujith Manoharan
Also compile it conditionally based on CONFIG_ATH9K_CHANNEL_CONTEXT. Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-08-28ath9k: Add a routine to tear down channel contextsSujith Manoharan
Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-08-28ath9k: Add a routine for initializing channel contextsSujith Manoharan
Setup the offchannel/sched timers and the chanctx work inside the new function. Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-08-28carl9170: Remove redundant protection checkAndreea-Cristina Bernat
The carl9170_op_ampdu_action() function is used only by the mac80211 framework. Since the mac80211 already takes care of checks and properly serializing calls to the driver's function there is no need for the driver to do the same thing. Signed-off-by: Andreea-Cristina Bernat <bernat.ada@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-08-28ath9k: Isolate ath9k_use_chanctx module parameterSujith Manoharan
This patch ensures that the module parameter "use_chanctx" is visible only when CONFIG_ATH9K_CHANNEL_CONTEXT is selected. Also register the channel context callbacks with mac80211 only when it is explicitly enabled and compile them out of the driver when CONFIG_ATH9K_CHANNEL_CONTEXT is not selected. Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-08-28ath9k: Isolate P2P powersave routinesSujith Manoharan
Use CONFIG_ATH9K_CHANNEL_CONTEXT to conditionally compile P2P-PS code. Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-08-28ath9k: Move P2P functions to channel.cSujith Manoharan
Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-08-28ath9k: Add a config option for channel contextSujith Manoharan
Channel contexts are supported only for P2P right now, so make sure that the 'normal' path remains unaffected by using a config option. This will also reduce the size of the driver. Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-08-28ath9k: Add debug informationSujith Manoharan
Add a few statements to debug channel context operation. Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-08-28ath9k: Move channel operations to channel.cSujith Manoharan
This reduces clutter in main.c Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-08-28ath9k: Handle failure to allocate HW timerSujith Manoharan
Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-08-28ath9k: Add a debug level for channel contextSujith Manoharan
Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-08-28ath5k: remove redundant null check before kfree()Bob Copeland
kfree() null-checks its argument. Found by smatch. Signed-off-by: Bob Copeland <me@bobcopeland.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-08-28ath5k: ensure led name is null terminatedBob Copeland
Add the missing null termination after strncpy(). This isn't actually a buffer overflow in this case since we use snprintf() appropriately to fill the buffer passed by the caller, but in the interest of not turning this into a bug down the road, go ahead and force termination here. Found by Coverity. Signed-off-by: Bob Copeland <me@bobcopeland.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-08-28ath5k: drop useless comparisonBob Copeland
rxs->rate_idx is unsigned, so it will always be >= 0. Found by Coverity. Signed-off-by: Bob Copeland <me@bobcopeland.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-08-28ray_cs: Add include guardsRasmus Villemoes
The files ray_cs.h and rayctl.h both contain two thirds of what appears to be an include guard using the macro name RAYLINK_H (both lack the #define). Since RAYLINK_H is not defined anywhere, the #ifndefs are confusing no-ops. Add proper include guards using different macro names. Signed-off-by: Rasmus Villemoes <linux@rasmusvillemoes.dk> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-08-28bcma: only map wrapper if its address is availableHauke Mehrtens
The Chipcommon B core does not have a wrap address and it would fail here. Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> Signed-off-by: Rafał Miłecki <zajec5@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-08-28mwifiex: use firmware API revision from GET_HW_SPEC responseAmitkumar Karwar
Newer firmware returns API revision in GET_HW_SPEC command response. We will make use of it instead of parsing this information from FW release number. Signed-off-by: Amitkumar Karwar <akarwar@marvell.com> Signed-off-by: Avinash Patil <patila@marvell.com> Signed-off-by: Cathy Luo <cluo@marvell.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-08-28mwifiex: rename macro and variables related to API revisionAmitkumar Karwar
We will remove 'fw' prefix from these variable and macro names and make them generic. Signed-off-by: Amitkumar Karwar <akarwar@marvell.com> Signed-off-by: Avinash Patil <patila@marvell.com> Signed-off-by: Cathy Luo <cluo@marvell.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-08-28mwifiex: fix left_len calculation issueAmitkumar Karwar
While updating 'left_len' in each iteration, we should subtract last TLV length not the accumulated length of TLVs parsed till now. This bug in parsing logic is exposed by newer firmware which adds two TLVs in GET_HW_SPEC command response. Earlier firmwares used to add only one TLV. Signed-off-by: Amitkumar Karwar <akarwar@marvell.com> Signed-off-by: Avinash Patil <patila@marvell.com> Signed-off-by: Cathy Luo <cluo@marvell.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-08-28ath9k_htc: advertise support for TDLSCsaba Kiraly
Based on a quick test with AR9271, TDLS seems to be working fine. Tests were done with 2 Atheros AR9271 based devices with firmware 1.3 (sha1 8d49f928aa40ac53c729189bff1333cd373a7fb5), associated with a WAP54G access point. TDLS worked fine both in WPA2 mode and without encryption. Stations maintained ping flood traffic between each other and towards the AP without significant losses. Not tested with AR7010. TDLS was enabled in earlier patches the same way for other Atheros drivers: ath9k (fd6562344dea2b8b2a5d644cf971f4e56004500a), and carl9170 (d1f3de71a584a82ee4e84505fce9acccf40215ff). Signed-off-by: Csaba Kiraly <csaba.kiraly@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-08-28Merge branch 'for-linville' of git://github.com/kvalo/athJohn W. Linville
2014-08-27ath10k: make target endianess more explicitMichal Kazior
Some copy engine structures are target specific and are uploaded to the device during init/configuration. This also cleans up a bit diag_mem_read/write implicit byteswap mess leaving only diag_access_read/write with an implicit endianess byteswap. Signed-off-by: Michal Kazior <michal.kazior@tieto.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2014-08-27ath10k: dont duplicate service-pipe mappingMichal Kazior
The mapping is already defined in a structure. It makes little sense to duplicate information stored in it within a function. Signed-off-by: Michal Kazior <michal.kazior@tieto.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2014-08-27ath10k: move pci init structuresMichal Kazior
It doesn't make much sense to have copy engine configuration structures spread across the whole source file. Signed-off-by: Michal Kazior <michal.kazior@tieto.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2014-08-26ath10k: fix fw crash dumpingMichal Kazior
Recent crash dump patches introduced a regression. If debugfs was disabled upon crash user could only see the following: [ 793.880000] ath10k: firmware crashed! (uuid n/a) [ 793.890000] ath10k: qca988x hw2.0 (0x4100016c, 0x043202ff) fw 10.1.467.2-1 api 2 htt 2.1 [ 793.890000] ath10k: debug 0 debugfs 0 tracing 0 dfs 1 The report was missing register dump. Fix it by printing registers regardless if crash_data is present or not. Signed-off-by: Michal Kazior <michal.kazior@tieto.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2014-08-26ath10k: improve logging to include dev idMichal Kazior
This makes it a lot easier to log and debug messages if there's more than 1 ath10k device on a system. Signed-off-by: Michal Kazior <michal.kazior@tieto.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2014-08-25orinoco_usb: use USB API functions rather than constantsHimangi Saraogi
This patch introduces the use of the functions usb_endpoint_is_bulk_in(epd) and usb_endpoint_is_bulk_out(epd). The semantic patch that makes these changes is as follows: @@ struct usb_endpoint_descriptor *epd; @@ - ((epd->bmAttributes & \(USB_ENDPOINT_XFERTYPE_MASK\|3\)) == - \(USB_ENDPOINT_XFER_BULK\|2\)) + usb_endpoint_xfer_bulk(epd) @@ struct usb_endpoint_descriptor *epd; @@ - ((epd->bEndpointAddress & \(USB_ENDPOINT_DIR_MASK\|0x80\)) == - \(USB_DIR_IN\|0x80\)) + usb_endpoint_dir_in(epd) @@ struct usb_endpoint_descriptor *epd; @@ - ((epd->bEndpointAddress & \(USB_ENDPOINT_DIR_MASK\|0x80\)) == - \(USB_DIR_OUT\|0\)) + usb_endpoint_dir_out(epd) @@ struct usb_endpoint_descriptor *epd; @@ - (usb_endpoint_xfer_bulk(epd) && usb_endpoint_dir_in(epd)) + usb_endpoint_is_bulk_in(epd) @@ struct usb_endpoint_descriptor *epd; @@ - (usb_endpoint_xfer_bulk(epd) && usb_endpoint_dir_out(epd)) + usb_endpoint_is_bulk_out(epd) Signed-off-by: Himangi Saraogi <himangi774@gmail.com> Acked-by: Julia Lawall <julia.lawall@lip6.fr> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-08-25atmel_cs: Remove typedef local_info_tHimangi Saraogi
The Linux kernel coding style guidelines suggest not using typedefs for structure types. This patch gets rid of the typedef for local_info_t. Also, the name of the struct is changed to drop the _t, to make the name look less typedef-like. The following Coccinelle semantic patch detects the case: @tn@ identifier i; type td; @@ -typedef struct i { ... } -td ; @@ type tn.td; identifier tn.i; @@ -td + struct i Signed-off-by: Himangi Saraogi <himangi774@gmail.com> Acked-by: Julia Lawall <julia.lawall@lip6.fr> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-08-25net: wireless: ipw2x00: ipw2200.c: Cleaning up missing null-terminate in ↵Rickard Strandqvist
conjunction with strncpy Replacing strncpy with strlcpy to avoid strings that lacks null terminate. Signed-off-by: Rickard Strandqvist <rickard_strandqvist@spectrumdigital.se> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-08-25wireless: wlcore: Use devm_kzallocHimangi Saraogi
This patch introduces the use of devm_kzalloc and does away with the kfrees in the probe and remove functions. Also, a couple of labels and the initial assignment of the ret variable in the probe function are removed. Signed-off-by: Himangi Saraogi <himangi774@gmail.com> Acked-by: Julia Lawall <julia.lawall@lip6.fr> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-08-25wil6210: fix access after free in wil_pcie_remove()Vladimir Kondratiev
'wil' released in wil_if_free(); save iomapped address aside to properly unmap it. Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-08-25wil6210: cfg80211_rx_mgmt to use GFP_ATOMICVladimir Kondratiev
Internally, cfg80211_rx_mgmt() takes lock: spin_lock_bh(&wdev->mgmt_registrations_lock); and therefore one can't use it with GFP_KERNEL allocation flags. When called with GFP_KERNEL, "sleep while atomic" warning triggered: <3>[242645.446224] BUG: sleeping function called from invalid context at kernel/mm/slub.c:926 <3>[242645.455516] in_atomic(): 1, irqs_disabled(): 0, pid: 18881, name: kworker/u16:0 <6>[242645.462868] CPU: 0 PID: 18881 Comm: kworker/u16:0 Tainted: G O 3.10.40-g619a884-00001-g357fa9c #2 <6>[242645.463044] Workqueue: wil6210_wmi wmi_event_worker [wil6210] <6>[242645.463087] Call trace: <6>[242645.463157] [<ffffffc000087390>] dump_backtrace+0x0/0x144 <6>[242645.463205] [<ffffffc0000874e4>] show_stack+0x10/0x1c <6>[242645.463259] [<ffffffc0009abc04>] dump_stack+0x1c/0x28 <6>[242645.463313] [<ffffffc0000c10c0>] __might_sleep+0xe0/0xf0 <6>[242645.463365] [<ffffffc00015a514>] kmem_cache_alloc+0x48/0x1e4 <6>[242645.463414] [<ffffffc00080d468>] __alloc_skb+0x48/0x164 <6>[242645.463466] [<ffffffc00097f2c4>] nl80211_send_mgmt+0x4c/0x1dc <6>[242645.463511] [<ffffffc000980268>] cfg80211_rx_mgmt+0x1bc/0x25c <6>[242645.463647] [<ffffffbffc005d64>] wmi_evt_rx_mgmt+0x21c/0x23c [wil6210] <6>[242645.463783] [<ffffffbffc0073b8>] wmi_event_worker+0x230/0x2f8 [wil6210] <6>[242645.463838] [<ffffffc0000afffc>] process_one_work+0x258/0x3d0 <6>[242645.463887] [<ffffffc0000b0fe0>] worker_thread+0x1f0/0x310 <6>[242645.463946] [<ffffffc0000b642c>] kthread+0xac/0xb8 Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-08-25wil6210: fix free'd memory access in wil_if_free()Vladimir Kondratiev
In the wil_priv_deinit(), wdev->netdev is accessed, so free_netdev() should not be called before mentioned call. Set wdev->netdev to NULL Make sure no more attempts to use it. It is used for debug printk if not NULL. This fix kernel panic on module unload and in case error on probe; if memory allocation debugging enabled. Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-08-25wil6210: Limit max number of associated stationsDedy Lansky
Add a module parameter to support setting the maximum number of stations that can be associated to an AP. Signed-off-by: Dedy Lansky <qca_dlansky@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-08-25wil6210: fix false "scan timeout"Vladimir Kondratiev
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>
2014-08-25wil6210: fix beamforming data reportingVladimir Kondratiev
When reading 'bf' file on debugfs, query beam forming status from firmware. Ignore CID's that return error or return all zeros. Remove obsolete code that used to maintain statistics on per-device basis, as now it is reported be per-CID and current. Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-08-25wil6210: convert debugfs to the table modeVladimir Kondratiev
Define tables for similar file entries, i.e. - table for debugfs_create_file - table for static parameters - table for parameters that are members of "wil" structure - table for blobs - table for interrupt controllers Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-08-25wil6210: Workaround for Sparrow with bad device idVladimir Kondratiev
If firmware broken on the boot time, Sparrow card enumerates as device 0x302 instead of 0x310. Allow using this ID Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-08-25wil6210: wait longer for hardware reset completionVladimir Kondratiev
Typical time for hardware reset, as measured, is about 200..250 msec. Adjust sleeping to use more relaxed msleep, increase sleep interval and increase total sleep time to be about 1sec Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-08-25wil6210: check error in wil_target_reset()Vladimir Kondratiev
When resetting target in wil_target_reset(), error may occur. Indicate error via error code. In case of error, don't attempt to further interact with card, specifically don't attempt firmware download or interrupts enabling. Move wil_rx_fini() to be always executed to prevent memory leak. Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-08-25wil6210: update copyright year 2014Vladimir Kondratiev
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>