wifi: iwlwifi: mld: Replace static declarations of IWL_MLD_ALLOC_FN

Replace static declarations of IWL_MLD_ALLOC_FN with a new macro
IWL_MLD_ALLOC_FN_STATIC that declares the static.

This is needed to resolve issues with spatch, which fails to handle
functions after "static IWL_MLD_ALLOC_FN".

Signed-off-by: Ilan Peer <ilan.peer@intel.com>
Link: https://patch.msgid.link/20260513084215.861e4554157d.Id07d4037c75f3ebc8a57ac95b14286369fb3467b@changeid
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
This commit is contained in:
Ilan Peer 2026-05-13 08:44:00 +03:00 committed by Miri Korenblit
parent 90cec2c954
commit b5d6175c11
4 changed files with 8 additions and 5 deletions

View File

@ -499,7 +499,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));
}
static IWL_MLD_ALLOC_FN(vif, vif)
IWL_MLD_ALLOC_FN_STATIC(vif, vif)
/* Constructor function for struct iwl_mld_vif */
static void

View File

@ -552,6 +552,9 @@ iwl_mld_allocate_##_type##_fw_id(struct iwl_mld *mld, \
return -ENOSPC; \
}
#define IWL_MLD_ALLOC_FN_STATIC(_type, _mac80211_type) \
static IWL_MLD_ALLOC_FN(_type, _mac80211_type)
static inline struct ieee80211_bss_conf *
iwl_mld_fw_id_to_link_conf(struct iwl_mld *mld, u8 fw_link_id)
{

View File

@ -577,7 +577,7 @@ int iwl_mld_add_modify_sta_cmd(struct iwl_mld *mld,
return iwl_mld_send_sta_cmd(mld, &cmd);
}
static IWL_MLD_ALLOC_FN(link_sta, link_sta)
IWL_MLD_ALLOC_FN_STATIC(link_sta, link_sta)
static int
iwl_mld_add_link_sta(struct iwl_mld *mld, struct ieee80211_link_sta *link_sta)

View File

@ -2,7 +2,7 @@
/*
* KUnit tests for channel helper functions
*
* Copyright (C) 2024-2025 Intel Corporation
* Copyright (C) 2024-2026 Intel Corporation
*/
#include <kunit/test.h>
#include <kunit/test-bug.h>
@ -92,7 +92,7 @@ static void iwlmld_kunit_init_link(struct ieee80211_vif *vif,
rcu_assign_pointer(vif->link_conf[link_id], link);
}
static IWL_MLD_ALLOC_FN(vif, vif)
IWL_MLD_ALLOC_FN_STATIC(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)
@ -197,7 +197,7 @@ void iwlmld_kunit_assign_chanctx_to_link(struct ieee80211_vif *vif,
vif->active_links |= BIT(link->link_id);
}
static IWL_MLD_ALLOC_FN(link_sta, link_sta)
IWL_MLD_ALLOC_FN_STATIC(link_sta, link_sta)
static void iwlmld_kunit_add_link_sta(struct ieee80211_sta *sta,
struct ieee80211_link_sta *link_sta,