1
0
Fork 0
Commit Graph

16394 Commits (9e9ff4b766e25624198b623fe3eda0b3e6c669cd)

Author SHA1 Message Date
Vladimir Kondratiev 47e19af9a7 wil6210: Refactor rx init/fini
Move WMI related operations to wmi.c as helper functions

Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-01-30 15:07:12 -05:00
Vladimir Kondratiev 2057ebb2bd wil6210: remove raw wil_dbg() calls
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>
2013-01-30 15:07:12 -05:00
Vladimir Kondratiev 4789d728e5 wil6210: rearrange IRQ debug printing
Make printings from IRQ appears in dmesg in chronological order

Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-01-30 15:07:11 -05:00
Vladimir Kondratiev 7269494e12 wil6210: Detect FW error
In the firmware, added is ability to report internal errors using IRQ.

Catch this IRQ and notify user space via netlink

User space get notified like (udevadm monitor --kernel --property):

KERNEL[12660.320520] change   /devices/pci0000:00/0000:00:1c.1/0000:02:00.0/0000:03:01.0/0000:05:00.0/net/wlan12 (net)
ACTION=change
DEVPATH=/devices/pci0000:00/0000:00:1c.1/0000:02:00.0/0000:03:01.0/0000:05:00.0/net/wlan12
DEVTYPE=wlan
EVENT=FW_ERROR
IFINDEX=6
INTERFACE=wlan12
SEQNUM=2489
SOURCE=wil6210
SUBSYSTEM=net

Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-01-30 15:07:10 -05:00
Cyril Roelandt 485f107d34 mwifiex: avoid out of bounds access in mwifiex_get_common_rates.
Check that the array indexes are in-bounds before accessing the rate2 and tmp
arrays.

Found with the following semantic patch:

<smpl>
@@
identifier t;
identifier idx;
expression E;
statement S;
@@
* for (... ; <+... t[idx] ...+> && idx < E ; ...)
S
</smpl>

Signed-off-by: Cyril Roelandt <tipecaml@gmail.com>
Acked-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-01-30 15:07:09 -05:00
Larry Finger 44ba973699 rtlwifi: Eliminate two empty routines
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-01-30 15:07:09 -05:00
Guenter Roeck 44ceaf371b net: iwlegacy: remove unused variable
Fix:

drivers/net/wireless/iwlegacy/4965.c: In function ‘il4965_post_associate’:
drivers/net/wireless/iwlegacy/4965.c:1751:25: warning: variable ‘conf’ set but
not used [-Wunused-but-set-variable]

seen when building allmodconfig on x86_64 with W=1 by removing the unused
variable.

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-01-30 15:07:08 -05:00
Christian Lamparter 00bcd0d699 iwlegacy: fix antenna bitmask
This patch is based on "iwlwifi: fix antenna bitmask".
(362b0563b2)

Like the new iwlagn devices, the old 4965N device only
supports a maximum of three antennas. Hence only three
bits are used, the fourth bit is likely the A-MPDU
indicator.

Cc: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-01-30 15:07:07 -05:00
Bing Zhao 5b2e2eccab mwifiex: do not overwrite error code from lower layer driver
Instead of converting it to a bogus error code -1, we should
return the original error code from lower layer driver. This
error code will be printed so it may give user some clues on
what has happened.

Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-01-30 15:07:05 -05:00
Alexey Khoroshilov 3220712d3a mwifiex: don't return zero on failure paths in mwifiex_pcie_init()
If pci_iomap() fails in mwifiex_pcie_init(), it breaks off initialization,
deallocates all resources, but returns zero.
The patch adds -EIO as return value in this case.

Found by Linux Driver Verification project (linuxtesting.org).

Signed-off-by: Alexey Khoroshilov <khoroshilov@ispras.ru>
Acked-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-01-30 15:07:04 -05:00
Anatol Pomozov baf58b0e8f rtl8723ae: Fix misspellings sucess->success
Signed-off-by: Anatol Pomozov <anatol.pomozov@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-01-30 15:06:55 -05:00
Yogesh Ashok Powar dcee7438ca mwl8k: Do not call STA specific cmds not supported by the AP fw
While using STA mode in the AP firmware, avoid
calling some firmware commands which are not
supported by the AP firmware.

Signed-off-by: Yogesh Ashok Powar <yogeshp@marvell.com>
Signed-off-by: Nishant Sarmukadam <nishants@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-01-30 15:06:53 -05:00
Yogesh Ashok Powar 41bf911910 mwl8k: Choose interface specific calls on vif type
Choose interface specific function calls
based on interface type instead of
firmware types.

Signed-off-by: Yogesh Ashok Powar <yogeshp@marvell.com>
Signed-off-by: Nishant Sarmukadam <nishants@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-01-30 15:06:53 -05:00
Yogesh Ashok Powar d994a1c867 mwl8k: Add/Del self entry for AP interface only
Add and delete self entry in the firmware sta database
for AP interface only. We do not need such an entry for
STA interface.

