Commit Graph

16587 Commits

Author SHA1 Message Date
Lilach Edelstein e139dc4aeb iwlwifi: add iwl_set_bits_mask to transport API
Express iwl_set_bit() and iwl_clear_bit() through iwl_set_bits_mask()
and add the latter to the transport's API in order to allow different
implementation for different transport types in the future.

Signed-off-by: Lilach Edelstein <lilach.edelstein@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2013-02-01 11:27:22 +01:00
Johannes Berg 6690c01d16 iwlwifi: lower BT coex aggregation message severity
As the rate scaling algorithm will attempt to enable
aggregation over and over again, the message will
flood the log if there is, for example, Bluetooth
streaming music. Make it a debug messages instead of
printing it all the time.

Reported-by: Jan-Michael Brummer <jan.brummer@tabos.org>
Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2013-02-01 11:27:21 +01:00
Johannes Berg 8ca151b568 iwlwifi: add the MVM driver
Newer firmware revisions have a completely new
firmware API. This is the new driver for this
new API.

I've listed the people who directly contributed
code, but many others from various teams have
contributed in other ways.

Cc: Alexander Bondar <alexander.bondar@intel.com>
Cc: Amit Beka <amit.beka@intel.com>
Cc: Amnon Paz <amnonx.paz@intel.com>
Cc: Assaf Krauss <assaf.krauss@intel.com>
Cc: David Spinadel <david.spinadel@intel.com>
Cc: Dor Shaish <dor.shaish@intel.com>
Cc: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Cc: Eytan Lifshitz <eytan.lifshitz@intel.com>
Cc: Ilan Peer <ilan.peer@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2013-02-01 11:27:15 +01:00
Emmanuel Grumbach c65dd1477b mac80211: inform the driver about update of dtim_period
Currently, when the driver requires the DTIM period,
mac80211 will wait to hear a beacon before association.
This behavior is suboptimal since some drivers may be
able to deal with knowing the DTIM period after the
association, if they get it at all.

To address this, notify the drivers with bss_info_changed
with the new BSS_CHANGED_DTIM_PERIOD flag when the DTIM
becomes known. This might be when changing to associated,
or later when the entire association was done with only
probe response information.

Rename the hardware flag for the current behaviour to
IEEE80211_HW_NEED_DTIM_BEFORE_ASSOC to more accurately
reflect its behaviour. IEEE80211_HW_NEED_DTIM_PERIOD is
no longer accurate as all drivers get the DTIM period
now, just not before association.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2013-01-31 14:05:38 +01:00
Johannes Berg b1e1adfa7d iwlwifi: add NVM and PHY DB code for new MVM driver
The new MVM (multi-virtual MAC) firmware driver
requires NVM (non-volatile memory) parsing code
and some PHY information database code. Add this
separately.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2013-01-30 21:41:32 +01:00
Johannes Berg aa2b177083 iwlwifi: fix calibration parser
The firmware TLV for calibration data isn't
really a u64, but two u32 values. Define a
struct for that and change the parser.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2013-01-30 21:41:29 +01:00
Johannes Berg 4a4ee1010d iwlwifi: clean up CMD_MODE enum
Just format the enum better.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2013-01-30 21:41:26 +01:00
Johannes Berg 99cd471423 iwlwifi: add 7000 series device configuration
Add configuration and detection code for the new
7000 series, with 7260 and 3160 devices.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2013-01-30 21:41:24 +01:00
Johannes Berg de8d7a5380 Merge remote-tracking branch 'wireless-next/master' into iwlwifi-next 2013-01-30 21:39:54 +01:00
Vladimir Kondratiev c331997b6c wil6210: fix wil_vring_init_tx status
In case vring setup with the firmware failed,
success status was returned. fix it.

Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-01-30 15:07:19 -05:00
Vladimir Kondratiev 2acb4220b2 wil6210: Never delete Rx chain with firmware
Firmware crash on attempt to delete Rx chain.
Driver part of Rx chain removed only in preparation for the target reset;
as reset is the only flow that removes Rx chain in the firmware.

Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-01-30 15:07:19 -05:00
Vladimir Kondratiev afda8bb50b wil6210: checkpatch warnings
Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-01-30 15:07:18 -05:00
Vladimir Kondratiev 7743882d6f wil6210: fix checkpatch CamelCase warnings
Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-01-30 15:07:17 -05:00
Vladimir Kondratiev e08b5906cc wil6210: Reorder reset preparation sequence
Disable interrupts first to prevent spurious WMI events arrival

Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-01-30 15:07:16 -05:00
Vladimir Kondratiev 56f004b467 wil6210: Separate common code for mbox regs caching to function
Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-01-30 15:07:16 -05:00
Vladimir Kondratiev b98917d742 wil6210: Fix "don't scan after connect" logic
When connect times out, scan was not re-enabled.

Strictly say, it is firmware issue - it should issue "disconnect"
event but it does not. Compensate in the driver.

Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-01-30 15:07:15 -05:00
Vladimir Kondratiev 241804cb7b wil6210: Call skb_orphan() right before Rx indication
Other parts of Rx path (BACK logic) will need to access associated data

Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-01-30 15:07:14 -05:00
Vladimir Kondratiev cb901733b4 wil6210: Fix: Tx stall
Due to multi-tx-queue design, wil_start_xmit() used to be executed
concurrently for different queues. Then, these transmits delivered
to the same queue, creating race.

As result, Tx descriptor may be skipped, causing stall in hardware.

Convert to single Tx queue fixes it.

Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-01-30 15:07:14 -05:00
Vladimir Kondratiev 795ce73438 wil6210: Count Tx statistics on Tx completion
This allows to account for Tx errors

Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-01-30 15:07:13 -05:00
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
Johannes Berg 448cd55c37 Merge remote-tracking branch 'wireless-next/master' into HEAD 2013-01-29 12:16:22 +01: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
Kees Cook 6cba014857 drivers/net/wireless/rtlwifi: remove depends on CONFIG_EXPERIMENTAL
The CONFIG_EXPERIMENTAL config item has not carried much meaning for a
while now and is almost always enabled by default. As agreed during the
Linux kernel summit, remove it from any "depends on" lines in Kconfigs.

Cc: Larry Finger <Larry.Finger@lwfinger.net>
Cc: Chaoming Li <chaoming_li@realsil.com.cn>
Acked-by: John W. Linville <linville@tuxdriver.com>
Acked-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-01-22 12:01:36 -08:00
Kees Cook 73272db9d4 drivers/net/wireless/zd1211rw: remove depends on CONFIG_EXPERIMENTAL
The CONFIG_EXPERIMENTAL config item has not carried much meaning for a
while now and is almost always enabled by default. As agreed during the
Linux kernel summit, remove it from any "depends on" lines in Kconfigs.

CC: Ulrich Kunitz <kune@deine-taler.de>
Acked-by: John W. Linville <linville@tuxdriver.com>
Acked-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-01-22 12:01:36 -08:00
Kees Cook a4b4d2148c drivers/net/wireless/rtl818x: remove depends on CONFIG_EXPERIMENTAL
The CONFIG_EXPERIMENTAL config item has not carried much meaning for a
while now and is almost always enabled by default. As agreed during the
Linux kernel summit, remove it from any "depends on" lines in Kconfigs.

