]> git.kernelconcepts.de Git - karo-tx-linux.git/blobdiff - drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c
Merge tag 'iwlwifi-next-for-kalle-2016-03-09_2' of https://git.kernel.org/pub/scm...
[karo-tx-linux.git] / drivers / net / wireless / intel / iwlwifi / mvm / mac80211.c
index 85ea5a8b5e3a439a8edc71cced368f5dbfdc6f1d..76e649c680a16bb5930f7c6d137aa429b779360d 100644 (file)
@@ -970,7 +970,7 @@ static void iwl_mvm_restart_cleanup(struct iwl_mvm *mvm)
         */
        iwl_mvm_unref_all_except(mvm, IWL_MVM_REF_UCODE_DOWN);
 
-       iwl_trans_stop_device(mvm->trans);
+       iwl_mvm_stop_device(mvm);
 
        mvm->scan_status = 0;
        mvm->ps_disabled = false;
@@ -1139,7 +1139,7 @@ void __iwl_mvm_mac_stop(struct iwl_mvm *mvm)
         */
        flush_work(&mvm->roc_done_wk);
 
-       iwl_trans_stop_device(mvm->trans);
+       iwl_mvm_stop_device(mvm);
 
        iwl_mvm_async_handlers_purge(mvm);
        /* async_handlers_list is empty and will stay empty: HW is stopped */
@@ -1170,8 +1170,6 @@ void __iwl_mvm_mac_stop(struct iwl_mvm *mvm)
                                mvm->scan_uid_status[i] = 0;
                }
        }
-
-       mvm->ucode_loaded = false;
 }
 
 static void iwl_mvm_mac_stop(struct ieee80211_hw *hw)
@@ -1953,7 +1951,12 @@ static void iwl_mvm_bss_info_changed_station(struct iwl_mvm *mvm,
                WARN_ON(iwl_mvm_enable_beacon_filter(mvm, vif, 0));
        }
 
-       if (changes & (BSS_CHANGED_PS | BSS_CHANGED_P2P_PS | BSS_CHANGED_QOS)) {
+       if (changes & (BSS_CHANGED_PS | BSS_CHANGED_P2P_PS | BSS_CHANGED_QOS |
+                      /*
+                       * Send power command on every beacon change,
+                       * because we may have not enabled beacon abort yet.
+                       */
+                      BSS_CHANGED_BEACON_INFO)) {
                ret = iwl_mvm_power_update_mac(mvm);
                if (ret)
                        IWL_ERR(mvm, "failed to update power mode\n");
@@ -2332,6 +2335,11 @@ static void iwl_mvm_check_uapsd(struct iwl_mvm *mvm, struct ieee80211_vif *vif,
        if (!(mvm->fw->ucode_capa.flags & IWL_UCODE_TLV_FLAGS_UAPSD_SUPPORT))
                return;
 
+       if (vif->p2p && !iwl_mvm_is_p2p_standalone_uapsd_supported(mvm)) {
+               vif->driver_flags &= ~IEEE80211_VIF_SUPPORTS_UAPSD;
+               return;
+       }
+
        if (iwlwifi_mod_params.uapsd_disable) {
                vif->driver_flags &= ~IEEE80211_VIF_SUPPORTS_UAPSD;
                return;
@@ -2546,10 +2554,8 @@ static void iwl_mvm_mac_mgd_prepare_tx(struct ieee80211_hw *hw,
                                      struct ieee80211_vif *vif)
 {
        struct iwl_mvm *mvm = IWL_MAC80211_GET_MVM(hw);
-       u32 duration = min(IWL_MVM_TE_SESSION_PROTECTION_MAX_TIME_MS,
-                          200 + vif->bss_conf.beacon_int);
-       u32 min_duration = min(IWL_MVM_TE_SESSION_PROTECTION_MIN_TIME_MS,
-                              100 + vif->bss_conf.beacon_int);
+       u32 duration = IWL_MVM_TE_SESSION_PROTECTION_MAX_TIME_MS;
+       u32 min_duration = IWL_MVM_TE_SESSION_PROTECTION_MIN_TIME_MS;
 
        if (WARN_ON_ONCE(vif->bss_conf.assoc))
                return;
@@ -2680,8 +2686,12 @@ static int iwl_mvm_mac_set_key(struct ieee80211_hw *hw,
                         * GTK on AP interface is a TX-only key, return 0;
                         * on IBSS they're per-station and because we're lazy
                         * we don't support them for RX, so do the same.
+                        * CMAC in AP/IBSS modes must be done in software.
                         */
-                       ret = 0;
+                       if (key->cipher == WLAN_CIPHER_SUITE_AES_CMAC)
+                               ret = -EOPNOTSUPP;
+                       else
+                               ret = 0;
                        key->hw_key_idx = STA_KEY_IDX_INVALID;
                        break;
                }