Signed-off-by: Yogesh Ashok Powar <yogeshp@marvell.com>
Signed-off-by: Nishant Sarmukadam <nishants@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-01-30 15:06:52 -05:00
Yogesh Ashok Powar 751930cb1d mwl8k: Enable hw encryption for STA mode on AP fw
Firmware supports hardware encryption feature
for the station interface running on AP
firmware.

Signed-off-by: Yogesh Ashok Powar <yogeshp@marvell.com>
Signed-off-by: Nishant Sarmukadam <nishants@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-01-30 15:06:51 -05:00
Yogesh Ashok Powar af458831c4 mwl8k: set mac type to MWL8K_MAC_TYPE_SECONDARY_CLIENT
Set mac type for station interface on AP firmware
as secondary. This allows the firmware to set specific
characteristics for the STA interface.

Signed-off-by: Yogesh Ashok Powar <yogeshp@marvell.com>
Signed-off-by: Nishant Sarmukadam <nishants@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-01-30 15:06:51 -05:00
Yogesh Ashok Powar d59c1cfd7c mwl8k: Allow adding station interface on AP firmware
When user wants to add a station interface when
AP firmware is loaded & in-use, allow creating
it and also notify user about the same.

Allow adding max one STA interface for AP fw.

Signed-off-by: Yogesh Ashok Powar <yogeshp@marvell.com>
Signed-off-by: Nishant Sarmukadam <nishants@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-01-30 15:06:50 -05:00
Yogesh Ashok Powar 2acdaa7a57 mwl8k: Announce simultaneous AP-STA support on AP fw
Specify the STA support in iface_limit and
in wihpy->interface_modes

Signed-off-by: Yogesh Ashok Powar <yogeshp@marvell.com>
Signed-off-by: Nishant Sarmukadam <nishants@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-01-30 15:06:49 -05:00
Yogesh Ashok Powar a246ac38cd mwl8k: Move tx/rx antenna configuration to mwl8k_probe_hw
This avoids calling mwl8k_cmd_rf_antenna functions every
time mwl8k_config function is called.

Signed-off-by: Yogesh Ashok Powar <yogeshp@marvell.com>
Signed-off-by: Nishant Sarmukadam <nishants@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-01-30 15:06:48 -05:00
Yogesh Ashok Powar 0f4316b97d mwl8k: Do not call mwl8k_cmd_set_rf_channel unconditionally
Avoid calling mwl8k_cmd_set_rf_channel unconditionally
by checking IEEE80211_CONF_CHANGE_CHANNEL.

Signed-off-by: Yogesh Ashok Powar <yogeshp@marvell.com>
Signed-off-by: Nishant Sarmukadam <nishants@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-01-30 15:06:48 -05:00
Yogesh Ashok Powar e882efc96d mwl8k: Stop bsses before hw specific commands
For the commands, that might change the hw characteristics
of the PHY device, stop the running bsses and resume them
once command is complete.

Signed-off-by: Yogesh Ashok Powar <yogeshp@marvell.com>
Signed-off-by: Nishant Sarmukadam <nishants@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-01-30 15:06:47 -05:00
Chun-Yeow Yeoh 4a5fc6d707 rt2x00: allow AP and mesh mode to operate simultaneously
Allow AP and Mesh mode to operate concurrently using
single radio. Verify this using fonera 2.0n featuring
RT3052 chipset and also TP-LINK TL-WN727N featuring
RT5370 chipset.

Signed-off-by: Chun-Yeow Yeoh <yeohchunyeow@gmail.com>
Acked-by: Helmut Schaa <helmut.schaa@googlemal.com>
Acked-by: Gertjan van Wingerde <gwingerde@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-01-30 15:06:44 -05:00
Stanislaw Gruszka 92941382e8 rt2x00: remove NOTICE
We use this macro only on 3 places - remove it and replace by other
appropriate macros for printing messages.

Signed-off-by: Stanislaw Gruszka <stf_xl@wp.pl>
Acked-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-01-30 15:06:43 -05:00
Stanislaw Gruszka bb9c298f31 rt2800usb: move "TX status missed" messages to debug level
Those messages can flood in dmesg, so do not print them by default.

Signed-off-by: Stanislaw Gruszka <stf_xl@wp.pl>
Acked-by: Gertjan van Wingerde <gwingerde@gmail.com>
Acked-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-01-30 15:06:43 -05:00
Stanislaw Gruszka 28f2bce9f8 rt2x00: print warning, notice and info as default
Some messages provide useful information, but are disabled without
CONFIG_RT2X00_DEBUG=y, so enable them by default

Signed-off-by: Stanislaw Gruszka <stf_xl@wp.pl>
Acked-by: Gertjan van Wingerde <gwingerde@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-01-30 15:06:42 -05:00
Sven Eckelmann 4ab0b0aa57 ath9k: Update spectral scan output data
The sample data received through the spectral scan can be either in big or
little endian byteorder. This information isn't stored in the output file.
Therefore it is not possible for the analyzer software to find the correct byte
order.

