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

Commit 863230da authored by Johannes Berg's avatar Johannes Berg Committed by Emmanuel Grumbach
Browse files

iwlwifi: mvm: clean up iwl_mvm_bss_info_changed_ap_ibss



Remove the enum abuse (using an enum to store a set of values),
the unneeded ret variable and unnecessary if nesting.

Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
Signed-off-by: default avatarEmmanuel Grumbach <emmanuel.grumbach@intel.com>
parent 741e703b
Loading
Loading
Loading
Loading
+7 −13
Original line number Diff line number Diff line
@@ -1397,27 +1397,21 @@ iwl_mvm_bss_info_changed_ap_ibss(struct iwl_mvm *mvm,
				 u32 changes)
{
	struct iwl_mvm_vif *mvmvif = iwl_mvm_vif_from_mac80211(vif);
	enum ieee80211_bss_change ht_change = BSS_CHANGED_ERP_CTS_PROT |
					      BSS_CHANGED_HT |
					      BSS_CHANGED_BANDWIDTH;
	int ret;

	/* Changes will be applied when the AP/IBSS is started */
	if (!mvmvif->ap_ibss_active)
		return;

	if (changes & ht_change) {
		ret = iwl_mvm_mac_ctxt_changed(mvm, vif);
		if (ret)
	if (changes & (BSS_CHANGED_ERP_CTS_PROT | BSS_CHANGED_HT |
		       BSS_CHANGED_BANDWIDTH) &&
	    iwl_mvm_mac_ctxt_changed(mvm, vif))
		IWL_ERR(mvm, "failed to update MAC %pM\n", vif->addr);
	}

	/* Need to send a new beacon template to the FW */
	if (changes & BSS_CHANGED_BEACON) {
		if (iwl_mvm_mac_ctxt_beacon_changed(mvm, vif))
	if (changes & BSS_CHANGED_BEACON &&
	    iwl_mvm_mac_ctxt_beacon_changed(mvm, vif))
		IWL_WARN(mvm, "Failed updating beacon data\n");
}
}

static void iwl_mvm_bss_info_changed(struct ieee80211_hw *hw,
				     struct ieee80211_vif *vif,