Acked-by: John W. Linville <linville@tuxdriver.com>
Acked-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-01-22 12:01:35 -08:00
Kees Cook a716ff169b drivers/net/wireless/rt2x00: remove depends on CONFIG_EXPERIMENTAL
The CONFIG_EXPERIMENTAL config item has not carried much meaning for a
while now and is almost always enabled by default. As agreed during the
Linux kernel summit, remove it from any "depends on" lines in Kconfigs.

CC: Ivo van Doorn <IvDoorn@gmail.com>
CC: Gertjan van Wingerde <gwingerde@gmail.com>
CC: Helmut Schaa <helmut.schaa@googlemail.com>
Acked-by: John W. Linville <linville@tuxdriver.com>
Acked-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Kees Cook <keescook@chromium.org>
Acked-by: Gertjan van Wingerde <gwingerde@gmail.com>
Acked-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-01-22 12:01:35 -08:00
Kees Cook ce15ffbeb9 drivers/net/wireless/p54: remove depends on CONFIG_EXPERIMENTAL
The CONFIG_EXPERIMENTAL config item has not carried much meaning for a
while now and is almost always enabled by default. As agreed during the
Linux kernel summit, remove it from any "depends on" lines in Kconfigs.

Acked-by: Christian Lamparter <chunkeey@googlemail.com>
Acked-by: John W. Linville <linville@tuxdriver.com>
Acked-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-01-22 12:01:35 -08:00
Kees Cook 23681908b5 drivers/net/wireless/ipw2x00: remove depends on CONFIG_EXPERIMENTAL
The CONFIG_EXPERIMENTAL config item has not carried much meaning for a
while now and is almost always enabled by default. As agreed during the
Linux kernel summit, remove it from any "depends on" lines in Kconfigs.

CC: Stanislav Yakovlev <stas.yakovlev@gmail.com>
Acked-by: John W. Linville <linville@tuxdriver.com>
Acked-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-01-22 12:01:35 -08:00
Kees Cook afd19ef0b1 drivers/net/wireless/b43: remove depends on CONFIG_EXPERIMENTAL
The CONFIG_EXPERIMENTAL config item has not carried much meaning for a
while now and is almost always enabled by default. As agreed during the
Linux kernel summit, remove it from any "depends on" lines in Kconfigs.

CC: Stefano Brivio <stefano.brivio@polimi.it>
Acked-by: John W. Linville <linville@tuxdriver.com>
Acked-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-01-22 12:01:35 -08:00
Kees Cook 49f82162ea drivers/net/wireless/ath/carl9170: remove depends on CONFIG_EXPERIMENTAL
The CONFIG_EXPERIMENTAL config item has not carried much meaning for a
while now and is almost always enabled by default. As agreed during the
Linux kernel summit, remove it from any "depends on" lines in Kconfigs.

CC: Christian Lamparter <chunkeey@googlemail.com>
Acked-by: John W. Linville <linville@tuxdriver.com>
Acked-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-01-22 12:01:35 -08:00
Kees Cook 33fd8fe985 drivers/net/wireless/ath/ath6kl: remove depends on CONFIG_EXPERIMENTAL
The CONFIG_EXPERIMENTAL config item has not carried much meaning for a
while now and is almost always enabled by default. As agreed during the
Linux kernel summit, remove it from any "depends on" lines in Kconfigs.

CC: Kalle Valo <kvalo@qca.qualcomm.com>
Acked-by: John W. Linville <linville@tuxdriver.com>
Acked-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-01-22 12:01:35 -08:00
Kees Cook 798f4e5eaa drivers/net/wireless: remove depends on CONFIG_EXPERIMENTAL
The CONFIG_EXPERIMENTAL config item has not carried much meaning for a
while now and is almost always enabled by default. As agreed during the
Linux kernel summit, remove it from any "depends on" lines in Kconfigs.

Acked-by: John W. Linville <linville@tuxdriver.com>
Acked-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-01-22 12:01:35 -08: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
Stephen Rothwell 0d4fb6e4cd wireless: remove conflicting version of print_hex_dump_bytes
This fixes the build due to there now being two copies of print_hex_dump_bytes
in the tree.

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-01-17 20:12:49 -08: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
Sujith Manoharan 1a26cda8e0 ath9k_hw: Fix radio programming for AR9550
For AR9550, program the synth value based on the ref. clock.
The logic for AR9550 is similar to AR9330, but keep the code
separate since changes for AR9330 are required - which would be
done later.

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-01-09 14:37:11 -05:00
Sujith Manoharan 2d7caefbaf ath9k_hw: Add TempCompensation feature for AR9550
Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-01-09 14:37:11 -05:00
Sujith Manoharan 3a6a62fbc9 ath9k_hw: Update initvals for QCA955x
Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-01-09 14:37:11 -05:00
Nishant Sarmukadam 4850b6d355 mwl8k: Wake up queues in mwl8k_start
If queues are stopped in mwl8k_stop,
these should be started in mwl8k_start

Signed-off-by: Nishant Sarmukadam <nishants@marvell.com>
Signed-off-by: Yogesh Powar <yogeshp@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-01-09 14:37:11 -05:00
Yogesh Ashok Powar 0dd13a48a9 mwl8k: Delete ampdu streams with state AMPDU_STREAM_NEW in sta remove
When a station deauths, we do not delete the streams with state
AMPDU_STREAM_NEW and these remain created forever. Fix this issue by
removing such streams in the driver

Signed-off-by: Nishant Sarmukadam <nishants@marvell.com>
Signed-off-by: Yogesh Ashok Powar <yogeshp@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-01-09 14:37:11 -05:00
Nishant Sarmukadam 9b0b11fb1e mwl8k: Disable tx_wait completion
Whenever TX ring is drained, priv->tx_wait still points
to a valid completion. Making sure that it points to
NULL before returning from the  mwl8k_tx_wait_empty
check.

Signed-off-by: Nishant Sarmukadam <nishants@marvell.com>
Signed-off-by: Yogesh Ashok Powar <yogeshp@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-01-09 14:37:10 -05:00
Sujith Manoharan 96da6fdd5a ath9k_hw: Use helper routines to simplify ar9003_hw_init_cal()
Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-01-09 14:37:10 -05:00
Sujith Manoharan dfcca60b88 ath9k_hw: Fix MCI init for AGC calibration
When AGC calibration is to be done, a GPM message with the
payload, MCI_GPM_WLAN_CAL_REQ has to be sent. Currently this falls
within the IQ-CAL code block which is incorrect. Fix this by using
a separate variable to decide when IQ-CAL is to be done separately
and call ar9003_mci_init_cal_req correctly.

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-01-09 14:37:10 -05:00
Sujith Manoharan 4656b8f680 ath9k_hw: Do not enable IQ-CAL for half/quarter rates
IQ calibration doesn't complete and times out for half/quarter
rates, so skip it correctly.

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-01-09 14:37:10 -05:00
John W. Linville 79afb22d09 Merge branch 'for-john' of git://git.sipsolutions.net/mac80211-next 2013-01-09 14:22:45 -05:00
John W. Linville a9b8a894ad Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless into for-davem 2013-01-09 11:01:37 -05:00
Jiri Pirko aaeb6cdfa5 remove init of dev->perm_addr in drivers
perm_addr is initialized correctly in register_netdevice() so to init it in
drivers is no longer needed.

