1
0
mirror of https://github.com/aircrack-ng/rtl8812au.git synced 2024-11-22 13:24:36 +00:00

Add kernel 5.18 support

This commit is contained in:
kimocoder 2022-06-06 02:50:32 +02:00
parent bf9f12febb
commit 41532e3b16
2 changed files with 4 additions and 4 deletions

View File

@ -1616,18 +1616,18 @@ enum ieee80211_state {
(((Addr[2]) & 0xff) == 0xff) && (((Addr[3]) & 0xff) == 0xff) && (((Addr[4]) & 0xff) == 0xff) && \
(((Addr[5]) & 0xff) == 0xff))
#else
extern __inline int is_multicast_mac_addr(const u8 *addr)
static inline int is_multicast_mac_addr(const u8 *addr)
{
return (addr[0] != 0xff) && (0x01 & addr[0]);
}
extern __inline int is_broadcast_mac_addr(const u8 *addr)
static inline int is_broadcast_mac_addr(const u8 *addr)
{
return ((addr[0] == 0xff) && (addr[1] == 0xff) && (addr[2] == 0xff) && \
(addr[3] == 0xff) && (addr[4] == 0xff) && (addr[5] == 0xff));
}
extern __inline int is_zero_mac_addr(const u8 *addr)
static inline int is_zero_mac_addr(const u8 *addr)
{
return ((addr[0] == 0x00) && (addr[1] == 0x00) && (addr[2] == 0x00) && \
(addr[3] == 0x00) && (addr[4] == 0x00) && (addr[5] == 0x00));

View File

@ -664,7 +664,7 @@ int rtw_android_priv_cmd(struct net_device *net, struct ifreq *ifr, int cmd)
goto exit;
}
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 0, 0)) || (RHEL_RELEASE_CODE >= RHEL_RELEASE_VERSION(8,0))
if (!access_ok(priv_cmd.buf, priv_cmd.total_len)) {
if (!access_ok(&priv_cmd.buf, priv_cmd.total_len)) {
#else
if (!access_ok(VERIFY_READ, priv_cmd.buf, priv_cmd.total_len)) {
#endif