rtl8188eu: Fix build for API changes in kernel 5.17

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
This commit is contained in:
Larry Finger 2022-02-03 10:21:57 -06:00
parent 5cff05afbb
commit 775137f273
4 changed files with 10 additions and 3 deletions

View file

@ -54,7 +54,7 @@ int rtl8188eu_init_recv_priv(struct adapter *padapter)
struct recv_buf *precvbuf; struct recv_buf *precvbuf;
tasklet_init(&precvpriv->recv_tasklet, tasklet_init(&precvpriv->recv_tasklet,
(void(*)(unsigned long))rtl8188eu_recv_tasklet, (void *)rtl8188eu_recv_tasklet,
(unsigned long)padapter); (unsigned long)padapter);
/* init recv_buf */ /* init recv_buf */

View file

@ -30,7 +30,7 @@ s32 rtl8188eu_init_xmit_priv(struct adapter *adapt)
struct xmit_priv *pxmitpriv = &adapt->xmitpriv; struct xmit_priv *pxmitpriv = &adapt->xmitpriv;
tasklet_init(&pxmitpriv->xmit_tasklet, tasklet_init(&pxmitpriv->xmit_tasklet,
(void(*)(unsigned long))rtl8188eu_xmit_tasklet, (void *)rtl8188eu_xmit_tasklet,
(unsigned long)adapt); (unsigned long)adapt);
return _SUCCESS; return _SUCCESS;
} }

View file

@ -382,8 +382,11 @@ int rtw_change_ifname(struct adapter *padapter, const char *ifname)
rtw_init_netdev_name(pnetdev, ifname); rtw_init_netdev_name(pnetdev, ifname);
#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 17, 0)
memcpy(pnetdev->dev_addr, padapter->eeprompriv.mac_addr, ETH_ALEN); memcpy(pnetdev->dev_addr, padapter->eeprompriv.mac_addr, ETH_ALEN);
#else
dev_addr_set(pnetdev, padapter->eeprompriv.mac_addr);
#endif
if (!rtnl_is_locked()) if (!rtnl_is_locked())
ret = register_netdev(pnetdev); ret = register_netdev(pnetdev);
else else

View file

@ -691,7 +691,11 @@ static struct adapter *rtw_usb_if1_init(struct dvobj_priv *dvobj,
rtw_init_wifidirect_addrs(padapter, padapter->eeprompriv.mac_addr, rtw_init_wifidirect_addrs(padapter, padapter->eeprompriv.mac_addr,
padapter->eeprompriv.mac_addr); padapter->eeprompriv.mac_addr);
#endif #endif
#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 17, 0)
memcpy(pnetdev->dev_addr, padapter->eeprompriv.mac_addr, ETH_ALEN); memcpy(pnetdev->dev_addr, padapter->eeprompriv.mac_addr, ETH_ALEN);
#else
dev_addr_set(pnetdev, padapter->eeprompriv.mac_addr);
#endif
DBG_88E("MAC Address from pnetdev->dev_addr = %pM\n", DBG_88E("MAC Address from pnetdev->dev_addr = %pM\n",
pnetdev->dev_addr); pnetdev->dev_addr);