mirror of
https://github.com/lwfinger/rtl8188eu.git
synced 2025-05-17 10:33:06 +00:00
rtl8188eu: Fix another API change for kernel 5.17
Struct net_device has been constantified, thus it is no longer OK to drirectly write the dev_addr, but use dev_addr_set() instead. Starting with kernel 5.17, improper usage generates a warning. Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
This commit is contained in:
parent
5b67bc47ea
commit
bf23ec4903
2 changed files with 12 additions and 1 deletions
|
@ -9418,7 +9418,11 @@ static int rtw_mp_efuse_set(struct net_device *dev,
|
|||
rtw_hal_read_chip_info(padapter);
|
||||
/* set mac addr*/
|
||||
rtw_macaddr_cfg(adapter_mac_addr(padapter), get_hal_mac_addr(padapter));
|
||||
#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 15, 0)
|
||||
memcpy((void *)padapter->pnetdev->dev_addr, get_hal_mac_addr(padapter), ETH_ALEN); /* set mac addr to net_device */
|
||||
#else
|
||||
dev_addr_set(padapter->pnetdev, get_hal_mac_addr(padapter));
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_P2P
|
||||
rtw_init_wifidirect_addrs(padapter, adapter_mac_addr(padapter), adapter_mac_addr(padapter));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue