Skip to content

Commit 6fe5468

Browse files
committed
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless
Conflicts: drivers/net/wireless/rt2x00/rt2x00pci.c
2 parents deb0928 + 69a2bac commit 6fe5468

26 files changed

Lines changed: 460 additions & 347 deletions

File tree

‎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
@@ -3303,15 +3303,15 @@ static int _brcmf_sdbrcm_download_firmware(struct brcmf_sdio *bus)
33033303
goto err;
33043304
}
33053305

3306-
/* External image takes precedence if specified */
33073306
if (brcmf_sdbrcm_download_code_file(bus)) {
33083307
brcmf_err("dongle image file download failed\n");
33093308
goto err;
33103309
}
33113310

3312-
/* External nvram takes precedence if specified */
3313-
if (brcmf_sdbrcm_download_nvram(bus))
3311+
if (brcmf_sdbrcm_download_nvram(bus)) {
33143312
brcmf_err("dongle nvram file download failed\n");
3313+
goto err;
3314+
}
33153315

33163316
/* Take arm out of reset */
33173317
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
@@ -1844,8 +1844,10 @@ static s32
18441844
brcmf_add_keyext(struct wiphy *wiphy, struct net_device *ndev,
18451845
u8 key_idx, const u8 *mac_addr, struct key_params *params)
18461846
{
1847+
struct brcmf_if *ifp = netdev_priv(ndev);
18471848
struct brcmf_wsec_key key;
18481849
s32 err = 0;
1850+
u8 keybuf[8];
18491851

18501852
memset(&key, 0, sizeof(key));
18511853
key.index = (u32) key_idx;
@@ -1869,8 +1871,9 @@ brcmf_add_keyext(struct wiphy *wiphy, struct net_device *ndev,
18691871
brcmf_dbg(CONN, "Setting the key index %d\n", key.index);
18701872
memcpy(key.data, params->key, key.len);
18711873

1872-
if (params->cipher == WLAN_CIPHER_SUITE_TKIP) {
1873-
u8 keybuf[8];
1874+
if ((ifp->vif->mode != WL_MODE_AP) &&
1875+
(params->cipher == WLAN_CIPHER_SUITE_TKIP)) {
1876+
brcmf_dbg(CONN, "Swapping RX/TX MIC key\n");
18741877
memcpy(keybuf, &key.data[24], sizeof(keybuf));
18751878
memcpy(&key.data[24], &key.data[16], sizeof(keybuf));
18761879
memcpy(&key.data[16], keybuf, sizeof(keybuf));
@@ -1966,7 +1969,7 @@ brcmf_cfg80211_add_key(struct wiphy *wiphy, struct net_device *ndev,
19661969
break;
19671970
case WLAN_CIPHER_SUITE_TKIP:
19681971
if (ifp->vif->mode != WL_MODE_AP) {
1969-
brcmf_dbg(CONN, "Swapping key\n");
1972+
brcmf_dbg(CONN, "Swapping RX/TX MIC key\n");
19701973
memcpy(keybuf, &key.data[24], sizeof(keybuf));
19711974
memcpy(&key.data[24], &key.data[16], sizeof(keybuf));
19721975
memcpy(&key.data[16], keybuf, sizeof(keybuf));
@@ -2071,8 +2074,7 @@ brcmf_cfg80211_get_key(struct wiphy *wiphy, struct net_device *ndev,
20712074
err = -EAGAIN;
20722075
goto done;
20732076
}
2074-
switch (wsec & ~SES_OW_ENABLED) {
2075-
case WEP_ENABLED:
2077+
if (wsec & WEP_ENABLED) {
20762078
sec = &profile->sec;
20772079
if (sec->cipher_pairwise & WLAN_CIPHER_SUITE_WEP40) {
20782080
params.cipher = WLAN_CIPHER_SUITE_WEP40;
@@ -2081,16 +2083,13 @@ brcmf_cfg80211_get_key(struct wiphy *wiphy, struct net_device *ndev,
20812083
params.cipher = WLAN_CIPHER_SUITE_WEP104;
20822084
brcmf_dbg(CONN, "WLAN_CIPHER_SUITE_WEP104\n");
20832085
}
2084-
break;
2085-
case TKIP_ENABLED:
2086+
} else if (wsec & TKIP_ENABLED) {
20862087
params.cipher = WLAN_CIPHER_SUITE_TKIP;
20872088
brcmf_dbg(CONN, "WLAN_CIPHER_SUITE_TKIP\n");
2088-
break;
2089-
case AES_ENABLED:
2089+
} else if (wsec & AES_ENABLED) {
20902090
params.cipher = WLAN_CIPHER_SUITE_AES_CMAC;
20912091
brcmf_dbg(CONN, "WLAN_CIPHER_SUITE_AES_CMAC\n");
2092-
break;
2093-
default:
2092+
} else {
20942093
brcmf_err("Invalid algo (0x%x)\n", wsec);
20952094
err = -EINVAL;
20962095
goto done;
@@ -3774,25 +3773,31 @@ brcmf_cfg80211_start_ap(struct wiphy *wiphy, struct net_device *ndev,
37743773
static int brcmf_cfg80211_stop_ap(struct wiphy *wiphy, struct net_device *ndev)
37753774
{
37763775
struct brcmf_if *ifp = netdev_priv(ndev);
3777-
s32 err = -EPERM;
3776+
s32 err;
37783777
struct brcmf_fil_bss_enable_le bss_enable;
3778+
struct brcmf_join_params join_params;
37793779

37803780
brcmf_dbg(TRACE, "Enter\n");
37813781

37823782
if (ifp->vif->wdev.iftype == NL80211_IFTYPE_AP) {
37833783
/* Due to most likely deauths outstanding we sleep */
37843784
/* first to make sure they get processed by fw. */
37853785
msleep(400);
3786-
err = brcmf_fil_cmd_int_set(ifp, BRCMF_C_SET_AP, 0);
3787-
if (err < 0) {
3788-
brcmf_err("setting AP mode failed %d\n", err);
3789-
goto exit;
3790-
}
3786+
3787+
memset(&join_params, 0, sizeof(join_params));
3788+
err = brcmf_fil_cmd_data_set(ifp, BRCMF_C_SET_SSID,
3789+
&join_params, sizeof(join_params));
3790+
if (err < 0)
3791+
brcmf_err("SET SSID error (%d)\n", err);
37913792
err = brcmf_fil_cmd_int_set(ifp, BRCMF_C_UP, 0);
3792-
if (err < 0) {
3793+
if (err < 0)
37933794
brcmf_err("BRCMF_C_UP error %d\n", err);
3794-
goto exit;
3795-
}
3795+
err = brcmf_fil_cmd_int_set(ifp, BRCMF_C_SET_AP, 0);
3796+
if (err < 0)
3797+
brcmf_err("setting AP mode failed %d\n", err);
3798+
err = brcmf_fil_cmd_int_set(ifp, BRCMF_C_SET_INFRA, 0);
3799+
if (err < 0)
3800+
brcmf_err("setting INFRA mode failed %d\n", err);
37963801
} else {
37973802
bss_enable.bsscfg_idx = cpu_to_le32(ifp->bssidx);
37983803
bss_enable.enable = cpu_to_le32(0);
@@ -3805,7 +3810,6 @@ static int brcmf_cfg80211_stop_ap(struct wiphy *wiphy, struct net_device *ndev)
38053810
set_bit(BRCMF_VIF_STATUS_AP_CREATING, &ifp->vif->sme_state);
38063811
clear_bit(BRCMF_VIF_STATUS_AP_CREATED, &ifp->vif->sme_state);
38073812

3808-
exit:
38093813
return err;
38103814
}
38113815

‎drivers/net/wireless/iwlwifi/dvm/rxon.c‎

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1419,6 +1419,14 @@ void iwlagn_bss_info_changed(struct ieee80211_hw *hw,
14191419

14201420
mutex_lock(&priv->mutex);
14211421

1422+
if (changes & BSS_CHANGED_IDLE && bss_conf->idle) {
1423+
/*
1424+
* If we go idle, then clearly no "passive-no-rx"
1425+
* workaround is needed any more, this is a reset.
1426+
*/
1427+
iwlagn_lift_passive_no_rx(priv);
1428+
}
1429+
14221430
if (unlikely(!iwl_is_ready(priv))) {
14231431
IWL_DEBUG_MAC80211(priv, "leave - not ready\n");
14241432
mutex_unlock(&priv->mutex);
@@ -1450,16 +1458,6 @@ void iwlagn_bss_info_changed(struct ieee80211_hw *hw,
14501458
priv->timestamp = bss_conf->sync_tsf;
14511459
ctx->staging.filter_flags |= RXON_FILTER_ASSOC_MSK;
14521460
} else {
1453-
/*
1454-
* If we disassociate while there are pending
1455-
* frames, just wake up the queues and let the
1456-
* frames "escape" ... This shouldn't really
1457-
* be happening to start with, but we should
1458-
* not get stuck in this case either since it
1459-
* can happen if userspace gets confused.
1460-
*/
1461-
iwlagn_lift_passive_no_rx(priv);
1462-
14631461
ctx->staging.filter_flags &= ~RXON_FILTER_ASSOC_MSK;
14641462

14651463
if (ctx->ctxid == IWL_RXON_CTX_BSS)

‎drivers/net/wireless/iwlwifi/dvm/tx.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1193,7 +1193,7 @@ int iwlagn_rx_reply_tx(struct iwl_priv *priv, struct iwl_rx_cmd_buffer *rxb,
11931193
memset(&info->status, 0, sizeof(info->status));
11941194

11951195
if (status == TX_STATUS_FAIL_PASSIVE_NO_RX &&
1196-
iwl_is_associated_ctx(ctx) && ctx->vif &&
1196+
ctx->vif &&
11971197
ctx->vif->type == NL80211_IFTYPE_STATION) {
11981198
/* block and stop all queues */
11991199
priv->passive_no_rx = true;

‎drivers/net/wireless/mwifiex/cfg80211.c‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1904,7 +1904,8 @@ mwifiex_cfg80211_scan(struct wiphy *wiphy,
19041904
}
19051905
}
19061906

1907-
for (i = 0; i < request->n_channels; i++) {
1907+
for (i = 0; i < min_t(u32, request->n_channels,
1908+
MWIFIEX_USER_SCAN_CHAN_MAX); i++) {
19081909
chan = request->channels[i];
19091910
priv->user_scan_cfg->chan_list[i].chan_number = chan->hw_value;
19101911
priv->user_scan_cfg->chan_list[i].radio_type = chan->band;

‎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
@@ -192,6 +196,9 @@ endif
192196
config RT2800_LIB
193197
tristate
194198

199+
config RT2X00_LIB_MMIO
200+
tristate
201+
195202
config RT2X00_LIB_PCI
196203
tristate
197204
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

0 commit comments

Comments
 (0)