aic8800: update to latest version

This commit is contained in:
aiamadeus 2025-07-02 20:09:18 +08:00
parent 13b270ef54
commit 698bacbc5c
9 changed files with 80 additions and 126 deletions

View File

@ -9,10 +9,10 @@ PKG_NAME:=aic8800
PKG_RELEASE:=1
PKG_SOURCE_PROTO:=git
PKG_SOURCE_DATE:=2024-06-20
PKG_SOURCE_DATE:=2025-07-02
PKG_SOURCE_URL:=https://github.com/radxa-pkg/aic8800.git
PKG_SOURCE_VERSION:=8ad987876a6220fffb40a755e0454250ce2c5fdd
PKG_MIRROR_HASH:=4a22e28a4341eb7516f03ea7e6c1c0523013e1aaf72c17428eb3749c8f553856
PKG_SOURCE_VERSION:=4e9cd23d44c7fedb845bbeaaa53675e90aed57e7
PKG_MIRROR_HASH:=a09cb200d2af8790f5ce67c81ed93e03be364bc89d3a6fd7b3fd5a93f23fd141
ifeq ($(BUILD_VARIANT),sdio)
MAKE_PATH:=src/SDIO/driver_fw/driver/aic8800

View File

@ -1,6 +1,6 @@
--- a/src/SDIO/driver_fw/driver/aic8800/aic8800_fdrv/rwnx_main.c
+++ b/src/SDIO/driver_fw/driver/aic8800/aic8800_fdrv/rwnx_main.c
@@ -2997,7 +2997,7 @@ static struct rwnx_vif *rwnx_interface_a
@@ -1579,7 +1579,7 @@ static struct rwnx_vif *rwnx_interface_a
vif->ap.generation = 0;
vif->ap.mesh_pm = NL80211_MESH_POWER_ACTIVE;
vif->ap.next_mesh_pm = NL80211_MESH_POWER_ACTIVE;
@ -9,7 +9,7 @@
case NL80211_IFTYPE_AP:
INIT_LIST_HEAD(&vif->ap.sta_list);
memset(&vif->ap.bcn, 0, sizeof(vif->ap.bcn));
@@ -3414,7 +3414,7 @@ static int rwnx_cfg80211_change_iface(st
@@ -1996,7 +1996,7 @@ static int rwnx_cfg80211_change_iface(st
INIT_LIST_HEAD(&vif->ap.proxy_list);
vif->ap.create_path = false;
vif->ap.generation = 0;
@ -18,7 +18,7 @@
case NL80211_IFTYPE_AP:
case NL80211_IFTYPE_P2P_GO:
INIT_LIST_HEAD(&vif->ap.sta_list);
@@ -5333,6 +5333,7 @@ static int rwnx_cfg80211_mgmt_tx(struct
@@ -3952,6 +3952,7 @@ static int rwnx_cfg80211_mgmt_tx(struct
switch (RWNX_VIF_TYPE(rwnx_vif)) {
case NL80211_IFTYPE_AP_VLAN:
rwnx_vif = rwnx_vif->ap_vlan.master;
@ -26,7 +26,7 @@
case NL80211_IFTYPE_AP:
case NL80211_IFTYPE_P2P_GO:
case NL80211_IFTYPE_MESH_POINT:
@@ -5645,7 +5646,7 @@ rwnx_cfg80211_tdls_mgmt(struct wiphy *wi
@@ -4261,7 +4262,7 @@ rwnx_cfg80211_tdls_mgmt(struct wiphy *wi
printk("%s: only one TDLS link is supported!\n", __func__);
status_code = WLAN_STATUS_REQUEST_DECLINED;
}
@ -35,7 +35,7 @@
case WLAN_TDLS_SETUP_REQUEST:
case WLAN_TDLS_TEARDOWN:
case WLAN_TDLS_DISCOVERY_REQUEST:
@@ -5965,6 +5966,7 @@ static int rwnx_fill_station_info(struct
@@ -4594,6 +4595,7 @@ static int rwnx_fill_station_info(struct
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 19, 0)
case FORMATMOD_HE_MU:
sinfo->rxrate.he_ru_alloc = rx_vect1->he.ru_size;
@ -65,36 +65,17 @@
add_if_req_param->type = MM_AP;
--- a/src/SDIO/driver_fw/driver/aic8800/aic8800_fdrv/rwnx_tdls.c
+++ b/src/SDIO/driver_fw/driver/aic8800/aic8800_fdrv/rwnx_tdls.c
@@ -255,17 +255,24 @@ rwnx_add_wmm_info_ie(struct sk_buff *skb
static u8 rwnx_ac_from_wmm(int ac)
{
@@ -257,6 +257,7 @@ static u8 rwnx_ac_from_wmm(int ac)
switch (ac) {
- default:
- WARN_ON_ONCE(1);
default:
WARN_ON_ONCE(1);
+ fallthrough;
case 0:
return AC_BE;
+ break;
case 1:
return AC_BK;
+ break;
case 2:
return AC_VI;
+ break;
case 3:
return AC_VO;
+ break;
+ default:
+ WARN_ON_ONCE(1);
+ break;
}
+
+ return 0;
}
static void
--- a/src/SDIO/driver_fw/driver/aic8800/aic8800_fdrv/rwnx_tx.c
+++ b/src/SDIO/driver_fw/driver/aic8800/aic8800_fdrv/rwnx_tx.c
@@ -325,6 +325,7 @@ u16 rwnx_select_txq(struct rwnx_vif *rwn
@@ -332,6 +332,7 @@ u16 rwnx_select_txq(struct rwnx_vif *rwn
/* AP_VLAN interface is not used for a 4A STA,
fallback searching sta amongs all AP's clients */
rwnx_vif = rwnx_vif->ap_vlan.master;

View File

@ -1,6 +1,6 @@
--- a/src/SDIO/driver_fw/driver/aic8800/aic8800_fdrv/rwnx_main.c
+++ b/src/SDIO/driver_fw/driver/aic8800/aic8800_fdrv/rwnx_main.c
@@ -781,7 +781,7 @@ static void rwnx_csa_finish(struct work_
@@ -785,7 +785,7 @@ static void rwnx_csa_finish(struct work_
} else
rwnx_txq_vif_stop(vif, RWNX_TXQ_STOP_CHAN, rwnx_hw);
spin_unlock_bh(&rwnx_hw->cb_lock);
@ -9,7 +9,7 @@
cfg80211_ch_switch_notify(vif->ndev, &csa->chandef, 0, 0);
#elif (LINUX_VERSION_CODE >= HIGH_KERNEL_VERSION)
cfg80211_ch_switch_notify(vif->ndev, &csa->chandef, 0);
@@ -5561,7 +5561,7 @@ int rwnx_cfg80211_channel_switch (struct
@@ -4177,7 +4177,7 @@ int rwnx_cfg80211_channel_switch (struct
goto end;
} else {
INIT_WORK(&csa->work, rwnx_csa_finish);
@ -18,7 +18,7 @@
cfg80211_ch_switch_started_notify(dev, &csa->chandef, 0, params->count, false, 0);
#elif LINUX_VERSION_CODE >= HIGH_KERNEL_VERSION2
cfg80211_ch_switch_started_notify(dev, &csa->chandef, 0, params->count, false);
@@ -5590,6 +5590,9 @@ rwnx_cfg80211_tdls_mgmt(struct wiphy *wi
@@ -4206,6 +4206,9 @@ rwnx_cfg80211_tdls_mgmt(struct wiphy *wi
#else
u8 *peer,
#endif
@ -30,7 +30,7 @@
u16 status_code,
--- a/src/SDIO/driver_fw/driver/aic8800/aic8800_fdrv/rwnx_mod_params.c
+++ b/src/SDIO/driver_fw/driver/aic8800/aic8800_fdrv/rwnx_mod_params.c
@@ -1728,7 +1728,9 @@ void rwnx_custregd(struct rwnx_hw *rwnx_
@@ -1763,7 +1763,9 @@ void rwnx_custregd(struct rwnx_hw *rwnx_
if (!rwnx_hw->mod_params->custregd)
return;

View File

@ -7,7 +7,7 @@
-int aicwf_dbg_level_bsp = LOGERROR|LOGINFO|LOGDEBUG|LOGTRACE;
+int aicwf_dbg_level_bsp = LOGDATA;
static struct platform_device *aicbsp_pdev;
struct semaphore aicbsp_probe_semaphore;
--- a/src/SDIO/driver_fw/driver/aic8800/aic8800_fdrv/rwnx_main.c
+++ b/src/SDIO/driver_fw/driver/aic8800/aic8800_fdrv/rwnx_main.c
@ -20,3 +20,14 @@
module_param(aicwf_dbg_level, int, 0660);
int testmode = 0;
char aic_fw_path[200];
--- a/src/SDIO/driver_fw/driver/aic8800/aic8800_fdrv/rwnx_platform.c
+++ b/src/SDIO/driver_fw/driver/aic8800/aic8800_fdrv/rwnx_platform.c
@@ -792,7 +792,7 @@ s8_l get_txpwr_max(s8_l power)
}
}
- printk("%s:txpwr_max:%d \r\n",__func__,power);
+ //printk("%s:txpwr_max:%d \r\n",__func__,power);
return power;
}

View File

@ -1,20 +0,0 @@
--- a/src/SDIO/driver_fw/driver/aic8800/aic8800_bsp/aic_bsp_driver.c
+++ b/src/SDIO/driver_fw/driver/aic8800/aic8800_bsp/aic_bsp_driver.c
@@ -16,6 +16,7 @@
#include <linux/delay.h>
#include <linux/vmalloc.h>
#include <linux/firmware.h>
+#include <linux/string.h>
#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 12, 0)
#include <linux/hardirq.h>
@@ -1364,7 +1365,8 @@ int aicbt_patch_info_unpack(struct aicbt
patch_info->info_len = head_t->len;
if(patch_info->info_len == 0)
return 0;
- memcpy(&patch_info->adid_addrinf, head_t->data, patch_info->info_len * sizeof(uint32_t) * 2);
+ unsafe_memcpy(&patch_info->adid_addrinf, head_t->data,
+ patch_info->info_len * sizeof(uint32_t) * 2, /* justification */);
}
return 0;
}

View File

@ -1,6 +1,6 @@
--- a/src/USB/driver_fw/drivers/aic8800/aic8800_fdrv/rwnx_main.c
+++ b/src/USB/driver_fw/drivers/aic8800/aic8800_fdrv/rwnx_main.c
@@ -3194,7 +3194,7 @@ static struct rwnx_vif *rwnx_interface_a
@@ -1854,7 +1854,7 @@ static struct rwnx_vif *rwnx_interface_a
vif->ap.generation = 0;
vif->ap.mesh_pm = NL80211_MESH_POWER_ACTIVE;
vif->ap.next_mesh_pm = NL80211_MESH_POWER_ACTIVE;
@ -9,7 +9,7 @@
case NL80211_IFTYPE_AP:
INIT_LIST_HEAD(&vif->ap.sta_list);
memset(&vif->ap.bcn, 0, sizeof(vif->ap.bcn));
@@ -3649,7 +3649,7 @@ static int rwnx_cfg80211_change_iface(st
@@ -2309,7 +2309,7 @@ static int rwnx_cfg80211_change_iface(st
INIT_LIST_HEAD(&vif->ap.proxy_list);
vif->ap.create_path = false;
vif->ap.generation = 0;
@ -18,7 +18,7 @@
case NL80211_IFTYPE_AP:
case NL80211_IFTYPE_P2P_GO:
INIT_LIST_HEAD(&vif->ap.sta_list);
@@ -5795,6 +5795,7 @@ static int rwnx_cfg80211_mgmt_tx(struct
@@ -4459,6 +4459,7 @@ static int rwnx_cfg80211_mgmt_tx(struct
switch (RWNX_VIF_TYPE(rwnx_vif)) {
case NL80211_IFTYPE_AP_VLAN:
rwnx_vif = rwnx_vif->ap_vlan.master;
@ -26,7 +26,7 @@
case NL80211_IFTYPE_AP:
case NL80211_IFTYPE_P2P_GO:
case NL80211_IFTYPE_MESH_POINT:
@@ -6456,6 +6457,7 @@ static int rwnx_fill_station_info(struct
@@ -5132,6 +5133,7 @@ static int rwnx_fill_station_info(struct
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 19, 0)
case FORMATMOD_HE_MU:
sinfo->rxrate.he_ru_alloc = rx_vect1->he.ru_size;
@ -34,9 +34,20 @@
case FORMATMOD_HE_SU:
case FORMATMOD_HE_ER:
sinfo->rxrate.flags = RATE_INFO_FLAGS_HE_MCS;
--- a/src/USB/driver_fw/drivers/aic8800/aic8800_fdrv/rwnx_mod_params.c
+++ b/src/USB/driver_fw/drivers/aic8800/aic8800_fdrv/rwnx_mod_params.c
@@ -936,7 +936,7 @@ static void rwnx_set_vht_capa(struct rwn
if(rwnx_hw->usbdev->chipid <= PRODUCT_ID_AIC8800D81)
nss = 1;
- band_2GHz->vht_cap.vht_supported = true;
+ band_2GHz->vht_cap.vht_supported = true;
if (rwnx_hw->mod_params->sgi80)
band_2GHz->vht_cap.cap |= IEEE80211_VHT_CAP_SHORT_GI_80;
if (rwnx_hw->mod_params->stbc_on)
--- a/src/USB/driver_fw/drivers/aic8800/aic8800_fdrv/rwnx_msg_tx.c
+++ b/src/USB/driver_fw/drivers/aic8800/aic8800_fdrv/rwnx_msg_tx.c
@@ -614,7 +614,7 @@ int rwnx_send_add_if(struct rwnx_hw *rwn
@@ -613,7 +613,7 @@ int rwnx_send_add_if(struct rwnx_hw *rwn
//case NL80211_IFTYPE_P2P_DEVICE:
case NL80211_IFTYPE_P2P_CLIENT:
add_if_req_param->p2p = true;
@ -45,7 +56,7 @@
#endif /* CONFIG_RWNX_FULLMAC */
case NL80211_IFTYPE_STATION:
add_if_req_param->type = MM_STA;
@@ -627,7 +627,7 @@ int rwnx_send_add_if(struct rwnx_hw *rwn
@@ -626,7 +626,7 @@ int rwnx_send_add_if(struct rwnx_hw *rwn
#ifdef CONFIG_RWNX_FULLMAC
case NL80211_IFTYPE_P2P_GO:
add_if_req_param->p2p = true;
@ -54,35 +65,24 @@
#endif /* CONFIG_RWNX_FULLMAC */
case NL80211_IFTYPE_AP:
add_if_req_param->type = MM_AP;
@@ -1443,6 +1443,7 @@ int rwnx_send_vendor_hwconfig_req(struct
printk("get_chip_temp err=%d\n", error);
}
}
+ break;
case CUSTOMIZED_FREQ_REQ:
/* Build the CUSTOMIZED_FREQ_REQ message */
req5 = rwnx_msg_zalloc(MM_SET_VENDOR_HWCONFIG_REQ, TASK_MM, DRV_TASK_ID, sizeof(struct mm_set_customized_freq_req));
--- a/src/USB/driver_fw/drivers/aic8800/aic8800_fdrv/rwnx_tdls.c
+++ b/src/USB/driver_fw/drivers/aic8800/aic8800_fdrv/rwnx_tdls.c
@@ -261,17 +261,24 @@ rwnx_add_wmm_info_ie(struct sk_buff *skb
static u8 rwnx_ac_from_wmm(int ac)
{
@@ -263,6 +263,7 @@ static u8 rwnx_ac_from_wmm(int ac)
switch (ac) {
- default:
- WARN_ON_ONCE(1);
default:
WARN_ON_ONCE(1);
+ fallthrough;
case 0:
return AC_BE;
+ break;
case 1:
return AC_BK;
+ break;
case 2:
return AC_VI;
+ break;
case 3:
return AC_VO;
+ break;
+ default:
+ WARN_ON_ONCE(1);
+ break;
}
+
+ return 0;
}
static void
--- a/src/USB/driver_fw/drivers/aic8800/aic8800_fdrv/rwnx_tx.c
+++ b/src/USB/driver_fw/drivers/aic8800/aic8800_fdrv/rwnx_tx.c
@@ -328,6 +328,7 @@ u16 rwnx_select_txq(struct rwnx_vif *rwn

View File

@ -1,6 +1,6 @@
--- a/src/USB/driver_fw/drivers/aic8800/aic8800_fdrv/rwnx_main.c
+++ b/src/USB/driver_fw/drivers/aic8800/aic8800_fdrv/rwnx_main.c
@@ -1072,7 +1072,7 @@ static void rwnx_csa_finish(struct work_
@@ -1073,7 +1073,7 @@ static void rwnx_csa_finish(struct work_
} else
rwnx_txq_vif_stop(vif, RWNX_TXQ_STOP_CHAN, rwnx_hw);
spin_unlock_bh(&rwnx_hw->cb_lock);
@ -9,7 +9,25 @@
cfg80211_ch_switch_notify(vif->ndev, &csa->chandef, 0, 0);
#elif (LINUX_VERSION_CODE >= HIGH_KERNEL_VERSION)
cfg80211_ch_switch_notify(vif->ndev, &csa->chandef, 0);
@@ -6045,7 +6045,7 @@ int rwnx_cfg80211_channel_switch(struct
@@ -3727,7 +3727,7 @@ static int rwnx_cfg80211_start_ap(struct
* @change_beacon: Change the beacon parameters for an access point mode
* interface. This should reject the call when AP mode wasn't started.
*/
-#if LINUX_VERSION_CODE > KERNEL_VERSION(6, 7, 0)
+#if LINUX_VERSION_CODE > KERNEL_VERSION(6, 7, 0) && !defined(BUILD_OPENWRT)
static int rwnx_cfg80211_change_beacon(struct wiphy *wiphy, struct net_device *dev,
struct cfg80211_ap_update *info)
#else
@@ -3747,7 +3747,7 @@ static int rwnx_cfg80211_change_beacon(s
elem.dma_addr = 0;
// Build the beacon
-#if LINUX_VERSION_CODE > KERNEL_VERSION(6, 7, 0)
+#if LINUX_VERSION_CODE > KERNEL_VERSION(6, 7, 0) && !defined(BUILD_OPENWRT)
buf = rwnx_build_bcn(bcn, &info->beacon);
#else
buf = rwnx_build_bcn(bcn, info);
@@ -4709,7 +4709,7 @@ int rwnx_cfg80211_channel_switch(struct
goto end;
} else {
INIT_WORK(&csa->work, rwnx_csa_finish);
@ -20,7 +38,7 @@
cfg80211_ch_switch_started_notify(dev, &csa->chandef, 0, params->count, false);
--- a/src/USB/driver_fw/drivers/aic8800/aic8800_fdrv/rwnx_mod_params.c
+++ b/src/USB/driver_fw/drivers/aic8800/aic8800_fdrv/rwnx_mod_params.c
@@ -1752,7 +1752,9 @@ void rwnx_custregd(struct rwnx_hw *rwnx_
@@ -1833,7 +1833,9 @@ void rwnx_custregd(struct rwnx_hw *rwnx_
// registration (in rwnx_set_wiphy_params()), so nothing has to be done here
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 0, 0)
@ -30,19 +48,3 @@
wiphy->regulatory_flags |= REGULATORY_WIPHY_SELF_MANAGED;
if (!rwnx_hw->mod_params->custregd)
--- a/src/USB/driver_fw/drivers/aic8800/aic8800_fdrv/rwnx_rx.c
+++ b/src/USB/driver_fw/drivers/aic8800/aic8800_fdrv/rwnx_rx.c
@@ -464,8 +464,13 @@ static bool rwnx_rx_data_skb(struct rwnx
if (amsdu) {
int count;
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 3, 0) || defined(BUILD_OPENWRT)
+ ieee80211_amsdu_to_8023s(skb, &list, rwnx_vif->ndev->dev_addr,
+ RWNX_VIF_TYPE(rwnx_vif), 0, NULL, NULL, false);
+#else
ieee80211_amsdu_to_8023s(skb, &list, rwnx_vif->ndev->dev_addr,
RWNX_VIF_TYPE(rwnx_vif), 0, NULL, NULL);
+#endif
count = skb_queue_len(&list);
if (count > ARRAY_SIZE(rwnx_hw->stats.amsdus_rx))

View File

@ -1,6 +1,6 @@
--- a/src/USB/driver_fw/drivers/aic8800/aic8800_fdrv/rwnx_main.c
+++ b/src/USB/driver_fw/drivers/aic8800/aic8800_fdrv/rwnx_main.c
@@ -525,7 +525,7 @@ extern uint8_t p2p_working;
@@ -525,7 +525,7 @@ static const int rwnx_hwq2uapsd[NL80211_
struct semaphore aicwf_deinit_sem;
atomic_t aicwf_deinit_atomic;

View File

@ -1,20 +0,0 @@
--- a/src/USB/driver_fw/drivers/aic8800/aic_load_fw/aicbluetooth.c
+++ b/src/USB/driver_fw/drivers/aic8800/aic_load_fw/aicbluetooth.c
@@ -8,6 +8,7 @@
#ifdef CONFIG_USE_FW_REQUEST
#include <linux/firmware.h>
#endif
+#include <linux/string.h>
//Parser state
#define INIT 0
@@ -1227,7 +1228,8 @@ int aicbt_patch_info_unpack(struct aicbt
patch_info->info_len = head_t->len;
if(patch_info->info_len == 0)
return 0;
- memcpy(&patch_info->adid_addrinf, head_t->data, patch_info->info_len * sizeof(uint32_t) * 2);
+ unsafe_memcpy(&patch_info->adid_addrinf, head_t->data,
+ patch_info->info_len * sizeof(uint32_t) * 2, /* justification */);
}
return 0;
}