提交 863230da 编写于 作者: J Johannes Berg 提交者: Emmanuel Grumbach

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: NJohannes Berg <johannes.berg@intel.com>
Signed-off-by: NEmmanuel Grumbach <emmanuel.grumbach@intel.com>
上级 741e703b
...@@ -1397,26 +1397,20 @@ iwl_mvm_bss_info_changed_ap_ibss(struct iwl_mvm *mvm, ...@@ -1397,26 +1397,20 @@ iwl_mvm_bss_info_changed_ap_ibss(struct iwl_mvm *mvm,
u32 changes) u32 changes)
{ {
struct iwl_mvm_vif *mvmvif = iwl_mvm_vif_from_mac80211(vif); 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 */ /* Changes will be applied when the AP/IBSS is started */
if (!mvmvif->ap_ibss_active) if (!mvmvif->ap_ibss_active)
return; return;
if (changes & ht_change) { if (changes & (BSS_CHANGED_ERP_CTS_PROT | BSS_CHANGED_HT |
ret = iwl_mvm_mac_ctxt_changed(mvm, vif); BSS_CHANGED_BANDWIDTH) &&
if (ret) iwl_mvm_mac_ctxt_changed(mvm, vif))
IWL_ERR(mvm, "failed to update MAC %pM\n", vif->addr); IWL_ERR(mvm, "failed to update MAC %pM\n", vif->addr);
}
/* Need to send a new beacon template to the FW */ /* Need to send a new beacon template to the FW */
if (changes & BSS_CHANGED_BEACON) { if (changes & BSS_CHANGED_BEACON &&
if (iwl_mvm_mac_ctxt_beacon_changed(mvm, vif)) iwl_mvm_mac_ctxt_beacon_changed(mvm, vif))
IWL_WARN(mvm, "Failed updating beacon data\n"); IWL_WARN(mvm, "Failed updating beacon data\n");
}
} }
static void iwl_mvm_bss_info_changed(struct ieee80211_hw *hw, static void iwl_mvm_bss_info_changed(struct ieee80211_hw *hw,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册