openwrt/staging/blogic.git
12 years agop54spi: Release GPIO lines and IRQ on error in p54spi_probe
Max Filippov [Wed, 29 Feb 2012 20:40:08 +0000 (00:40 +0400)]
p54spi: Release GPIO lines and IRQ on error in p54spi_probe

This makes it possible to reload driver if insmod has failed due to
missing firmware.

Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
Cc: stable <stable@vger.kernel.org>
Acked-by: Christian Lamparter <chunkeey@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agorndis_wlan: use u8 for key indexes
Jussi Kivilinna [Wed, 29 Feb 2012 14:25:05 +0000 (16:25 +0200)]
rndis_wlan: use u8 for key indexes

cfg80211 uses u8 for key indexes and so should rndis_wlan.

Signed-off-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agorndis_wlan: use RNDIS_WLAN_NUM_KEYS for all key index checks
Jussi Kivilinna [Wed, 29 Feb 2012 14:25:00 +0000 (16:25 +0200)]
rndis_wlan: use RNDIS_WLAN_NUM_KEYS for all key index checks

Use new RNDIS_WLAN_NUM_KEYS for checks in add_wep_key() and add_wpa_key().

Signed-off-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agorndis_wlan: fix le16/le32_to_cpu mix up with config.beacon_period
Jussi Kivilinna [Wed, 29 Feb 2012 14:24:54 +0000 (16:24 +0200)]
rndis_wlan: fix le16/le32_to_cpu mix up with config.beacon_period

'beacon_period' in 'struct ndis_80211_conf' is __le32 instead of __le16 so
le32_to_cpu must be used instead of le16_to_cpu.

Also correct 'beacon_interval' variables used for passing this value forward
from u16 to u32 and rename those variables 'beacon_period' This is to avoid
confusion because 'beacon_interval' is defined as __le16 at other structure,
'struct ndis_80211_fixed_ies'.

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agorndis_wlan: prevent integer overflow in indication()
Dan Carpenter [Wed, 29 Feb 2012 06:37:53 +0000 (09:37 +0300)]
rndis_wlan: prevent integer overflow in indication()

