Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 11a0513c authored by Luca Coelho's avatar Luca Coelho
Browse files

iwlwifi: mvm: remove duplicate if in iwl_mvm_setup_connection_keep()



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: default avatarLuca Coelho <luciano.coelho@intel.com>
parent 2d8c2615
Loading
Loading
Loading
Loading
+3 −4
Original line number Original line Diff line number Diff line
@@ -1503,6 +1503,7 @@ static bool iwl_mvm_setup_connection_keep(struct iwl_mvm *mvm,
			.conf.cipher = gtkdata.cipher,
			.conf.cipher = gtkdata.cipher,
			.conf.keyidx = status->gtk.key_index,
			.conf.keyidx = status->gtk.key_index,
		};
		};
		__be64 replay_ctr;


		switch (gtkdata.cipher) {
		switch (gtkdata.cipher) {
		case WLAN_CIPHER_SUITE_CCMP:
		case WLAN_CIPHER_SUITE_CCMP:
@@ -1524,11 +1525,9 @@ static bool iwl_mvm_setup_connection_keep(struct iwl_mvm *mvm,
		if (IS_ERR(key))
		if (IS_ERR(key))
			return false;
			return false;
		iwl_mvm_set_key_rx_seq(mvm, key, status);
		iwl_mvm_set_key_rx_seq(mvm, key, status);
	}


	if (status->num_of_gtk_rekeys) {
		replay_ctr = cpu_to_be64(le64_to_cpu(status->replay_ctr));
		__be64 replay_ctr =

			cpu_to_be64(le64_to_cpu(status->replay_ctr));
		ieee80211_gtk_rekey_notify(vif, vif->bss_conf.bssid,
		ieee80211_gtk_rekey_notify(vif, vif->bss_conf.bssid,
					   (void *)&replay_ctr, GFP_KERNEL);
					   (void *)&replay_ctr, GFP_KERNEL);
	}
	}