1
0
mirror of https://github.com/aircrack-ng/rtl8812au.git synced 2024-11-22 05:14:35 +00:00

Add kernel v6.6 support

This commit is contained in:
kimocoder 2023-10-29 16:29:30 +01:00
parent 8954f2b8d8
commit 81be2f4681
3 changed files with 18 additions and 7 deletions

View File

@ -9,6 +9,8 @@ EXTRA_CFLAGS += -Wno-implicit-fallthrough
EXTRA_CFLAGS += -Wno-cast-function-type EXTRA_CFLAGS += -Wno-cast-function-type
#EXTRA_CFLAGS += -Wno-error=cast-function-type #EXTRA_CFLAGS += -Wno-error=cast-function-type
#EXTRA_CFLAGS += -Wno-parentheses-equality #EXTRA_CFLAGS += -Wno-parentheses-equality
EXTRA_CFLAGS += -Wno-error=incompatible-pointer-types
EXTRA_CFLAGS += -Wno-stringop-overread
#EXTRA_CFLAGS += -Wno-pointer-bool-conversion #EXTRA_CFLAGS += -Wno-pointer-bool-conversion
EXTRA_CFLAGS += -Wno-unknown-pragmas EXTRA_CFLAGS += -Wno-unknown-pragmas
#EXTRA_CFLAGS += -Wno-unused #EXTRA_CFLAGS += -Wno-unused

View File

@ -478,7 +478,7 @@ u8 rtw_cfg80211_ch_switch_notify(_adapter *adapter, u8 ch, u8 bw, u8 offset,
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 3, 0)) #if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 3, 0))
cfg80211_ch_switch_notify(adapter->pnetdev, &chdef, 0, 0); cfg80211_ch_switch_notify(adapter->pnetdev, &chdef, 0, 0);
#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(5,19, 2)) #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 19, 2))
cfg80211_ch_switch_notify(adapter->pnetdev, &chdef, 0); cfg80211_ch_switch_notify(adapter->pnetdev, &chdef, 0);
#else #else
cfg80211_ch_switch_notify(adapter->pnetdev, &chdef); cfg80211_ch_switch_notify(adapter->pnetdev, &chdef);
@ -5267,10 +5267,10 @@ static int cfg80211_rtw_change_beacon(struct wiphy *wiphy, struct net_device *nd
return ret; return ret;
} }
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 19, 2)) #if (LINUX_VERSION_CODE < KERNEL_VERSION(5, 19, 2))
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) static int cfg80211_rtw_stop_ap(struct wiphy *wiphy, struct net_device *ndev)
#else
static int cfg80211_rtw_stop_ap(struct wiphy *wiphy, struct net_device *ndev, unsigned int link_id)
#endif #endif
{ {
_adapter *adapter = (_adapter *)rtw_netdev_priv(ndev); _adapter *adapter = (_adapter *)rtw_netdev_priv(ndev);
@ -7813,6 +7813,9 @@ static int cfg80211_rtw_tdls_mgmt(struct wiphy *wiphy,
const u8 *peer, const u8 *peer,
#else #else
u8 *peer, u8 *peer,
#endif
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 5, 0))
int link_id,
#endif #endif
u8 action_code, u8 action_code,
u8 dialog_token, u8 dialog_token,
@ -10155,12 +10158,12 @@ static struct cfg80211_ops rtw_cfg80211_ops = {
.del_pmksa = cfg80211_rtw_del_pmksa, .del_pmksa = cfg80211_rtw_del_pmksa,
.flush_pmksa = cfg80211_rtw_flush_pmksa, .flush_pmksa = cfg80211_rtw_flush_pmksa,
#ifdef CONFIG_AP_MODE
#ifdef RTW_VIRTUAL_INT #ifdef RTW_VIRTUAL_INT
.add_virtual_intf = cfg80211_rtw_add_virtual_intf, .add_virtual_intf = cfg80211_rtw_add_virtual_intf,
.del_virtual_intf = cfg80211_rtw_del_virtual_intf, .del_virtual_intf = cfg80211_rtw_del_virtual_intf,
#endif #endif
#ifdef CONFIG_AP_MODE
#if (LINUX_VERSION_CODE < KERNEL_VERSION(3, 4, 0)) && !defined(COMPAT_KERNEL_RELEASE) #if (LINUX_VERSION_CODE < KERNEL_VERSION(3, 4, 0)) && !defined(COMPAT_KERNEL_RELEASE)
.add_beacon = cfg80211_rtw_add_beacon, .add_beacon = cfg80211_rtw_add_beacon,
.set_beacon = cfg80211_rtw_set_beacon, .set_beacon = cfg80211_rtw_set_beacon,
@ -10432,7 +10435,7 @@ void rtw_wdev_unregister(struct wireless_dev *wdev)
rtw_cfg80211_indicate_scan_done(adapter, _TRUE); 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(3, 11, 0)) || defined(COMPAT_KERNEL_RELEASE)
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 0, 0)) #if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 19, 2))
if (wdev->links[0].client.current_bss) { if (wdev->links[0].client.current_bss) {
#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 19, 2)) #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 19, 2))
if (wdev->connected) { if (wdev->connected) {
@ -10473,9 +10476,10 @@ int rtw_cfg80211_ndev_res_alloc(_adapter *adapter)
rtw_wiphy_free(wiphy); rtw_wiphy_free(wiphy);
adapter->wiphy = NULL; adapter->wiphy = NULL;
} }
#endif
exit: exit:
#endif
return ret; return ret;
} }
@ -10489,6 +10493,7 @@ void rtw_cfg80211_ndev_res_free(_adapter *adapter)
#endif #endif
} }
int rtw_cfg80211_ndev_res_register(_adapter *adapter) int rtw_cfg80211_ndev_res_register(_adapter *adapter)
{ {
int ret = _FAIL; int ret = _FAIL;

View File

@ -396,6 +396,10 @@ static void _rtw_regd_init_wiphy(struct rtw_regulatory *reg, struct wiphy *wiphy
wiphy->regulatory_flags &= ~REGULATORY_DISABLE_BEACON_HINTS; wiphy->regulatory_flags &= ~REGULATORY_DISABLE_BEACON_HINTS;
#endif #endif
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 19, 0)) && (LINUX_VERSION_CODE < KERNEL_VERSION(6, 5, 0))
wiphy->regulatory_flags |= REGULATORY_IGNORE_STALE_KICKOFF;
#endif
regd = _rtw_regdomain_select(reg); regd = _rtw_regdomain_select(reg);
wiphy_apply_custom_regulatory(wiphy, regd); wiphy_apply_custom_regulatory(wiphy, regd);