From 94841bf289a0f948400b8b0c78b163a69ccc74fd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Carlos=20Garc=C3=A9s?= Date: Mon, 13 Mar 2023 16:52:48 +0000 Subject: [PATCH] Fix kernel 6.3 wifi: cfg80211: include puncturing bitmap in channel switch events see https://github.com/torvalds/linux/commit/b345f0637c0042f9e6b78378a32256d90f485774 --- os_dep/linux/ioctl_cfg80211.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/os_dep/linux/ioctl_cfg80211.c b/os_dep/linux/ioctl_cfg80211.c index ead698a..fd06b13 100644 --- a/os_dep/linux/ioctl_cfg80211.c +++ b/os_dep/linux/ioctl_cfg80211.c @@ -439,7 +439,9 @@ u8 rtw_cfg80211_ch_switch_notify(_adapter *adapter, u8 ch, u8 bw, u8 offset, #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 19, 0)) if (started) { -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 1, 0)) +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 3, 0)) + cfg80211_ch_switch_started_notify(adapter->pnetdev, &chdef, 0, 0, false, 0); +#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 1, 0)) cfg80211_ch_switch_started_notify(adapter->pnetdev, &chdef, 0, 0, false); #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 11, 0)) cfg80211_ch_switch_started_notify(adapter->pnetdev, &chdef, 0, false); @@ -452,8 +454,9 @@ u8 rtw_cfg80211_ch_switch_notify(_adapter *adapter, u8 ch, u8 bw, u8 offset, if (!rtw_cfg80211_allow_ch_switch_notify(adapter)) goto exit; - -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,19, 2)) +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 3, 0)) + cfg80211_ch_switch_notify(adapter->pnetdev, &chdef, 0, 0); +#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(5,19, 2)) cfg80211_ch_switch_notify(adapter->pnetdev, &chdef, 0); #else cfg80211_ch_switch_notify(adapter->pnetdev, &chdef);