If we pick a high value for "offset" then it could lead to an integer
overflow and we would get past the check for:
if (offset + len > buflen) { ...

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agorndis_wlan: make some variables unsigned
Dan Carpenter [Wed, 29 Feb 2012 06:36:57 +0000 (09:36 +0300)]
rndis_wlan: make some variables unsigned

These variables can never be less than zero because we cap them in
get_device_pmkids().  Let's make them unsigned here because it's simpler
to not have to worry about negative numbers when we read the code.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agorndis_wlan: remove unneeded variables
Dan Carpenter [Wed, 29 Feb 2012 06:36:28 +0000 (09:36 +0300)]
rndis_wlan: remove unneeded variables

We never use the "len" variable.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agorndis_wlan: integer overflows in rndis_wlan_do_link_up_work()
Dan Carpenter [Thu, 1 Mar 2012 07:02:08 +0000 (10:02 +0300)]
rndis_wlan: integer overflows in rndis_wlan_do_link_up_work()

If "offset" is negative then we can get past this check:
if (offset > CONTROL_BUFFER_SIZE)
Or if we pick a very high "req_ie_len" then we can get around the check:
if (offset + req_ie_len > CONTROL_BUFFER_SIZE)

I made "resp_ie_len" and "req_ie_len" unsigned.  I don't know if it was
intentional that they were signed in the original.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years ago{nl,cfg,mac}80211: Implement RSSI threshold for mesh peering
Ashok Nagarajan [Wed, 29 Feb 2012 01:04:08 +0000 (17:04 -0800)]
{nl,cfg,mac}80211: Implement RSSI threshold for mesh peering

Mesh peer links are established only if average rssi of the peer
candidate satisfies the threshold. This is not in 802.11s specification
but was requested by David Fulgham, an open80211s user. This is a way to avoid
marginal peer links with stations that are barely within range.

This patch adds a new mesh configuration parameter, mesh_rssi_threshold. This
feature is supported only for hardwares that report signal in dBm.

Signed-off-by: Ashok Nagarajan <ashok@cozybit.com>
Signed-off-by: Javier Cardona <javier@cozybit.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agob43: prevent firmware on bcm5354 from taking over wrong GPIO pins
Hauke Mehrtens [Tue, 28 Feb 2012 19:45:06 +0000 (20:45 +0100)]
b43: prevent firmware on bcm5354 from taking over wrong GPIO pins

When using the bcm5354 (Soc with integrated LP-PHY Wifi) with a recent
firmware >= 478.104 it runs out of memory after a very short time in
OpenWrt after doing an active scan or any thing else where packages are
send. This was cased by a gpio misconfiguration, the firmware triggered
the GPIO pins used for buttons on some devices and that caused an other
driver (OpenWrt diag) listening for these buttons irqs to send many
messages to the user space.
This patch fixes the bug for my devices (Asus WL-520GU) and makes it
work with firmware 666.2. Now the firmware just uses LED GPIO pin
number 1 and not the button pins any more.

This is the GPIO Pin layout used on my device, see [0].
GPIO pin layout:
pin#    name    type
0       power   led
1       wlan    led
2       reset   button
3       ses     buttom

This is the nvram configuration output of "nvram show |grep gpio"

related nvram configuration:
wl0gpio2=11
wl0gpio3=11
wl0gpio0=11
wl0gpio1=0x02
reset_gpio=2

[0]: https://dev.openwrt.org/browser/trunk/package/broadcom-diag/src/diag.c

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath9k: make use of list_for_each_entry_safe
Mohammed Shafi Shajakhan [Tue, 28 Feb 2012 15:24:44 +0000 (20:54 +0530)]
ath9k: make use of list_for_each_entry_safe

this does the same thing as the previous code

Signed-off-by: Mohammed Shafi Shajakhan <mohammed@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath9k: completely zero intialize valid_phy_rate_idx
Mohammed Shafi Shajakhan [Tue, 28 Feb 2012 15:24:43 +0000 (20:54 +0530)]
ath9k: completely zero intialize valid_phy_rate_idx

its better to zero initialize the 'valid_phy_rate_idx' array completely

Signed-off-by: Mohammed Shafi Shajakhan <mohammed@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agomac80211: Fix the generation of PREQs in proactive RANN mechanism of HWMP
Chun-Yeow Yeoh [Tue, 28 Feb 2012 14:00:06 +0000 (22:00 +0800)]
mac80211: Fix the generation of PREQs in proactive RANN mechanism of HWMP

According to Section Y.7.4 Actions on receipt of proactive RANN, an individually
addressed PREQ should be generated towards the neighbor peer mesh STA indicated
in the RANN Sender Address field in the forwarding information.

Signed-off-by: Chun-Yeow Yeoh <yeohchunyeow@gmail.com>
Signed-off-by: Javier Cardona <javier@cozybit.com>
Signed-off-by: Thomas Pedersen <thomas@cozybit.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agomwifiex: fix bug in wildcard scan handling
Amitkumar Karwar [Tue, 28 Feb 2012 06:04:15 +0000 (22:04 -0800)]
mwifiex: fix bug in wildcard scan handling

Currently if valid SSID list is provided in scan request, driver
performs specific SSID scan otherwise wildcard scan is chosen.

When wpa_supplicant provides valid SSID list followed by
zero-length SSID for wildcard scan, only specific SSID scan is
performed by driver. Actually driver is expected to do both type
of scanning in this case. The patch fixes this issue.

Also, use SSID list pointer provided by stack directly, instead
of copying SSID's to local structure.

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>
12 years agomwifiex: remove unnecessary struct mwifiex_802_11_ssid
Amitkumar Karwar [Tue, 28 Feb 2012 06:04:14 +0000 (22:04 -0800)]
mwifiex: remove unnecessary struct mwifiex_802_11_ssid

Use struct cfg80211_ssid available in include/net/cfg80211.h
instead of having similar definition in driver.

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>
12 years agomwifiex: correct bitrates advertised to cfg80211
Avinash Patil [Tue, 28 Feb 2012 06:04:11 +0000 (22:04 -0800)]
mwifiex: correct bitrates advertised to cfg80211

1. Driver and firmware do not support 22Mbps and 72Mbps bitrates.
Remove them from the rate table advertised to cfg80211.

2. First 4 rates from mwifiex_rates table are not valid for
5GHz/A band. Set correct bitrate array's index and no of rates for
ieee80211_supported_band for 5GHz band.

Signed-off-by: Avinash Patil <patila@marvell.com>
Signed-off-by: Nishant Sarmukadam <nishants@marvell.com>
Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Yogesh Ashok Powar <yogeshp@marvell.com>
Signed-off-by: Kiran Divekar <dkiran@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoMIPS: BCM47XX: provide sprom to bcma bus
Hauke Mehrtens [Mon, 27 Feb 2012 23:56:14 +0000 (00:56 +0100)]
MIPS: BCM47XX: provide sprom to bcma bus

On SoCs the sprom is often stored in nvram in the flashchip. This patch
registers a sprom fallback callback handler in bcma and provides the
sprom needed for this device.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoMIPS: BCM47XX: move and extend sprom parsing
Hauke Mehrtens [Mon, 27 Feb 2012 23:56:13 +0000 (00:56 +0100)]
MIPS: BCM47XX: move and extend sprom parsing

Move the sprom parsing from nvram into sprom.c. There are all values
needed for sprom version 1 to 9 read from nvram and there are more
sanity checks added. This is based on the sprom parsing in the open
source part of the Broadcom SDK.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoMIPS: BCM47XX: fix signature of nvram_parse_macaddr
Hauke Mehrtens [Mon, 27 Feb 2012 23:56:12 +0000 (00:56 +0100)]
MIPS: BCM47XX: fix signature of nvram_parse_macaddr

Explicitly enforce an char array of 6 bytes for the mac address.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoMIPS: BCM47XX: return number of written bytes in nvram_getenv
Hauke Mehrtens [Mon, 27 Feb 2012 23:56:11 +0000 (00:56 +0100)]
MIPS: BCM47XX: return number of written bytes in nvram_getenv

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agobcma: add support for sprom not found on the device
Hauke Mehrtens [Mon, 27 Feb 2012 23:56:10 +0000 (00:56 +0100)]
bcma: add support for sprom not found on the device

On SoCs the sprom is stored in the nvram in a special partition on the
flash chip. The nvram contains the sprom for the main bus, but
sometimes also for a pci devices using bcma. This patch makes it
possible for the arch code to register a function to fetch the needed
sprom from the nvram and provide it to the bcma code.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agobcma: export bcma_find_core
Hauke Mehrtens [Mon, 27 Feb 2012 23:56:09 +0000 (00:56 +0100)]
bcma: export bcma_find_core

This function is needed by the bcm47xx arch code to get the number of
the ieee80211 core.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agossb: add some missing sprom attributes
Hauke Mehrtens [Mon, 27 Feb 2012 23:56:08 +0000 (00:56 +0100)]
ssb: add some missing sprom attributes

This patch extends the sprom struct to contain all sprom attributes
found in sprom version 1 to 9. This was done accordingly to the open
source part of the Broadcom SDK.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agossb: add alpha2
Hauke Mehrtens [Mon, 27 Feb 2012 23:56:07 +0000 (00:56 +0100)]
ssb: add alpha2

This member contains the country code encoded with two chars

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agossb: fix per path sprom vars
Hauke Mehrtens [Mon, 27 Feb 2012 23:56:06 +0000 (00:56 +0100)]
ssb: fix per path sprom vars

On sprom version 4 and 5 there are 4 values for pa_2g, pa_5gl, pa_5g
and pa_5gh, for sprom version 8 and 9 there are only 3. Make the per
path sprom store also work for older sprom versions.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agossb: remove 5GHz antenna gain from sprom
Hauke Mehrtens [Mon, 27 Feb 2012 23:56:05 +0000 (00:56 +0100)]
ssb: remove 5GHz antenna gain from sprom

There is no 2.4 GHz or 5GHz antenna gain stored in sprom. The sprom
just stores the gain values for antenna 1 and 2 or 1 to 4 for more
recent sprom versions. On old devices antenna 2 was used for 5 GHz wifi.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agossb: sprom fix some sizes / signedness
Hauke Mehrtens [Mon, 27 Feb 2012 23:56:04 +0000 (00:56 +0100)]
ssb: sprom fix some sizes / signedness

Some parts of the sprom struct are bigger than needed.
The leddc and maxpwr values are just 8 bit long and not 16.
rxpo2g and rxpo5g are signed

I got these information for the open source part of the Broadcom SDK
covering sprom version 1 to 9. rxpo2g contained a negative number on my
bcm5354 based device, this cased an error and Broadcom SDK says this is
signed.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath9k: fix drv_tx_last_beacon on AR9003 by processing beacon tx status
Felix Fietkau [Mon, 27 Feb 2012 18:58:42 +0000 (19:58 +0100)]
ath9k: fix drv_tx_last_beacon on AR9003 by processing beacon tx status

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath9k_hw: enable interrupts for beacon tx completion events
Felix Fietkau [Mon, 27 Feb 2012 18:58:41 +0000 (19:58 +0100)]
ath9k_hw: enable interrupts for beacon tx completion events

Not doing so could cause the tx status queue to overflow during longer
periods of time without non-beacon tx. These events are also required
for proper drv_tx_last_beacon handling.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath9k: do not call ath9k_hw_txprocdesc on AR9003 outside of the tx tasklet
Felix Fietkau [Mon, 27 Feb 2012 18:58:40 +0000 (19:58 +0100)]
ath9k: do not call ath9k_hw_txprocdesc on AR9003 outside of the tx tasklet

Since AR9003 uses a global tx status queue, processing tx status outside of
the regular tx tasklet is dangerous and messes up hardware/software
synchronization of tx status events.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoRevert "ath9k_hw: Fix false tx hung detection in AR9003 chips"
Felix Fietkau [Mon, 27 Feb 2012 18:58:39 +0000 (19:58 +0100)]
Revert "ath9k_hw: Fix false tx hung detection in AR9003 chips"

The approach of this change is flawed, as it triggers tx status processing
from more callsites, yet the chips only have one global tx status queue.
Subsequent patches will properly fix the issue that this one tried to address.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agomwifiex: handle auto authentication mode correctly
Amitkumar Karwar [Sat, 25 Feb 2012 05:36:05 +0000 (21:36 -0800)]
mwifiex: handle auto authentication mode correctly

When authentication type is configured to NL80211_AUTHTYPE_AUTOMATIC,
driver tries to connect using open mode. The association is failed
if AP is configured in shared mode.

This patch adds code to try association using shared mode as well if
open mode association fails.

Now since we returned exact error code in association response handler
(instead of -1), corresponding changes are done in
mwifiex_process_cmdresp().

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>
12 years agocarl9170: fix breakage from "mac80211: handle non-bufferable MMPDUs correctly"
John W. Linville [Wed, 29 Feb 2012 20:08:33 +0000 (15:08 -0500)]
carl9170: fix breakage from "mac80211: handle non-bufferable MMPDUs correctly"

That commit intended for 3.4 renamed IEEE80211_TX_CTL_POLL_RESPONSE as
IEEE80211_TX_CTL_NO_PS_BUFFER.  Meanwhile, "carl9170: fix frame delivery
if sta is in powersave mode" added a reference to
IEEE80211_TX_CTL_POLL_RESPONSE in the fixes stream for 3.3.  This simple
patch fixes that merge boo-boo.

Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoMerge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless
John W. Linville [Wed, 29 Feb 2012 19:53:21 +0000 (14:53 -0500)]
Merge branch 'master' of git://git./linux/kernel/git/linville/wireless

12 years agoath9k: decouple RX error checking for DFS
Zefir Kurtisi [Mon, 27 Feb 2012 11:52:06 +0000 (12:52 +0100)]
ath9k: decouple RX error checking for DFS

Previous RX error checking was done exclusive-or for different error
types and caused DFS pulse events to be dropped when other error
flags (e.g. CRC) were set simultaneously.

This patch decouples PHY error processing from other types and ensures
that all pulses detected by HW are accounted by the pattern detector.

Signed-off-by: Zefir Kurtisi <zefir.kurtisi@neratec.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoiwlegacy: remove unused enum il4965_calib_enabled_state
Greg Dietsche [Mon, 27 Feb 2012 18:25:33 +0000 (12:25 -0600)]
iwlegacy: remove unused enum il4965_calib_enabled_state

Remove the enum il4965_calib_enabled_state because it is not used.

Signed-off-by: Greg Dietsche <Gregory.Dietsche@cuw.edu>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoiwlegacy: remove enum iw_calib and related code
Greg Dietsche [Mon, 27 Feb 2012 18:25:32 +0000 (12:25 -0600)]
iwlegacy: remove enum iw_calib and related code

Remove the enum il_calib. It defined one identifier: IL_CALIB_MAX.
Remove the function il4965_calib_free_results. It was doing nothing
because IL_CALIB_MAX is zero. Next, remove calib_results from the
il_priv structure and also remove the associated return
type/struct il_calib_result.

Signed-off-by: Greg Dietsche <Gregory.Dietsche@cuw.edu>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoiwlegacy: Kconfig: Change Debug Option to be more clear
Greg Dietsche [Mon, 27 Feb 2012 18:25:31 +0000 (12:25 -0600)]
iwlegacy: Kconfig: Change Debug Option to be more clear

Since the menuconfig system doesn't indent the debug options
for the 3945 /4965, add some text to make it clear which
debug options are being configured.

Signed-off-by: Greg Dietsche <Gregory.Dietsche@cuw.edu>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoiwlegacy: Kconfig: Move Debugging Options
Greg Dietsche [Mon, 27 Feb 2012 18:25:30 +0000 (12:25 -0600)]
iwlegacy: Kconfig: Move Debugging Options

Move the debug options so they appear below the 3945 / 4965 options.

Signed-off-by: Greg Dietsche <Gregory.Dietsche@cuw.edu>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agomac80211: handle non-bufferable MMPDUs correctly
Johannes Berg [Mon, 27 Feb 2012 11:18:30 +0000 (12:18 +0100)]
mac80211: handle non-bufferable MMPDUs correctly

This renames the IEEE80211_TX_CTL_POLL_RESPONSE
TX flag to IEEE80211_TX_CTL_NO_PS_BUFFER and also
uses it for non-bufferable MMPDUs (all MMPDUs but
deauth, disassoc and action frames.)

Previously, mac80211 would let the MMPDU through
but not set the flag so drivers supporting some
hardware aids for avoiding the PS races would
then reject the frame.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agomwifiex: remove unnecessary enum MWIFIEX_802_11_WEP_STATUS
Amitkumar Karwar [Sat, 25 Feb 2012 05:36:04 +0000 (21:36 -0800)]
mwifiex: remove unnecessary enum MWIFIEX_802_11_WEP_STATUS

Instead of defining an 'enum', we can simply use 'u8' flag for WEP
status. Rename 'wep_status' to 'wep_enabled' to match with
'wpa_enabled' and 'wpa2_enabled'.

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>
12 years agomwifiex: remove redundant scan operation
Amitkumar Karwar [Sat, 25 Feb 2012 05:35:36 +0000 (21:35 -0800)]
mwifiex: remove redundant scan operation

It should have been removed by commit "mwifiex: use cfg80211 dynamic
scan..." (7c6fa2a843..) after adding code to avoid an extra scan
during association because scan entries are valid for 15 seconds in
cfg80211 stack.

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>
12 years agomac80211: make deauth/disassoc sequence more natural
Johannes Berg [Fri, 24 Feb 2012 12:50:54 +0000 (13:50 +0100)]
mac80211: make deauth/disassoc sequence more natural

The association sequence looks (roughly) like
this now:
 * set BSSID
 * set station to EXIST state
 * send auth
 * set station to AUTH state
 * send assoc
 * set station to ASSOC state
 * set BSS info to associated

In contrast, the deauth/disassoc sequence is
the other way around:
 * clear BSSID/BSS info state
 * remove station
 * send deauth/disassoc
(in some cases the last two steps are reversed.)

This patch encodes the entire sequence in the
ieee80211_set_disassoc() function and changes
it to be like this, for good measure with an
explicit flush:
 * send deauth/disassoc
 * flush
 * remove station
 * clear BSSID/BSS info state

At least iwlwifi gets confused with the other
sequence in P2P mode and complains that it
wasn't able to flush the queues.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agomac80211: fix ieee80211_set_disassoc() sending DelBA
Johannes Berg [Fri, 24 Feb 2012 12:50:53 +0000 (13:50 +0100)]
mac80211: fix ieee80211_set_disassoc() sending DelBA

When ieee80211_set_disassoc() is called with the
tx argument set to true, it will send DelBA out
to the peer. This isn't useful or necessary in a
few cases where we do it today, those being when
we lost the connection or when the supplicant
explicitly asked us to not tell the AP.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agomac80211: dont call cfg80211 from ieee80211_send_deauth_disassoc
Johannes Berg [Fri, 24 Feb 2012 12:50:52 +0000 (13:50 +0100)]
mac80211: dont call cfg80211 from ieee80211_send_deauth_disassoc

Instead of calling cfg80211 in ieee80211_send_deauth_disassoc()
pass out the frame and call it from the caller. That saves the
SKB allocation if we don't actually want to send the frame and
enables us to make the ordering smarter in the future.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agocfg80211: remove cookies from callbacks
Johannes Berg [Fri, 24 Feb 2012 12:50:51 +0000 (13:50 +0100)]
cfg80211: remove cookies from callbacks

In "cfg80211: no cookies in cfg80211_send_XXX()"
Holger Schurig removed the cookies in the calls
from mac80211 to cfg80211, but the ones in the
other direction were left in. Remove them now.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoipw2x00: remove ipw2100_rates_11b[]
Stanislav Yakovlev [Fri, 10 Feb 2012 01:23:52 +0000 (20:23 -0500)]
ipw2x00: remove ipw2100_rates_11b[]

It's just a duplicate of ipw2100_bg_rates[].

Signed-off-by: Stanislav Yakovlev <stas.yakovlev@gmail.com>
Reviewed-by: Julian Calaby <julian.calaby@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agozd1211rw: wait between setting hash table and powering radio on
Florian Fainelli [Wed, 29 Feb 2012 13:00:13 +0000 (14:00 +0100)]
zd1211rw: wait between setting hash table and powering radio on

I am running Debian testing kernel 3.1.0-1-amd64, using a 079b:0062 Sagem
XG-76NA 802.11bg stick.

Upon zd1211rw interface
bringup (ifconfig wlan0 up) I get the following timeout:

[  950.330573] zd1211rw 1-3:1.0: phy2
[  955.108510] zd1211rw 1-3:1.0: firmware version 4725
[  955.148532] zd1211rw 1-3:1.0: zd1211b chip 079b:0062 v4810 high 00-19-70
AL2230_RF pa0 g--NS
[snip]
[  955.204072] zd1211rw 1-3:1.0: error ioread32(CR_REG1): -110

A second ifconfig wlan0 up brings the interface up without problems.

After a bit more debugging, the call trace is the following:

[10241.028130] zd1211rw 1-3:1.0: zd_chip_lock_phy_regs: error
ioread32(CR_REG1): -110
[10241.028140] zd1211rw 1-3:1.0: zd_switch_radio_on: failed to lock PHY regs
[10241.028148] zd1211rw 1-3:1.0: zd_op_start: failed to set radio on

Adding a 10 milliseconds delay between the call to set_mc_hash() and
zd_chip_switch_radio_on() allows successful interface bringups in all
cases and matches what the vendor driver did.

Acked-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi>
Signed-off-by: Florian Fainelli <florian@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agomwifiex: reset encryption mode flag before association
Amitkumar Karwar [Sat, 25 Feb 2012 05:35:35 +0000 (21:35 -0800)]
mwifiex: reset encryption mode flag before association

Recent commit
"mwifiex: clear previous security setting during association"
fixes association failure problems observed in some corner cases
by clearing previous security setting before each association.

We should reset encryption mode flag as well. This patch takes care
of it.

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>
12 years agocarl9170: fix frame delivery if sta is in powersave mode
Christian Lamparter [Sat, 25 Feb 2012 20:36:36 +0000 (21:36 +0100)]
carl9170: fix frame delivery if sta is in powersave mode

Nicolas Cavallari discovered that carl9170 has some
serious problems delivering data to sleeping stations.

It turns out that the driver was not honoring two
important flags (IEEE80211_TX_CTL_POLL_RESPONSE and
IEEE80211_TX_CTL_CLEAR_PS_FILT) which are set on
frames that should be sent although the receiving
station is still in powersave mode.

Cc: stable <stable@vger.kernel.org>
Reported-by: Nicolas Cavallari <Nicolas.Cavallari@lri.fr>
Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agocarl9170: Fix memory accounting when sta is in power-save mode.
Nicolas Cavallari [Thu, 23 Feb 2012 15:53:34 +0000 (16:53 +0100)]
carl9170: Fix memory accounting when sta is in power-save mode.

On Access Point mode, when transmitting a packet, if the destination
station is in powersave mode, we abort transmitting the packet to the
device queue, but we do not reclaim the allocated memory.  Given enough
packets, we can go in a state where there is no packet on the device
queue, but we think the device has no memory left, so no packet gets
transmitted, connections breaks and the AP stops working.

This undo the allocation done in the TX path when the station is in
power-save mode.

Signed-off-by: Nicolas Cavallari <cavallar@lri.fr>
Acked-by: Christian Lamparter <chunkeey@googlemail.com>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoiwlwifi: fix IDI compilation
Emmanuel Grumbach [Thu, 23 Feb 2012 08:18:00 +0000 (10:18 +0200)]
iwlwifi: fix IDI compilation

This is a fixup for my:
iwlwifi: kill iwl_bus.h

Please fold them into one patch for upstream

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
12 years agoiwlwifi: update pci subsystem id
Wey-Yi Guy [Wed, 22 Feb 2012 18:21:09 +0000 (10:21 -0800)]
iwlwifi: update pci subsystem id

Update the pci subsystem id and product name for 6005 series devices

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
12 years agoiwlwifi: one more sku added to 6x35 series
Wey-Yi Guy [Wed, 22 Feb 2012 16:18:55 +0000 (08:18 -0800)]
iwlwifi: one more sku added to 6x35 series

Add new sku to 6x35 series

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
12 years agoiwlwifi: iwl-trans.h doesn't need all these includes
Emmanuel Grumbach [Thu, 16 Feb 2012 07:47:01 +0000 (09:47 +0200)]
iwlwifi: iwl-trans.h doesn't need all these includes

We can use forward declaration for the relevant struct since they
aren't dereferenced in the header file.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
12 years agoiwlwifi: document the operational mode
Emmanuel Grumbach [Thu, 16 Feb 2012 07:35:19 +0000 (09:35 +0200)]
iwlwifi: document the operational mode

Also add a might_sleep to enforce the context requirements.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
12 years agoiwlwifi: remove iwl_reset_traffic_log from shared
Emmanuel Grumbach [Wed, 15 Feb 2012 10:48:04 +0000 (12:48 +0200)]
iwlwifi: remove iwl_reset_traffic_log from shared

It is op_mode related

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
12 years agoiwlwifi: remove iwl_print_rx_config_cmd from shared
Emmanuel Grumbach [Wed, 15 Feb 2012 10:48:04 +0000 (12:48 +0200)]
iwlwifi: remove iwl_print_rx_config_cmd from shared

It is op_mode related

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
12 years agoiwlwifi: kill iwl_bus.h
Emmanuel Grumbach [Mon, 27 Feb 2012 21:53:32 +0000 (13:53 -0800)]
iwlwifi: kill iwl_bus.h

No one needs it any more

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
12 years agoiwlwifi: eeprom gets transport and not bus
Emmanuel Grumbach [Mon, 13 Feb 2012 09:24:47 +0000 (11:24 +0200)]
iwlwifi: eeprom gets transport and not bus

This is temporary, but at least we can now throw the bus away
and move the iwl_pci_{probe,remove} functions.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
12 years agoiwlwifi: move eeprom defines to iwl-eeprom.c
Emmanuel Grumbach [Mon, 13 Feb 2012 09:17:57 +0000 (11:17 +0200)]
iwlwifi: move eeprom defines to iwl-eeprom.c

They don't need to be in iwl-dev.h

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
12 years agoiwlwifi: remove a few dereferences to iwl_priv from the tansport
Emmanuel Grumbach [Sun, 12 Feb 2012 13:21:08 +0000 (15:21 +0200)]
iwlwifi: remove a few dereferences to iwl_priv from the tansport

The transport should not dereference the iwl_priv pointer. Remove a
few of those.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
12 years agoiwlwifi: virtualize op_mode's fw_error
Emmanuel Grumbach [Thu, 9 Feb 2012 14:08:15 +0000 (16:08 +0200)]
iwlwifi: virtualize op_mode's fw_error

Export it as "nic_error" notification, the error handling will be in
the op_mode.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
12 years agoiwlwifi: virtualize op_mode's set_hw_rf_kill
Emmanuel Grumbach [Thu, 9 Feb 2012 14:08:15 +0000 (16:08 +0200)]
iwlwifi: virtualize op_mode's set_hw_rf_kill

Export it as "hw_rf_kill" notification.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
12 years agoiwlwifi: virtualize op_mode's stop/start queue
Emmanuel Grumbach [Thu, 9 Feb 2012 14:08:15 +0000 (16:08 +0200)]
iwlwifi: virtualize op_mode's stop/start queue

Export them as "queue_full" and "queue_not_full" notification.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
12 years agoiwlwifi: virtualize op_mode's rx
Emmanuel Grumbach [Thu, 9 Feb 2012 14:08:15 +0000 (16:08 +0200)]
iwlwifi: virtualize op_mode's rx

This is the op_mode's Rx handler.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
12 years agoiwlwifi: virtualize op_mode's free skb
Emmanuel Grumbach [Thu, 9 Feb 2012 14:08:15 +0000 (16:08 +0200)]
iwlwifi: virtualize op_mode's free skb

This handler allows the transport layer to free an skb from the
op_mode. This can happen when the driver is stopped while Tx
packets are pending in the transport layer.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
12 years agoiwlwifi: use sparse compliant __aligned__ attribute
Emmanuel Grumbach [Wed, 15 Feb 2012 07:25:06 +0000 (09:25 +0200)]
iwlwifi: use sparse compliant __aligned__ attribute

Sparse prefers __aligned(sizeof(void *));

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
12 years agoiwlwifi: virtualize the op_mode
Emmanuel Grumbach [Thu, 9 Feb 2012 14:08:15 +0000 (16:08 +0200)]
iwlwifi: virtualize the op_mode

Define the op_mode as an interface with its ops. All the functions
of the op_mode are "private", but its ops is made public in
iwl-op-mode.h.
The drv object starts the op_mode by using the start function in the
public ops.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
12 years agoiwlwifi: rename iwl_remove to iwl_op_mode_dvm_stop
Emmanuel Grumbach [Thu, 9 Feb 2012 09:46:06 +0000 (11:46 +0200)]
iwlwifi: rename iwl_remove to iwl_op_mode_dvm_stop

iwl_remove stops the wifi flows, so rename.
Moreover, we can possibly stop the wifi flows even if the driver
is statically compiled in the kernel, so remove the __devexit pragma.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
12 years agoiwlwifi: drv object can release its own memory
Emmanuel Grumbach [Tue, 7 Feb 2012 12:27:31 +0000 (14:27 +0200)]
iwlwifi: drv object can release its own memory

Move that code to the iwl-drv.c

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
12 years agoiwlwifi: introducing the drv object's flows
Emmanuel Grumbach [Tue, 7 Feb 2012 12:18:40 +0000 (14:18 +0200)]
iwlwifi: introducing the drv object's flows

Fetch the fw and spawn the op_mode. The op_mode that we need
to fetch is determined from the fw file.
Since the fw is fetched very early in the init flow, we can
determine what op_mode to spawn.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
12 years agoiwlwifi: move uCode flags handling to op_mode
Johannes Berg [Tue, 21 Feb 2012 16:31:06 +0000 (18:31 +0200)]
iwlwifi: move uCode flags handling to op_mode

The uCode flags modification is op_mode dependent
since the P2P config is an op-mode config.

This also fixes P2P enabling: due to the uCode
loading code shuffle moving the SKU check before
the EEPROM was read it was always false and would
always disable PAN/P2P.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
12 years agoiwlwifi: move content of iwl_probe to post fetch_fw
Emmanuel Grumbach [Tue, 7 Feb 2012 08:35:18 +0000 (10:35 +0200)]
iwlwifi: move content of iwl_probe to post fetch_fw

This will allow to have different behavior depending on the fw.
Different fw APIs require completely different implementation
of the mac80211 APIs. Each of these implementations is called an
op_mode.

The current op_mode is called DVM which states for dual virtual MAC.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
12 years agoiwlwifi: parse_tlv functions set the fw_version string
Emmanuel Grumbach [Thu, 9 Feb 2012 06:42:43 +0000 (08:42 +0200)]
iwlwifi: parse_tlv functions set the fw_version string

struct iwl_fw contains a string that describe the fw. This string
is now set by the iwl_parse_*_firmware.
This string is later used to update the cfg80211 data.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
12 years agort2800pci: Fix 'Error - MCU request failed' during initialization
Jakub Kicinski [Wed, 22 Feb 2012 20:58:58 +0000 (21:58 +0100)]
rt2800pci: Fix 'Error - MCU request failed' during initialization

Bring MCU operations during device initialization to sync
with legacy driver.

This should fix following error:
phy0 -> rt2800pci_mcu_status: Error - MCU request failed,
no response from hardware

Signed-off-by: Jakub Kicinski <kubakici@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>
12 years agort2800: Add documentation on MCU requests
Jakub Kicinski [Wed, 22 Feb 2012 20:58:57 +0000 (21:58 +0100)]
rt2800: Add documentation on MCU requests

Add documentation on MCU communication, some of known commands and
their arguments. Supplement command ids.

Signed-off-by: Jakub Kicinski <kubakici@wp.pl>
Acked-by: Ivo van Doorn <IvDoorn@gmail.com>
Acked-by: Gertjan van Wingerde <gwingerde@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoiwlwifi: iwl-agn.h included twice
Danny Kukawka [Wed, 15 Feb 2012 17:55:16 +0000 (18:55 +0100)]
iwlwifi: iwl-agn.h included twice

drivers/net/wireless/iwlwifi/iwl-core.c included 'iwl-agn.h' twice,
remove the duplicate.

Signed-off-by: Danny Kukawka <danny.kukawka@bisect.de>
Acked-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agomac80211_hwsim: correctly line up a multiline printk
Antonio Quartulli [Sun, 26 Feb 2012 17:40:04 +0000 (18:40 +0100)]
mac80211_hwsim: correctly line up a multiline printk

The second line of a printk statement must line up to the opening bracket.

Signed-off-by: Antonio Quartulli <ordex@autistici.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agomac80211: remove local_to_hw
Johannes Berg [Sun, 26 Feb 2012 10:24:35 +0000 (11:24 +0100)]
mac80211: remove local_to_hw

That's a lot longer than open-coding it and
doesn't really add value, so just remove it.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agomac80211: fix sta_info_flush() return value
Johannes Berg [Sat, 25 Feb 2012 20:40:46 +0000 (21:40 +0100)]
mac80211: fix sta_info_flush() return value

The comment for sta_info_flush() states
"Returns the number of removed STA entries"
but that isn't actually true. Consequently,
the warning when a station is still around
on interface removal can never trigger and
this delayed finding the timer issue the
previous patch fixed. Fix the return value
here to make that warning useful again.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agomac80211: fix auth/assoc data & timer leak
Johannes Berg [Sat, 25 Feb 2012 20:48:08 +0000 (21:48 +0100)]
mac80211: fix auth/assoc data & timer leak

When removing an interface while it is in the
process of authenticating or associating, we
leak the auth_data or assoc_data, and leave
the timer pending. The timer then crashes the
system when it fires as its data is gone.

Fix this by explicitly deleting all the data
when the interface is removed. This uncovered
another bug -- this problem should have been
detected by the sta_info_flush() warning but
that function doesn't ever return non-zero,
I'll fix that in a separate patch.

Reported-by: Hieu Nguyen <hieux.c.nguyen@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agobrcm80211: fmac: use correct firmware filename
Rafał Miłecki [Fri, 24 Feb 2012 06:22:51 +0000 (07:22 +0100)]
brcm80211: fmac: use correct firmware filename

Also don't use so generic BRCMF_USB_FW_NAME as we may need different
firmwares in the future.

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Acked-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agobrcm80211: fmac: fix a couple checking after dereference bugs
Dan Carpenter [Fri, 24 Feb 2012 06:22:27 +0000 (09:22 +0300)]
brcm80211: fmac: fix a couple checking after dereference bugs

There were two dereferencing before checking for NULL static checker
complaints in this new file.  The list cursor is never NULL so that
check can be removed.  I moved the other dereference after the check.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agonet/wireless: ipw2x00: Use IW_HANDLER macro from linux/wireless.h
Stanislav Yakovlev [Thu, 23 Feb 2012 22:31:24 +0000 (17:31 -0500)]
net/wireless: ipw2x00: Use IW_HANDLER macro from linux/wireless.h

Use IW_HANDLER macro in ipw2100.c to declare wireless handlers.

Note: ipw2200.c already uses it.

Signed-off-by: Stanislav Yakovlev <stas.yakovlev@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agomac80211: use proper sub_if_data on suspend path
Jakub Kicinski [Thu, 23 Feb 2012 01:17:48 +0000 (02:17 +0100)]
mac80211: use proper sub_if_data on suspend path

Use interface data from sta instead of invalid pointer
to list head in calls to drv_sta_state.

Signed-off-by: Jakub Kicinski <kubakici@wp.pl>
Reviewed-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath9k: Cleanup mci.c
Sujith Manoharan [Wed, 22 Feb 2012 09:13:52 +0000 (14:43 +0530)]
ath9k: Cleanup mci.c

Cleanup whitespace, fix indentation and coding style.
Also remove debug messages that were flooding the log.

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath9k_hw: MCI whitespace/debug cleanup
Sujith Manoharan [Wed, 22 Feb 2012 07:12:21 +0000 (12:42 +0530)]
ath9k_hw: MCI whitespace/debug cleanup

This patch fixes indentation and the general coding style
in ar9003_mci.c. Also, minimize the amount of debug log
output generated by MCI.

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath9k_hw: Remove HW revision checks
Sujith Manoharan [Wed, 22 Feb 2012 07:12:15 +0000 (12:42 +0530)]
ath9k_hw: Remove HW revision checks

They are not needed since MCI will be enabled only for
AR9462 v2.0

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath9k_hw: Cleanup MCI reset routine
Sujith Manoharan [Wed, 22 Feb 2012 07:12:10 +0000 (12:42 +0530)]
ath9k_hw: Cleanup MCI reset routine

* Use a separate function to enable/disable
  OneStepLookAhead.

* Remove unnecessary hardware SREV checks.

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath9k: Modify ATH9K_BTCOEX_SUPPORT
Sujith Manoharan [Wed, 22 Feb 2012 07:12:04 +0000 (12:42 +0530)]
ath9k: Modify ATH9K_BTCOEX_SUPPORT

ATH9K_BTCOEX_SUPPORT is now used by both ath9k and ath9k_htc
to enable BT coexistence. Fix Kbuild to allow this.

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath9k: Remove ATH9K_HW_CAP_MCI checks
Sujith Manoharan [Wed, 22 Feb 2012 07:11:59 +0000 (12:41 +0530)]
ath9k: Remove ATH9K_HW_CAP_MCI checks

With the ability to remove BTCOEX support at compile time,
these checks are no longer needed.

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath9k: Remove ATH_BTCOEX_CFG_NONE checks
Sujith Manoharan [Wed, 22 Feb 2012 07:11:52 +0000 (12:41 +0530)]
ath9k: Remove ATH_BTCOEX_CFG_NONE checks

Since BTCOEX code can be compiled out cleanly now,
remove these checks.

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath9k_htc: Use CONFIG_ATH9K_BTCOEX_SUPPORT
Sujith Manoharan [Wed, 22 Feb 2012 07:11:47 +0000 (12:41 +0530)]
ath9k_htc: Use CONFIG_ATH9K_BTCOEX_SUPPORT

ath9k_htc can also make use of CONFIG_ATH9K_BTCOEX_SUPPORT
to be compiled without BTCOEX support.

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath9k_htc: Init BTCOEX inside htc_drv_gpio.c
Sujith Manoharan [Wed, 22 Feb 2012 07:11:41 +0000 (12:41 +0530)]
ath9k_htc: Init BTCOEX inside htc_drv_gpio.c

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath9k_htc: Start/stop btcoex using a helper
Sujith Manoharan [Wed, 22 Feb 2012 07:11:36 +0000 (12:41 +0530)]
ath9k_htc: Start/stop btcoex using a helper

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath9k_hw: Use CONFIG_ATH9K_BTCOEX_SUPPORT
Sujith Manoharan [Wed, 22 Feb 2012 12:25:47 +0000 (17:55 +0530)]
ath9k_hw: Use CONFIG_ATH9K_BTCOEX_SUPPORT

Make use of CONFIG_ATH9K_BTCOEX_SUPPORT in ath9k_hw
to provide a clean way of compilation without BTCOEX
support.

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath9k_hw: Cleanup MCI function declarations
Sujith Manoharan [Wed, 22 Feb 2012 07:11:24 +0000 (12:41 +0530)]
ath9k_hw: Cleanup MCI function declarations

This patch converts a few functions to static variants
and removes extraneous declarations.

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath9k_hw: Cleanup MCI bits from hw.h
Sujith Manoharan [Wed, 22 Feb 2012 07:11:18 +0000 (12:41 +0530)]
ath9k_hw: Cleanup MCI bits from hw.h

This patch moves all the MCI-specific declarations that have been
dumped unceremoniously in hw.h to ar9003_mci.h

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath9k_hw: Cleanup MCI bits from ath9k_hw_reset()
Sujith Manoharan [Wed, 22 Feb 2012 07:11:12 +0000 (12:41 +0530)]
ath9k_hw: Cleanup MCI bits from ath9k_hw_reset()

This patch moves all the MCI-specific code in the main reset
function to helper functions.

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>