Signed-off-by: Jiri Pirko <jiri@resnulli.us>
Signed-off-by: David S. Miller <davem@davemloft.net>
2013-01-08 18:00:48 -08:00
Avinash Patil e7f767a7d9 mwifiex: use map/unmap APIs in TX and RX to reduce memcpy
This patch is an enhacement to mwifiex_pcie driver to use
map/unmap PCI memory APIs. This reduces one memcpy each in TX
path and RX path, and enhances throughput.

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-07 15:18:30 -05:00
Avinash Patil fbd7e7ac6d mwifiex: flush TX ring for PCIe after disconnect or bss stop
This patch adds handler to clean PCIe TX rings after disconnect
or bss stop is called for PCIe based mwifiex driver.

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-07 15:18:30 -05:00
Avinash Patil fc33146090 mwifiex: use pci_alloc/free_consistent APIs for PCIe
This patch uses pci_alloc_consistent and pci_free_consistent
APIs for mwifiex_pcie driver. Consistent DMA memory is allocated
for TX, RX and event rings. Command buffer and command response
buffer also uses map/unmap memory APIs to download commands and
get command responses.

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-07 15:18:30 -05:00
Avinash Patil c6d1d87a10 mwifiex: add init_fw_port handler for PCIe interface
This patch adds support for init_fw_port handler for PCIe
interface, which resets RXBD read pointer for PCIe.
This fixes issue where RX doesn't work until some TX from
driver happens.

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-07 15:18:29 -05:00
Avinash Patil 659c478861 mwifiex: access interrupt status only while holding lock
This patch fixes a bug for few instances where PCIe interrupt
status variable is accessed without holding spin lock.
This can result into missing interrupts.

Fix this by copying interrupt status to a local variable and
then using it for calling specific routine.

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-07 15:18:29 -05:00
Sujith Manoharan 03c2dc7358 ath9k_hw: Fix calibration for AR9340
TX_IQ_ON_AGC_CAL should not be enabled for AR9340. TX-IQ calibration
is run as part of AGC calibration only for AR9485, AR9462 and AR9565.
For the others (AR9300, AR9330, AR9340), TX-IQ cal is done independent
of AGC-cal.

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-01-07 15:18:28 -05:00
Yogesh Ashok Powar c2f2e2029b mwl8k: bump firmware API to 3
New firmware is required to support
a) Add support for additional ampdu streams
b) Handle corresponding watchdog events to destroy ampdu streams

Bumping firmware API version by one.

Signed-off-by: Nishant Sarmukadam <nishants@marvell.com>
Signed-off-by: Yogesh Ashok Powar <yogeshp@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-01-07 15:18:27 -05:00
Yogesh Ashok Powar c27a54d3f1 mwl8k: Handle watchdog event with highest prioriry
Currently, command path waits till all the tx host queues
are empty. Whenever watchdog event is raised, firmware
expects driver to destroy ampdu queues immediately.

This requires corresponding commands i.e.
mwl8k_cmd_get_watchdog_bitmap and mwl8k_destroy_ba to be
sent without waiting for the tx queues to be completely
empty.

Use "watchdog_event_pending" to ensure the above mentioned
two commands are sent down immediately.

Signed-off-by: Nishant Sarmukadam <nishants@marvell.com>
Signed-off-by: Yogesh Ashok Powar <yogeshp@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-01-07 15:18:27 -05:00
Yogesh Ashok Powar cfacba12f5 mwl8k: Handle Watchdog events for the new ampdu streams
With more ampdu streams, we need to handle watchdog
events for the new ampdu streams. Handle these
events appropriately.

Earlier mwl8k_cmd_get_watchdog_bitmap used to return
only one stream index and hence bitwise operations
on the return value were not required. Now the function
returns a bitmap with different bits are mapped with
different stream indices.

Signed-off-by: Nishant Sarmukadam <nishants@marvell.com>
Signed-off-by: Yogesh Ashok Powar <yogeshp@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-01-07 15:18:27 -05:00
Yogesh Ashok Powar 07f6dda1e7 mwl8k: changing mwl8k_destroy_ba prototype
Currently, mwl8k_ampdu_stream is passed as one of the
argument to the function mwl8k_destroy_ba. Instead of
this pass only the stream index. This will be helpful
during watchdog event handling when bitmap of stream
indices are received.

Signed-off-by: Nishant Sarmukadam <nishants@marvell.com>
Signed-off-by: Yogesh Ashok Powar <yogeshp@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-01-07 15:18:27 -05:00
Yogesh Ashok Powar 7fb978b7e9 mwl8k: Enable support to support additional ampdu streams
Currently, we have 2 ampdu streams that can be created
simultaneously. Firmware is capable of supporting
additional streams. Add support to use these streams.

Signed-off-by: Nishant Sarmukadam <nishants@marvell.com>
Signed-off-by: Yogesh Ashok Powar <yogeshp@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-01-07 15:17:00 -05:00
Yogesh Ashok Powar 5f2a14940d mwl8k: set ack policy to normal
Set ACK policy to NORMAL when its not going to
be an AMPDU packet.

Signed-off-by: Yogesh Ashok Powar <yogeshp@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-01-07 15:17:00 -05:00
Yogesh Ashok Powar 96769caf8a mwl8k: Remove redundant txq_idx
Ampdu stream index can be derived from stream->idx.
So we no longer need stream->txq_idx, hence removing it.

Signed-off-by: Nishant Sarmukadam <nishants@marvell.com>
Signed-off-by: Yogesh Ashok Powar <yogeshp@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-01-07 15:17:00 -05:00
Sujith Manoharan 1a6e5d7c96 ath9k_hw: Remove TEMP_COMP_CAL
This is not enabled for any chip and is unused.

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-01-07 15:17:00 -05:00
Sujith Manoharan b686929c54 ath9k_hw: Enable calibration types in init_cal_settings
Doing this in ath9k_hw_fill_cap_info() is odd and it's
cleaner to do this in the init function for calibration.
Also, setup the supported calibration type in init_cal_settings.

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-01-07 15:16:59 -05:00
Avinash Patil 54428c57b6 mwifiex: parse WMM IEs from hostapd for mwifiex AP
This patch adds support for parsing WMM IEs from hostapd
and setting them to FW via sys configure command.

Patch also sets wiphy flag to advertise AP uAPSD support.

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-07 15:16:59 -05:00
Amitkumar Karwar d35f1035b5 mwifiex: use correct htcapinfo for HT20 ibss network
It is observed that same htcapinfo ie is included in beacon for
HT20, HT40+ and HT40- ibss networks. This patch makes sure that
we will not advertise 40Mhz flags while creating/joining ibss
network in HT20 mode.

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-07 15:16:59 -05:00
Sasha Levin fc40ca9234 wireless: mwifiex: remove unreachable paths
We know 'firmware' is non-NULL from the beginning of mwifiex_prog_fw_w_helper,
remove all !firmware paths from the rest of the function.

Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-01-07 15:16:59 -05:00
Alexey Khoroshilov 6960af6dce p54pci: don't return zero on failure paths in p54p_probe()
If pci_set_dma_mask() or pci_set_consistent_dma_mask() fails in p54p_probe(),
it breaks off initialization, deallocates all resources, but returns zero.
Similar issue is if check for returned value of pci_resource_len() fails.

