wifi: iwlwifi: mvm: cleanup MLO and non-MLO unification code
authorMiri Korenblit <miriam.rachel.korenblit@intel.com>
Wed, 11 Oct 2023 10:07:23 +0000 (13:07 +0300)
committerJohannes Berg <johannes.berg@intel.com>
Mon, 23 Oct 2023 10:26:27 +0000 (12:26 +0200)
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>
drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c
drivers/net/wireless/intel/iwlwifi/mvm/mvm.h

index 387642ea2fffd67626b2140c2414847d5af5f0cd..ce65d74413fbf05c7a2f0f5e634812d9814a49f2 100644 (file)
@@ -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)
index 866753218ec876e0d969c9d1af766e5cfcf8ca5b..fda5ad4723ac13744e98c21169ff48924e606fff 100644 (file)
@@ -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);