Skip to content

Commit 0f27f57

Browse files
committed
Merge branch 'wireless'
John W. Linville says: ==================== For the cfg80211 fix, Johannes says: "I have another straggler for 3.9, adding locking forgotten in a previous fix." On top of that: Bing Zhao provides an mwifiex fix to properly order a scan completion. Franky Lin gives us a brcmfmac fix to fail at the firmware loading stage if the nvram cannot be downloaded. Gabor Juhos brings what at first looks like a rather big rt2x00 patch. I think it is OK because it is really just reorganizing some code within the rt2x00 driver in order to fix a build failure. Hante Meuleman offers a trio of brcmfmac fixes related to running in AP mode. Robert Shade sends an ath9k fix to reenable interrupts even if a channel change fails. Tim Gardner gives us an rt2x00 fix to cut-down on some log SPAM. Please let me know if there are problems! ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
2 parents b50b72d + 64e5751 commit 0f27f57

File tree

15 files changed

+390
-290
lines changed

15 files changed

+390
-290
lines changed

drivers/net/wireless/ath/ath9k/main.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -280,6 +280,10 @@ static int ath_reset_internal(struct ath_softc *sc, struct ath9k_channel *hchan)
280280
if (r) {
281281
ath_err(common,
282282
"Unable to reset channel, reset status %d\n", r);
283+
284+
ath9k_hw_enable_interrupts(ah);
285+
ath9k_queue_reset(sc, RESET_TYPE_BB_HANG);
286+
283287
goto out;
284288
}
285289

drivers/net/wireless/brcm80211/brcmfmac/dhd_sdio.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3317,15 +3317,15 @@ static int _brcmf_sdbrcm_download_firmware(struct brcmf_sdio *bus)
33173317
goto err;
33183318
}
33193319

3320-
/* External image takes precedence if specified */
33213320
if (brcmf_sdbrcm_download_code_file(bus)) {
33223321
brcmf_err("dongle image file download failed\n");
33233322
goto err;
33243323
}
33253324

3326-
/* External nvram takes precedence if specified */
3327-
if (brcmf_sdbrcm_download_nvram(bus))
3325+
if (brcmf_sdbrcm_download_nvram(bus)) {
33283326
brcmf_err("dongle nvram file download failed\n");
3327+
goto err;
3328+
}
33293329

