fix for 6.x kernels
This commit is contained in:
parent
d95287c99d
commit
b71593a785
|
@ -808,8 +808,13 @@ check_bss:
|
||||||
|
|
||||||
DBG_871X(FUNC_ADPT_FMT" call cfg80211_roamed\n", FUNC_ADPT_ARG(padapter));
|
DBG_871X(FUNC_ADPT_FMT" call cfg80211_roamed\n", FUNC_ADPT_ARG(padapter));
|
||||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,12,0)
|
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,12,0)
|
||||||
|
#if LINUX_VERSION_CODE >= KERNEL_VERSION(6,0,0)
|
||||||
|
roam_info.links[0].channel = notify_channel;
|
||||||
|
roam_info.links[0].bssid = cur_network->network.MacAddress;
|
||||||
|
#else
|
||||||
roam_info.channel = notify_channel;
|
roam_info.channel = notify_channel;
|
||||||
roam_info.bssid = cur_network->network.MacAddress;
|
roam_info.bssid = cur_network->network.MacAddress;
|
||||||
|
#endif
|
||||||
roam_info.req_ie =
|
roam_info.req_ie =
|
||||||
pmlmepriv->assoc_req+sizeof(struct ieee80211_hdr_3addr)+2;
|
pmlmepriv->assoc_req+sizeof(struct ieee80211_hdr_3addr)+2;
|
||||||
roam_info.req_ie_len =
|
roam_info.req_ie_len =
|
||||||
|
@ -1517,9 +1522,11 @@ 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(2,6,37)) || defined(COMPAT_KERNEL_RELEASE)
|
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6,0,0))
|
||||||
|
int link_id, u8 key_index, bool pairwise, const u8 *mac_addr,
|
||||||
|
#elif (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))
|
||||||
u8 key_index, const u8 *mac_addr,
|
u8 key_index, const u8 *mac_addr,
|
||||||
#endif // (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,37))
|
#endif // (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,37))
|
||||||
struct key_params *params)
|
struct key_params *params)
|
||||||
|
@ -1668,7 +1675,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(2,6,37)) || defined(COMPAT_KERNEL_RELEASE)
|
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6,0,0))
|
||||||
|
int link_id, u8 key_index, bool pairwise, const u8 *mac_addr,
|
||||||
|
#elif (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))
|
||||||
u8 key_index, const u8 *mac_addr,
|
u8 key_index, const u8 *mac_addr,
|
||||||
|
@ -1701,7 +1710,9 @@ static int cfg80211_rtw_get_key(struct wiphy *wiphy, struct net_device *ndev,
|
||||||
}
|
}
|
||||||
|
|
||||||
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(2,6,37)) || defined(COMPAT_KERNEL_RELEASE)
|
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6,0,0))
|
||||||
|
int link_id, u8 key_index, bool pairwise, const u8 *mac_addr)
|
||||||
|
#elif (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))
|
||||||
u8 key_index, const u8 *mac_addr)
|
u8 key_index, const u8 *mac_addr)
|
||||||
|
@ -1722,9 +1733,13 @@ static int cfg80211_rtw_del_key(struct wiphy *wiphy, struct net_device *ndev,
|
||||||
}
|
}
|
||||||
|
|
||||||
static int cfg80211_rtw_set_default_key(struct wiphy *wiphy,
|
static int cfg80211_rtw_set_default_key(struct wiphy *wiphy,
|
||||||
struct net_device *ndev, u8 key_index
|
struct net_device *ndev,
|
||||||
|
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6,0,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
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
|
|
|
@ -2312,7 +2312,9 @@ u64 rtw_division64(u64 x, u64 y)
|
||||||
inline u32 rtw_random32(void)
|
inline u32 rtw_random32(void)
|
||||||
{
|
{
|
||||||
#ifdef PLATFORM_LINUX
|
#ifdef PLATFORM_LINUX
|
||||||
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,8,0))
|
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6,1,0))
|
||||||
|
return get_random_u32();
|
||||||
|
#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3,8,0))
|
||||||
return prandom_u32();
|
return prandom_u32();
|
||||||
#elif (LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,18))
|
#elif (LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,18))
|
||||||
u32 random_int;
|
u32 random_int;
|
||||||
|
|
Loading…
Reference in a new issue