mirror of
https://github.com/openwrt/openwrt.git
synced 2024-12-28 09:39:00 +00:00
a07566ead8
Fix more compilation error with kernel 6.1 and make it possible to compile. Multiple fix are done due to kernel bump: - PDE_DATA (now deprecated) to pde_data - dev_addr now const and require some cast - prandom_u32 (now deprecated) to get_random_u32 Also other minor fix for always true condition and tasklet type cast not compatible. Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
57 lines
2.3 KiB
Diff
57 lines
2.3 KiB
Diff
From 51ab9d6a959de87206731f941b1df39e5c5d63ea Mon Sep 17 00:00:00 2001
|
|
From: Christian Marangi <ansuelsmth@gmail.com>
|
|
Date: Sun, 30 Jul 2023 11:21:49 +0200
|
|
Subject: [PATCH 4/5] treewide: drop const from dev_addr
|
|
|
|
dev_addr is not const and conflict with memcpy function. Fix compilation
|
|
warning by casting dev_addr to void*.
|
|
|
|
This operation is safe as this is done before netdev register.
|
|
|
|
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
|
|
---
|
|
os_dep/linux/os_intfs.c | 6 +++---
|
|
os_dep/osdep_service.c | 2 +-
|
|
2 files changed, 4 insertions(+), 4 deletions(-)
|
|
|
|
--- a/os_dep/linux/os_intfs.c
|
|
+++ b/os_dep/linux/os_intfs.c
|
|
@@ -1885,7 +1885,7 @@ int _netdev_if2_open(struct net_device *
|
|
|
|
_rtw_memcpy(padapter->eeprompriv.mac_addr, mac, ETH_ALEN);
|
|
rtw_init_wifidirect_addrs(padapter, padapter->eeprompriv.mac_addr, padapter->eeprompriv.mac_addr);
|
|
- _rtw_memcpy(pnetdev->dev_addr, padapter->eeprompriv.mac_addr, ETH_ALEN);
|
|
+ _rtw_memcpy((void *)pnetdev->dev_addr, padapter->eeprompriv.mac_addr, ETH_ALEN);
|
|
}
|
|
#endif //CONFIG_PLATFORM_INTEL_BYT
|
|
|
|
@@ -2254,7 +2254,7 @@ static int _rtw_drv_register_netdev(_ada
|
|
/* alloc netdev name */
|
|
rtw_init_netdev_name(pnetdev, name);
|
|
|
|
- _rtw_memcpy(pnetdev->dev_addr, padapter->eeprompriv.mac_addr, ETH_ALEN);
|
|
+ _rtw_memcpy((void *)pnetdev->dev_addr, padapter->eeprompriv.mac_addr, ETH_ALEN);
|
|
|
|
/* Tell the network stack we exist */
|
|
if (register_netdev(pnetdev) != 0) {
|
|
@@ -2334,7 +2334,7 @@ int _netdev_open(struct net_device *pnet
|
|
#ifdef CONFIG_PLATFORM_INTEL_BYT
|
|
rtw_macaddr_cfg(padapter->eeprompriv.mac_addr);
|
|
rtw_init_wifidirect_addrs(padapter, padapter->eeprompriv.mac_addr, padapter->eeprompriv.mac_addr);
|
|
- _rtw_memcpy(pnetdev->dev_addr, padapter->eeprompriv.mac_addr, ETH_ALEN);
|
|
+ _rtw_memcpy((void *)pnetdev->dev_addr, padapter->eeprompriv.mac_addr, ETH_ALEN);
|
|
#endif //CONFIG_PLATFORM_INTEL_BYT
|
|
|
|
padapter->bDriverStopped = _FALSE;
|
|
--- a/os_dep/osdep_service.c
|
|
+++ b/os_dep/osdep_service.c
|
|
@@ -2209,7 +2209,7 @@ int rtw_change_ifname(_adapter *padapter
|
|
|
|
rtw_init_netdev_name(pnetdev, ifname);
|
|
|
|
- _rtw_memcpy(pnetdev->dev_addr, padapter->eeprompriv.mac_addr, ETH_ALEN);
|
|
+ _rtw_memcpy((void *)pnetdev->dev_addr, padapter->eeprompriv.mac_addr, ETH_ALEN);
|
|
|
|
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,26))
|
|
if(!rtnl_is_locked())
|