aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwlwifi/mvm/mac80211.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/wireless/iwlwifi/mvm/mac80211.c')
-rw-r--r--drivers/net/wireless/iwlwifi/mvm/mac80211.c28
1 files changed, 22 insertions, 6 deletions
diff --git a/drivers/net/wireless/iwlwifi/mvm/mac80211.c b/drivers/net/wireless/iwlwifi/mvm/mac80211.c
index b41177eb4888..c49b5073c251 100644
--- a/drivers/net/wireless/iwlwifi/mvm/mac80211.c
+++ b/drivers/net/wireless/iwlwifi/mvm/mac80211.c
@@ -262,9 +262,9 @@ int iwl_mvm_mac_setup_register(struct iwl_mvm *mvm)
262 mvm->rts_threshold = IEEE80211_MAX_RTS_THRESHOLD; 262 mvm->rts_threshold = IEEE80211_MAX_RTS_THRESHOLD;
263 263
264 /* currently FW API supports only one optional cipher scheme */ 264 /* currently FW API supports only one optional cipher scheme */
265 if (mvm->fw->cs->cipher) { 265 if (mvm->fw->cs[0].cipher) {
266 mvm->hw->n_cipher_schemes = 1; 266 mvm->hw->n_cipher_schemes = 1;
267 mvm->hw->cipher_schemes = mvm->fw->cs; 267 mvm->hw->cipher_schemes = &mvm->fw->cs[0];
268 } 268 }
269 269
270#ifdef CONFIG_PM_SLEEP 270#ifdef CONFIG_PM_SLEEP
@@ -944,6 +944,8 @@ static void iwl_mvm_bss_info_changed_station(struct iwl_mvm *mvm,
944 IWL_ERR(mvm, "failed to update power mode\n"); 944 IWL_ERR(mvm, "failed to update power mode\n");
945 } 945 }
946 iwl_mvm_bt_coex_vif_change(mvm); 946 iwl_mvm_bt_coex_vif_change(mvm);
947 iwl_mvm_update_smps(mvm, vif, IWL_MVM_SMPS_REQ_TT,
948 IEEE80211_SMPS_AUTOMATIC);
947 } else if (changes & BSS_CHANGED_BEACON_INFO) { 949 } else if (changes & BSS_CHANGED_BEACON_INFO) {
948 /* 950 /*
949 * We received a beacon _after_ association so 951 * We received a beacon _after_ association so
@@ -1012,9 +1014,16 @@ static int iwl_mvm_start_ap_ibss(struct ieee80211_hw *hw,
1012 if (ret) 1014 if (ret)
1013 goto out_unbind; 1015 goto out_unbind;
1014 1016
1017 /* must be set before quota calculations */
1018 mvmvif->ap_ibss_active = true;
1019
1020 /* power updated needs to be done before quotas */
1021 mvm->bound_vif_cnt++;
1022 iwl_mvm_power_update_binding(mvm, vif, true);
1023
1015 ret = iwl_mvm_update_quotas(mvm, vif); 1024 ret = iwl_mvm_update_quotas(mvm, vif);
1016 if (ret) 1025 if (ret)
1017 goto out_rm_bcast; 1026 goto out_quota_failed;
1018 1027
1019 /* Need to update the P2P Device MAC (only GO, IBSS is single vif) */ 1028 /* Need to update the P2P Device MAC (only GO, IBSS is single vif) */
1020 if (vif->p2p && mvm->p2p_device_vif) 1029 if (vif->p2p && mvm->p2p_device_vif)
@@ -1025,7 +1034,10 @@ static int iwl_mvm_start_ap_ibss(struct ieee80211_hw *hw,
1025 mutex_unlock(&mvm->mutex); 1034 mutex_unlock(&mvm->mutex);
1026 return 0; 1035 return 0;
1027 1036
1028out_rm_bcast: 1037out_quota_failed:
1038 mvm->bound_vif_cnt--;
1039 iwl_mvm_power_update_binding(mvm, vif, false);
1040 mvmvif->ap_ibss_active = false;
1029 iwl_mvm_send_rm_bcast_sta(mvm, &mvmvif->bcast_sta); 1041 iwl_mvm_send_rm_bcast_sta(mvm, &mvmvif->bcast_sta);
1030out_unbind: 1042out_unbind:
1031 iwl_mvm_binding_remove_vif(mvm, vif); 1043 iwl_mvm_binding_remove_vif(mvm, vif);
@@ -1057,6 +1069,10 @@ static void iwl_mvm_stop_ap_ibss(struct ieee80211_hw *hw,
1057 iwl_mvm_update_quotas(mvm, NULL); 1069 iwl_mvm_update_quotas(mvm, NULL);
1058 iwl_mvm_send_rm_bcast_sta(mvm, &mvmvif->bcast_sta); 1070 iwl_mvm_send_rm_bcast_sta(mvm, &mvmvif->bcast_sta);
1059 iwl_mvm_binding_remove_vif(mvm, vif); 1071 iwl_mvm_binding_remove_vif(mvm, vif);
1072
1073 mvm->bound_vif_cnt--;
1074 iwl_mvm_power_update_binding(mvm, vif, false);
1075
1060 iwl_mvm_mac_ctxt_remove(mvm, vif); 1076 iwl_mvm_mac_ctxt_remove(mvm, vif);
1061 1077
1062 mutex_unlock(&mvm->mutex); 1078 mutex_unlock(&mvm->mutex);
@@ -1790,11 +1806,11 @@ static void iwl_mvm_unassign_vif_chanctx(struct ieee80211_hw *hw,
1790 } 1806 }
1791 1807
1792 iwl_mvm_binding_remove_vif(mvm, vif); 1808 iwl_mvm_binding_remove_vif(mvm, vif);
1793out_unlock:
1794 mvmvif->phy_ctxt = NULL;
1795 mvm->bound_vif_cnt--; 1809 mvm->bound_vif_cnt--;
1796 iwl_mvm_power_update_binding(mvm, vif, false); 1810 iwl_mvm_power_update_binding(mvm, vif, false);
1797 1811
1812out_unlock:
1813 mvmvif->phy_ctxt = NULL;
1798 mutex_unlock(&mvm->mutex); 1814 mutex_unlock(&mvm->mutex);
1799} 1815}
1800 1816