It is relative common to get the data from a low end AP in big endian mode and
transfer it to another computer in little endian mode to analyze it. Therefore,
it would be better to store it in network (big endian) byte order.

The extension of the 8 bit bins for each bin to 16 bit is not necessary. This
operation can be done in userspace or on a different machine. Instead the
max_exp defining the amount of shifting required for each bin is exported to
userspace.

The change of the output format requires a change of the type in the sample
tlv to allow the userspace program to correctly detect the bin format.

Reported-by: Zefir Kurtisi <zefir.kurtisi@neratec.com>
Signed-off-by: Sven Eckelmann <sven@open-mesh.com>
[siwu@hrz.tu-chemnitz.de: squashed patches, update commit message, rebase, fix endianess bug]
Signed-off-by: Simon Wunderlich <siwu@hrz.tu-chemnitz.de>
Signed-off-by: Mathias Kretschmer <mathias.kretschmer@fokus.fraunhofer.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-01-30 15:06:42 -05:00
Simon Wunderlich 3a325565c7 ath9k: reorder error codes for spectral
When using the spectral scan feature, frames with phy errors are
returned for further processing to the driver. However, if the frames
also have an invalid CRC (which seems to happen quite often), the frame
is marked with bad CRC and not with the PHY error bit. The FFT
processing function will thus miss the frames.

Fix this by changing the precedence in error marking.

Signed-off-by: Simon Wunderlich <siwu@hrz.tu-chemnitz.de>
Signed-off-by: Mathias Kretschmer <mathias.kretschmer@fokus.fraunhofer.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-01-30 15:06:41 -05:00
Simon Wunderlich 9b99e665f6 ath9k: drop spectral packets after processing them
Spectral packets are "bogus" packets and should not be further evaluated
by the RX path.

Statistics are added to keep track of these packets.

Signed-off-by: Simon Wunderlich <siwu@hrz.tu-chemnitz.de>
Signed-off-by: Mathias Kretschmer <mathias.kretschmer@fokus.fraunhofer.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-01-30 15:06:40 -05:00
Simon Wunderlich 04ccd4a1a6 ath9k: add debug parameters for spectral scan
Export the various parameters to userspace.

Signed-off-by: Simon Wunderlich <siwu@hrz.tu-chemnitz.de>
Signed-off-by: Mathias Kretschmer <mathias.kretschmer@fokus.fraunhofer.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-01-30 15:06:40 -05:00
Avinash Patil 6ccea75e70 mwifiex: fix invalid access of PCIe RxBD ring buffer descriptor
This patch fixes invalid access of RxBD ring buffer descriptor's
length and flag inside PCIe send_data_complete() routine. We are
supposed to modify TxBD buffer descriptor's length and flag here.

Signed-off-by: Avinash Patil <patila@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-01-30 15:06:39 -05:00
Stanislaw Gruszka def6452157 rt2x00: print chip and firmware version by default
Signed-off-by: Stanislaw Gruszka <stf_xl@wp.pl>
Tested-by: Xose Vazquez Perez <xose.vazquez@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-01-30 15:06:39 -05:00
Julia Lawall 29d7b331c7 drivers/net/wireless/iwlegacy/4965-mac.c: adjust duplicate test
Delete successive tests to the same location.  This looks like simple code
duplication.

