wifi: iwlwifi: mvm: cleanup MLO and non-MLO unification code
bss_info_changed() callback of mac80211 was originally in both MLD and non-MLD API. Therefore, we extracted the common part to a function which receives a callback structure with the mode-specific (non-MLO\MLO) ops. Eventually, for MLO API, bss_info_changed() callback was split into 2 callbacks: link_info_changed() and vif_cfg_changed() so it is no longer in use for MLO, only for non-MLO. Remove the code that uses the mode-specific callback structure. Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com> Signed-off-by: Gregory Greenman <gregory.greenman@intel.com> Link: https://lore.kernel.org/r/20231011130030.b65fbcdb9295.I2a64a6f1178ee0466755d728addc77acbb2ed6f4@changeid Signed-off-by: Johannes Berg <johannes.berg@intel.com>
This commit is contained in:
parent
67ac248e4d
commit
df7e30980c
@ -3036,22 +3036,6 @@ static void iwl_mvm_bss_info_changed(struct ieee80211_hw *hw,
|
||||
struct ieee80211_vif *vif,
|
||||
struct ieee80211_bss_conf *bss_conf,
|
||||
u64 changes)
|
||||
{
|
||||
static const struct iwl_mvm_bss_info_changed_ops callbacks = {
|
||||
.bss_info_changed_sta = iwl_mvm_bss_info_changed_station,
|
||||
.bss_info_changed_ap_ibss = iwl_mvm_bss_info_changed_ap_ibss,
|
||||
};
|
||||
|
||||
iwl_mvm_bss_info_changed_common(hw, vif, bss_conf, &callbacks,
|
||||
changes);
|
||||
}
|
||||
|
||||
void
|
||||
iwl_mvm_bss_info_changed_common(struct ieee80211_hw *hw,
|
||||
struct ieee80211_vif *vif,
|
||||
struct ieee80211_bss_conf *bss_conf,
|
||||
const struct iwl_mvm_bss_info_changed_ops *callbacks,
|
||||
u64 changes)
|
||||
{
|
||||
struct iwl_mvm *mvm = IWL_MAC80211_GET_MVM(hw);
|
||||
|
||||
@ -3062,12 +3046,11 @@ iwl_mvm_bss_info_changed_common(struct ieee80211_hw *hw,
|
||||
|
||||
switch (vif->type) {
|
||||
case NL80211_IFTYPE_STATION:
|
||||
callbacks->bss_info_changed_sta(mvm, vif, bss_conf, changes);
|
||||
iwl_mvm_bss_info_changed_station(mvm, vif, bss_conf, changes);
|
||||
break;
|
||||
case NL80211_IFTYPE_AP:
|
||||
case NL80211_IFTYPE_ADHOC:
|
||||
callbacks->bss_info_changed_ap_ibss(mvm, vif, bss_conf,
|
||||
changes);
|
||||
iwl_mvm_bss_info_changed_ap_ibss(mvm, vif, bss_conf, changes);
|
||||
break;
|
||||
case NL80211_IFTYPE_MONITOR:
|
||||
if (changes & BSS_CHANGED_MU_GROUPS)
|
||||
|
@ -1921,41 +1921,10 @@ void iwl_mvm_stop_ap_ibss_common(struct iwl_mvm *mvm,
|
||||
struct ieee80211_vif *vif);
|
||||
|
||||
/* BSS Info */
|
||||
/**
|
||||
* struct iwl_mvm_bss_info_changed_ops - callbacks for the bss_info_changed()
|
||||
*
|
||||
* Since the only difference between both MLD and
|
||||
* non-MLD versions of bss_info_changed() is these function calls,
|
||||
* each version will send its specific function calls to
|
||||
* %iwl_mvm_bss_info_changed_common().
|
||||
*
|
||||
* @bss_info_changed_sta: pointer to the function that handles changes
|
||||
* in bss_info in sta mode
|
||||
* @bss_info_changed_ap_ibss: pointer to the function that handles changes
|
||||
* in bss_info in ap and ibss modes
|
||||
*/
|
||||
struct iwl_mvm_bss_info_changed_ops {
|
||||
void (*bss_info_changed_sta)(struct iwl_mvm *mvm,
|
||||
struct ieee80211_vif *vif,
|
||||
struct ieee80211_bss_conf *bss_conf,
|
||||
u64 changes);
|
||||
void (*bss_info_changed_ap_ibss)(struct iwl_mvm *mvm,
|
||||
struct ieee80211_vif *vif,
|
||||
struct ieee80211_bss_conf *bss_conf,
|
||||
u64 changes);
|
||||
};
|
||||
|
||||
void
|
||||
iwl_mvm_bss_info_changed_common(struct ieee80211_hw *hw,
|
||||
struct ieee80211_vif *vif,
|
||||
struct ieee80211_bss_conf *bss_conf,
|
||||
const struct iwl_mvm_bss_info_changed_ops *callbacks,
|
||||
u64 changes);
|
||||
void
|
||||
iwl_mvm_bss_info_changed_station_common(struct iwl_mvm *mvm,
|
||||
struct ieee80211_vif *vif,
|
||||
struct ieee80211_bss_conf *link_conf,
|
||||
u64 changes);
|
||||
void iwl_mvm_bss_info_changed_station_common(struct iwl_mvm *mvm,
|
||||
struct ieee80211_vif *vif,
|
||||
struct ieee80211_bss_conf *link_conf,
|
||||
u64 changes);
|
||||
void iwl_mvm_bss_info_changed_station_assoc(struct iwl_mvm *mvm,
|
||||
struct ieee80211_vif *vif,
|
||||
u64 changes);
|
||||
|
Loading…
x
Reference in New Issue
Block a user