From 055e126fd38dc14c28849f1689ef9e58e5c09d89 Mon Sep 17 00:00:00 2001 From: Jason K Date: Wed, 16 Mar 2016 18:30:22 -0700 Subject: [PATCH] Broke out implementation of severel functions out of header file. The was causing build failures on the arm64 architecture --- core/rtw_ieee80211.c | 16 ++++++++++++++++ include/ieee80211.h | 24 +++--------------------- 2 files changed, 19 insertions(+), 21 deletions(-) diff --git a/core/rtw_ieee80211.c b/core/rtw_ieee80211.c index 97eba25..ebb4829 100644 --- a/core/rtw_ieee80211.c +++ b/core/rtw_ieee80211.c @@ -2218,3 +2218,19 @@ const char *action_public_str(u8 action) return _action_public_str[action]; } +int is_multicast_mac_addr(const u8 *addr) +{ + return ((addr[0] != 0xff) && (0x01 & addr[0])); +} + +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)); +} + +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)); +} diff --git a/include/ieee80211.h b/include/ieee80211.h index fc293c4..3f067dc 100644 --- a/include/ieee80211.h +++ b/include/ieee80211.h @@ -1308,29 +1308,11 @@ enum ieee80211_state { #define IP_FMT "%d.%d.%d.%d" #define IP_ARG(x) ((u8*)(x))[0],((u8*)(x))[1],((u8*)(x))[2],((u8*)(x))[3] -#ifdef PLATFORM_FREEBSD //Baron change func to macro -#define is_multicast_mac_addr(Addr) ((((Addr[0]) & 0x01) == 0x01) && ((Addr[0]) != 0xff)) -#define is_broadcast_mac_addr(Addr) ((((Addr[0]) & 0xff) == 0xff) && (((Addr[1]) & 0xff) == 0xff) && \ -(((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) -{ - return ((addr[0] != 0xff) && (0x01 & addr[0])); -} +extern int is_multicast_mac_addr(const u8 *addr); -extern __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 int is_broadcast_mac_addr(const u8 *addr); -extern __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)); -} -#endif //PLATFORM_FREEBSD +extern int is_zero_mac_addr(const u8 *addr); #define CFG_IEEE80211_RESERVE_FCS (1<<0) #define CFG_IEEE80211_COMPUTE_FCS (1<<1)