Update upstream source from tag 'upstream/5.3.9_git20220829.4ba8e08'

Update to upstream version '5.3.9~git20220829.4ba8e08'
with Debian dir acb483443a
This commit is contained in:
Sophie Brun 2022-10-06 14:22:17 +02:00
commit 7338edb800
4 changed files with 35 additions and 0 deletions

View File

@ -1529,6 +1529,7 @@ enum ieee80211_state {
(((Addr[2]) & 0xff) == 0xff) && (((Addr[3]) & 0xff) == 0xff) && (((Addr[4]) & 0xff) == 0xff) && \ (((Addr[2]) & 0xff) == 0xff) && (((Addr[3]) & 0xff) == 0xff) && (((Addr[4]) & 0xff) == 0xff) && \
(((Addr[5]) & 0xff) == 0xff)) (((Addr[5]) & 0xff) == 0xff))
#else #else
#if (LINUX_VERSION_CODE < KERNEL_VERSION(5, 18, 00))
extern __inline int is_multicast_mac_addr(const u8 *addr) extern __inline int is_multicast_mac_addr(const u8 *addr)
{ {
return (addr[0] != 0xff) && (0x01 & addr[0]); return (addr[0] != 0xff) && (0x01 & addr[0]);
@ -1545,6 +1546,24 @@ extern __inline int is_zero_mac_addr(const u8 *addr)
return ((addr[0] == 0x00) && (addr[1] == 0x00) && (addr[2] == 0x00) && \ return ((addr[0] == 0x00) && (addr[1] == 0x00) && (addr[2] == 0x00) && \
(addr[3] == 0x00) && (addr[4] == 0x00) && (addr[5] == 0x00)); (addr[3] == 0x00) && (addr[4] == 0x00) && (addr[5] == 0x00));
} }
#else
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));
}
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));
}
#endif /* LINUX_VERSION_CODE */
#endif /* PLATFORM_FREEBSD */ #endif /* PLATFORM_FREEBSD */
#define CFG_IEEE80211_RESERVE_FCS (1<<0) #define CFG_IEEE80211_RESERVE_FCS (1<<0)

View File

@ -1199,7 +1199,11 @@ static int rtw_net_set_mac_address(struct net_device *pnetdev, void *addr)
} }
_rtw_memcpy(adapter_mac_addr(padapter), sa->sa_data, ETH_ALEN); /* set mac addr to adapter */ _rtw_memcpy(adapter_mac_addr(padapter), sa->sa_data, ETH_ALEN); /* set mac addr to adapter */
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 17, 0))
eth_hw_addr_set(pnetdev, sa->sa_data);
#else
_rtw_memcpy(pnetdev->dev_addr, sa->sa_data, ETH_ALEN); /* set mac addr to net_device */ _rtw_memcpy(pnetdev->dev_addr, sa->sa_data, ETH_ALEN); /* set mac addr to net_device */
#endif
#if 0 #if 0
if (rtw_is_hw_init_completed(padapter)) { if (rtw_is_hw_init_completed(padapter)) {
@ -1628,7 +1632,11 @@ int rtw_os_ndev_register(_adapter *adapter, const char *name)
/* alloc netdev name */ /* alloc netdev name */
rtw_init_netdev_name(ndev, name); rtw_init_netdev_name(ndev, name);
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 17, 0))
eth_hw_addr_set(ndev, adapter_mac_addr(adapter));
#else
_rtw_memcpy(ndev->dev_addr, adapter_mac_addr(adapter), ETH_ALEN); _rtw_memcpy(ndev->dev_addr, adapter_mac_addr(adapter), ETH_ALEN);
#endif
#if defined(CONFIG_NET_NS) #if defined(CONFIG_NET_NS)
dev_net_set(ndev, wiphy_net(adapter_to_wiphy(adapter))); dev_net_set(ndev, wiphy_net(adapter_to_wiphy(adapter)));
#endif //defined(CONFIG_NET_NS) #endif //defined(CONFIG_NET_NS)

View File

@ -45,6 +45,10 @@ inline struct proc_dir_entry *get_rtw_drv_proc(void)
#define get_proc_net init_net.proc_net #define get_proc_net init_net.proc_net
#endif #endif
#if(LINUX_VERSION_CODE >= KERNEL_VERSION(5, 17, 0))
#define PDE_DATA(inode) pde_data(inode)
#endif
inline struct proc_dir_entry *rtw_proc_create_dir(const char *name, struct proc_dir_entry *parent, void *data) inline struct proc_dir_entry *rtw_proc_create_dir(const char *name, struct proc_dir_entry *parent, void *data)
{ {
struct proc_dir_entry *entry; struct proc_dir_entry *entry;

View File

@ -1268,8 +1268,12 @@ u32 _rtw_down_sema(_sema *sema)
inline void thread_exit(_completion *comp) inline void thread_exit(_completion *comp)
{ {
#ifdef PLATFORM_LINUX #ifdef PLATFORM_LINUX
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 17, 0))
kthread_complete_and_exit(comp, 0);
#else
complete_and_exit(comp, 0); complete_and_exit(comp, 0);
#endif #endif
#endif
#ifdef PLATFORM_FREEBSD #ifdef PLATFORM_FREEBSD
printf("%s", "RTKTHREAD_exit"); printf("%s", "RTKTHREAD_exit");