The patch implements proper error code propagation.

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

Signed-off-by: Alexey Khoroshilov <khoroshilov@ispras.ru>
Acked-by: Christian Lamparter <chunkeey@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-01-07 15:16:59 -05:00
Hante Meuleman 40a2329685 brcmfmac: Update init code routines from interface up.
On interface up dongle gets inialized. Move UP command to common
routine and update these common init routines using ifp.

Reviewed-by: Arend Van Spriel <arend@broadcom.com>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Signed-off-by: Hante Meuleman <meuleman@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-01-07 15:16:58 -05:00
Hante Meuleman 88d1239a1b brcmfmac: Removing obsolete variables and inline functions.
Reviewed-by: Arend Van Spriel <arend@broadcom.com>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Signed-off-by: Hante Meuleman <meuleman@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-01-07 15:16:58 -05:00
Hante Meuleman 80fd2dbee0 brcmfmac: Return correct error on netdev xmit.
Netdev xmit routine brcfm_netdev_start_xmit was defined
incorrectly and used wrong return codes. Always eat the
packet and return ok. Remove drvr_up check since it is not
relevant.

Reviewed-by: Arend Van Spriel <arend@broadcom.com>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Signed-off-by: Hante Meuleman <meuleman@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-01-07 15:16:58 -05:00
Hante Meuleman 03abad08bb brcmfmac: Remove unused caching dongle error.
CDC errors are retained. However, it is never used so it can
be removed.

Reviewed-by: Arend Van Spriel <arend@broadcom.com>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Signed-off-by: Hante Meuleman <meuleman@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-01-07 15:16:58 -05:00
Arend van Spriel b84e3112ec brcmfmac: remove unnecessary curly braces in dhd_attach()
Stumbled into a curly braces used for if statement with only
one conditional statement. Removing them.

Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Hante Meuleman <meuleman@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-01-07 15:16:57 -05:00
Arend van Spriel 12b33dacb4 brcmfmac: cleanup netdev transmit callback
The header of the ethernet packet is processed conditionally, but
the check is wrong as it checks skb length is at least ETH_ALEN. It
should check it is at least sizeof struct ethhdr instead.

Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Hante Meuleman <meuleman@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-01-07 15:16:57 -05:00
Arend van Spriel 7833b5799f brcmfmac: remove unused event related definitions
The driver had some global definitions in dhd.h to map event
identifiers to event names. With redesign of firmware event
processing this has all moved to fweh module so these definitions
can be removed.

Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Hante Meuleman <meuleman@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-01-07 15:16:57 -05:00
Hante Meuleman a6cfb1477d brcmfmac: Use dedicated trace level for CDC.
CDC debug is partly done with TRACE and partly with CTL, however
CDC hardly ever needs debugging. Use dedicated level CDC and
replace TRACE and CTL in dhd_cdc with that.

Reviewed-by: Arend Van Spriel <arend@broadcom.com>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Signed-off-by: Hante Meuleman <meuleman@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-01-07 15:16:57 -05:00
Arend van Spriel a43af515f6 brcmfmac: remove brcmf_proto_hdrpull() from bus interface
The use of the function brcmf_proto_hdrpull() is moved to the
common part of the driver and consequently it can be removed
from the bus interface.

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-07 15:16:56 -05:00
Arend van Spriel 3aa7aad2b2 brcmfmac: remove rx helper function from bus interface
The bus interface provided a wrapper function to pass a single
packet to the common driver part filling a skb queue with one
packet. For clarity the caller now sets up the skb queue and
call the rx bus interface function.

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-07 15:16:56 -05:00
Arend van Spriel 79d7c4e8da brcmfmac: define pr_fmt in one place
Several source files (but not all) define the pr_fmt() macro in exactly
the same way. Instead this commit defines it in a header file so driver
logging is consistent.

Cc: Joe Perches <joe@perches.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-07 15:16:56 -05:00
Arend van Spriel 81d5f1bbc4 brcmfmac: assure USB dongle firmware is reset upon module unload
Upon unloading the brcmfmac module the USB firmware should be reset
as the device remains powered. The reset assures a known device
state when a new brcmfmac driver load is being done.

Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Hante Meuleman <meuleman@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-01-07 15:16:56 -05:00
Hante Meuleman ac744395ba brcmfmac: removed deprecated set_bitrate_mask support
Set bitrate_mask is not desired anymore. The firmware will
determine the correct rates to be used.

Reviewed-by: Arend Van Spriel <arend@broadcom.com>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Signed-off-by: Hante Meuleman <meuleman@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-01-07 15:16:56 -05:00
Hante Meuleman 0429a6fa6b brcmfmac: do not reconfigure refill rx on 0-length packet.
When USB device gets removed rx complete comes with 0-length
packets. Do not refill those packets. In some rare cases it can
cause infinite loop.

Reviewed-by: Arend Van Spriel <arend@broadcom.com>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Signed-off-by: Hante Meuleman <meuleman@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-01-07 15:16:55 -05:00
Piotr Haber 637ccc27f4 brcmsmac: remove dead code
Dead code after AMPDU restructure.

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-07 15:16:55 -05:00
Arend van Spriel b180b10056 brcmsmac: allow user-space setting of interface address
The interface address of the wireless device is determined by
the permanent address stored in the device. This patch allows
it to be overridden from user-space.

Reported-by: Maximilian Engelhardt <maxi@daemonizer.de>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-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-07 15:16:55 -05:00
Arend van Spriel 66578c0a8c brcmsmac: use perimeter lock in add_interface() callback
All callbacks that access driver functions should do that under
perimeter lock protection. The add_interface() callback was lacking
this lock.

Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-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-07 15:16:55 -05:00
Piotr Haber 01486c5ad3 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.

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-07 15:16:54 -05:00
Gabor Juhos a02308e931 rt2x00: rt2800: convert read_eeprom functions to return an int value
Both the rtt2x00usb_eeprom_read and the ioremap
functions are allowed to fail, however their
return values are not checked in the read_eeprom
functions in the rt2800{pci,usb} drivers.

The patch adds the missing checks, and converts
all read_eeprom functions to return an int value,
so the error values can be propagated up to the
'rt2800_validate_eeprom' function.

Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-01-07 15:16:54 -05:00
Sujith Manoharan e1b97c9bc5 ath9k_hw: Remove AR9485 1.0 macro
Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-01-07 15:16:54 -05:00
Geert Uytterhoeven c2397bb0c5 brcmsmac: initialize morepending in brcms_b_recv()
drivers/net/wireless/brcm80211/brcmsmac/main.c: In function ‘brcms_b_recv’:
drivers/net/wireless/brcm80211/brcmsmac/main.c:7636: warning: ‘morepending’ may be used uninitialized in this function

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Acked-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-01-07 15:16:54 -05:00
Stanislaw Gruszka 07db8f8fe9 iwlegacy: allow to enable PS
Power save support was removed from iwlegacy due to possible firmware
crashes problems it cause. I use to plan first inspect code to find
reason of problems, fix them and then allow to enable PS. But
realistically - code inspection will not happen, so let's do it, and
wait for eventual bug reports.

Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-01-07 15:16:53 -05:00
Stanislaw Gruszka 70277f47b5 iwlegacy: add flush callback
Dump implementation of flush, which just wait until all TX queues
become empty.

Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-01-07 15:16:53 -05:00
Gabor Juhos 93476b1e68 ath9k: fix column header comments for some initval arrays
Some 3-column initval arrays have wrong comments. The
column of these arrays is indexed by the 'freqIndex'
variable in 'ar5008_hw_process_ini' which only depends
on the actual band.

