lede/package/kernel/rtl8812au-ac/patches/050-backport-6.1.patch
2023-01-31 15:06:50 +08:00

128 lines
4.5 KiB
Diff

--- a/os_dep/linux/ioctl_cfg80211.c
+++ b/os_dep/linux/ioctl_cfg80211.c
@@ -460,9 +460,7 @@
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 19, 0))
if (started) {
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 1, 0) || defined(BUILD_OPENWRT))
- cfg80211_ch_switch_started_notify(adapter->pnetdev, &chdef, 0, 0, false);
-#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 11, 0) || defined(BUILD_OPENWRT))
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 11, 0) || defined(BUILD_OPENWRT))
cfg80211_ch_switch_started_notify(adapter->pnetdev, &chdef, 0, false);
#else
cfg80211_ch_switch_started_notify(adapter->pnetdev, &chdef, 0);
@@ -475,7 +473,7 @@
goto exit;
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 19, 2) || defined(BUILD_OPENWRT))
- cfg80211_ch_switch_notify(adapter->pnetdev, &chdef, 0);
+ cfg80211_ch_switch_notify(adapter->pnetdev, &chdef);
#else
cfg80211_ch_switch_notify(adapter->pnetdev, &chdef);
#endif
@@ -1152,7 +1150,7 @@
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 12, 0)
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 0, 0) || defined(BUILD_OPENWRT))
- roam_info.links[0].bssid = cur_network->network.MacAddress;
+ roam_info.bssid = cur_network->network.MacAddress;
#else
roam_info.bssid = cur_network->network.MacAddress;
#endif
@@ -1721,9 +1719,6 @@
}
static int cfg80211_rtw_add_key(struct wiphy *wiphy, struct net_device *ndev
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 1, 0) || defined(BUILD_OPENWRT))
- , int link_id
-#endif
, u8 key_index
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 37)) || defined(COMPAT_KERNEL_RELEASE)
, bool pairwise
@@ -1868,9 +1863,6 @@
}
static int cfg80211_rtw_get_key(struct wiphy *wiphy, struct net_device *ndev
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 1, 0) || defined(BUILD_OPENWRT))
- , int link_id
-#endif
, u8 keyid
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 37)) || defined(COMPAT_KERNEL_RELEASE)
, bool pairwise
@@ -2036,9 +2028,6 @@
}
static int cfg80211_rtw_del_key(struct wiphy *wiphy, struct net_device *ndev,
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 1, 0) || defined(BUILD_OPENWRT))
- int link_id,
-#endif
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 37)) || defined(COMPAT_KERNEL_RELEASE)
u8 key_index, bool pairwise, const u8 *mac_addr)
#else /* (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 37)) */
@@ -2059,11 +2048,7 @@
}
static int cfg80211_rtw_set_default_key(struct wiphy *wiphy,
- struct net_device *ndev,
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 1, 0) || defined(BUILD_OPENWRT))
- int link_id,
-#endif
- u8 key_index
+ struct net_device *ndev, u8 key_index
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 38)) || defined(COMPAT_KERNEL_RELEASE)
, bool unicast, bool multicast
#endif
@@ -2111,11 +2096,7 @@
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 30))
int cfg80211_rtw_set_default_mgmt_key(struct wiphy *wiphy,
- struct net_device *ndev,
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 1, 0) || defined(BUILD_OPENWRT))
- int link_id,
-#endif
- u8 key_index)
+ struct net_device *ndev, u8 key_index)
{
#define SET_DEF_KEY_PARAM_FMT " key_index=%d"
#define SET_DEF_KEY_PARAM_ARG , key_index
@@ -5248,11 +5229,7 @@
return ret;
}
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 19, 2) || defined(BUILD_OPENWRT))
-static int cfg80211_rtw_stop_ap(struct wiphy *wiphy, struct net_device *ndev, unsigned int link_id)
-#else
static int cfg80211_rtw_stop_ap(struct wiphy *wiphy, struct net_device *ndev)
-#endif
{
_adapter *adapter = (_adapter *)rtw_netdev_priv(ndev);
@@ -6125,11 +6102,8 @@
return 0;
}
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 19, 2) || defined(BUILD_OPENWRT))
-static int cfg80211_rtw_get_channel(struct wiphy *wiphy, struct wireless_dev *wdev, unsigned int link_id, struct cfg80211_chan_def *chandef){
-#else
+
static int cfg80211_rtw_get_channel(struct wiphy *wiphy, struct wireless_dev *wdev, struct cfg80211_chan_def *chandef){
-#endif
_adapter *padapter= wiphy_to_adapter(wiphy);
int channel;
int control_freq;
@@ -10434,13 +10408,8 @@
rtw_cfg80211_indicate_scan_done(adapter, _TRUE);
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 11, 0)) || defined(COMPAT_KERNEL_RELEASE)
- #if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 0, 0) || defined(BUILD_OPENWRT))
- if (wdev->links[0].client.current_bss) {
- #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 19, 2) || defined(BUILD_OPENWRT))
- if (wdev->connected) {
- #else
+
if (wdev->current_bss) {
- #endif
RTW_INFO(FUNC_ADPT_FMT" clear current_bss by cfg80211_disconnected\n", FUNC_ADPT_ARG(adapter));
rtw_cfg80211_indicate_disconnect(adapter, 0, 1);
}