Skip to content

Commit

Permalink
[RTL8852BU] Update for upstream change
Browse files Browse the repository at this point in the history
netif_napi_add() => netif_napi_add_weight()
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=b48b89f

Add missing new argument to cfg80211_ch_switch_notify()
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=b8c9024

Signed-off-by: MichaIng <[email protected]>
  • Loading branch information
MichaIng committed Dec 17, 2023
1 parent dd06a1c commit cca9d02
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
8 changes: 7 additions & 1 deletion drivers/staging/rtl8852bu/os_dep/linux/ioctl_cfg80211.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion drivers/staging/rtl8852bu/os_dep/linux/os_intfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit cca9d02

Please sign in to comment.