]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
wifi: iwlwifi: mld: make alloc functions not forced static
authorJohannes Berg <johannes.berg@intel.com>
Sat, 21 Mar 2026 17:29:09 +0000 (19:29 +0200)
committerMiri Korenblit <miriam.rachel.korenblit@intel.com>
Wed, 25 Mar 2026 09:31:57 +0000 (11:31 +0200)
In preparation for NAN needing the link ID allocation, have
the macro not automatically make the ID allocation functions
static so we can remove that later from the link allocation
function.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://patch.msgid.link/20260321192637.cbfd202c255f.I4dd4d4416d30bed35bc7b7caa3de50071906830a@changeid
drivers/net/wireless/intel/iwlwifi/mld/iface.c
drivers/net/wireless/intel/iwlwifi/mld/link.c
drivers/net/wireless/intel/iwlwifi/mld/mld.h
drivers/net/wireless/intel/iwlwifi/mld/sta.c
drivers/net/wireless/intel/iwlwifi/mld/tests/utils.c

index 5c7f2435ecb99ba65e1cf1ca1206499a9b67005d..96824797760569c084f17e44cd5dab1c29635bd6 100644 (file)
@@ -386,7 +386,7 @@ static void iwl_mld_mlo_scan_start_wk(struct wiphy *wiphy,
        iwl_mld_int_mlo_scan(mld, iwl_mld_vif_to_mac80211(mld_vif));
 }
 
-IWL_MLD_ALLOC_FN(vif, vif)
+static IWL_MLD_ALLOC_FN(vif, vif)
 
 /* Constructor function for struct iwl_mld_vif */
 static void
index b5430e8a73d663687375eb906c77b45e8d6bb498..b66e84d2365fb00a48d52fd39d2d7f5d2ad6adc9 100644 (file)
@@ -437,7 +437,7 @@ iwl_mld_rm_link_from_fw(struct iwl_mld *mld, struct ieee80211_bss_conf *link)
        iwl_mld_send_link_cmd(mld, &cmd, FW_CTXT_ACTION_REMOVE);
 }
 
-IWL_MLD_ALLOC_FN(link, bss_conf)
+static IWL_MLD_ALLOC_FN(link, bss_conf)
 
 /* Constructor function for struct iwl_mld_link */
 static int
index 66c7a7d3140908b9668071b5ab676ac084fe7b5b..ea3d1fab6f4600150f295b8dadf5ff6d1bcb2e4e 100644 (file)
@@ -530,9 +530,9 @@ void iwl_construct_mld(struct iwl_mld *mld, struct iwl_trans *trans,
 #define IWL_MLD_INVALID_FW_ID 0xff
 
 #define IWL_MLD_ALLOC_FN(_type, _mac80211_type)                                                \
-static int                                                                             \
+int                                                                                    \
 iwl_mld_allocate_##_type##_fw_id(struct iwl_mld *mld,                                  \
-                                u8 *fw_id,                             \
+                                u8 *fw_id,                                             \
                                 struct ieee80211_##_mac80211_type *mac80211_ptr)       \
 {                                                                                      \
        u8 rand = IWL_MLD_DIS_RANDOM_FW_ID ? 0 : get_random_u8();                       \
index 619f302076ad4b434f503904bb438fe31d2f0de8..eda2cbbb3b30c0457194f48938bb08ec2396293f 100644 (file)
@@ -528,7 +528,7 @@ iwl_mld_add_modify_sta_cmd(struct iwl_mld *mld,
        return iwl_mld_send_sta_cmd(mld, &cmd);
 }
 
-IWL_MLD_ALLOC_FN(link_sta, link_sta)
+static IWL_MLD_ALLOC_FN(link_sta, link_sta)
 
 static int
 iwl_mld_add_link_sta(struct iwl_mld *mld, struct ieee80211_link_sta *link_sta)
index 26cf27be762d58c0a5687d60a85e6174cca81bba..176dbbf4c6431e4589052e7b45d83ae2c53c709d 100644 (file)
@@ -68,7 +68,7 @@ int iwlmld_kunit_test_init(struct kunit *test)
        return 0;
 }
 
-IWL_MLD_ALLOC_FN(link, bss_conf)
+static IWL_MLD_ALLOC_FN(link, bss_conf)
 
 static void iwlmld_kunit_init_link(struct ieee80211_vif *vif,
                                   struct ieee80211_bss_conf *link,
@@ -94,7 +94,7 @@ static void iwlmld_kunit_init_link(struct ieee80211_vif *vif,
        rcu_assign_pointer(vif->link_conf[link_id], link);
 }
 
-IWL_MLD_ALLOC_FN(vif, vif)
+static IWL_MLD_ALLOC_FN(vif, vif)
 
 /* Helper function to add and initialize a VIF for KUnit tests */
 struct ieee80211_vif *iwlmld_kunit_add_vif(bool mlo, enum nl80211_iftype type)
@@ -199,7 +199,7 @@ void iwlmld_kunit_assign_chanctx_to_link(struct ieee80211_vif *vif,
                vif->active_links |= BIT(link->link_id);
 }
 
-IWL_MLD_ALLOC_FN(link_sta, link_sta)
+static IWL_MLD_ALLOC_FN(link_sta, link_sta)
 
 static void iwlmld_kunit_add_link_sta(struct ieee80211_sta *sta,
                                      struct ieee80211_link_sta *link_sta,