Skip to content

Commit

Permalink
ieee80211.h: buildfix for Linux 5.18
Browse files Browse the repository at this point in the history
ieee80211.h: buildfix for Linux 5.18
  • Loading branch information
kelebek333 committed Apr 24, 2022
1 parent 34a68cb commit ab3725e
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions include/ieee80211.h
Original file line number Diff line number Diff line change
Expand Up @@ -1425,18 +1425,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));
Expand Down

0 comments on commit ab3725e

Please sign in to comment.