mirror of
https://github.com/chinawrj/rtl8812au
synced 2024-11-27 15:44:18 +00:00
Add kernel 5.18 support
This commit is contained in:
parent
bf9f12febb
commit
41532e3b16
@ -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));
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user