]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commitdiff
iwlwifi: mvm: remove duplicate if in iwl_mvm_setup_connection_keep()
authorLuca Coelho <luciano.coelho@intel.com>
Tue, 27 Feb 2018 14:37:56 +0000 (16:37 +0200)
committerLuca Coelho <luciano.coelho@intel.com>
Fri, 31 Aug 2018 08:38:18 +0000 (11:38 +0300)
We repeated the same if twice in a row.  Remove the second one and
move the code block into the previous one.

Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
drivers/net/wireless/intel/iwlwifi/mvm/d3.c

index 47ceffbfd9af33fc8daf8cd15693c903737c68e4..799ee015ef84b2bbcea1eb7389502c9d8ec34787 100644 (file)
@@ -1503,6 +1503,7 @@ static bool iwl_mvm_setup_connection_keep(struct iwl_mvm *mvm,
                        .conf.cipher = gtkdata.cipher,
                        .conf.keyidx = status->gtk.key_index,
                };
+               __be64 replay_ctr;
 
                switch (gtkdata.cipher) {
                case WLAN_CIPHER_SUITE_CCMP:
@@ -1524,11 +1525,9 @@ static bool iwl_mvm_setup_connection_keep(struct iwl_mvm *mvm,
                if (IS_ERR(key))
                        return false;
                iwl_mvm_set_key_rx_seq(mvm, key, status);
-       }
 
-       if (status->num_of_gtk_rekeys) {
-               __be64 replay_ctr =
-                       cpu_to_be64(le64_to_cpu(status->replay_ctr));
+               replay_ctr = cpu_to_be64(le64_to_cpu(status->replay_ctr));
+
                ieee80211_gtk_rekey_notify(vif, vif->bss_conf.bssid,
                                           (void *)&replay_ctr, GFP_KERNEL);
        }