Add Kernel 6.2 support

This commit is contained in:
ivanovborislav 2023-01-22 10:05:42 +02:00 committed by GitHub
parent 10631c95a3
commit d23a4f8a98
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 22 additions and 5 deletions

View File

@ -454,7 +454,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 (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 19, 0))
if (started) { 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() --- /* --- cfg80211_ch_switch_started_notfiy() ---
* A new parameter, bool quiet, is added from Linux kernel v5.11, * A new parameter, bool quiet, is added from Linux kernel v5.11,
@ -1907,6 +1909,9 @@ exit:
} }
static int cfg80211_rtw_add_key(struct wiphy *wiphy, struct net_device *ndev static int cfg80211_rtw_add_key(struct wiphy *wiphy, struct net_device *ndev
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 1, 0))
, int link_id
#endif
, u8 key_index , u8 key_index
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 37)) || defined(COMPAT_KERNEL_RELEASE) #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 37)) || defined(COMPAT_KERNEL_RELEASE)
, bool pairwise , bool pairwise
@ -2069,6 +2074,9 @@ addkey_end:
} }
static int cfg80211_rtw_get_key(struct wiphy *wiphy, struct net_device *ndev static int cfg80211_rtw_get_key(struct wiphy *wiphy, struct net_device *ndev
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 1, 0))
, int link_id
#endif
, u8 keyid , u8 keyid
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 37)) || defined(COMPAT_KERNEL_RELEASE) #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 37)) || defined(COMPAT_KERNEL_RELEASE)
, bool pairwise , bool pairwise
@ -2257,6 +2265,9 @@ exit:
} }
static int cfg80211_rtw_del_key(struct wiphy *wiphy, struct net_device *ndev, static int cfg80211_rtw_del_key(struct wiphy *wiphy, struct net_device *ndev,
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 1, 0))
int link_id,
#endif
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 37)) || defined(COMPAT_KERNEL_RELEASE) #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 37)) || defined(COMPAT_KERNEL_RELEASE)
u8 key_index, bool pairwise, const u8 *mac_addr) u8 key_index, bool pairwise, const u8 *mac_addr)
#else /* (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 37)) */ #else /* (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 37)) */
@ -2276,8 +2287,11 @@ static int cfg80211_rtw_del_key(struct wiphy *wiphy, struct net_device *ndev,
return 0; return 0;
} }
static int cfg80211_rtw_set_default_key(struct wiphy *wiphy, static int cfg80211_rtw_set_default_key(struct wiphy *wiphy, struct net_device *ndev,
struct net_device *ndev, u8 key_index #if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 1, 0))
int link_id,
#endif
u8 key_index
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 38)) || defined(COMPAT_KERNEL_RELEASE) #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 38)) || defined(COMPAT_KERNEL_RELEASE)
, bool unicast, bool multicast , bool unicast, bool multicast
#endif #endif
@ -2324,8 +2338,11 @@ static int cfg80211_rtw_set_default_key(struct wiphy *wiphy,
} }
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 30)) #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 30))
int cfg80211_rtw_set_default_mgmt_key(struct wiphy *wiphy, int cfg80211_rtw_set_default_mgmt_key(struct wiphy *wiphy, struct net_device *ndev,
struct net_device *ndev, u8 key_index) #if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 1, 0))
int link_id,
#endif
u8 key_index)
{ {
#define SET_DEF_KEY_PARAM_FMT " key_index=%d" #define SET_DEF_KEY_PARAM_FMT " key_index=%d"
#define SET_DEF_KEY_PARAM_ARG , key_index #define SET_DEF_KEY_PARAM_ARG , key_index