aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless
diff options
context:
space:
mode:
authorJohn W. Linville <linville@tuxdriver.com>2013-08-09 15:06:28 -0400
committerJohn W. Linville <linville@tuxdriver.com>2013-08-09 15:06:28 -0400
commit4f0544489215fc78cccb96f8e3d0f078ae965297 (patch)
tree69e71db0cf005a68ab1b70f33ae0462fd94152fc /drivers/net/wireless
parent2952f6ef5195ea76279f7370f0a6571867e54438 (diff)
parent5a6e0cf70743f30c17ccb5f228db9a124b0e7477 (diff)
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless
Diffstat (limited to 'drivers/net/wireless')
-rw-r--r--drivers/net/wireless/ath/ath10k/Kconfig2
-rw-r--r--drivers/net/wireless/brcm80211/brcmfmac/wl_cfg80211.c5
-rw-r--r--drivers/net/wireless/cw1200/sta.c7
-rw-r--r--drivers/net/wireless/iwlegacy/4965-mac.c16
-rw-r--r--drivers/net/wireless/iwlegacy/common.c1
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-prph.h2
-rw-r--r--drivers/net/wireless/iwlwifi/mvm/d3.c15
-rw-r--r--drivers/net/wireless/iwlwifi/mvm/fw-api-scan.h1
-rw-r--r--drivers/net/wireless/iwlwifi/mvm/mac80211.c42
-rw-r--r--drivers/net/wireless/iwlwifi/mvm/scan.c11
-rw-r--r--drivers/net/wireless/iwlwifi/mvm/sta.c11
-rw-r--r--drivers/net/wireless/iwlwifi/pcie/drv.c1
-rw-r--r--drivers/net/wireless/iwlwifi/pcie/rx.c8
-rw-r--r--drivers/net/wireless/iwlwifi/pcie/trans.c5
-rw-r--r--drivers/net/wireless/mwifiex/cfg80211.c4
-rw-r--r--drivers/net/wireless/mwifiex/cfp.c3
-rw-r--r--drivers/net/wireless/mwifiex/join.c6
-rw-r--r--drivers/net/wireless/mwifiex/sdio.c4
-rw-r--r--drivers/net/wireless/mwifiex/sta_ioctl.c4
-rw-r--r--drivers/net/wireless/rt2x00/rt2x00queue.c18
20 files changed, 96 insertions, 70 deletions
diff --git a/drivers/net/wireless/ath/ath10k/Kconfig b/drivers/net/wireless/ath/ath10k/Kconfig
index cde58fe96254..82e8088ca9b4 100644
--- a/drivers/net/wireless/ath/ath10k/Kconfig
+++ b/drivers/net/wireless/ath/ath10k/Kconfig
@@ -1,6 +1,6 @@
1config ATH10K 1config ATH10K
2 tristate "Atheros 802.11ac wireless cards support" 2 tristate "Atheros 802.11ac wireless cards support"
3 depends on MAC80211 3 depends on MAC80211 && HAS_DMA
4 select ATH_COMMON 4 select ATH_COMMON
5 ---help--- 5 ---help---
6 This module adds support for wireless adapters based on 6 This module adds support for wireless adapters based on
diff --git a/drivers/net/wireless/brcm80211/brcmfmac/wl_cfg80211.c b/drivers/net/wireless/brcm80211/brcmfmac/wl_cfg80211.c
index 277b37ae7126..7fa71f73cfe8 100644
--- a/drivers/net/wireless/brcm80211/brcmfmac/wl_cfg80211.c
+++ b/drivers/net/wireless/brcm80211/brcmfmac/wl_cfg80211.c
@@ -1093,8 +1093,11 @@ static void brcmf_link_down(struct brcmf_cfg80211_vif *vif)
1093 brcmf_dbg(INFO, "Call WLC_DISASSOC to stop excess roaming\n "); 1093 brcmf_dbg(INFO, "Call WLC_DISASSOC to stop excess roaming\n ");
1094 err = brcmf_fil_cmd_data_set(vif->ifp, 1094 err = brcmf_fil_cmd_data_set(vif->ifp,
1095 BRCMF_C_DISASSOC, NULL, 0); 1095 BRCMF_C_DISASSOC, NULL, 0);
1096 if (err) 1096 if (err) {
1097 brcmf_err("WLC_DISASSOC failed (%d)\n", err); 1097 brcmf_err("WLC_DISASSOC failed (%d)\n", err);
1098 cfg80211_disconnected(vif->wdev.netdev, 0,
1099 NULL, 0, GFP_KERNEL);
1100 }
1098 clear_bit(BRCMF_VIF_STATUS_CONNECTED, &vif->sme_state); 1101 clear_bit(BRCMF_VIF_STATUS_CONNECTED, &vif->sme_state);
1099 } 1102 }
1100 clear_bit(BRCMF_VIF_STATUS_CONNECTING, &vif->sme_state); 1103 clear_bit(BRCMF_VIF_STATUS_CONNECTING, &vif->sme_state);
diff --git a/drivers/net/wireless/cw1200/sta.c b/drivers/net/wireless/cw1200/sta.c
index 7365674366f4..010b252be584 100644
--- a/drivers/net/wireless/cw1200/sta.c
+++ b/drivers/net/wireless/cw1200/sta.c
@@ -1406,11 +1406,8 @@ static void cw1200_do_unjoin(struct cw1200_common *priv)
1406 if (!priv->join_status) 1406 if (!priv->join_status)
1407 goto done; 1407 goto done;
1408 1408
1409 if (priv->join_status > CW1200_JOIN_STATUS_IBSS) { 1409 if (priv->join_status == CW1200_JOIN_STATUS_AP)
1410 wiphy_err(priv->hw->wiphy, "Unexpected: join status: %d\n", 1410 goto done;
1411 priv->join_status);
1412 BUG_ON(1);
1413 }
1414 1411
1415 cancel_work_sync(&priv->update_filtering_work); 1412 cancel_work_sync(&priv->update_filtering_work);
1416 cancel_work_sync(&priv->set_beacon_wakeup_period_work); 1413 cancel_work_sync(&priv->set_beacon_wakeup_period_work);
diff --git a/drivers/net/wireless/iwlegacy/4965-mac.c b/drivers/net/wireless/iwlegacy/4965-mac.c
index c4b22e190a54..b411ab905284 100644
--- a/drivers/net/wireless/iwlegacy/4965-mac.c
+++ b/drivers/net/wireless/iwlegacy/4965-mac.c
@@ -4466,12 +4466,12 @@ il4965_irq_tasklet(struct il_priv *il)
4466 * is killed. Hence update the killswitch state here. The 4466 * is killed. Hence update the killswitch state here. The
4467 * rfkill handler will care about restarting if needed. 4467 * rfkill handler will care about restarting if needed.
4468 */ 4468 */
4469 if (!test_bit(S_ALIVE, &il->status)) { 4469 if (hw_rf_kill) {
4470 if (hw_rf_kill) 4470 set_bit(S_RFKILL, &il->status);
4471 set_bit(S_RFKILL, &il->status); 4471 } else {
4472 else 4472 clear_bit(S_RFKILL, &il->status);
4473 clear_bit(S_RFKILL, &il->status);
4474 wiphy_rfkill_set_hw_state(il->hw->wiphy, hw_rf_kill); 4473 wiphy_rfkill_set_hw_state(il->hw->wiphy, hw_rf_kill);
4474 il_force_reset(il, true);
4475 } 4475 }
4476 4476
4477 handled |= CSR_INT_BIT_RF_KILL; 4477 handled |= CSR_INT_BIT_RF_KILL;
@@ -5340,6 +5340,9 @@ il4965_alive_start(struct il_priv *il)
5340 5340
5341 il->active_rate = RATES_MASK; 5341 il->active_rate = RATES_MASK;
5342 5342
5343 il_power_update_mode(il, true);
5344 D_INFO("Updated power mode\n");
5345
5343 if (il_is_associated(il)) { 5346 if (il_is_associated(il)) {
5344 struct il_rxon_cmd *active_rxon = 5347 struct il_rxon_cmd *active_rxon =
5345 (struct il_rxon_cmd *)&il->active; 5348 (struct il_rxon_cmd *)&il->active;
@@ -5370,9 +5373,6 @@ il4965_alive_start(struct il_priv *il)
5370 D_INFO("ALIVE processing complete.\n"); 5373 D_INFO("ALIVE processing complete.\n");
5371 wake_up(&il->wait_command_queue); 5374 wake_up(&il->wait_command_queue);
5372 5375
5373 il_power_update_mode(il, true);
5374 D_INFO("Updated power mode\n");
5375
5376 return; 5376 return;
5377 5377
5378restart: 5378restart:
diff --git a/drivers/net/wireless/iwlegacy/common.c b/drivers/net/wireless/iwlegacy/common.c
index 3195aad440dd..b03e22ef5462 100644
--- a/drivers/net/wireless/iwlegacy/common.c
+++ b/drivers/net/wireless/iwlegacy/common.c
@@ -4660,6 +4660,7 @@ il_force_reset(struct il_priv *il, bool external)
4660 4660
4661 return 0; 4661 return 0;
4662} 4662}
4663EXPORT_SYMBOL(il_force_reset);
4663 4664
4664int 4665int
4665il_mac_change_interface(struct ieee80211_hw *hw, struct ieee80211_vif *vif, 4666il_mac_change_interface(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
diff --git a/drivers/net/wireless/iwlwifi/iwl-prph.h b/drivers/net/wireless/iwlwifi/iwl-prph.h
index ff8cc75c189d..a70c7b9d9bad 100644
--- a/drivers/net/wireless/iwlwifi/iwl-prph.h
+++ b/drivers/net/wireless/iwlwifi/iwl-prph.h
@@ -97,6 +97,8 @@
97 97
98#define APMG_PCIDEV_STT_VAL_L1_ACT_DIS (0x00000800) 98#define APMG_PCIDEV_STT_VAL_L1_ACT_DIS (0x00000800)
99 99
100#define APMG_RTC_INT_STT_RFKILL (0x10000000)
101
100/* Device system time */ 102/* Device system time */
101#define DEVICE_SYSTEM_TIME_REG 0xA0206C 103#define DEVICE_SYSTEM_TIME_REG 0xA0206C
102 104
diff --git a/drivers/net/wireless/iwlwifi/mvm/d3.c b/drivers/net/wireless/iwlwifi/mvm/d3.c
index ebf7f9468926..d0d7a20266e6 100644
--- a/drivers/net/wireless/iwlwifi/mvm/d3.c
+++ b/drivers/net/wireless/iwlwifi/mvm/d3.c
@@ -134,7 +134,7 @@ struct wowlan_key_data {
134 struct iwl_wowlan_rsc_tsc_params_cmd *rsc_tsc; 134 struct iwl_wowlan_rsc_tsc_params_cmd *rsc_tsc;
135 struct iwl_wowlan_tkip_params_cmd *tkip; 135 struct iwl_wowlan_tkip_params_cmd *tkip;
136 bool error, use_rsc_tsc, use_tkip; 136 bool error, use_rsc_tsc, use_tkip;
137 int gtk_key_idx; 137 int wep_key_idx;
138}; 138};
139 139
140static void iwl_mvm_wowlan_program_keys(struct ieee80211_hw *hw, 140static void iwl_mvm_wowlan_program_keys(struct ieee80211_hw *hw,
@@ -188,8 +188,8 @@ static void iwl_mvm_wowlan_program_keys(struct ieee80211_hw *hw,
188 wkc.wep_key.key_offset = 0; 188 wkc.wep_key.key_offset = 0;
189 } else { 189 } else {
190 /* others start at 1 */ 190 /* others start at 1 */
191 data->gtk_key_idx++; 191 data->wep_key_idx++;
192 wkc.wep_key.key_offset = data->gtk_key_idx; 192 wkc.wep_key.key_offset = data->wep_key_idx;
193 } 193 }
194 194
195 ret = iwl_mvm_send_cmd_pdu(mvm, WEP_KEY, CMD_SYNC, 195 ret = iwl_mvm_send_cmd_pdu(mvm, WEP_KEY, CMD_SYNC,
@@ -316,8 +316,13 @@ static void iwl_mvm_wowlan_program_keys(struct ieee80211_hw *hw,
316 mvm->ptk_ivlen = key->iv_len; 316 mvm->ptk_ivlen = key->iv_len;
317 mvm->ptk_icvlen = key->icv_len; 317 mvm->ptk_icvlen = key->icv_len;
318 } else { 318 } else {
319 data->gtk_key_idx++; 319 /*
320 key->hw_key_idx = data->gtk_key_idx; 320 * firmware only supports TSC/RSC for a single key,
321 * so if there are multiple keep overwriting them
322 * with new ones -- this relies on mac80211 doing
323 * list_add_tail().
324 */
325 key->hw_key_idx = 1;
321 mvm->gtk_ivlen = key->iv_len; 326 mvm->gtk_ivlen = key->iv_len;
322 mvm->gtk_icvlen = key->icv_len; 327 mvm->gtk_icvlen = key->icv_len;
323 } 328 }
diff --git a/drivers/net/wireless/iwlwifi/mvm/fw-api-scan.h b/drivers/net/wireless/iwlwifi/mvm/fw-api-scan.h
index c33ff8e61f4f..83cb9b992ea4 100644
--- a/drivers/net/wireless/iwlwifi/mvm/fw-api-scan.h
+++ b/drivers/net/wireless/iwlwifi/mvm/fw-api-scan.h
@@ -69,7 +69,6 @@
69/* Scan Commands, Responses, Notifications */ 69/* Scan Commands, Responses, Notifications */
70 70
71/* Masks for iwl_scan_channel.type flags */ 71/* Masks for iwl_scan_channel.type flags */
72#define SCAN_CHANNEL_TYPE_PASSIVE 0
73#define SCAN_CHANNEL_TYPE_ACTIVE BIT(0) 72#define SCAN_CHANNEL_TYPE_ACTIVE BIT(0)
74#define SCAN_CHANNEL_NARROW_BAND BIT(22) 73#define SCAN_CHANNEL_NARROW_BAND BIT(22)
75 74
diff --git a/drivers/net/wireless/iwlwifi/mvm/mac80211.c b/drivers/net/wireless/iwlwifi/mvm/mac80211.c
index fc61b274780c..785c782b166f 100644
--- a/drivers/net/wireless/iwlwifi/mvm/mac80211.c
+++ b/drivers/net/wireless/iwlwifi/mvm/mac80211.c
@@ -514,6 +514,27 @@ static int iwl_mvm_mac_add_interface(struct ieee80211_hw *hw,
514 goto out_unlock; 514 goto out_unlock;
515 515
516 /* 516 /*
517 * TODO: remove this temporary code.
518 * Currently MVM FW supports power management only on single MAC.
519 * If new interface added, disable PM on existing interface.
520 * P2P device is a special case, since it is handled by FW similary to
521 * scan. If P2P deviced is added, PM remains enabled on existing
522 * interface.
523 * Note: the method below does not count the new interface being added
524 * at this moment.
525 */
526 if (vif->type != NL80211_IFTYPE_P2P_DEVICE)
527 mvm->vif_count++;
528 if (mvm->vif_count > 1) {
529 IWL_DEBUG_MAC80211(mvm,
530 "Disable power on existing interfaces\n");
531 ieee80211_iterate_active_interfaces_atomic(
532 mvm->hw,
533 IEEE80211_IFACE_ITER_NORMAL,
534 iwl_mvm_pm_disable_iterator, mvm);
535 }
536
537 /*
517 * The AP binding flow can be done only after the beacon 538 * The AP binding flow can be done only after the beacon
518 * template is configured (which happens only in the mac80211 539 * template is configured (which happens only in the mac80211
519 * start_ap() flow), and adding the broadcast station can happen 540 * start_ap() flow), and adding the broadcast station can happen
@@ -537,27 +558,6 @@ static int iwl_mvm_mac_add_interface(struct ieee80211_hw *hw,
537 goto out_unlock; 558 goto out_unlock;
538 } 559 }
539 560
540 /*
541 * TODO: remove this temporary code.
542 * Currently MVM FW supports power management only on single MAC.
543 * If new interface added, disable PM on existing interface.
544 * P2P device is a special case, since it is handled by FW similary to
545 * scan. If P2P deviced is added, PM remains enabled on existing
546 * interface.
547 * Note: the method below does not count the new interface being added
548 * at this moment.
549 */
550 if (vif->type != NL80211_IFTYPE_P2P_DEVICE)
551 mvm->vif_count++;
552 if (mvm->vif_count > 1) {
553 IWL_DEBUG_MAC80211(mvm,
554 "Disable power on existing interfaces\n");
555 ieee80211_iterate_active_interfaces_atomic(
556 mvm->hw,
557 IEEE80211_IFACE_ITER_NORMAL,
558 iwl_mvm_pm_disable_iterator, mvm);
559 }
560
561 ret = iwl_mvm_mac_ctxt_add(mvm, vif); 561 ret = iwl_mvm_mac_ctxt_add(mvm, vif);
562 if (ret) 562 if (ret)
563 goto out_release; 563 goto out_release;
diff --git a/drivers/net/wireless/iwlwifi/mvm/scan.c b/drivers/net/wireless/iwlwifi/mvm/scan.c
index 14c1b457ca50..9a7ab8495300 100644
--- a/drivers/net/wireless/iwlwifi/mvm/scan.c
+++ b/drivers/net/wireless/iwlwifi/mvm/scan.c
@@ -178,19 +178,12 @@ static void iwl_mvm_scan_fill_channels(struct iwl_scan_cmd *cmd,
178 struct iwl_scan_channel *chan = (struct iwl_scan_channel *) 178 struct iwl_scan_channel *chan = (struct iwl_scan_channel *)
179 (cmd->data + le16_to_cpu(cmd->tx_cmd.len)); 179 (cmd->data + le16_to_cpu(cmd->tx_cmd.len));
180 int i; 180 int i;
181 __le32 chan_type_value;
182
183 if (req->n_ssids > 0)
184 chan_type_value = cpu_to_le32(BIT(req->n_ssids) - 1);
185 else
186 chan_type_value = SCAN_CHANNEL_TYPE_PASSIVE;
187 181
188 for (i = 0; i < cmd->channel_count; i++) { 182 for (i = 0; i < cmd->channel_count; i++) {
189 chan->channel = cpu_to_le16(req->channels[i]->hw_value); 183 chan->channel = cpu_to_le16(req->channels[i]->hw_value);
184 chan->type = cpu_to_le32(BIT(req->n_ssids) - 1);
190 if (req->channels[i]->flags & IEEE80211_CHAN_PASSIVE_SCAN) 185 if (req->channels[i]->flags & IEEE80211_CHAN_PASSIVE_SCAN)
191 chan->type = SCAN_CHANNEL_TYPE_PASSIVE; 186 chan->type &= cpu_to_le32(~SCAN_CHANNEL_TYPE_ACTIVE);
192 else
193 chan->type = chan_type_value;
194 chan->active_dwell = cpu_to_le16(active_dwell); 187 chan->active_dwell = cpu_to_le16(active_dwell);
195 chan->passive_dwell = cpu_to_le16(passive_dwell); 188 chan->passive_dwell = cpu_to_le16(passive_dwell);
196 chan->iteration_count = cpu_to_le16(1); 189 chan->iteration_count = cpu_to_le16(1);
diff --git a/drivers/net/wireless/iwlwifi/mvm/sta.c b/drivers/net/wireless/iwlwifi/mvm/sta.c
index 8b302774b70c..44add291531b 100644
--- a/drivers/net/wireless/iwlwifi/mvm/sta.c
+++ b/drivers/net/wireless/iwlwifi/mvm/sta.c
@@ -914,6 +914,7 @@ int iwl_mvm_sta_tx_agg_flush(struct iwl_mvm *mvm, struct ieee80211_vif *vif,
914 struct iwl_mvm_sta *mvmsta = (void *)sta->drv_priv; 914 struct iwl_mvm_sta *mvmsta = (void *)sta->drv_priv;
915 struct iwl_mvm_tid_data *tid_data = &mvmsta->tid_data[tid]; 915 struct iwl_mvm_tid_data *tid_data = &mvmsta->tid_data[tid];
916 u16 txq_id; 916 u16 txq_id;
917 enum iwl_mvm_agg_state old_state;
917 918
918 /* 919 /*
919 * First set the agg state to OFF to avoid calling 920 * First set the agg state to OFF to avoid calling
@@ -923,13 +924,17 @@ int iwl_mvm_sta_tx_agg_flush(struct iwl_mvm *mvm, struct ieee80211_vif *vif,
923 txq_id = tid_data->txq_id; 924 txq_id = tid_data->txq_id;
924 IWL_DEBUG_TX_QUEUES(mvm, "Flush AGG: sta %d tid %d q %d state %d\n", 925 IWL_DEBUG_TX_QUEUES(mvm, "Flush AGG: sta %d tid %d q %d state %d\n",
925 mvmsta->sta_id, tid, txq_id, tid_data->state); 926 mvmsta->sta_id, tid, txq_id, tid_data->state);
927 old_state = tid_data->state;
926 tid_data->state = IWL_AGG_OFF; 928 tid_data->state = IWL_AGG_OFF;
927 spin_unlock_bh(&mvmsta->lock); 929 spin_unlock_bh(&mvmsta->lock);
928 930
929 if (iwl_mvm_flush_tx_path(mvm, BIT(txq_id), true)) 931 if (old_state >= IWL_AGG_ON) {
930 IWL_ERR(mvm, "Couldn't flush the AGG queue\n"); 932 if (iwl_mvm_flush_tx_path(mvm, BIT(txq_id), true))
933 IWL_ERR(mvm, "Couldn't flush the AGG queue\n");
934
935 iwl_trans_txq_disable(mvm->trans, tid_data->txq_id);
936 }
931 937
932 iwl_trans_txq_disable(mvm->trans, tid_data->txq_id);
933 mvm->queue_to_mac80211[tid_data->txq_id] = 938 mvm->queue_to_mac80211[tid_data->txq_id] =
934 IWL_INVALID_MAC80211_QUEUE; 939 IWL_INVALID_MAC80211_QUEUE;
935 940
diff --git a/drivers/net/wireless/iwlwifi/pcie/drv.c b/drivers/net/wireless/iwlwifi/pcie/drv.c
index db6be2491d7c..c96070fa93e4 100644
--- a/drivers/net/wireless/iwlwifi/pcie/drv.c
+++ b/drivers/net/wireless/iwlwifi/pcie/drv.c
@@ -130,6 +130,7 @@ static DEFINE_PCI_DEVICE_TABLE(iwl_hw_card_ids) = {
130 {IWL_PCI_DEVICE(0x423C, 0x1306, iwl5150_abg_cfg)}, /* Half Mini Card */ 130 {IWL_PCI_DEVICE(0x423C, 0x1306, iwl5150_abg_cfg)}, /* Half Mini Card */
131 {IWL_PCI_DEVICE(0x423C, 0x1221, iwl5150_agn_cfg)}, /* Mini Card */ 131 {IWL_PCI_DEVICE(0x423C, 0x1221, iwl5150_agn_cfg)}, /* Mini Card */
132 {IWL_PCI_DEVICE(0x423C, 0x1321, iwl5150_agn_cfg)}, /* Half Mini Card */ 132 {IWL_PCI_DEVICE(0x423C, 0x1321, iwl5150_agn_cfg)}, /* Half Mini Card */
133 {IWL_PCI_DEVICE(0x423C, 0x1326, iwl5150_abg_cfg)}, /* Half Mini Card */
133 134
134 {IWL_PCI_DEVICE(0x423D, 0x1211, iwl5150_agn_cfg)}, /* Mini Card */ 135 {IWL_PCI_DEVICE(0x423D, 0x1211, iwl5150_agn_cfg)}, /* Mini Card */
135 {IWL_PCI_DEVICE(0x423D, 0x1311, iwl5150_agn_cfg)}, /* Half Mini Card */ 136 {IWL_PCI_DEVICE(0x423D, 0x1311, iwl5150_agn_cfg)}, /* Half Mini Card */
diff --git a/drivers/net/wireless/iwlwifi/pcie/rx.c b/drivers/net/wireless/iwlwifi/pcie/rx.c
index 5fdb4eea146d..68837d4e9fa0 100644
--- a/drivers/net/wireless/iwlwifi/pcie/rx.c
+++ b/drivers/net/wireless/iwlwifi/pcie/rx.c
@@ -888,6 +888,14 @@ irqreturn_t iwl_pcie_irq_handler(int irq, void *dev_id)
888 888
889 iwl_op_mode_hw_rf_kill(trans->op_mode, hw_rfkill); 889 iwl_op_mode_hw_rf_kill(trans->op_mode, hw_rfkill);
890 if (hw_rfkill) { 890 if (hw_rfkill) {
891 /*
892 * Clear the interrupt in APMG if the NIC is going down.
893 * Note that when the NIC exits RFkill (else branch), we
894 * can't access prph and the NIC will be reset in
895 * start_hw anyway.
896 */
897 iwl_write_prph(trans, APMG_RTC_INT_STT_REG,
898 APMG_RTC_INT_STT_RFKILL);
891 set_bit(STATUS_RFKILL, &trans_pcie->status); 899 set_bit(STATUS_RFKILL, &trans_pcie->status);
892 if (test_and_clear_bit(STATUS_HCMD_ACTIVE, 900 if (test_and_clear_bit(STATUS_HCMD_ACTIVE,
893 &trans_pcie->status)) 901 &trans_pcie->status))
diff --git a/drivers/net/wireless/iwlwifi/pcie/trans.c b/drivers/net/wireless/iwlwifi/pcie/trans.c
index cec0c8991285..805e303dc4d9 100644
--- a/drivers/net/wireless/iwlwifi/pcie/trans.c
+++ b/drivers/net/wireless/iwlwifi/pcie/trans.c
@@ -670,6 +670,11 @@ static int iwl_trans_pcie_start_hw(struct iwl_trans *trans)
670 return err; 670 return err;
671 } 671 }
672 672
673 /* Reset the entire device */
674 iwl_set_bit(trans, CSR_RESET, CSR_RESET_REG_FLAG_SW_RESET);
675
676 usleep_range(10, 15);
677
673 iwl_pcie_apm_init(trans); 678 iwl_pcie_apm_init(trans);
674 679
675 /* From now on, the op_mode will be kept updated about RF kill state */ 680 /* From now on, the op_mode will be kept updated about RF kill state */
diff --git a/drivers/net/wireless/mwifiex/cfg80211.c b/drivers/net/wireless/mwifiex/cfg80211.c
index 8a752637f0ce..c5e21ede60f2 100644
--- a/drivers/net/wireless/mwifiex/cfg80211.c
+++ b/drivers/net/wireless/mwifiex/cfg80211.c
@@ -1727,9 +1727,9 @@ mwifiex_cfg80211_connect(struct wiphy *wiphy, struct net_device *dev,
1727 struct mwifiex_private *priv = mwifiex_netdev_get_priv(dev); 1727 struct mwifiex_private *priv = mwifiex_netdev_get_priv(dev);
1728 int ret; 1728 int ret;
1729 1729
1730 if (priv->bss_mode != NL80211_IFTYPE_STATION) { 1730 if (GET_BSS_ROLE(priv) != MWIFIEX_BSS_ROLE_STA) {
1731 wiphy_err(wiphy, 1731 wiphy_err(wiphy,
1732 "%s: reject infra assoc request in non-STA mode\n", 1732 "%s: reject infra assoc request in non-STA role\n",
1733 dev->name); 1733 dev->name);
1734 return -EINVAL; 1734 return -EINVAL;
1735 } 1735 }
diff --git a/drivers/net/wireless/mwifiex/cfp.c b/drivers/net/wireless/mwifiex/cfp.c
index 913bb63fd0ad..9eefacbc844b 100644
--- a/drivers/net/wireless/mwifiex/cfp.c
+++ b/drivers/net/wireless/mwifiex/cfp.c
@@ -447,7 +447,8 @@ u32 mwifiex_get_supported_rates(struct mwifiex_private *priv, u8 *rates)
447 u32 k = 0; 447 u32 k = 0;
448 struct mwifiex_adapter *adapter = priv->adapter; 448 struct mwifiex_adapter *adapter = priv->adapter;
449 449
450 if (priv->bss_mode == NL80211_IFTYPE_STATION) { 450 if (priv->bss_mode == NL80211_IFTYPE_STATION ||
451 priv->bss_mode == NL80211_IFTYPE_P2P_CLIENT) {
451 switch (adapter->config_bands) { 452 switch (adapter->config_bands) {
452 case BAND_B: 453 case BAND_B:
453 dev_dbg(adapter->dev, "info: infra band=%d " 454 dev_dbg(adapter->dev, "info: infra band=%d "
diff --git a/drivers/net/wireless/mwifiex/join.c b/drivers/net/wireless/mwifiex/join.c
index ba043ca2a34a..9d7c0e6c4fc7 100644
--- a/drivers/net/wireless/mwifiex/join.c
+++ b/drivers/net/wireless/mwifiex/join.c
@@ -1291,8 +1291,10 @@ int mwifiex_associate(struct mwifiex_private *priv,
1291{ 1291{
1292 u8 current_bssid[ETH_ALEN]; 1292 u8 current_bssid[ETH_ALEN];
1293 1293
1294 /* Return error if the adapter or table entry is not marked as infra */ 1294 /* Return error if the adapter is not STA role or table entry
1295 if ((priv->bss_mode != NL80211_IFTYPE_STATION) || 1295 * is not marked as infra.
1296 */
1297 if ((GET_BSS_ROLE(priv) != MWIFIEX_BSS_ROLE_STA) ||
1296 (bss_desc->bss_mode != NL80211_IFTYPE_STATION)) 1298 (bss_desc->bss_mode != NL80211_IFTYPE_STATION))
1297 return -1; 1299 return -1;
1298 1300
diff --git a/drivers/net/wireless/mwifiex/sdio.c b/drivers/net/wireless/mwifiex/sdio.c
index 1eb5efa1bce2..0e2070f72fed 100644
--- a/drivers/net/wireless/mwifiex/sdio.c
+++ b/drivers/net/wireless/mwifiex/sdio.c
@@ -1636,8 +1636,8 @@ static int mwifiex_sdio_host_to_card(struct mwifiex_adapter *adapter,
1636 /* Allocate buffer and copy payload */ 1636 /* Allocate buffer and copy payload */
1637 blk_size = MWIFIEX_SDIO_BLOCK_SIZE; 1637 blk_size = MWIFIEX_SDIO_BLOCK_SIZE;
1638 buf_block_len = (pkt_len + blk_size - 1) / blk_size; 1638 buf_block_len = (pkt_len + blk_size - 1) / blk_size;
1639 *(u16 *) &payload[0] = (u16) pkt_len; 1639 *(__le16 *)&payload[0] = cpu_to_le16((u16)pkt_len);
1640 *(u16 *) &payload[2] = type; 1640 *(__le16 *)&payload[2] = cpu_to_le16(type);
1641 1641
1642 /* 1642 /*
1643 * This is SDIO specific header 1643 * This is SDIO specific header
diff --git a/drivers/net/wireless/mwifiex/sta_ioctl.c b/drivers/net/wireless/mwifiex/sta_ioctl.c
index c071ce91c8b2..f084412eee0b 100644
--- a/drivers/net/wireless/mwifiex/sta_ioctl.c
+++ b/drivers/net/wireless/mwifiex/sta_ioctl.c
@@ -257,10 +257,10 @@ int mwifiex_bss_start(struct mwifiex_private *priv, struct cfg80211_bss *bss,
257 goto done; 257 goto done;
258 } 258 }
259 259
260 if (priv->bss_mode == NL80211_IFTYPE_STATION) { 260 if (priv->bss_mode == NL80211_IFTYPE_STATION ||
261 priv->bss_mode == NL80211_IFTYPE_P2P_CLIENT) {
261 u8 config_bands; 262 u8 config_bands;
262 263
263 /* Infra mode */
264 ret = mwifiex_deauthenticate(priv, NULL); 264 ret = mwifiex_deauthenticate(priv, NULL);
265 if (ret) 265 if (ret)
266 goto done; 266 goto done;
diff --git a/drivers/net/wireless/rt2x00/rt2x00queue.c b/drivers/net/wireless/rt2x00/rt2x00queue.c
index 6c0a91ff963c..aa95c6cf3545 100644
--- a/drivers/net/wireless/rt2x00/rt2x00queue.c
+++ b/drivers/net/wireless/rt2x00/rt2x00queue.c
@@ -936,13 +936,8 @@ void rt2x00queue_index_inc(struct queue_entry *entry, enum queue_index index)
936 spin_unlock_irqrestore(&queue->index_lock, irqflags); 936 spin_unlock_irqrestore(&queue->index_lock, irqflags);
937} 937}
938 938
939void rt2x00queue_pause_queue(struct data_queue *queue) 939void rt2x00queue_pause_queue_nocheck(struct data_queue *queue)
940{ 940{
941 if (!test_bit(DEVICE_STATE_PRESENT, &queue->rt2x00dev->flags) ||
942 !test_bit(QUEUE_STARTED, &queue->flags) ||
943 test_and_set_bit(QUEUE_PAUSED, &queue->flags))
944 return;
945
946 switch (queue->qid) { 941 switch (queue->qid) {
947 case QID_AC_VO: 942 case QID_AC_VO:
948 case QID_AC_VI: 943 case QID_AC_VI:
@@ -958,6 +953,15 @@ void rt2x00queue_pause_queue(struct data_queue *queue)
958 break; 953 break;
959 } 954 }
960} 955}
956void rt2x00queue_pause_queue(struct data_queue *queue)
957{
958 if (!test_bit(DEVICE_STATE_PRESENT, &queue->rt2x00dev->flags) ||
959 !test_bit(QUEUE_STARTED, &queue->flags) ||
960 test_and_set_bit(QUEUE_PAUSED, &queue->flags))
961 return;
962
963 rt2x00queue_pause_queue_nocheck(queue);
964}
961EXPORT_SYMBOL_GPL(rt2x00queue_pause_queue); 965EXPORT_SYMBOL_GPL(rt2x00queue_pause_queue);
962 966
963void rt2x00queue_unpause_queue(struct data_queue *queue) 967void rt2x00queue_unpause_queue(struct data_queue *queue)
@@ -1019,7 +1023,7 @@ void rt2x00queue_stop_queue(struct data_queue *queue)
1019 return; 1023 return;
1020 } 1024 }
1021 1025
1022 rt2x00queue_pause_queue(queue); 1026 rt2x00queue_pause_queue_nocheck(queue);
1023 1027
1024 queue->rt2x00dev->ops->lib->stop_queue(queue); 1028 queue->rt2x00dev->ops->lib->stop_queue(queue);
1025 1029