Skip to content

Commit 2332312

Browse files
giuliobenettimantriyogesh
authored andcommitted
fix(esp_hosted_ng): 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 <[email protected]>
1 parent 421ec70 commit 2332312

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

esp_hosted_ng/host/esp_cfg80211.c

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -738,6 +738,9 @@ static void esp_cfg80211_set_wakeup(struct wiphy *wiphy,
738738

739739
static int esp_cfg80211_set_tx_power(struct wiphy *wiphy,
740740
struct wireless_dev *wdev,
741+
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 17, 0))
742+
int radio_idx,
743+
#endif
741744
enum nl80211_tx_power_setting type, int mbm)
742745
{
743746
struct esp_adapter *adapter = esp_get_adapter();
@@ -815,6 +818,9 @@ static int esp_cfg80211_get_station(struct wiphy *wiphy, struct net_device *ndev
815818

816819
static int esp_cfg80211_get_tx_power(struct wiphy *wiphy,
817820
struct wireless_dev *wdev,
821+
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 17, 0))
822+
int radio_idx,
823+
#endif
818824
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 14, 0))
819825
unsigned int link_id,
820826
#endif
@@ -842,7 +848,11 @@ static int esp_cfg80211_get_tx_power(struct wiphy *wiphy,
842848
return 0;
843849
}
844850

845-
static int esp_cfg80211_set_wiphy_params(struct wiphy *wiphy, u32 changed)
851+
static int esp_cfg80211_set_wiphy_params(struct wiphy *wiphy,
852+
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 17, 0))
853+
int radio_idx,
854+
#endif
855+
u32 changed)
846856
{
847857
esp_dbg("\n");
848858
return 0;

0 commit comments

Comments
 (0)