The 'initvals' tool from 'qca-swiss-army-knife' prints
the correct comment lines for these arrays, since commit
'atheros-initvals: fix comments for non-fastclock 3-column tables'
however the comments were not refreshed in ath9k.

The patch contains no functional changes.

Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-01-07 15:16:53 -05:00
Christian Lamparter 1f1d9654e1 carl9170: refactor carl9170_update_beacon
This patch moves parts of carl9170_update_beacon
into separate subroutines, so the parts become
more manageable.

Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-01-07 15:16:53 -05:00
Christian Lamparter 558925f313 carl9170: remove custom NUM_TID and friends
The commit: "mac80211: introduce IEEE80211_NUM_TIDS and use it"
introduced a generic NUM_TID definitions for all everyone.

Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-01-07 15:16:53 -05:00
Christian Lamparter 55fa645e3a carl9170: disable hw crypto for p2p networks
While the driver supports HW offload in a single
P2P client configuration, it doesn't support HW
offload in the concurrent P2P GO+CLIENT
configuration.

Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-01-07 15:16:52 -05:00
Christian Lamparter 7a5c730773 carl9170: don't enable hw crypto offload, if the fw doesn't support it
Previously, op_start would set disable_offload always
to false, even if it was set to true by the fw parser.

Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-01-07 15:16:52 -05:00
Christian Lamparter 17f658ac8c carl9170: Only specify interface combinations if more than one interface is possible
Otherwise carl9170 triggers a warning in cfg80211, from net/wireless/core.c

	/* Combinations with just one interface aren't real */
	if (WARN_ON(c->max_interfaces < 2))

Note: The number of supported interfaces is set by
the carl9170 firmware. The default number of
supported interfaces for all current firmwares is 2.
Therefore this warning can only be observed with
custom firmwares.

Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-01-07 15:16:52 -05:00
Christian Lamparter 7f878b0d96 carl9170: allow P2P_GO interface creation after P2P_CLIENT
Janusz Dziedzic reported that after a change in wpa_supplicant
["nl80211: Automatically use concurrent P2P if possible"],
carl9170 was no longer able to host a P2P network.

This patch tackles the problem by allowing GO interfaces to be
registered, long after the P2P_CLIENT interface is brought up.

Reported-by: Janusz Dziedzic <janusz.dziedzic@gmail.com>
Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-01-07 15:16:52 -05:00
Christian Lamparter 5ae994d098 carl9170: import 1.9.7 firmware headers
Import new headers from my firmware branch:
<https://github.com/chunkeey/carl9170fw>

visit our wiki at:
<http://wireless.kernel.org/en/users/Drivers/carl9170.fw>

Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-01-07 15:16:51 -05:00
Christian Lamparter d1f3de71a5 carl9170: advertise support for TDLS
Based on a quick test [ath9k and carl9170],
TDLS seemed to be working fine. And while
we are at it, let's move the wiphy feature
flag set from carl9170_alloc into a single
place in carl9170_fw.

Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-01-07 15:16:51 -05:00
Felix Fietkau c1b976d2fc ath9k_hw: use the devres API for allocations
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Acked-by: Luis R. Rodriguez <mcgrof@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-01-07 15:16:51 -05:00
Felix Fietkau b81950b165 ath9k: use the devres API for allocations/mappings
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Acked-by: Luis R. Rodriguez <mcgrof@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-01-07 15:16:51 -05:00
Stanislaw Gruszka d5374ef13e rt2800: refactor RFCSR initialization
rt2800_init_rfcsr() is too big, split RF initialization into per chip
functions. Code will change, but we should setup the same values onto
RF registers and in the same order as before.

Signed-off-by: Stanislaw Gruszka <stf_xl@wp.pl>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-01-07 15:16:50 -05:00
John W. Linville 48c6cc04c9 Merge branch 'for-john' of git://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/iwlwifi-next 2013-01-07 14:57:43 -05:00
Larry Finger 5e20a4b530 b43: Fix firmware loading when driver is built into the kernel
Recent versions of udev cause synchronous firmware loading from the
probe routine to fail because the request to user space would time
out. The original fix for b43 (commit 6b6fa58) moved the firmware
load from the probe routine to a work queue, but it still used synchronous
firmware loading. This method is OK when b43 is built as a module;
however, it fails when the driver is compiled into the kernel.

This version changes the code to load the initial firmware file
using request_firmware_nowait(). A completion event is used to
hold the work queue until that file is available. This driver
reads several firmware files - the remainder can be read synchronously.
On some test systems, the async read fails; however, a following synch
read works, thus the async failure falls through to the sync try.

Reported-and-Tested by: Felix Janda <felix.janda@posteo.de>
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Cc: Stable <stable@vger.kernel.org>  (V3.4+)
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-01-07 14:34:45 -05:00
Chen Gang 407ee23725 drivers/net/wireless/iwlegacy: use strlcpy instead of strncpy
The fields must be null-terminated, or simple_strtoul will cause issue.

Signed-off-by: Chen Gang <gang.chen@asianux.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-01-07 14:34:45 -05:00
Nickolai Zeldovich c4f74d35ca drivers/net/wireless/mwl8k.c: avoid use-after-free
Do not dereference p->station_id after kfree(cmd) because p
points into the cmd data structure.

Signed-off-by: Nickolai Zeldovich <nickolai@csail.mit.edu>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-01-07 14:34:44 -05:00
Julian Wollrath 111b72a2f0 rtlwifi: Fix typo in debug output of rtl8192c and rtl8723ae
Signed-off-by: Julian Wollrath <jwollrath@web.de>
Acked-by: Larry Finger <Larry.finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-01-07 14:32:24 -05:00
Jiri Pirko 81135548e6 net: use ETHTOOL_FWVERS_LEN instead of ETHTOOL_BUSINFO_LEN for fw_ver strings
Signed-off-by: Jiri Pirko <jiri@resnulli.us>
Signed-off-by: David S. Miller <davem@davemloft.net>
2013-01-06 21:06:31 -08:00
Jiri Pirko 7826d43f2d ethtool: fix drvinfo strings set in drivers
Use strlcpy where possible to ensure the string is \0 terminated.
Use always sizeof(string) instead of 32, ETHTOOL_BUSINFO_LEN
and custom defines.
Use snprintf instead of sprint.
Remove unnecessary inits of ->fw_version
Remove unnecessary inits of drvinfo struct.

