mirror of
https://github.com/brektrou/rtl8821CU.git
synced 2025-12-26 04:36:18 +08:00
parent
ef3ff12118
commit
8b6faa20db
@ -1216,7 +1216,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)) {
|
||||||
@ -1653,7 +1657,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
|
||||||
|
|
||||||
/* Tell the network stack we exist */
|
/* Tell the network stack we exist */
|
||||||
|
|
||||||
|
|||||||
@ -37,6 +37,8 @@ inline struct proc_dir_entry *get_rtw_drv_proc(void)
|
|||||||
#if (LINUX_VERSION_CODE < KERNEL_VERSION(3, 10, 0))
|
#if (LINUX_VERSION_CODE < KERNEL_VERSION(3, 10, 0))
|
||||||
#define PDE_DATA(inode) PDE((inode))->data
|
#define PDE_DATA(inode) PDE((inode))->data
|
||||||
#define proc_get_parent_data(inode) PDE((inode))->parent->data
|
#define proc_get_parent_data(inode) PDE((inode))->parent->data
|
||||||
|
#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 17, 0))
|
||||||
|
#define PDE_DATA(inode) pde_data(inode)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if (LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 24))
|
#if (LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 24))
|
||||||
|
|||||||
@ -1294,8 +1294,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");
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user