Fix build for kernel 6.17

With commit:
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=b74947b4f6ff7c122a1bb6eb38bb7ecfbb1d3820
set_wiphy_params() and set/get_tx_power() gain argument radio_idx to get
radio index. So let's add that argument according to linux version >=
6.17.

Signed-off-by: Giulio Benetti <giulio.benetti@benettiengineering.com>
This commit is contained in:
Giulio Benetti 2025-10-08 18:11:07 +02:00
parent 07fa9cf0fa
commit 9ebb828281

View File

@ -3603,7 +3603,12 @@ static void cfg80211_rtw_abort_scan(struct wiphy *wiphy,
}
#endif
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 17, 0))
static int cfg80211_rtw_set_wiphy_params(struct wiphy *wiphy, int radio_idx,
u32 changed)
#else
static int cfg80211_rtw_set_wiphy_params(struct wiphy *wiphy, u32 changed)
#endif
{
#if 0
struct iwm_priv *iwm = wiphy_to_iwm(wiphy);
@ -4588,6 +4593,9 @@ static int cfg80211_rtw_set_txpower(struct wiphy *wiphy,
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 8, 0))
struct wireless_dev *wdev,
#endif
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 17, 0))
int radio_idx,
#endif
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 36)) || defined(COMPAT_KERNEL_RELEASE)
enum nl80211_tx_power_setting type, int mbm)
#else
@ -4650,6 +4658,9 @@ static int cfg80211_rtw_get_txpower(struct wiphy *wiphy,
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 8, 0))
struct wireless_dev *wdev,
#endif
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 17, 0))
int radio_idx,
#endif
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 14, 0))
unsigned int link_id,
#endif