]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commitdiff
iwlwifi: mvm: disconnect on disconnection wakeup event
authorEliad Peller <eliad@wizery.com>
Thu, 7 Nov 2013 12:12:09 +0000 (14:12 +0200)
committerEmmanuel Grumbach <emmanuel.grumbach@intel.com>
Mon, 9 Dec 2013 20:29:02 +0000 (22:29 +0200)
When waking up from d3 due to disconnection event
(e.g. because of beacon loss), we should disconnect
immediately.

Signed-off-by: Eliad Peller <eliad@wizery.com>
Reviewed-by: Luciano Coelho <luciano.coelho@intel.com>
Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
drivers/net/wireless/iwlwifi/mvm/d3.c

index 12354f8442553d8141f37d5a36e92fb09792782f..96b09d9d706857206d05a2560463cc7f96442f1d 100644 (file)
@@ -1533,10 +1533,16 @@ static bool iwl_mvm_setup_connection_keep(struct iwl_mvm *mvm,
        struct iwl_mvm_d3_gtk_iter_data gtkdata = {
                .status = status,
        };
+       u32 disconnection_reasons =
+               IWL_WOWLAN_WAKEUP_BY_DISCONNECTION_ON_MISSED_BEACON |
+               IWL_WOWLAN_WAKEUP_BY_DISCONNECTION_ON_DEAUTH;
 
        if (!status || !vif->bss_conf.bssid)
                return false;
 
+       if (le32_to_cpu(status->wakeup_reasons) & disconnection_reasons)
+               return false;
+
        /* find last GTK that we used initially, if any */
        gtkdata.find_phase = true;
        ieee80211_iter_keys(mvm->hw, vif,