Signed-off-by: Jiri Pirko <jiri@resnulli.us>
Signed-off-by: David S. Miller <davem@davemloft.net>
2013-01-06 21:06:31 -08:00
Vladimir Kondratiev 2be7d22f06 wireless: add new wil6210 802.11ad 60GHz driver
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>
2013-01-04 16:10:53 -05:00
Amitkumar Karwar c3ff0b2dff mwifiex: fix typo in setting up ibss network parameters
commit 683b6d3... "cfg80211: pass a channel definition struct"
accidentally changed "==" to "!=".

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-04 16:09:48 -05:00
Bing Zhao 9c969d8ccb mwifiex: check wait_event_interruptible return value
wait_event_interruptible function returns -ERESTARTSYS if it's
interrupted by a signal. Driver should check the return value
and handle this case properly.

In mwifiex_wait_queue_complete() routine, as we are now checking
wait_event_interruptible return value, the condition check is not
required. Also, we have removed mwifiex_cancel_pending_ioctl()
call to avoid a chance of sending second command to FW by other path
as soon as we clear current command node. FW can not handle two
commands simultaneously.

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-04 16:09:48 -05:00
John W. Linville a910c9cab6 Merge branch 'for-john' of git://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/iwlwifi-fixes 2013-01-04 16:06:11 -05:00
John W. Linville 7b87e57341 Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless into for-davem 2013-01-04 15:22:52 -05:00
Vladimir Kondratiev 9a6f7347f5 ath9k: Fix Kconfig for ATH9K_HTC
Ath9k consists of 2 different sub-modules: ATH9K and ATH9K_HTC.
Both uses common Atheros code from ath.ko and need ATH_COMMON.

However, while ATH9K selects ATH_COMMON, ATH9K_HTC does not.
As result, if ATH9K_HTC is the only Atheros card selected, compilation fails with
unresolved symbols.

This patch moves ATH_COMMON selection to the common part for both
ATH9K and ATH9K_HTC

Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-01-04 14:34:27 -05:00
Thomas Pedersen c51f878379 mac80211_hwsim: fix beacon timing
A beacon period starts at TSF time 0. Spoof this by
rounding the starting beacon time to a multiple of the
beacon interval, and keep TBTT aligned on TSF adjustment.

Signed-off-by: Thomas Pedersen <thomas@cozybit.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2013-01-04 14:01:55 +01:00
Thomas Pedersen 01e59e467e mac80211_hwsim: hrtimer beacon
For testing various timing-sensitive protocols (power
save, MBCA, etc.), a beacon accuracy of jiffies is not
sufficient. A tasklet_hrtimer is used for the beacon since
it runs the callback in soft-IRQ context with hrtimer
resolution.

Also handle BSS_CHANGED_BEACON_ENABLED for hwsim.

Signed-off-by: Thomas Pedersen <thomas@cozybit.com>
[simplify timer container_of]
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2013-01-04 13:58:01 +01:00
Thomas Pedersen 45034bfb8c mac80211_hwsim: fix tsf adjustment
Make hwsim TSF offset adjustments cumulative and relative
to the fake PHY TSF. Now adding 1000us, then adding -1000us
doesn't result in a tsf_offset of -1000. Also the beacon
timestamp can now correctly be expressed as (tsf +
data->tsf_offset), which will be done in a later patch.

Signed-off-by: Thomas Pedersen <thomas@cozybit.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2013-01-04 13:52:50 +01:00
Emmanuel Grumbach abae2386d5 iwlwifi: always check that grab_nic_access succeeds
This allows to let sparse check that the NIC access is
always released.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2013-01-03 15:34:11 +01:00
Eytan Lifshitz c8f9b0feab iwlwifi: fix spelling and value in LED registers.
Fix typo in the macro name and the wrong value.

Signed-off-by: Eytan Lifshitz <eytan.lifshitz@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2013-01-03 15:33:29 +01:00
Johannes Berg 0aa86df673 iwlwifi: move some PCIe calls to better places
Synchronizing the IRQ is pointless when we will
then enable the RF-Kill interrupt again, but is
needed before we free it and the data needed to
handle IRQs; move it to the free function.

Simiarly, cancelling the replenish work struct
can move to the function that frees the RX data
structures.

Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2013-01-03 15:33:00 +01:00
Johannes Berg a8b691e610 iwlwifi: request IRQ only once
There's no need to request the IRQ every time the
device is started, we can request it just once.

Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2013-01-03 15:32:45 +01:00
Emmanuel Grumbach 653ea7a6a5 iwlwifi: don't treat a bool as an error code
iwl_trans_grab_nic_access returns a boolean. So ret should
explicitely set to an error code and not rely on the value
returned by iwl_trans_grab_nic_access.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2013-01-03 15:32:26 +01:00
Emmanuel Grumbach f590dcec94 iwlwifi: fix the reclaimed packet tracking upon flush queue
There's a bug in the currently released firmware version,
the sequence control in the Tx response isn't updated in
all cases. Take it from the packet as a workaround.

Cc: stable@vger.kernel.org
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2013-01-03 15:31:15 +01:00
Emmanuel Grumbach 4fd442db98 iwlwifi: virtualize SRAM access
Different transports implement the access to the SRAM in
different ways. Virtualize it.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2013-01-03 15:30:19 +01:00
Emmanuel Grumbach 7a65d17053 iwlwifi: virtualize iwl_{grab,release}_nic_access
Since different transports have different ways to wake the
up the NIC, we need to virtualize it.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2013-01-03 15:29:46 +01:00
Johannes Berg 392d4cad79 iwlwifi: fix PCIe interrupt handle return value
By accident, commit eb6476441b
("iwlwifi: protect use_ict with irq_lock") changed the return
value of the iwl_pcie_isr() function in case it handles an
interrupt -- it now returns IRQ_NONE instead of IRQ_HANDLED.

Put back the correct return value.

Cc: stable@vger.kernel.org
Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2013-01-03 15:29:15 +01:00
Johannes Berg f317243a8b iwlwifi: use __packed
Use __packed instead of __attribute__((packed)).

Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2013-01-03 15:28:52 +01:00
Emmanuel Grumbach 6ae02f3ef7 iwlwifi: let the op_mode run a FW while in RFKILL
In some cases, the fw should run even if the NIC is in
RFKILL. Make the API more flexible to allow that.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2013-01-03 15:28:16 +01:00
Emmanuel Grumbach d28cbdef8c iwlwifi: don't verify fw after download
No need to verify that the fw has been written correctly.
In case it hasn't, we won't get ALIVE notification.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2013-01-03 15:27:41 +01:00
Emmanuel Grumbach da58eefa6d iwlwifi: clean up code in AGG
If we take a pointer to the tid_data, then use it.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2013-01-03 15:26:56 +01:00
Emmanuel Grumbach 046db34638 iwlwifi: make the BC table layout configurable
This is needed for newer NICs.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2013-01-03 15:24:37 +01:00
Johannes Berg 18b559d5db mac80211: split TX aggregation stop action
When TX aggregation is stopped, there are a few
different cases:
 - connection with the peer was dropped
 - session stop was requested locally
 - session stop was requested by the peer
 - connection was dropped while a session is stopping

The behaviour in these cases should be different, if
the connection is dropped then the driver should drop
all frames, otherwise the frames may continue to be
transmitted, aggregated in the case of a locally
requested session stop or unaggregated in the case of
the peer requesting session stop.

