From af27791efdde55cdec3b4400c9d1a806c0040e38 Mon Sep 17 00:00:00 2001 From: Butterfly Date: Tue, 12 Apr 2022 00:31:54 +0300 Subject: [PATCH] Buildfix for Linux 5.18 Buildfix for Linux 5.18 --- include/ieee80211.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/drivers/net/wireless/rtl8811cu/include/ieee80211.h b/drivers/net/wireless/rtl8811cu/include/ieee80211.h index dde8b4c..9fb6b48 100644 --- a/drivers/net/wireless/rtl8811cu/include/ieee80211.h +++ b/drivers/net/wireless/rtl8811cu/include/ieee80211.h @@ -1529,18 +1529,30 @@ enum ieee80211_state { (((Addr[2]) & 0xff) == 0xff) && (((Addr[3]) & 0xff) == 0xff) && (((Addr[4]) & 0xff) == 0xff) && \ (((Addr[5]) & 0xff) == 0xff)) #else +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 18, 0)) +static inline int is_multicast_mac_addr(const u8 *addr) +#else extern __inline int is_multicast_mac_addr(const u8 *addr) +#endif { return (addr[0] != 0xff) && (0x01 & addr[0]); } +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 18, 0)) +static inline int is_broadcast_mac_addr(const u8 *addr) +#else extern __inline int is_broadcast_mac_addr(const u8 *addr) +#endif { return ((addr[0] == 0xff) && (addr[1] == 0xff) && (addr[2] == 0xff) && \ (addr[3] == 0xff) && (addr[4] == 0xff) && (addr[5] == 0xff)); } +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 18, 0)) +static inline int is_zero_mac_addr(const u8 *addr) +#else extern __inline int is_zero_mac_addr(const u8 *addr) +#endif { return ((addr[0] == 0x00) && (addr[1] == 0x00) && (addr[2] == 0x00) && \ (addr[3] == 0x00) && (addr[4] == 0x00) && (addr[5] == 0x00));