rtl8188eu: Fix builds through kernel 6.1

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
This commit is contained in:
Larry Finger 2022-11-28 14:44:00 -06:00
parent ca2465c497
commit cb854ca647
7 changed files with 71 additions and 36 deletions

View file

@ -957,23 +957,23 @@ 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]
extern __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)
{
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));
}
static inline int is_multicast_mac_addr(const u8 *addr)
{
return ((addr[0] != 0xff) && (0x01 & addr[0]));
}
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);
}
#define CFG_IEEE80211_RESERVE_FCS (1<<0)
#define CFG_IEEE80211_COMPUTE_FCS (1<<1)

View file

@ -116,7 +116,11 @@ int pm_netdev_open(struct net_device *pnetdev,u8 bnormal);
spinlock_t lock;
};
#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 17, 0)
#define thread_exit() complete_and_exit(NULL, 0)
#else
#define thread_exit() kthread_complete_and_exit(NULL, 0);
#endif
#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,24))
#define DMA_BIT_MASK(n) (((n) == 64) ? ~0ULL : ((1ULL<<(n))-1))