]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
iwlwifi: mvm: Allow iwl_mvm_mac_mgd_prepare_tx() when associated
authorIlan Peer <ilan.peer@intel.com>
Mon, 22 Jan 2018 14:44:09 +0000 (16:44 +0200)
committerLuca Coelho <luciano.coelho@intel.com>
Wed, 28 Mar 2018 19:43:37 +0000 (22:43 +0300)
The FW does not allocate quota air time for the binding of a station
MAC before iwlmvm indicates that it is associated. Currently iwlmvm
indicates that the MAC is associated only after hearing a beacon from
the AP. In case a deauthentication frame is sent before the MAC is
associated, the frame might not be sent as the corresponding binding
is not scheduled.

To handle such cases, set IEEE80211_HW_DEAUTH_NEED_MGD_TX_PREP in the
HW flags, requesting mac80211 to call the mgd_prepare_tx() callback
before transmitting a deauthentication frame if associated but no
beacon was heard from the AP.

In addition, do not warn in iwl_mvm_mac_mgd_prepare_tx() when already
associated as now the callback can be called also when associated.

Signed-off-by: Ilan Peer <ilan.peer@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c

index 82dc9dec416064e137d9edd48751c4bf2ad600f9..51b30424575b0b719132b7501d5c90b49bcc723a 100644 (file)
@@ -421,6 +421,7 @@ int iwl_mvm_mac_setup_register(struct iwl_mvm *mvm)
        ieee80211_hw_set(hw, SUPPORTS_CLONED_SKBS);
        ieee80211_hw_set(hw, SUPPORTS_AMSDU_IN_AMPDU);
        ieee80211_hw_set(hw, NEEDS_UNIQUE_STA_ADDR);
+       ieee80211_hw_set(hw, DEAUTH_NEED_MGD_TX_PREP);
 
        if (iwl_mvm_has_tlc_offload(mvm)) {
                ieee80211_hw_set(hw, TX_AMPDU_SETUP_IN_HW);
@@ -2815,9 +2816,6 @@ static void iwl_mvm_mac_mgd_prepare_tx(struct ieee80211_hw *hw,
        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;
-
        /*
         * iwl_mvm_protect_session() reads directly from the device
         * (the system time), so make sure it is available.