Skip to content

Commit

Permalink
Patch for linux-6.3.
Browse files Browse the repository at this point in the history
  • Loading branch information
ziman committed May 10, 2023
1 parent 7caf3cc commit 39baac1
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion os_dep/linux/ioctl_cfg80211.c
Original file line number Diff line number Diff line change
Expand Up @@ -410,7 +410,18 @@ u8 rtw_cfg80211_ch_switch_notify(_adapter *adapter, u8 ch, u8 bw, u8 offset, u8
struct wiphy *wiphy = adapter_to_wiphy(adapter);
u8 ret = _SUCCESS;

#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 8, 0))
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 3, 0))
// 6.3 needs an additional argcument to cfg80211_ch_switch_notify()
// https://github.com/torvalds/linux/commit/b345f0637c0042f9e6b78378a32256d90f485774
struct cfg80211_chan_def chdef = {};

ret = rtw_chbw_to_cfg80211_chan_def(wiphy, &chdef, ch, bw, offset, ht);
if (ret != _SUCCESS)
goto exit;

cfg80211_ch_switch_notify(adapter->pnetdev, &chdef, 0, 0);

#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 8, 0))
struct cfg80211_chan_def chdef = {};

ret = rtw_chbw_to_cfg80211_chan_def(wiphy, &chdef, ch, bw, offset, ht);
Expand Down

0 comments on commit 39baac1

Please sign in to comment.