diff --git a/drivers/staging/rtl8852bu/os_dep/linux/ioctl_cfg80211.c b/drivers/staging/rtl8852bu/os_dep/linux/ioctl_cfg80211.c index 17078a4c8b7f..51a816641d37 100755 --- a/drivers/staging/rtl8852bu/os_dep/linux/ioctl_cfg80211.c +++ b/drivers/staging/rtl8852bu/os_dep/linux/ioctl_cfg80211.c @@ -483,7 +483,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(5, 11, 0)) +#if (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_notfiy() --- * A new parameter, bool quiet, is added from Linux kernel v5.11, @@ -504,7 +506,11 @@ 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(6, 1, 0)) + cfg80211_ch_switch_notify(adapter->pnetdev, &chdef, 0); +#else cfg80211_ch_switch_notify(adapter->pnetdev, &chdef); +#endif #else int freq = rtw_ch2freq(ch); diff --git a/drivers/staging/rtl8852bu/os_dep/linux/os_intfs.c b/drivers/staging/rtl8852bu/os_dep/linux/os_intfs.c index 87fe3b82611d..49822a148373 100755 --- a/drivers/staging/rtl8852bu/os_dep/linux/os_intfs.c +++ b/drivers/staging/rtl8852bu/os_dep/linux/os_intfs.c @@ -291,7 +291,7 @@ int rtw_ndev_init(struct net_device *dev) rtw_adapter_proc_init(dev); #ifdef CONFIG_RTW_NAPI - netif_napi_add(dev, &adapter->napi, rtw_recv_napi_poll, RTL_NAPI_WEIGHT); + netif_napi_add_weight(dev, &adapter->napi, rtw_recv_napi_poll, RTL_NAPI_WEIGHT); #endif /* CONFIG_RTW_NAPI */ return 0;