mirror of
https://github.com/drygdryg/rtl8188eus.git
synced 2025-04-28 18:27:26 +09:00
Build support with kernel v5.17:
replace PDE_DATA() with pde_data(): https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=359745d78351c6f5442435f81549f0207ece28aa rename complete_and_exit to kthread_complete_and_exit: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=cead18552660702a4a46f58e65188fe5f36e9dfe use eth_hw_addr_set: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=5b6d5affd27486ec9152a66df1741cf67782712a
This commit is contained in:
parent
0958f294f9
commit
13cc38399e
@ -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 */
|
||||
#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 */
|
||||
#endif
|
||||
|
||||
#if 0
|
||||
if (rtw_is_hw_init_completed(padapter)) {
|
||||
@ -1628,7 +1632,11 @@ int rtw_os_ndev_register(_adapter *adapter, const char *name)
|
||||
/* alloc netdev 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);
|
||||
#endif
|
||||
#if defined(CONFIG_NET_NS)
|
||||
dev_net_set(ndev, wiphy_net(adapter_to_wiphy(adapter)));
|
||||
#endif //defined(CONFIG_NET_NS)
|
||||
|
@ -45,6 +45,10 @@ inline struct proc_dir_entry *get_rtw_drv_proc(void)
|
||||
#define get_proc_net init_net.proc_net
|
||||
#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)
|
||||
{
|
||||
struct proc_dir_entry *entry;
|
||||
|
@ -1268,8 +1268,12 @@ u32 _rtw_down_sema(_sema *sema)
|
||||
inline void thread_exit(_completion *comp)
|
||||
{
|
||||
#ifdef PLATFORM_LINUX
|
||||
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 17, 0))
|
||||
kthread_complete_and_exit(comp, 0);
|
||||
#else
|
||||
complete_and_exit(comp, 0);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef PLATFORM_FREEBSD
|
||||
printf("%s", "RTKTHREAD_exit");
|
||||
|
Loading…
x
Reference in New Issue
Block a user