A simplified version of the semantic match that finds this problem is as
follows: (http://coccinelle.lip6.fr/)

// <smpl>
@s exists@
local idexpression y;
expression x,e;
@@

*if ( \(x == NULL\|IS_ERR(x)\|y != 0\) )
 { ... when forall
   return ...; }
... when != \(y = e\|y += e\|y -= e\|y |= e\|y &= e\|y++\|y--\|&y\)
    when != \(XT_GETPAGE(...,y)\|WMI_CMD_BUF(...)\)
*if ( \(x == NULL\|IS_ERR(x)\|y != 0\) )
 { ... when forall
   return ...; }
// </smpl>

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-01-30 15:06:38 -05:00
John W. Linville 1698c6db42 Merge branch 'for-john' of git://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/iwlwifi-next 2013-01-30 14:23:08 -05:00
John W. Linville 20fb9e5033 Merge branch 'for-john' of git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211-next 2013-01-30 14:22:19 -05:00
Bing Zhao 8a7d7cbf7b mwifiex: fix incomplete scan in case of IE parsing error
A scan request is split into multiple scan commands queued in
scan_pending_q. Each scan command will be sent to firmware and
its response is handlded one after another.

If any error is detected while parsing IE in command response
buffer the remaining data will be ignored and error is returned.

We should check if there is any more scan commands pending in
the queue before returning error. This ensures that we will call
cfg80211_scan_done if this is the last scan command, or send
next scan command in scan_pending_q to firmware.

Cc: "3.6+" <stable@vger.kernel.org>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-01-30 14:13:09 -05:00
John W. Linville 56e1bd7706 Merge branch 'for-linville' of git://git.kernel.org/pub/scm/linux/kernel/git/luca/wl12xx
Conflicts:
	drivers/net/wireless/ti/wlcore/main.c
2013-01-29 14:03:20 -05:00
Larry Finger 0a06ad8e3a rtlwifi: Fix the usage of the wrong variable in usb.c
In routine _rtl_rx_pre_process(), skb_dequeue() is called to get an skb;
however, the wrong variable name is used in subsequent calls.

Reported-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Cc: Guenter Roeck <linux@roeck-us.net>
Cc: Stable <stable@vger.kernel.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-01-28 14:48:53 -05:00
Arend van Spriel 0e33e48ddc brcmsmac: fix tx status processing
This issue was reported on the wireless list (see [1]) in which
brcmsmac ran into a fatal error:

[  588.284074] brcmsmac bcma0:0: frameid != txh->TxFrameID
[  588.284098] brcmsmac bcma0:0: MI_TFS: fatal
[  588.284103] brcmsmac bcma0:0: wl0: fatal error, reinitializing
[  588.286208] ieee80211 phy0: Hardware restart was requested

The tx status feedback is processed in a loop limiting the number of
frames processed in one run. The code terminate processing when the
limit is reached regardless the txstatus value read from the device
register. When that status is is flagged as being valid it must be
processed as the hardware will clear it after is has been read.

Bisecting was done by Seth Forshee and showed following commit as the
culprit:

commit 57fe504817
Author: Piotr Haber <phaber@broadcom.com>
Date:   Wed Nov 28 21:44:07 2012 +0100

    brcmsmac: fix bounds checking in tx/rx

[1] http://www.spinics.net/lists/linux-wireless/msg101293.html

Reported-by: Linus Torvalds <torvalds@linux-foundation.org>
Tested-by: Seth Forshee <seth.forshee@canonical.com>
Reviewed-by: Hante Meuleman <meuleman@broadcom.com>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-01-28 14:48:52 -05:00
John W. Linville 006da9ebba Merge branch 'for-john' of git://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/iwlwifi-fixes 2013-01-28 14:47:43 -05:00
John W. Linville 4205e6ef4e Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next into for-davem 2013-01-28 14:43:00 -05:00
John W. Linville 9ebea3829f Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless
Conflicts:
	drivers/net/wireless/ath/ath9k/main.c
	drivers/net/wireless/iwlwifi/dvm/tx.c
2013-01-28 13:54:03 -05:00
Johannes Berg 97c7952792 iwlwifi: include debugfs.h
The iwl-op-mode.h file uses a struct dentry for debugfs
so should include debugfs.h.

Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2013-01-24 20:41:07 +01:00
Emmanuel Grumbach 887da9176e mac80211: provide the vif in rssi_callback
Since drivers can support several BSS / P2P Client
interfaces, the rssi callback needs to inform the driver
about the interface teh rssi event relates to.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2013-01-24 15:41:29 +01:00
Emmanuel Grumbach d13f1862c0 iwlwifi: provide RX page order
When the pages are to be used by front-end, it may need
to know the page order, provide it.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2013-01-24 13:36:32 +01:00
Johannes Berg 128e63ef07 iwlwifi: update copyright
Update Copyright notices to 2013.

Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2013-01-24 13:00:55 +01:00
Emmanuel Grumbach ae023b2795 Revert "iwlwifi: fix the reclaimed packet tracking upon flush queue"
This reverts commit f590dcec94
which has been reported to cause issues.

See https://lkml.org/lkml/2013/1/20/4 for further details.

Cc: stable@vger.kernel.org [3.7]
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2013-01-24 12:54:24 +01:00
John W. Linville e91d1694d3 Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless into for-davem 2013-01-23 14:34:00 -05:00
Felix Fietkau c5e818ef08 ath9k_hw: remove a useless WARN_ON
&ah->curchan->ani can never be NULL

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-01-22 16:05:32 -05:00
Felix Fietkau 9dbac67da3 ath9k_hw: reduce struct ar5416AniState size
It is kept per-channel, so removing unnecessary (or constant) fields from
it can save quite a bit of memory.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-01-22 16:05:31 -05:00
Felix Fietkau f5ffe23aa0 ath9k_hw: remove ath9k_hw_ani_setup and its variables
They are no longer needed for ANI functionality

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-01-22 16:05:31 -05:00
Felix Fietkau 0166b4beec ath9k_hw: make the initval parameter to ath9k_hw_write_array const
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-01-22 16:03:22 -05:00
Felix Fietkau 81b519504f ath9k: use ath_tx_process_buffer instead of open-coding similar code
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-01-22 16:03:21 -05:00
Felix Fietkau 1381559ba4 ath9k: clean up processing of pending tx frames on reset
Dropping packets from aggregation sessions is usually not a good idea, as
it might upset the synchronization of the BlockAck receive window of the
remote node. The use of the retry_tx parameter to reset/tx-drain functions
also seemed a bit arbitrary.
This patch removes this parameter altogether and ensures that pending tx
frames are not dropped for no good reason.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-01-22 16:03:21 -05:00
Felix Fietkau 0a62acb1c9 ath9k: stop rx after tx
Completing frame transmission can fail if the rx engine is stopped
prematurely, as the hw might be waiting for an ACK from the other side.
Shutting down tx before rx might make the DMA shutdown more reliable.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-01-22 16:02:15 -05:00
Cong Ding eee569e403 net: wireless/rtlwifi: fix uninitialized variable issue
The use of variable packet_beacon might be uninitialized in the three files.

Signed-off-by: Cong Ding <dinggnu@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-01-22 16:01:30 -05:00
Alexey Khoroshilov 662845057f iwlegacy: don't return zero on failure paths in il4965_pci_probe()
If hardware is not ready, il4965_pci_probe() breaks off initialization,
deallocates all resources, but returns zero.
The patch adds -EIO as return value in this case.

Found by Linux Driver Verification project (linuxtesting.org).

Signed-off-by: Alexey Khoroshilov <khoroshilov@ispras.ru>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-01-22 16:01:30 -05:00
Alexey Khoroshilov a2ca8ecb8f mwl8k: don't return zero on failure paths in mwl8k_probe[_hw]()
If pci_iomap() fails in mwl8k_probe(), it breaks off initialization,
deallocates all resources, but returns zero.
There is a similar issue when priv->rxd_ops is NULL in mwl8k_probe_hw().

The patch adds proper error code return values.

Found by Linux Driver Verification project (linuxtesting.org).

Signed-off-by: Alexey Khoroshilov <khoroshilov@ispras.ru>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-01-22 16:01:30 -05:00
Amitkumar Karwar 7532c7d013 mwifiex: correction in status codes used for association failure
When AP responds with appropriate status code, we forward that
code correctly to cfg80211. But sometimes when there is no
response from AP, our firmware uses proprietary status codes.
We will map authentication timeout to WLAN_STATUS_AUTH_TIMEOUT
and other proprietary codes to WLAN_STATUS_UNSPECIFIED_FAILURE.

Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-01-22 16:01:30 -05:00
Helmut Schaa 84e9e8ebd3 rt2x00: Improve TX status handling for BlockAckReq frames
Since rt2800 hardware isn't capable of reporting the TX status of
BlockAckReq frames implement the TX status handling of BARs in
rt2x00lib. We keep track of all BARs that are send out and try to
match incoming BAs to the appropriate BARs. This allows us to report a
more or less accurate TX status for BAR frames which in turn improves
BA session stability.

This is loosley based on Christian Lamparter's patch for carl9170
"carl9170: fix HT peer BA session corruption".

We have to walk the list of pending BARs for every rx'red BA even
though most BAs don't belong to any of these BARs as they are just
acknowledging an AMPDU. To keep that overhead low use RCU which allows
us to walk the list of pending BARs without the need to acquire a lock.
This however requires us to _copy_ relevant information from the BAR
(RA, TA, control field, start sequence number) into our BAR list entry.

Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com>
Tested-by: Andreas Hartmann <andihartmann@01019freenet.de>
Acked-by: Gertjan van Wingerde <gwingerde@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-01-22 16:01:29 -05:00
Dan Carpenter f49aabf816 prism54: bug in getting auth type
There is a missing break statement so SHARED_KEY authentication doesn't
work.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-01-22 16:01:29 -05:00
Dan Carpenter e03e8ddbfd b43: N-PHY: fix gain in b43_nphy_get_gain_ctl_workaround_ent()
There were no break statements in this switch statement so everything
used the default settings.  Per Walter Harms's suggestion, I've replaced
the switch statement and done a little cleanup.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-01-22 16:01:29 -05:00
Chen Gang 708d019fd1 drivers/net/wireless: need consider the not '\0' terminated string.
in ray_cs.c:
    the a_current_ess_id is "Null terminated unless ESSID_SIZE long"
    so we need buffer it with '\0' firstly, before using strlen or %s.

  additional information:
    in drivers/net/wireless/rayctl.h:
      "NULL terminated unless 32 long" is a comment at line 616, 664
      ESSID_SIZE is 32, at line 190
    in include/uapi/linux/wireless.h:
      IW_ESSID_MAX_SIZE is also 32
    in drivers/net/wireless/ray_cs.c:
      use strncpy for it, without '\0' terminated, at line 639
      use memcpy for it, assume not '\0' terminated in line 1092..1097
      buffer it with '\0' firstly, before using %s, in line 2576, 2598..2600

Signed-off-by: Chen Gang <gang.chen@asianux.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-01-22 16:01:29 -05:00
Felix Fietkau 6aaacd8615 ath9k_hw: fix RF bank initialization
ar900*_init_mode_regs needs to be called before RF banks are allocated,
otherwise the storage size of RF banks isn't known. This patch fixes
a memory overrun that can show up as a crash on unloading the module.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-01-22 15:58:48 -05:00
John W. Linville 066433a6fa Merge branch 'for-john' of git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211-next 2013-01-22 15:40:56 -05:00
John W. Linville aa3c90b890 Merge branch 'for-john' of git://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/iwlwifi-next 2013-01-22 15:39:51 -05:00
Avinash Patil 83f0c6d1f5 mwifiex: fix typo in PCIe adapter NULL check
Add missing "!" as we are supposed to check "!card->adapter"
in PCIe suspend handler.

Cc: "3.2+" <stable@vger.kernel.org>
Signed-off-by: Avinash Patil <patila@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Reviewed-by: Sergey V. <sftp.mtuci@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-01-22 14:33:44 -05:00
Felix Fietkau fea92cbf08 ath9k: allow setting arbitrary antenna masks on AR9003+
Cc: stable@vger.kernel.org
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-01-22 14:33:44 -05:00
Felix Fietkau 24171dd920 ath9k_hw: fix chain swap setting when setting rx chainmask to 5
Chain swapping should only be enabled when the EEPROM chainmask is set to 5,
regardless of what the runtime chainmask is.

Cc: stable@vger.kernel.org
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-01-22 14:33:44 -05:00
Felix Fietkau 4a8f199508 ath9k_hw: fix calibration issues on chainmask that don't include chain 0
Cc: stable@vger.kernel.org
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-01-22 14:33:43 -05:00
Larry Finger 430d25251e rtlwifi: Fix build warning introduced by commit a290593
The kbuild test robot reports the following warning with x86_64-randconfig-x955:

warning: (RTL8192CE && RTL8192SE && RTL8192DE && RTL8723AE && RTL8192CU) selects
 RTLWIFI which has unmet direct dependencies (NETDEVICES && WLAN &&
 (RTL8192CE || RTL8192CU || RTL8192SE || RTL8192DE))

This warning was introduced in commit a290593, "rtlwifi: Modify files for addition
of rtl8723ae", and is d ue to a missing dependence of RTLWIFI on RTL8723AE.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Cc: kbuild test robot <fengguang.wu@intel.com>
Reported-by: kbuild test robot <fengguang.wu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-01-22 14:33:43 -05:00
Stanislaw Gruszka fa4cffcba9 iwlegacy: fix IBSS cleanup
We do not correctly change interface type when switching from
IBSS mode to STA mode, that results in microcode errors.

Resolves:
https://bugzilla.redhat.com/show_bug.cgi?id=886946

Reported-by: Jaroslav Skarvada <jskarvad@redhat.com>
Cc: stable@vger.kernel.org
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-01-22 14:33:43 -05:00
John W. Linville cb4ec37d48 Merge branch 'for-john' of git://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/iwlwifi-fixes 2013-01-22 14:22:01 -05:00
Johannes Berg 0f19b41e22 mac80211: remove ARP filter enable/disable logic
Depending on the driver, having ARP filtering for
some addresses may be possible. Remove the logic
that tracks whether ARP filter is enabled or not
and give the driver the total number of addresses
instead of the length of the list so it can make
its own decision.

Reviewed-by: Luciano Coelho <coelho@ti.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2013-01-18 21:20:34 +01:00
Luciano Coelho 5b37649bbc Merge branch 'wl12xx-next' into for-linville
Conflicts:
	drivers/net/wireless/ti/wl12xx/main.c
	drivers/net/wireless/ti/wlcore/wlcore.h
2013-01-18 09:59:08 +02:00
John W. Linville 811477de5f Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless into for-davem 2013-01-17 12:07:44 -05:00
Emmanuel Grumbach 1c3fea82d6 iwlwifi: improve the reports in TX path
Also when things go wrong (queues don't get emtpy), try to
get some data from the HW.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2013-01-16 14:23:57 +01:00
Emmanuel Grumbach c3e5d7181a iwlwifi: audit single frames from AGG queue in RS
The rate scaling won't treat the information in a frame
with IEEE80211_TX_CTL_AMPDU set if IEEE80211_TX_STAT_AMPDU
is cleared. But all the frames coming from an AGG tx queue
have IEEE80211_TX_CTL_AMPDU set, and IEEE80211_TX_STAT_AMPDU
is set only if the frame was sent in an AMPDU.
This means that all the data in frames in AGG tx queues that
aren't sent as an AMPDU is thrown away.
This is even more harmful when in bad link conditions, the
frames are sent in an AMPDU and then finally sent as single
frame. So a lot of failures weren't reported and the rate
scaling got stuck in high rates leading to very poor
connectivity.

Fix that by clearing IEEE80211_TX_CTL_AMPDU when the frame
isn't part of an AMPDU.

This bug was introduced by

2eb81a40aa
iwlwifi: don't clear CTL_AMPDU on frame status

This fix basically reverts the aforementioned commit.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2013-01-16 14:20:20 +01:00
Johannes Berg ddaf5a5b30 iwlwifi: enable communication with WoWLAN firmware
On resuming, the opmode may have to be able to talk
to the WoWLAN/D3 firmware in order to query it about
its status and wakeup reasons. To do that, the opmode
has to call the new d3_resume() transport API which
will set up the device for command communcation.

Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2013-01-16 14:19:54 +01:00
Johannes Berg 22dc3c9561 iwlwifi: simplify scheduler memory clearing
Writing 130 dwords into the device one by one is
rather inefficient, every one needs to lock, grab
NIC access (a few register reads/writes) and then
write the address and data registers.

Use the new memory clearing function to make this
easier and faster.

Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2013-01-16 14:19:14 +01:00
Emmanuel Grumbach 01387ffd19 iwlwifi: allow to zero SRAM
Sending a NULL pointer to iwl_trans_write_mem allows now
to zero SRAM.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2013-01-16 14:18:56 +01:00
Johannes Berg b1cf1bc160 iwlwifi: don't enable all interrupts on resuming
Enabling the RF-kill interrupt is sufficient for getting
RF-kill notifications, and no other interrupt is needed
as the device isn't functional when suspended and will be
restarted/reconfigured when mac80211 resumes it later.

Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2013-01-16 14:18:06 +01:00
Johannes Berg d21fa2dad6 iwlwifi: don't memset scalar values
The dma_addr_t type is a scalar value, so it should
just be assigned, not memset.

Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2013-01-16 14:17:51 +01:00
David S. Miller 4b87f92259 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Conflicts:
	Documentation/networking/ip-sysctl.txt
	drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c

Both conflicts were simply overlapping context.

A build fix for qlcnic is in here too, simply removing the added
devinit annotations which no longer exist.

Signed-off-by: David S. Miller <davem@davemloft.net>
2013-01-15 15:05:59 -05:00
Fengguang Wu e2d4a24e03 ath9k_hw: ar9002_hw_spectral_scan_config() can be static
Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-01-14 15:10:40 -05:00
Felix Fietkau 4668cce527 ath9k: disable the tasklet before taking the PCU lock
Fixes a reported CPU soft lockup where the tasklet tries to acquire the
lock and blocks while ath_prepare_reset (holding the lock) waits for it
to complete.

Cc: stable@vger.kernel.org
Reported-by: Robert Shade <robert.shade@gmail.com>
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-01-14 15:02:22 -05:00
Felix Fietkau 463e3ed3ea ath9k: remove sc->rx.rxbuflock to fix a deadlock
The commit "ath9k: fix rx flush handling" added a deadlock that happens
because ath_rx_tasklet is called in a section that has already taken the
rx buffer lock.

It seems that the only purpose of the rxbuflock was a band-aid fix to the
reset vs rx tasklet race, which has been properly fixed in the commit
"ath9k: add a better fix for the rx tasklet vs rx flush race".

Now that the fix is in, we can safely remove the lock to avoid such issues.

Cc: stable@vger.kernel.org
Reported-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-01-14 15:02:21 -05:00
Luis R. Rodriguez 0c0280bd0b wireless: make the reg_notifier() void
The reg_notifier()'s return value need not be checked
as it is only supposed to do post regulatory work and
that should never fail. Any behaviour to regulatory
that needs to be considered before cfg80211 does work
to a driver should be specified by using the already
existing flags, the reg_notifier() just does post
processing should it find it needs to.

Also make lbs_reg_notifier static.

Signed-off-by: Luis R. Rodriguez <mcgrof@do-not-panic.com>
[move lbs_reg_notifier to not break compile]
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2013-01-14 11:32:44 +01:00
Felix Fietkau eab6d7921d ath9k_hw: add tx gain tables for newer devices
Improves stability on affected devices and also fixes the Tx IQ calibration
related regression on some AR9340 devices such as the TP-Link TL-WDR4300.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-01-11 14:50:00 -05:00
Simon Wunderlich aad12ede97 ath9k: fix spectral scan endless mode on AR9002
There was a copy+paste error in ar9002 for the endless spectral mode,
fix that.

Signed-off-by: Simon Wunderlich <siwu@hrz.tu-chemnitz.de>
Signed-off-by: Mathias Kretschmer <mathias.kretschmer@fokus.fraunhofer.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-01-11 14:49:59 -05:00
Thomas Pedersen b66851c3c8 mac80211_hwsim: fix beacon timestamp and mactime
Set the beacon timestamp once during "transmission" so the
monitor interface also gets a timestamped beacon.

Also use a common base between TX timestamp and RX
mactime. This eliminates "TX" path delay, which shows up
as a constant error in Toffset.

Get the global TSF once before iterating over all RX HWs,
so they all set a mactime with the same time base.

Signed-off-by: Thomas Pedersen <thomas@cozybit.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-01-11 14:49:58 -05:00
Piotr Haber a1fe52801a brcmsmac: increase timer reference count for new timers only
On hardware reintialization reference count of
already existing timers would be increased again.
This leads to problems on module unloading.

Cc: stable@vger.kernel.org
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Hante Meuleman <meuleman@broadcom.com>
Reviewed-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Piotr Haber <phaber@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-01-11 14:12:02 -05:00
Felix Fietkau 4b883f021b ath9k: fix rx flush handling
Right now the rx flush is not doing anything useful on AR9003+, as it only
works if the buffers in the rx FIFO have not been purged yet, as is done
by ath_stoprecv.

To fix this, always call ath_flushrecv from within ath_stoprecv before
the FIFO is emptied, but still after the hw receive path has been stopped.

This ensures that frames received (and ACKed by the hardware) shortly before
a reset will be seen by the software, which should improve A-MPDU session
stability.

Cc: stable@vger.kernel.org
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-01-11 14:12:02 -05:00
Felix Fietkau 7fc00a3054 ath9k: add a better fix for the rx tasklet vs rx flush race
Ensure that the rx tasklet is no longer running when entering the reset path.
Also remove the distinction between flush and no-flush frame processing.
If a frame has been received and ACKed by the hardware, the stack needs to see
it, so that the BA receive window does not go out of sync.

Cc: stable@vger.kernel.org
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-01-11 14:12:02 -05:00
Felix Fietkau 3adcf20afb ath9k: remove the WARN_ON that triggers if generating a beacon fails
During teardown, mac80211 will not return a new beacon. This is normal and
handled properly in the driver, so there's no need to spam the user with a kernel
warning here.

Cc: stable@vger.kernel.org
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-01-11 14:12:02 -05:00
Felix Fietkau 1adb2e2b5f ath9k: fix double-free bug on beacon generate failure
When the next beacon is sent, the ath_buf from the previous run is reused.
If getting a new beacon from mac80211 fails, bf->bf_mpdu is not reset, yet
the skb is freed, leading to a double-free on the next beacon tx attempt,
resulting in a system crash.

Cc: stable@vger.kernel.org
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-01-11 14:12:01 -05:00
Felix Fietkau a3dc48e82b ath9k: do not link receive buffers during flush
On AR9300 the rx FIFO needs to be empty during reset to ensure that no
further DMA activity is generated, otherwise it might lead to memory
corruption issues.

Cc: stable@vger.kernel.org
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-01-11 14:12:01 -05:00
Sujith Manoharan 0981c3b24e ath9k_htc: Fix memory leak
SKBs that are allocated in the HTC layer do not have callbacks
registered and hence ended up not being freed, Fix this by freeing
them properly in the TX completion routine.

Cc: <stable@vger.kernel.org>
Reported-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Tested-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-01-11 14:12:01 -05:00
Amitkumar Karwar 3b86acb808 mwifiex: correct config_bands handling for ibss network
BAND_G is implicit when BAND_GN is present.

Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-01-11 14:12:01 -05:00
Amitkumar Karwar d7b9c5204e mwifiex: update config_bands during infra association
Currently "adapter->config_bands" is updated during infra
association only if channel is provided by user in "iw connect"
command. config_bands is used while preparing association
request to calculate supported rates by intersecting our rates
with the rates advertised by AP.

There is corner case in which we include zero rates in
supported rates TLV based on previous IBSS network history,
which leads to association failure.

This patch fixes the problem by correctly updating config_bands.

Cc: "3.7.y" <stable@vger.kernel.org>
Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-01-11 14:12:00 -05:00
Simon Wunderlich e93d083f42 ath9k: add spectral scan feature
Adds the spectral scan feature for ath9k. AR92xx and AR93xx chips
are supported for now. The spectral scan is triggered by configuring
a mode through a debugfs control file. Samples can be gathered via
another relay debugfs file.

Essentially, to try it out:

echo chanscan > /sys/kernel/debug/ieee80211/phy0/ath9k/spectral_scan_ctl
iw dev wlan0 scan
cat /sys/kernel/debug/ieee80211/phy0/ath9k/spectral_scan0 > samples
echo disable > /sys/kernel/debug/ieee80211/phy0/ath9k/spectral_scan_ctl

This feature is still experimental.

The special "chanscan" mode is used to perform spectral scan while
mac80211 is scanning for channels. To allow this,
sw_scan_start/complete() ops have been added.

The patch contains code snippets and information from Zefir Kurtisi and
information provided by Adrian Chadd and Felix Fietkau.

Signed-off-by: Simon Wunderlich <siwu@hrz.tu-chemnitz.de>
Signed-off-by: Mathias Kretschmer <mathias.kretschmer@fokus.fraunhofer.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-01-09 14:37:12 -05:00