be82ca45434aeacd356a7ac65950ef89ca15e640.patch 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. From be82ca45434aeacd356a7ac65950ef89ca15e640 Mon Sep 17 00:00:00 2001
  2. From: Shiwei Zhang <ylxdzsw@gmail.com>
  3. Date: Sat, 27 Aug 2022 14:46:50 +0800
  4. Subject: [PATCH] fix for 5.19.3
  5. ---
  6. include/ieee80211.h | 6 +++---
  7. os_dep/linux/ioctl_cfg80211.c | 16 ++++++++--------
  8. 2 files changed, 11 insertions(+), 11 deletions(-)
  9. diff --git a/include/ieee80211.h b/include/ieee80211.h
  10. index dde8b4c..9eb3343 100644
  11. --- a/include/ieee80211.h
  12. +++ b/include/ieee80211.h
  13. @@ -1529,18 +1529,18 @@ enum ieee80211_state {
  14. (((Addr[2]) & 0xff) == 0xff) && (((Addr[3]) & 0xff) == 0xff) && (((Addr[4]) & 0xff) == 0xff) && \
  15. (((Addr[5]) & 0xff) == 0xff))
  16. #else
  17. -extern __inline int is_multicast_mac_addr(const u8 *addr)
  18. +__inline int is_multicast_mac_addr(const u8 *addr)
  19. {
  20. return (addr[0] != 0xff) && (0x01 & addr[0]);
  21. }
  22. -extern __inline int is_broadcast_mac_addr(const u8 *addr)
  23. +__inline int is_broadcast_mac_addr(const u8 *addr)
  24. {
  25. return ((addr[0] == 0xff) && (addr[1] == 0xff) && (addr[2] == 0xff) && \
  26. (addr[3] == 0xff) && (addr[4] == 0xff) && (addr[5] == 0xff));
  27. }
  28. -extern __inline int is_zero_mac_addr(const u8 *addr)
  29. +__inline int is_zero_mac_addr(const u8 *addr)
  30. {
  31. return ((addr[0] == 0x00) && (addr[1] == 0x00) && (addr[2] == 0x00) && \
  32. (addr[3] == 0x00) && (addr[4] == 0x00) && (addr[5] == 0x00));
  33. diff --git a/os_dep/linux/ioctl_cfg80211.c b/os_dep/linux/ioctl_cfg80211.c
  34. index d9c81c9..1808620 100644
  35. --- a/os_dep/linux/ioctl_cfg80211.c
  36. +++ b/os_dep/linux/ioctl_cfg80211.c
  37. @@ -417,7 +417,7 @@ u8 rtw_cfg80211_ch_switch_notify(_adapter *adapter, u8 ch, u8 bw, u8 offset, u8
  38. if (ret != _SUCCESS)
  39. goto exit;
  40. - cfg80211_ch_switch_notify(adapter->pnetdev, &chdef);
  41. + cfg80211_ch_switch_notify(adapter->pnetdev, &chdef, 0);
  42. #else
  43. int freq = rtw_ch2freq(ch);
  44. @@ -4929,7 +4929,7 @@ static int cfg80211_rtw_change_beacon(struct wiphy *wiphy, struct net_device *nd
  45. return ret;
  46. }
  47. -static int cfg80211_rtw_stop_ap(struct wiphy *wiphy, struct net_device *ndev)
  48. +static int cfg80211_rtw_stop_ap(struct wiphy *wiphy, struct net_device *ndev, unsigned int link_id)
  49. {
  50. _adapter *adapter = (_adapter *)rtw_netdev_priv(ndev);
  51. @@ -9678,12 +9678,12 @@ void rtw_wdev_unregister(struct wireless_dev *wdev)
  52. rtw_cfg80211_indicate_scan_done(adapter, _TRUE);
  53. - #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 11, 0)) || defined(COMPAT_KERNEL_RELEASE)
  54. - if (wdev->current_bss) {
  55. - RTW_INFO(FUNC_ADPT_FMT" clear current_bss by cfg80211_disconnected\n", FUNC_ADPT_ARG(adapter));
  56. - rtw_cfg80211_indicate_disconnect(adapter, 0, 1);
  57. - }
  58. - #endif
  59. + // #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 11, 0)) || defined(COMPAT_KERNEL_RELEASE)
  60. + // if (wdev->current_bss) {
  61. + // RTW_INFO(FUNC_ADPT_FMT" clear current_bss by cfg80211_disconnected\n", FUNC_ADPT_ARG(adapter));
  62. + // rtw_cfg80211_indicate_disconnect(adapter, 0, 1);
  63. + // }
  64. + // #endif
  65. if (pwdev_priv->pmon_ndev) {
  66. RTW_INFO("%s, unregister monitor interface\n", __func__);