Split these different cases so that the driver can
act accordingly; however, treat local and remote stop
the same way and ask the driver to not send frames as
aggregated packets any more.

In the case of connection drop, the stop callback the
driver is otherwise supposed to call is no longer
required.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2013-01-03 13:01:42 +01:00
Johannes Berg 361c9c8b0e regulatory: use IS_ERR macro family for freq_reg_info
Instead of returning an error and filling a pointer
return the pointer and an ERR_PTR value in error cases.

Acked-by: Luis R. Rodriguez <mcgrof@do-not-panic.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2013-01-03 13:01:31 +01:00
Johannes Berg fe7ef5e9ba regulatory: remove handling of channel bandwidth
The channel bandwidth handling isn't really quite right,
it assumes that a 40 MHz channel is really two 20 MHz
channels, which isn't strictly true. This is the way the
regulatory database handling is defined right now though
so remove the logic to handle other channel widths.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2013-01-03 13:01:28 +01:00
Johannes Berg a357d7f985 mac80211_hwsim: allow testing paged RX
Paged RX, i.e. SKBs with (some of) the data in pages instead
of the SKB header data (skb->data) can behave differently in
the stack and cause other bugs. To make debugging easier add
an option to hwsim to test with such SKBs.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2013-01-03 13:01:15 +01:00
Hante Meuleman 619c5a9ad5 brcmfmac: fix parsing rsn ie for ap mode.
RSN IEs got incorrectly parsed and therefore ap mode using WPA2
security was not working.

Cc: stable@vger.kernel.org
Reviewed-by: Arend Van Spriel <arend@broadcom.com>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Signed-off-by: Hante Meuleman <meuleman@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-01-02 14:38:38 -05:00
Arend van Spriel 1b2c2e73b3 brcmsmac: add copyright information for Canonical
Patches from Canonical involved the introduction of new source
files debug.[ch]. That coincided with other patches from Broadcom
introducing the same files.

Cc: Seth Forshee <seth.forshee@canonical.com>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-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-02 14:38:36 -05:00
Larry Finger 3f009c78bb rtlwifi: rtl8723ae: Fix warning for unchecked pci_map_single() call
Kernel 3.8 implements checking of all DMA mapping calls and issues
a WARNING for the first it finds that is not checked.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-01-02 14:38:35 -05:00
Larry Finger f6aa93ad03 rtlwifi: rtl8192se: Fix warning for unchecked pci_map_single() call
Kernel 3.8 implements checking of all DMA mapping calls and issues
a WARNING for the first it finds that is not checked.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-01-02 14:38:34 -05:00
Larry Finger 708b70ff31 rtlwifi: rtl8192de: Fix warning for unchecked pci_map_single() call
Kernel 3.8 implements checking of all DMA mapping calls and issues
a WARNING for the first it finds that is not checked.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-01-02 14:38:33 -05:00
Larry Finger 9145910161 rtlwifi: rtl8192ce: Fix warning for unchecked pci_map_single() call
Kernel 3.8 implements checking of all DMA mapping calls and issues
a WARNING for the first it finds that is not checked.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-01-02 14:38:32 -05:00
Larry Finger 86bfec8d51 rtlwifi: Fix warning for unchecked pci_map_single() call
Kernel 3.8 implements checking of all DMA mapping calls and issues
a WARNING for the first it finds that is not checked.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-01-02 14:38:31 -05:00
Christian Lamparter 4010fe21a3 p54usb: add USBIDs for two more p54usb devices
This patch adds USBIDs for:
	- DrayTek Vigor 530
	- Zoom 4410a

It also adds a note about Gemtek WUBI-100GW
and SparkLAN WL-682 USBID conflict [WUBI-100GW
is a ISL3886+NET2280 (LM86 firmare) solution,
whereas WL-682 is a ISL3887 (LM87 firmware)]
device.

Source: <http://www.wikidevi.com/wiki/Intersil/p54/usb/windows>

Cc: <stable@vger.kernel.org>
Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-01-02 14:38:30 -05:00
Jesper Juhl 1474a89838 rtlwifi: Don't leak on error in _rtl_usb_receive()
We fail to release 'urb' if '_rtl_prep_rx_urb()' fails in
_rtl_usb_receive().
This patch should take care of the leak.

Signed-off-by: Jesper Juhl <jj@chaosbits.net>
Acked-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-01-02 14:38:29 -05:00
Sujith Manoharan a796a1dd5d ath9k_hw: Fix RX gain initvals for AR9485
Populate iniModesRxGain with the correct initvals
array for AR9485 v1.1

Cc: stable@vger.kernel.org
Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-01-02 14:38:28 -05:00
Niels Ole Salscheider 7ffa592843 brcmsmac: Use udelay instead of usleep_range
wlc_lcnphy_rx_iq_cal_gain is called during initialization, i. e. when
executing brcms_up.
But brcms_up is called from brcms_ops_start while the latter holds a spin lock.
Thus, we cannot use usleep_range but have to use udelay.

This fixes:
BUG: scheduling while atomic: NetworkManager/1652/0x00000200
[...]
Call Trace:
 [<ffffffff81582522>] __schedule_bug+0x48/0x54
 [<ffffffff815892b6>] __schedule+0x596/0x6d0
 [<ffffffff81589719>] schedule+0x29/0x70
 [<ffffffff8158893c>] schedule_hrtimeout_range_clock+0xfc/0x140
 [<ffffffff81060f10>] ? update_rmtp+0x70/0x70
 [<ffffffff81588993>] schedule_hrtimeout_range+0x13/0x20
 [<ffffffff810495e0>] usleep_range+0x40/0x50
 [<ffffffffa05dedcb>] wlc_lcnphy_rx_iq_cal.constprop.10+0x59b/0xa90 [brcmsmac]
 [<ffffffffa05df4ce>] wlc_lcnphy_periodic_cal+0x20e/0x220 [brcmsmac]
 [<ffffffffa05dce8d>] ? wlc_lcnphy_set_tx_pwr_ctrl+0x21d/0x3c0 [brcmsmac]
 [<ffffffffa05e0cfc>] wlc_phy_init_lcnphy+0xacc/0x1100 [brcmsmac]
 [<ffffffffa05e0230>] ? wlc_phy_txpower_recalc_target_lcnphy+0x90/0x90 [brcmsmac]
 [<ffffffffa05d7c7d>] wlc_phy_init+0xcd/0x170 [brcmsmac]
 [<ffffffffa05c9dfe>] brcms_b_bsinit.isra.65+0x12e/0x310 [brcmsmac]
 [<ffffffffa05d061b>] brcms_c_init+0x8fb/0x1170 [brcmsmac]
 [<ffffffffa05c3a0a>] brcms_init+0x5a/0x70 [brcmsmac]
 [<ffffffffa05ce76c>] brcms_c_up+0x1ac/0x4a0 [brcmsmac]
 [<ffffffffa05c3c65>] brcms_up+0x25/0x30 [brcmsmac]
 [<ffffffffa05c44c0>] brcms_ops_start+0xd0/0x100 [brcmsmac]
[...]

