099-cut-linkid-linux-version-code-conditionals.patch 4.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. From 30fc9d96fa2ce16209306237e677d3d3cbb12685 Mon Sep 17 00:00:00 2001
  2. From: John Thomson <[email protected]>
  3. Date: Sun, 28 May 2023 13:26:46 +1000
  4. Subject: [PATCH] Revert "fix kernel 6.1 80211 link_id"
  5. This reverts commit a027da58e8d8e95827f97222ca321cd0b2d377dd.
  6. ---
  7. os_dep/linux/ioctl_cfg80211.c | 29 +++++------------------------
  8. 1 file changed, 5 insertions(+), 24 deletions(-)
  9. --- a/os_dep/linux/ioctl_cfg80211.c
  10. +++ b/os_dep/linux/ioctl_cfg80211.c
  11. @@ -797,14 +797,9 @@ check_bss:
  12. #endif
  13. DBG_871X(FUNC_ADPT_FMT" call cfg80211_roamed\n", FUNC_ADPT_ARG(padapter));
  14. -#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 0, 0)
  15. - roam_info.links[0].channel = notify_channel;
  16. - roam_info.links[0].bssid = cur_network->network.MacAddress;
  17. -#elif LINUX_VERSION_CODE >= KERNEL_VERSION(4, 12, 0)
  18. +#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 12, 0)
  19. roam_info.channel = notify_channel;
  20. roam_info.bssid = cur_network->network.MacAddress;
  21. -#endif
  22. -#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 12, 0)
  23. roam_info.req_ie = pmlmepriv->assoc_req + sizeof(struct rtw_ieee80211_hdr_3addr) + 2;
  24. roam_info.req_ie_len = pmlmepriv->assoc_req_len - sizeof(struct rtw_ieee80211_hdr_3addr) - 2;
  25. roam_info.resp_ie = pmlmepriv->assoc_rsp + sizeof(struct rtw_ieee80211_hdr_3addr) + 6;
  26. @@ -1393,9 +1388,7 @@ exit:
  27. }
  28. static int cfg80211_rtw_add_key(struct wiphy *wiphy, struct net_device *ndev,
  29. -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 1, 0))
  30. - int link_id, u8 key_index, bool pairwise, const u8 *mac_addr,
  31. -#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,37)) || defined(COMPAT_KERNEL_RELEASE)
  32. +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,37)) || defined(COMPAT_KERNEL_RELEASE)
  33. u8 key_index, bool pairwise, const u8 *mac_addr,
  34. #else // (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,37))
  35. u8 key_index, const u8 *mac_addr,
  36. @@ -1535,9 +1528,7 @@ addkey_end:
  37. }
  38. static int cfg80211_rtw_get_key(struct wiphy *wiphy, struct net_device *ndev,
  39. -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 1, 0))
  40. - int link_id, u8 key_index, bool pairwise, const u8 *mac_addr,
  41. -#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,37)) || defined(COMPAT_KERNEL_RELEASE)
  42. +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,37)) || defined(COMPAT_KERNEL_RELEASE)
  43. u8 key_index, bool pairwise, const u8 *mac_addr,
  44. #else // (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,37))
  45. u8 key_index, const u8 *mac_addr,
  46. @@ -1570,9 +1561,7 @@ static int cfg80211_rtw_get_key(struct w
  47. }
  48. static int cfg80211_rtw_del_key(struct wiphy *wiphy, struct net_device *ndev,
  49. -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 1, 0))
  50. - int link_id, u8 key_index, bool pairwise, const u8 *mac_addr)
  51. -#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,37)) || defined(COMPAT_KERNEL_RELEASE)
  52. +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,37)) || defined(COMPAT_KERNEL_RELEASE)
  53. u8 key_index, bool pairwise, const u8 *mac_addr)
  54. #else // (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,37))
  55. u8 key_index, const u8 *mac_addr)
  56. @@ -1592,11 +1581,7 @@ static int cfg80211_rtw_del_key(struct w
  57. }
  58. static int cfg80211_rtw_set_default_key(struct wiphy *wiphy,
  59. - struct net_device *ndev,
  60. -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 1, 0))
  61. - int link_id,
  62. -#endif
  63. - u8 key_index
  64. + struct net_device *ndev, u8 key_index
  65. #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,38)) || defined(COMPAT_KERNEL_RELEASE)
  66. , bool unicast, bool multicast
  67. #endif
  68. @@ -4046,11 +4031,7 @@ static int cfg80211_rtw_change_beacon(st
  69. return ret;
  70. }
  71. -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6,0,0))
  72. -static int cfg80211_rtw_stop_ap(struct wiphy *wiphy, struct net_device *ndev, unsigned int link_id)
  73. -#else
  74. static int cfg80211_rtw_stop_ap(struct wiphy *wiphy, struct net_device *ndev)
  75. -#endif
  76. {
  77. DBG_871X(FUNC_NDEV_FMT"\n", FUNC_NDEV_ARG(ndev));
  78. return 0;