33303330
/* Take arm out of reset */
33313331
if (brcmf_sdbrcm_download_state(bus, false)) {

drivers/net/wireless/brcm80211/brcmfmac/wl_cfg80211.c

Lines changed: 25 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1891,8 +1891,10 @@ static s32
18911891
brcmf_add_keyext(struct wiphy *wiphy, struct net_device *ndev,
18921892
u8 key_idx, const u8 *mac_addr, struct key_params *params)
18931893
{
1894+
struct brcmf_if *ifp = netdev_priv(ndev);
18941895
struct brcmf_wsec_key key;
18951896
s32 err = 0;
1897+
u8 keybuf[8];
18961898

18971899
memset(&key, 0, sizeof(key));
18981900
key.index = (u32) key_idx;
@@ -1916,8 +1918,9 @@ brcmf_add_keyext(struct wiphy *wiphy, struct net_device *ndev,
19161918
brcmf_dbg(CONN, "Setting the key index %d\n", key.index);
19171919
memcpy(key.data, params->key, key.len);
19181920

1919-
if (params->cipher == WLAN_CIPHER_SUITE_TKIP) {
1920-
u8 keybuf[8];
1921+
if ((ifp->vif->mode != WL_MODE_AP) &&
1922+
(params->cipher == WLAN_CIPHER_SUITE_TKIP)) {
1923+
brcmf_dbg(CONN, "Swapping RX/TX MIC key\n");
19211924
memcpy(keybuf, &key.data[24], sizeof(keybuf));
19221925
memcpy(&key.data[24], &key.data[16], sizeof(keybuf));
19231926
memcpy(&key.data[16], keybuf, sizeof(keybuf));
@@ -2013,7 +2016,7 @@ brcmf_cfg80211_add_key(struct wiphy *wiphy, struct net_device *ndev,
20132016
break;
20142017
case WLAN_CIPHER_SUITE_TKIP:
20152018
if (ifp->vif->mode != WL_MODE_AP) {
2016-
brcmf_dbg(CONN, "Swapping key\n");
2019+
brcmf_dbg(CONN, "Swapping RX/TX MIC key\n");
20172020
memcpy(keybuf, &key.data[24], sizeof(keybuf));
20182021
memcpy(&key.data[24], &key.data[16], sizeof(keybuf));
20192022
memcpy(&key.data[16], keybuf, sizeof(keybuf));
@@ -2118,8 +2121,7 @@ brcmf_cfg80211_get_key(struct wiphy *wiphy, struct net_device *ndev,
21182121
err = -EAGAIN;
21192122
goto done;
21202123
}
2121-
switch (wsec & ~SES_OW_ENABLED) {
2122-
case WEP_ENABLED:
2124+
if (wsec & WEP_ENABLED) {
21232125
sec = &profile->sec;
21242126
if (sec->cipher_pairwise & WLAN_CIPHER_SUITE_WEP40) {
21252127
params.cipher = WLAN_CIPHER_SUITE_WEP40;
@@ -2128,16 +2130,13 @@ brcmf_cfg80211_get_key(struct wiphy *wiphy, struct net_device *ndev,
21282130
params.cipher = WLAN_CIPHER_SUITE_WEP104;
21292131
brcmf_dbg(CONN, "WLAN_CIPHER_SUITE_WEP104\n");
21302132
}
2131-
break;
2132-
case TKIP_ENABLED:
2133+
} else if (wsec & TKIP_ENABLED) {
21332134
params.cipher = WLAN_CIPHER_SUITE_TKIP;
21342135
brcmf_dbg(CONN, "WLAN_CIPHER_SUITE_TKIP\n");
2135-
break;
2136-
case AES_ENABLED:
2136+
} else if (wsec & AES_ENABLED) {
21372137
params.cipher = WLAN_CIPHER_SUITE_AES_CMAC;
21382138
brcmf_dbg(CONN, "WLAN_CIPHER_SUITE_AES_CMAC\n");
2139-
break;
2140-
default:
2139+
} else {
21412140
brcmf_err("Invalid algo (0x%x)\n", wsec);
21422141
err = -EINVAL;
21432142
goto done;
@@ -3824,25 +3823,31 @@ brcmf_cfg80211_start_ap(struct wiphy *wiphy, struct net_device *ndev,
38243823
static int brcmf_cfg80211_stop_ap(struct wiphy *wiphy, struct net_device *ndev)
38253824
{
38263825
struct brcmf_if *ifp = netdev_priv(ndev);
3827-
s32 err = -EPERM;
3826+
s32 err;
38283827
struct brcmf_fil_bss_enable_le bss_enable;
3828+
struct brcmf_join_params join_params;
38293829

38303830
brcmf_dbg(TRACE, "Enter\n");
38313831

38323832
if (ifp->vif->wdev.iftype == NL80211_IFTYPE_AP) {
38333833
/* Due to most likely deauths outstanding we sleep */
38343834
/* first to make sure they get processed by fw. */
38353835
msleep(400);
3836-
err = brcmf_fil_cmd_int_set(ifp, BRCMF_C_SET_AP, 0);
3837-
if (err < 0) {
3838-
brcmf_err("setting AP mode failed %d\n", err);
3839-
goto exit;
3840-
}
3836+
3837+
memset(&join_params, 0, sizeof(join_params));
3838+
err = brcmf_fil_cmd_data_set(ifp, BRCMF_C_SET_SSID,
3839+
&join_params, sizeof(join_params));
3840+
if (err < 0)
3841+
brcmf_err("SET SSID error (%d)\n", err);
38413842
err = brcmf_fil_cmd_int_set(ifp, BRCMF_C_UP, 0);
3842-
if (err < 0) {
3843+
if (err < 0)
38433844
brcmf_err("BRCMF_C_UP error %d\n", err);
3844-
goto exit;
3845-
}
3845+
err = brcmf_fil_cmd_int_set(ifp, BRCMF_C_SET_AP, 0);
3846+
if (err < 0)
3847+
brcmf_err("setting AP mode failed %d\n", err);
3848+
err = brcmf_fil_cmd_int_set(ifp, BRCMF_C_SET_INFRA, 0);
3849+
if (err < 0)
3850+
brcmf_err("setting INFRA mode failed %d\n", err);
38463851
} else {
38473852
bss_enable.bsscfg_idx = cpu_to_le32(ifp->bssidx);
38483853
bss_enable.enable = cpu_to_le32(0);
@@ -3855,7 +3860,6 @@ static int brcmf_cfg80211_stop_ap(struct wiphy *wiphy, struct net_device *ndev)
38553860
set_bit(BRCMF_VIF_STATUS_AP_CREATING, &ifp->vif->sme_state);
38563861
clear_bit(BRCMF_VIF_STATUS_AP_CREATED, &ifp->vif->sme_state);
38573862

3858-
exit:
38593863
return err;
38603864
}
38613865

drivers/net/wireless/mwifiex/scan.c

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1393,8 +1393,10 @@ int mwifiex_scan_networks(struct mwifiex_private *priv,
13931393
queue_work(adapter->workqueue, &adapter->main_work);
13941394

13951395
/* Perform internal scan synchronously */
1396-
if (!priv->scan_request)
1396+
if (!priv->scan_request) {
1397+
dev_dbg(adapter->dev, "wait internal scan\n");
13971398
mwifiex_wait_queue_complete(adapter, cmd_node);
1399+
}
13981400
} else {
13991401
spin_unlock_irqrestore(&adapter->scan_pending_q_lock,
14001402
flags);
@@ -1793,7 +1795,12 @@ int mwifiex_ret_802_11_scan(struct mwifiex_private *priv,
17931795
/* Need to indicate IOCTL complete */
17941796
if (adapter->curr_cmd->wait_q_enabled) {
17951797
adapter->cmd_wait_q.status = 0;
1796-
mwifiex_complete_cmd(adapter, adapter->curr_cmd);
1798+
if (!priv->scan_request) {
1799+
dev_dbg(adapter->dev,
1800+
"complete internal scan\n");
1801+
mwifiex_complete_cmd(adapter,
1802+
adapter->curr_cmd);
1803+
}
17971804
}
17981805
if (priv->report_scan_result)
17991806
priv->report_scan_result = false;

drivers/net/wireless/rt2x00/Kconfig

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ if RT2X00
2020
config RT2400PCI
2121
tristate "Ralink rt2400 (PCI/PCMCIA) support"
2222
depends on PCI
23+
select RT2X00_LIB_MMIO
2324
select RT2X00_LIB_PCI
2425
select EEPROM_93CX6
2526
---help---
@@ -31,6 +32,7 @@ config RT2400PCI
3132
config RT2500PCI
3233
tristate "Ralink rt2500 (PCI/PCMCIA) support"
3334
depends on PCI
35+
select RT2X00_LIB_MMIO
3436
select RT2X00_LIB_PCI
3537
select EEPROM_93CX6
3638
---help---
@@ -43,6 +45,7 @@ config RT61PCI
4345
tristate "Ralink rt2501/rt61 (PCI/PCMCIA) support"
4446
depends on PCI
4547
select RT2X00_LIB_PCI
48+
select RT2X00_LIB_MMIO
4649
select RT2X00_LIB_FIRMWARE
4750
select RT2X00_LIB_CRYPTO
4851
select CRC_ITU_T
@@ -57,6 +60,7 @@ config RT2800PCI
5760
tristate "Ralink rt27xx/rt28xx/rt30xx (PCI/PCIe/PCMCIA) support"
5861
depends on PCI || SOC_RT288X || SOC_RT305X
5962
select RT2800_LIB
63+
select RT2X00_LIB_MMIO
6064
select RT2X00_LIB_PCI if PCI
6165
select RT2X00_LIB_SOC if SOC_RT288X || SOC_RT305X
6266
select RT2X00_LIB_FIRMWARE
@@ -185,6 +189,9 @@ endif
185189
config RT2800_LIB
186190
tristate
187191

192+
config RT2X00_LIB_MMIO
193+
tristate
194+
188195
config RT2X00_LIB_PCI
189196
tristate
190197
select RT2X00_LIB

drivers/net/wireless/rt2x00/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ rt2x00lib-$(CONFIG_RT2X00_LIB_FIRMWARE) += rt2x00firmware.o
99
rt2x00lib-$(CONFIG_RT2X00_LIB_LEDS) += rt2x00leds.o
1010

1111
obj-$(CONFIG_RT2X00_LIB) += rt2x00lib.o
12+
obj-$(CONFIG_RT2X00_LIB_MMIO) += rt2x00mmio.o
1213
obj-$(CONFIG_RT2X00_LIB_PCI) += rt2x00pci.o
1314
obj-$(CONFIG_RT2X00_LIB_SOC) += rt2x00soc.o
1415
obj-$(CONFIG_RT2X00_LIB_USB) += rt2x00usb.o

drivers/net/wireless/rt2x00/rt2400pci.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434
#include <linux/slab.h>
3535

3636
#include "rt2x00.h"
37+
#include "rt2x00mmio.h"
3738
#include "rt2x00pci.h"
3839
#include "rt2400pci.h"
3940

drivers/net/wireless/rt2x00/rt2500pci.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434
#include <linux/slab.h>
3535

3636
#include "rt2x00.h"
37+
#include "rt2x00mmio.h"
3738
#include "rt2x00pci.h"
3839
#include "rt2500pci.h"
3940

drivers/net/wireless/rt2x00/rt2800pci.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@
4141
#include <linux/eeprom_93cx6.h>
4242

4343
#include "rt2x00.h"
44+
#include "rt2x00mmio.h"
4445
#include "rt2x00pci.h"
4546
#include "rt2x00soc.h"
4647
#include "rt2800lib.h"

0 commit comments

Comments
 (0)