Signed-off-by: Niels Ole Salscheider <niels_ole@salscheider-online.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-01-02 14:38:26 -05:00
Tomasz Guszkowski 3194b7fcdf p54usb: add USB ID for T-Com Sinus 154 data II
Added USB ID for T-Com Sinus 154 data II.

Cc: <stable@vger.kernel.org>
Signed-off-by: Tomasz Guszkowski <tsg@o2.pl>
Acked-by: Christian Lamparter <chunkeey@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-01-02 14:38:25 -05:00
Christian Lamparter 6c653f6677 carl9170: fix -EINVAL bailout during init with !CONFIG_MAC80211_MESH
Sean reported that as of 3.7, his AR9170 device no longer works
because the driver fails during initialization. He noted this
is due to:
"In carl9170/fw.c, ar->hw->wiphy is tagged with
NL80211_IFTYPE_MESH_POINT support if the firmware has Content
after Beacon Queuing. This is both in interface_modes and the
only iface_combinations entry.

If CONFIG_MAC80211_MESH is not set, ieee80211_register_hw
removes NL80211_IFTYPE_MESH_POINT from interface_modes, but
not iface_combinations.

wiphy_register then checks to see if every interface type in
every interface combination is in interface_modes.
NL80211_IFTYPE_MESH_POINT was removed, so you get a WARN_ON
warning and it returns -EINVAL, giving up."

Unfortunately, the iface_combination (types) feature bitmap
in ieee80211_iface_limit is part of a const member in the
ieee80211_iface_combination struct. Hence, the MESH_POINT
feature flag can't be masked by wiphy_register in the
same way as interface_modes in ieee80211_register_hw.

Cc: <stable@vger.kernel.org>
Reported-by: Sean Patrick Santos <quantheory@gmail.com>
Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
Tested-by: Sean Patrick Santos <quantheory@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-01-02 14:38:25 -05:00
Jussi Kivilinna 4c3de5920c rtlwifi: fix incorrect use of usb_alloc_coherent with usb_control_msg
Incorrect use of usb_alloc_coherent memory as input buffer to usb_control_msg
can cause problems in arch DMA code, for example kernel BUG at
'arch/arm/include/asm/dma-mapping.h:321' on ARM (linux-3.4).

Change _usb_writeN_sync use kmalloc'd buffer instead.

Cc: stable@vger.kernel.org
Signed-off-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi>
Acked-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-01-02 14:38:24 -05:00
Sujith Manoharan 12e9432707 ath9k: Fix compilation breakage
Since ath9k makes use of mac80211's debugfs hooks to
maintain station statistics, make ATH9K_DEBUGFS
select MAC80211_DEBUGFS. This fixes the issue reported by
Fengguang Wu:

drivers/net/wireless/ath/ath9k/debug.c: In function 'ath9k_sta_add_debugfs':
drivers/net/wireless/ath/ath9k/debug.c:1589:4: error: 'struct ath_node' has no member named 'node_stat'
drivers/net/wireless/ath/ath9k/debug.c: In function 'ath9k_sta_remove_debugfs':
drivers/net/wireless/ath/ath9k/debug.c:1599:19: error: 'struct ath_node' has no member named 'node_stat'

Reported-by: Fengguang Wu <fengguang.wu@intel.com>
Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-01-02 14:38:23 -05:00
Tejun Heo 02957f92bc wl1251: don't use [delayed_]work_pending()
There's no need to test whether a (delayed) work item in pending
before queueing, flushing or cancelling it.  Most uses are unnecessary
and quite a few of them are buggy.

Remove unnecessary pending tests from wl1251.  Only compile tested.

Signed-off-by: Tejun Heo <tj@kernel.org>
Acked-by: Luciano Coelho <coelho@ti.com>
Cc: linux-wireless@vger.kernel.org
2012-12-28 13:40:15 -08:00
Tejun Heo 7f5855c979 mwifiex: don't use [delayed_]work_pending()
Drop work_pending() test from mwifiex_sdio_card_reset().  As
work_pending() becomes %false before sdio_card_reset_worker() starts
executing, it doesn't really protect anything.  reset_host may change
between mmc_remove_host() and mmc_add_host().  Make
sdio_card_reset_worker() cache the target mmc_host so that it isn't
affected by mwifiex_sdio_card_reset() racing with it.

Only compile tested.

Signed-off-by: Tejun Heo <tj@kernel.org>
Acked-by: Bing Zhao <bzhao@marvell.com>
Cc: linux-wireless@vger.kernel.org
2012-12-28 13:40:15 -08:00
Greg KH 03ce758e56 Drivers: network: more __dev* removal
Remove some __dev* markings that snuck in the 3.8-rc1 merge window in
the drivers/net/* directory.

Cc: Bill Pemberton <wfp5p@virginia.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2012-12-22 00:03:00 -08:00
Linus Torvalds 9eb127cc04 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Pull networking fixes from David Miller:

 1) Really fix tuntap SKB use after free bug, from Eric Dumazet.

 2) Adjust SKB data pointer to point past the transport header before
    calling icmpv6_notify() so that the headers are in the state which
    that function expects.  From Duan Jiong.

 3) Fix ambiguities in the new tuntap multi-queue APIs.  From Jason
    Wang.

 4) mISDN needs to use del_timer_sync(), from Konstantin Khlebnikov.

 5) Don't destroy mutex after freeing up device private in mac802154,
    fix also from Konstantin Khlebnikov.

 6) Fix INET request socket leak in TCP and DCCP, from Christoph Paasch.

 7) SCTP HMAC kconfig rework, from Neil Horman.

 8) Fix SCTP jprobes function signature, otherwise things explode, from
    Daniel Borkmann.

 9) Fix typo in ipv6-offload Makefile variable reference, from Simon
    Arlott.

10) Don't fail USBNET open just because remote wakeup isn't supported,
    from Oliver Neukum.

11) be2net driver bug fixes from Sathya Perla.

12) SOLOS PCI ATM driver bug fixes from Nathan Williams and David
    Woodhouse.

13) Fix MTU changing regression in 8139cp driver, from John Greene.

* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (45 commits)
  solos-pci: ensure all TX packets are aligned to 4 bytes
  solos-pci: add firmware upgrade support for new models
  solos-pci: remove superfluous debug output
  solos-pci: add GPIO support for newer versions on Geos board
  8139cp: Prevent dev_close/cp_interrupt race on MTU change
  net: qmi_wwan: add ZTE MF880
  drivers/net: Use of_match_ptr() macro in smsc911x.c
  drivers/net: Use of_match_ptr() macro in smc91x.c
  ipv6: addrconf.c: remove unnecessary "if"
  bridge: Correctly encode addresses when dumping mdb entries
  bridge: Do not unregister all PF_BRIDGE rtnl operations
  use generic usbnet_manage_power()
  usbnet: generic manage_power()
  usbnet: handle PM failure gracefully
  ksz884x: fix receive polling race condition
  qlcnic: update driver version
  qlcnic: fix unused variable warnings
  net: fec: forbid FEC_PTP on SoCs that do not support
  be2net: fix wrong frag_idx reported by RX CQ
  be2net: fix be_close() to ensure all events are ack'ed
  ...
2012-12-19 20:29:15 -08:00