mirror of
https://github.com/coolsnowwolf/lede.git
synced 2025-04-16 04:13:31 +00:00
package: add driver for aic8800 sdio wifi
This commit is contained in:
parent
6c15bad147
commit
4f9d051c8e
60
package/lean/aic8800/Makefile
Normal file
60
package/lean/aic8800/Makefile
Normal file
@ -0,0 +1,60 @@
|
|||||||
|
# SPDX-License-Identifier: GPL-2.0+
|
||||||
|
#
|
||||||
|
# Copyright (c) 2023-2024 AnYun
|
||||||
|
#
|
||||||
|
|
||||||
|
include $(TOPDIR)/rules.mk
|
||||||
|
|
||||||
|
PKG_NAME:=aic8800
|
||||||
|
PKG_RELEASE:=1
|
||||||
|
|
||||||
|
PKG_SOURCE_PROTO:=git
|
||||||
|
PKG_SOURCE_DATE:=2024-03-04
|
||||||
|
PKG_SOURCE_URL:=https://github.com/radxa-pkg/aic8800.git
|
||||||
|
PKG_SOURCE_VERSION:=6a7ec8536a1688a785740d98ca96a4d00b274c56
|
||||||
|
PKG_MIRROR_HASH:=75bbd6f410089d8301663aebdeeb79027420ec45dd054b5851c408dfeef23776
|
||||||
|
|
||||||
|
MAKE_PATH:=src/SDIO/driver_fw/driver/aic8800
|
||||||
|
PKG_EXTMOD_SUBDIRS:=$(MAKE_PATH)
|
||||||
|
|
||||||
|
include $(INCLUDE_DIR)/kernel.mk
|
||||||
|
include $(INCLUDE_DIR)/package.mk
|
||||||
|
|
||||||
|
define KernelPackage/aic8800
|
||||||
|
SUBMENU:=Wireless Drivers
|
||||||
|
TITLE:=SKI WB800D80S wireless support
|
||||||
|
DEPENDS:=+kmod-mac80211 +kmod-mmc \
|
||||||
|
+@DRIVER_11N_SUPPORT +@DRIVER_11AC_SUPPORT
|
||||||
|
FILES:= \
|
||||||
|
$(PKG_BUILD_DIR)/$(MAKE_PATH)/aic8800_bsp/aic8800_bsp.ko \
|
||||||
|
$(PKG_BUILD_DIR)/$(MAKE_PATH)/aic8800_fdrv/aic8800_fdrv.ko
|
||||||
|
AUTOLOAD:=$(call AutoProbe,aic8800_bsp aic8800_fdrv)
|
||||||
|
MODPARAMS.aic8800_fdrv:=he_on=n
|
||||||
|
endef
|
||||||
|
|
||||||
|
NOSTDINC_FLAGS := \
|
||||||
|
$(KERNEL_NOSTDINC_FLAGS) \
|
||||||
|
-I$(PKG_BUILD_DIR) \
|
||||||
|
-I$(STAGING_DIR)/usr/include/mac80211-backport/uapi \
|
||||||
|
-I$(STAGING_DIR)/usr/include/mac80211-backport \
|
||||||
|
-I$(STAGING_DIR)/usr/include/mac80211/uapi \
|
||||||
|
-I$(STAGING_DIR)/usr/include/mac80211 \
|
||||||
|
-include backport/backport.h
|
||||||
|
|
||||||
|
EXTRA_CFLAGS:= -DBUILD_OPENWRT
|
||||||
|
|
||||||
|
define Build/Compile
|
||||||
|
+$(MAKE) $(PKG_JOBS) -C "$(LINUX_DIR)" \
|
||||||
|
NOSTDINC_FLAGS="$(NOSTDINC_FLAGS)" \
|
||||||
|
EXTRA_CFLAGS="$(EXTRA_CFLAGS)" \
|
||||||
|
$(KERNEL_MAKE_FLAGS) \
|
||||||
|
M="$(PKG_BUILD_DIR)/$(MAKE_PATH)/" \
|
||||||
|
modules
|
||||||
|
endef
|
||||||
|
|
||||||
|
define KernelPackage/aic8800/install
|
||||||
|
$(INSTALL_DIR) $(1)/lib/firmware/aic8800
|
||||||
|
$(CP) $(PKG_BUILD_DIR)/src/SDIO/driver_fw/fw/aic8800D80/* $(1)/lib/firmware/aic8800
|
||||||
|
endef
|
||||||
|
|
||||||
|
$(eval $(call KernelPackage,aic8800))
|
114
package/lean/aic8800/patches/010-fixes-build.patch
Normal file
114
package/lean/aic8800/patches/010-fixes-build.patch
Normal file
@ -0,0 +1,114 @@
|
|||||||
|
--- a/src/SDIO/driver_fw/driver/aic8800/aic8800_fdrv/rwnx_main.c
|
||||||
|
+++ b/src/SDIO/driver_fw/driver/aic8800/aic8800_fdrv/rwnx_main.c
|
||||||
|
@@ -2932,7 +2932,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;
|
||||||
|
- // no break
|
||||||
|
+ fallthrough;
|
||||||
|
case NL80211_IFTYPE_AP:
|
||||||
|
INIT_LIST_HEAD(&vif->ap.sta_list);
|
||||||
|
memset(&vif->ap.bcn, 0, sizeof(vif->ap.bcn));
|
||||||
|
@@ -3349,7 +3349,7 @@ static int rwnx_cfg80211_change_iface(st
|
||||||
|
INIT_LIST_HEAD(&vif->ap.proxy_list);
|
||||||
|
vif->ap.create_path = false;
|
||||||
|
vif->ap.generation = 0;
|
||||||
|
- // no break
|
||||||
|
+ fallthrough;
|
||||||
|
case NL80211_IFTYPE_AP:
|
||||||
|
case NL80211_IFTYPE_P2P_GO:
|
||||||
|
INIT_LIST_HEAD(&vif->ap.sta_list);
|
||||||
|
@@ -5257,6 +5257,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;
|
||||||
|
+ fallthrough;
|
||||||
|
case NL80211_IFTYPE_AP:
|
||||||
|
case NL80211_IFTYPE_P2P_GO:
|
||||||
|
case NL80211_IFTYPE_MESH_POINT:
|
||||||
|
@@ -5569,7 +5570,7 @@ rwnx_cfg80211_tdls_mgmt(struct wiphy *wi
|
||||||
|
printk("%s: only one TDLS link is supported!\n", __func__);
|
||||||
|
status_code = WLAN_STATUS_REQUEST_DECLINED;
|
||||||
|
}
|
||||||
|
- /* fall-through */
|
||||||
|
+ fallthrough;
|
||||||
|
case WLAN_TDLS_SETUP_REQUEST:
|
||||||
|
case WLAN_TDLS_TEARDOWN:
|
||||||
|
case WLAN_TDLS_DISCOVERY_REQUEST:
|
||||||
|
@@ -5889,6 +5890,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;
|
||||||
|
+ fallthrough;
|
||||||
|
case FORMATMOD_HE_SU:
|
||||||
|
case FORMATMOD_HE_ER:
|
||||||
|
sinfo->rxrate.flags = RATE_INFO_FLAGS_HE_MCS;
|
||||||
|
--- a/src/SDIO/driver_fw/driver/aic8800/aic8800_fdrv/rwnx_msg_tx.c
|
||||||
|
+++ b/src/SDIO/driver_fw/driver/aic8800/aic8800_fdrv/rwnx_msg_tx.c
|
||||||
|
@@ -524,7 +524,7 @@ int rwnx_send_add_if (struct rwnx_hw *rw
|
||||||
|
//case NL80211_IFTYPE_P2P_DEVICE:
|
||||||
|
case NL80211_IFTYPE_P2P_CLIENT:
|
||||||
|
add_if_req_param->p2p = true;
|
||||||
|
- // no break
|
||||||
|
+ fallthrough;
|
||||||
|
#endif /* CONFIG_RWNX_FULLMAC */
|
||||||
|
case NL80211_IFTYPE_STATION:
|
||||||
|
add_if_req_param->type = MM_STA;
|
||||||
|
@@ -537,7 +537,7 @@ int rwnx_send_add_if (struct rwnx_hw *rw
|
||||||
|
#ifdef CONFIG_RWNX_FULLMAC
|
||||||
|
case NL80211_IFTYPE_P2P_GO:
|
||||||
|
add_if_req_param->p2p = true;
|
||||||
|
- // no break
|
||||||
|
+ fallthrough;
|
||||||
|
#endif /* CONFIG_RWNX_FULLMAC */
|
||||||
|
case NL80211_IFTYPE_AP:
|
||||||
|
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)
|
||||||
|
{
|
||||||
|
switch (ac) {
|
||||||
|
- default:
|
||||||
|
- WARN_ON_ONCE(1);
|
||||||
|
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
|
||||||
|
/* 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;
|
||||||
|
+ fallthrough;
|
||||||
|
case NL80211_IFTYPE_AP:
|
||||||
|
case NL80211_IFTYPE_P2P_GO:
|
||||||
|
{
|
||||||
|
--- a/src/SDIO/driver_fw/driver/aic8800/aic8800_fdrv/rwnx_txq.c
|
||||||
|
+++ b/src/SDIO/driver_fw/driver/aic8800/aic8800_fdrv/rwnx_txq.c
|
||||||
|
@@ -635,6 +635,7 @@ static inline void rwnx_txq_vif_for_each
|
||||||
|
}
|
||||||
|
case NL80211_IFTYPE_AP_VLAN:
|
||||||
|
rwnx_vif = rwnx_vif->ap_vlan.master;
|
||||||
|
+ fallthrough;
|
||||||
|
case NL80211_IFTYPE_AP:
|
||||||
|
case NL80211_IFTYPE_MESH_POINT:
|
||||||
|
case NL80211_IFTYPE_P2P_GO:
|
12
package/lean/aic8800/patches/020-update-path.patch
Normal file
12
package/lean/aic8800/patches/020-update-path.patch
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
--- a/src/SDIO/driver_fw/driver/aic8800/aic8800_bsp/Makefile
|
||||||
|
+++ b/src/SDIO/driver_fw/driver/aic8800/aic8800_bsp/Makefile
|
||||||
|
@@ -1,7 +1,7 @@
|
||||||
|
CONFIG_SDIO_SUPPORT := y
|
||||||
|
CONFIG_SDIO_PWRCTRL := y
|
||||||
|
-CONFIG_AIC_FW_PATH = "/vendor/etc/firmware"
|
||||||
|
-#CONFIG_AIC_FW_PATH = "/lib/firmware/aic8800"
|
||||||
|
+#CONFIG_AIC_FW_PATH = "/vendor/etc/firmware"
|
||||||
|
+CONFIG_AIC_FW_PATH = "/lib/firmware/aic8800"
|
||||||
|
export CONFIG_AIC_FW_PATH
|
||||||
|
ccflags-y += -DCONFIG_AIC_FW_PATH=\"$(CONFIG_AIC_FW_PATH)\"
|
||||||
|
|
92
package/lean/aic8800/patches/030-wireless-5.15.patch
Normal file
92
package/lean/aic8800/patches/030-wireless-5.15.patch
Normal file
@ -0,0 +1,92 @@
|
|||||||
|
--- a/src/SDIO/driver_fw/driver/aic8800/aic8800_fdrv/rwnx_compat.h
|
||||||
|
+++ b/src/SDIO/driver_fw/driver/aic8800/aic8800_fdrv/rwnx_compat.h
|
||||||
|
@@ -52,7 +52,7 @@
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 15, 60)
|
||||||
|
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 15, 60) || defined(BUILD_OPENWRT)
|
||||||
|
#define IEEE80211_MAX_AMPDU_BUF IEEE80211_MAX_AMPDU_BUF_HE
|
||||||
|
#define IEEE80211_HE_PHY_CAP6_TRIG_MU_BEAMFORMER_FB IEEE80211_HE_PHY_CAP6_TRIG_MU_BEAMFORMING_PARTIAL_BW_FB
|
||||||
|
#define IEEE80211_HE_PHY_CAP6_TRIG_SU_BEAMFORMER_FB IEEE80211_HE_PHY_CAP6_TRIG_SU_BEAMFORMING_FB
|
||||||
|
--- a/src/SDIO/driver_fw/driver/aic8800/aic8800_fdrv/rwnx_main.c
|
||||||
|
+++ b/src/SDIO/driver_fw/driver/aic8800/aic8800_fdrv/rwnx_main.c
|
||||||
|
@@ -2998,7 +2998,7 @@ static struct rwnx_vif *rwnx_interface_a
|
||||||
|
} else
|
||||||
|
vif->use_4addr = false;
|
||||||
|
|
||||||
|
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 11, 0)
|
||||||
|
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 11, 0) || defined(BUILD_OPENWRT)
|
||||||
|
if (cfg80211_register_netdevice(ndev))
|
||||||
|
#else
|
||||||
|
if (register_netdevice(ndev))
|
||||||
|
@@ -3271,7 +3271,7 @@ static int rwnx_cfg80211_del_iface(struc
|
||||||
|
|
||||||
|
if (dev->reg_state == NETREG_REGISTERED) {
|
||||||
|
/* Will call rwnx_close if interface is UP */
|
||||||
|
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 11, 0)
|
||||||
|
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 11, 0) || defined(BUILD_OPENWRT)
|
||||||
|
cfg80211_unregister_netdevice(dev);
|
||||||
|
#else
|
||||||
|
unregister_netdevice(dev);
|
||||||
|
--- 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
|
||||||
|
@@ -1312,7 +1312,7 @@ static void rwnx_set_he_capa(struct rwnx
|
||||||
|
if (rwnx_hw->mod_params->stbc_on)
|
||||||
|
he_cap->he_cap_elem.phy_cap_info[2] |= IEEE80211_HE_PHY_CAP2_STBC_RX_UNDER_80MHZ;
|
||||||
|
|
||||||
|
- #if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 13, 0)
|
||||||
|
+ #if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 13, 0) || defined(BUILD_OPENWRT)
|
||||||
|
he_cap->he_cap_elem.phy_cap_info[3] |= IEEE80211_HE_PHY_CAP3_DCM_MAX_CONST_RX_16_QAM |
|
||||||
|
IEEE80211_HE_PHY_CAP3_DCM_MAX_RX_NSS_1 |
|
||||||
|
IEEE80211_HE_PHY_CAP3_RX_PARTIAL_BW_SU_IN_20MHZ_MU;
|
||||||
|
@@ -1330,7 +1330,7 @@ static void rwnx_set_he_capa(struct rwnx
|
||||||
|
}
|
||||||
|
he_cap->he_cap_elem.phy_cap_info[5] |= IEEE80211_HE_PHY_CAP5_NG16_SU_FEEDBACK |
|
||||||
|
IEEE80211_HE_PHY_CAP5_NG16_MU_FEEDBACK;
|
||||||
|
- #if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 13, 0)
|
||||||
|
+ #if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 13, 0) || defined(BUILD_OPENWRT)
|
||||||
|
he_cap->he_cap_elem.phy_cap_info[6] |= IEEE80211_HE_PHY_CAP6_CODEBOOK_SIZE_42_SU |
|
||||||
|
IEEE80211_HE_PHY_CAP6_CODEBOOK_SIZE_75_MU |
|
||||||
|
IEEE80211_HE_PHY_CAP6_TRIG_SU_BEAMFORMING_FB |
|
||||||
|
@@ -1429,7 +1429,7 @@ static void rwnx_set_he_capa(struct rwnx
|
||||||
|
#endif
|
||||||
|
if (rwnx_hw->mod_params->stbc_on)
|
||||||
|
he_cap->he_cap_elem.phy_cap_info[2] |= IEEE80211_HE_PHY_CAP2_STBC_RX_UNDER_80MHZ;
|
||||||
|
- #if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 13, 0)
|
||||||
|
+ #if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 13, 0) || defined(BUILD_OPENWRT)
|
||||||
|
he_cap->he_cap_elem.phy_cap_info[3] |= IEEE80211_HE_PHY_CAP3_DCM_MAX_CONST_RX_16_QAM |
|
||||||
|
IEEE80211_HE_PHY_CAP3_DCM_MAX_RX_NSS_1 |
|
||||||
|
IEEE80211_HE_PHY_CAP3_RX_PARTIAL_BW_SU_IN_20MHZ_MU;
|
||||||
|
@@ -1446,7 +1446,7 @@ static void rwnx_set_he_capa(struct rwnx
|
||||||
|
}
|
||||||
|
he_cap->he_cap_elem.phy_cap_info[5] |= IEEE80211_HE_PHY_CAP5_NG16_SU_FEEDBACK |
|
||||||
|
IEEE80211_HE_PHY_CAP5_NG16_MU_FEEDBACK;
|
||||||
|
- #if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 13, 0)
|
||||||
|
+ #if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 13, 0) || defined(BUILD_OPENWRT)
|
||||||
|
he_cap->he_cap_elem.phy_cap_info[6] |= IEEE80211_HE_PHY_CAP6_CODEBOOK_SIZE_42_SU |
|
||||||
|
IEEE80211_HE_PHY_CAP6_CODEBOOK_SIZE_75_MU |
|
||||||
|
IEEE80211_HE_PHY_CAP6_TRIG_SU_BEAMFORMING_FB |
|
||||||
|
@@ -1732,7 +1732,7 @@ void rwnx_custregd(struct rwnx_hw *rwnx_
|
||||||
|
wiphy->regulatory_flags |= REGULATORY_WIPHY_SELF_MANAGED;
|
||||||
|
|
||||||
|
rtnl_lock();
|
||||||
|
- #if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 12, 0)
|
||||||
|
+ #if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 12, 0) || defined(BUILD_OPENWRT)
|
||||||
|
if (regulatory_set_wiphy_regd_sync(wiphy, getRegdomainFromRwnxDB(wiphy, default_ccode))){
|
||||||
|
wiphy_err(wiphy, "Failed to set custom regdomain\n");
|
||||||
|
}
|
||||||
|
--- a/src/SDIO/driver_fw/driver/aic8800/aic8800_fdrv/rwnx_radar.c
|
||||||
|
+++ b/src/SDIO/driver_fw/driver/aic8800/aic8800_fdrv/rwnx_radar.c
|
||||||
|
@@ -1282,7 +1282,11 @@ static void rwnx_radar_detected(struct r
|
||||||
|
chan_def = rwnx_hw->chanctx_table[rwnx_hw->cur_chanctx].chan_def;
|
||||||
|
|
||||||
|
rwnx_radar_cancel_cac(&rwnx_hw->radar);
|
||||||
|
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 17, 0) || defined(BUILD_OPENWRT)
|
||||||
|
+ __cfg80211_radar_event(rwnx_hw->wiphy, &chan_def, true, GFP_KERNEL);
|
||||||
|
+#else
|
||||||
|
cfg80211_radar_event(rwnx_hw->wiphy, &chan_def, GFP_KERNEL);
|
||||||
|
+#endif
|
||||||
|
|
||||||
|
#endif /* CONFIG_RWNX_FULLMAC */
|
||||||
|
}
|
159
package/lean/aic8800/patches/031-wireless-6.1.patch
Normal file
159
package/lean/aic8800/patches/031-wireless-6.1.patch
Normal file
@ -0,0 +1,159 @@
|
|||||||
|
--- a/src/SDIO/driver_fw/driver/aic8800/aic8800_fdrv/rwnx_main.c
|
||||||
|
+++ b/src/SDIO/driver_fw/driver/aic8800/aic8800_fdrv/rwnx_main.c
|
||||||
|
@@ -776,7 +776,7 @@ static void rwnx_csa_finish(struct work_
|
||||||
|
spin_unlock_bh(&rwnx_hw->cb_lock);
|
||||||
|
#if (LINUX_VERSION_CODE >= HIGH_KERNEL_VERSION3)
|
||||||
|
cfg80211_ch_switch_notify(vif->ndev, &csa->chandef, 0, 0);
|
||||||
|
-#elif (LINUX_VERSION_CODE >= HIGH_KERNEL_VERSION)
|
||||||
|
+#elif (LINUX_VERSION_CODE >= HIGH_KERNEL_VERSION) || defined(BUILD_OPENWRT)
|
||||||
|
cfg80211_ch_switch_notify(vif->ndev, &csa->chandef, 0);
|
||||||
|
#else
|
||||||
|
cfg80211_ch_switch_notify(vif->ndev, &csa->chandef);
|
||||||
|
@@ -3540,7 +3540,7 @@ bool key_flag = false;
|
||||||
|
* when adding a group key.
|
||||||
|
*/
|
||||||
|
static int rwnx_cfg80211_add_key(struct wiphy *wiphy, struct net_device *netdev,
|
||||||
|
-#if (LINUX_VERSION_CODE >= HIGH_KERNEL_VERSION2)
|
||||||
|
+#if (LINUX_VERSION_CODE >= HIGH_KERNEL_VERSION2) || defined(BUILD_OPENWRT)
|
||||||
|
int link_id,
|
||||||
|
#endif
|
||||||
|
u8 key_index, bool pairwise, const u8 *mac_addr,
|
||||||
|
@@ -3637,7 +3637,7 @@ bool key_flag = false;
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
static int rwnx_cfg80211_get_key(struct wiphy *wiphy, struct net_device *netdev,
|
||||||
|
-#if (LINUX_VERSION_CODE >= HIGH_KERNEL_VERSION2)
|
||||||
|
+#if (LINUX_VERSION_CODE >= HIGH_KERNEL_VERSION2) || defined(BUILD_OPENWRT)
|
||||||
|
int link_id,
|
||||||
|
#endif
|
||||||
|
u8 key_index, bool pairwise, const u8 *mac_addr,
|
||||||
|
@@ -3655,7 +3655,7 @@ static int rwnx_cfg80211_get_key(struct
|
||||||
|
* and @key_index, return -ENOENT if the key doesn't exist.
|
||||||
|
*/
|
||||||
|
static int rwnx_cfg80211_del_key(struct wiphy *wiphy, struct net_device *netdev,
|
||||||
|
-#if (LINUX_VERSION_CODE >= HIGH_KERNEL_VERSION2)
|
||||||
|
+#if (LINUX_VERSION_CODE >= HIGH_KERNEL_VERSION2) || defined(BUILD_OPENWRT)
|
||||||
|
int link_id,
|
||||||
|
#endif
|
||||||
|
u8 key_index, bool pairwise, const u8 *mac_addr)
|
||||||
|
@@ -3694,7 +3694,7 @@ static int rwnx_cfg80211_del_key(struct
|
||||||
|
*/
|
||||||
|
static int rwnx_cfg80211_set_default_key(struct wiphy *wiphy,
|
||||||
|
struct net_device *netdev,
|
||||||
|
-#if (LINUX_VERSION_CODE >= HIGH_KERNEL_VERSION2)
|
||||||
|
+#if (LINUX_VERSION_CODE >= HIGH_KERNEL_VERSION2) || defined(BUILD_OPENWRT)
|
||||||
|
int link_id,
|
||||||
|
#endif
|
||||||
|
u8 key_index, bool unicast, bool multicast)
|
||||||
|
@@ -3709,7 +3709,7 @@ static int rwnx_cfg80211_set_default_key
|
||||||
|
*/
|
||||||
|
static int rwnx_cfg80211_set_default_mgmt_key(struct wiphy *wiphy,
|
||||||
|
struct net_device *netdev,
|
||||||
|
-#if (LINUX_VERSION_CODE >= HIGH_KERNEL_VERSION2)
|
||||||
|
+#if (LINUX_VERSION_CODE >= HIGH_KERNEL_VERSION2) || defined(BUILD_OPENWRT)
|
||||||
|
int link_id,
|
||||||
|
#endif
|
||||||
|
u8 key_index)
|
||||||
|
@@ -3796,7 +3796,7 @@ static int rwnx_cfg80211_connect(struct
|
||||||
|
key_params.seq_len = 0;
|
||||||
|
key_params.cipher = sme->crypto.cipher_group;
|
||||||
|
rwnx_cfg80211_add_key(wiphy, dev,
|
||||||
|
-#if (LINUX_VERSION_CODE >= HIGH_KERNEL_VERSION2)
|
||||||
|
+#if (LINUX_VERSION_CODE >= HIGH_KERNEL_VERSION2) || defined(BUILD_OPENWRT)
|
||||||
|
0,
|
||||||
|
#endif
|
||||||
|
sme->key_idx, false, NULL, &key_params);
|
||||||
|
@@ -4063,7 +4063,7 @@ static int rwnx_cfg80211_add_station(str
|
||||||
|
sta->vif_idx = rwnx_vif->vif_index;
|
||||||
|
sta->vlan_idx = sta->vif_idx;
|
||||||
|
sta->qos = (params->sta_flags_set & BIT(NL80211_STA_FLAG_WME)) != 0;
|
||||||
|
-#if LINUX_VERSION_CODE >= HIGH_KERNEL_VERSION
|
||||||
|
+#if LINUX_VERSION_CODE >= HIGH_KERNEL_VERSION || defined(BUILD_OPENWRT)
|
||||||
|
sta->ht = params->link_sta_params.ht_capa ? 1 : 0;
|
||||||
|
sta->vht = params->link_sta_params.vht_capa ? 1 : 0;
|
||||||
|
#else
|
||||||
|
@@ -4469,7 +4469,7 @@ static int rwnx_cfg80211_change_station(
|
||||||
|
sta->vif_idx = rwnx_vif->vif_index;
|
||||||
|
sta->vlan_idx = sta->vif_idx;
|
||||||
|
sta->qos = (params->sta_flags_set & BIT(NL80211_STA_FLAG_WME)) != 0;
|
||||||
|
-#if LINUX_VERSION_CODE >= HIGH_KERNEL_VERSION
|
||||||
|
+#if LINUX_VERSION_CODE >= HIGH_KERNEL_VERSION || defined(BUILD_OPENWRT)
|
||||||
|
sta->ht = params->link_sta_params.ht_capa ? 1 : 0;
|
||||||
|
sta->vht = params->link_sta_params.vht_capa ? 1 : 0;
|
||||||
|
#else
|
||||||
|
@@ -4716,7 +4716,7 @@ static int rwnx_cfg80211_change_beacon(s
|
||||||
|
/**
|
||||||
|
* * @stop_ap: Stop being an AP, including stopping beaconing.
|
||||||
|
*/
|
||||||
|
-#if (LINUX_VERSION_CODE >= HIGH_KERNEL_VERSION)
|
||||||
|
+#if (LINUX_VERSION_CODE >= HIGH_KERNEL_VERSION) || defined(BUILD_OPENWRT)
|
||||||
|
static int rwnx_cfg80211_stop_ap(struct wiphy *wiphy, struct net_device *dev, unsigned int link_id)
|
||||||
|
#else
|
||||||
|
static int rwnx_cfg80211_stop_ap(struct wiphy *wiphy, struct net_device *dev)
|
||||||
|
@@ -5190,7 +5190,7 @@ static int rwnx_cfg80211_dump_survey(str
|
||||||
|
*/
|
||||||
|
static int rwnx_cfg80211_get_channel(struct wiphy *wiphy,
|
||||||
|
struct wireless_dev *wdev,
|
||||||
|
-#if LINUX_VERSION_CODE >= HIGH_KERNEL_VERSION
|
||||||
|
+#if LINUX_VERSION_CODE >= HIGH_KERNEL_VERSION || defined(BUILD_OPENWRT)
|
||||||
|
unsigned int link_id,
|
||||||
|
#endif
|
||||||
|
struct cfg80211_chan_def *chandef)
|
||||||
|
@@ -5487,7 +5487,7 @@ int rwnx_cfg80211_channel_switch (struct
|
||||||
|
INIT_WORK(&csa->work, rwnx_csa_finish);
|
||||||
|
#if LINUX_VERSION_CODE >= HIGH_KERNEL_VERSION4
|
||||||
|
cfg80211_ch_switch_started_notify(dev, &csa->chandef, 0, params->count, false, 0);
|
||||||
|
-#elif LINUX_VERSION_CODE >= HIGH_KERNEL_VERSION2
|
||||||
|
+#elif LINUX_VERSION_CODE >= HIGH_KERNEL_VERSION2 || defined(BUILD_OPENWRT)
|
||||||
|
cfg80211_ch_switch_started_notify(dev, &csa->chandef, 0, params->count, false);
|
||||||
|
#elif LINUX_VERSION_CODE >= KERNEL_VERSION(5, 11, 0)
|
||||||
|
cfg80211_ch_switch_started_notify(dev, &csa->chandef, params->count, params->block_tx);
|
||||||
|
--- a/src/SDIO/driver_fw/driver/aic8800/aic8800_fdrv/rwnx_msg_rx.c
|
||||||
|
+++ b/src/SDIO/driver_fw/driver/aic8800/aic8800_fdrv/rwnx_msg_rx.c
|
||||||
|
@@ -836,7 +836,7 @@ static inline int rwnx_rx_sm_connect_ind
|
||||||
|
|
||||||
|
do {
|
||||||
|
bss = cfg80211_get_bss(wdev->wiphy, NULL, rwnx_vif->sta.bssid,
|
||||||
|
-#if LINUX_VERSION_CODE >= HIGH_KERNEL_VERSION
|
||||||
|
+#if LINUX_VERSION_CODE >= HIGH_KERNEL_VERSION || defined(BUILD_OPENWRT)
|
||||||
|
wdev->u.client.ssid, wdev->u.client.ssid_len,
|
||||||
|
#else
|
||||||
|
wdev->ssid, wdev->ssid_len,
|
||||||
|
@@ -866,7 +866,7 @@ static inline int rwnx_rx_sm_connect_ind
|
||||||
|
#else
|
||||||
|
WLAN_CAPABILITY_ESS,
|
||||||
|
#endif
|
||||||
|
-#if LINUX_VERSION_CODE >= HIGH_KERNEL_VERSION
|
||||||
|
+#if LINUX_VERSION_CODE >= HIGH_KERNEL_VERSION || defined(BUILD_OPENWRT)
|
||||||
|
(int)wdev->u.client.ssid_len,
|
||||||
|
wdev->u.client.ssid,
|
||||||
|
#else
|
||||||
|
@@ -887,7 +887,7 @@ static inline int rwnx_rx_sm_connect_ind
|
||||||
|
rwnx_vif->sta.bssid[0], rwnx_vif->sta.bssid[1], rwnx_vif->sta.bssid[2],
|
||||||
|
rwnx_vif->sta.bssid[3], rwnx_vif->sta.bssid[4], rwnx_vif->sta.bssid[5]);
|
||||||
|
|
||||||
|
-#if LINUX_VERSION_CODE >= HIGH_KERNEL_VERSION
|
||||||
|
+#if LINUX_VERSION_CODE >= HIGH_KERNEL_VERSION || defined(BUILD_OPENWRT)
|
||||||
|
wdev->u.client.ssid_len = (int)rwnx_vif->sta.ssid_len;
|
||||||
|
memcpy(wdev->u.client.ssid, rwnx_vif->sta.ssid, wdev->u.client.ssid_len);
|
||||||
|
#else
|
||||||
|
@@ -927,7 +927,7 @@ static inline int rwnx_rx_sm_connect_ind
|
||||||
|
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 12, 0)
|
||||||
|
struct cfg80211_roam_info info;
|
||||||
|
memset(&info, 0, sizeof(info));
|
||||||
|
-#if LINUX_VERSION_CODE >= HIGH_KERNEL_VERSION
|
||||||
|
+#if LINUX_VERSION_CODE >= HIGH_KERNEL_VERSION || defined(BUILD_OPENWRT)
|
||||||
|
if (rwnx_vif->ch_index < NX_CHAN_CTXT_CNT)
|
||||||
|
info.links[0].channel = rwnx_hw->chanctx_table[rwnx_vif->ch_index].chan_def.chan;
|
||||||
|
info.links[0].bssid = (const u8 *)ind->bssid.array;
|
||||||
|
--- a/src/SDIO/driver_fw/driver/aic8800/aic8800_fdrv/rwnx_msg_tx.c
|
||||||
|
+++ b/src/SDIO/driver_fw/driver/aic8800/aic8800_fdrv/rwnx_msg_tx.c
|
||||||
|
@@ -1941,7 +1941,7 @@ int rwnx_send_me_sta_add(struct rwnx_hw
|
||||||
|
{
|
||||||
|
struct me_sta_add_req *req;
|
||||||
|
|
||||||
|
-#if LINUX_VERSION_CODE >= HIGH_KERNEL_VERSION
|
||||||
|
+#if LINUX_VERSION_CODE >= HIGH_KERNEL_VERSION || defined(BUILD_OPENWRT)
|
||||||
|
struct link_station_parameters *link_sta_params = ¶ms->link_sta_params;
|
||||||
|
#else
|
||||||
|
struct station_parameters *link_sta_params = params;
|
13
package/lean/aic8800/patches/032-wireless-6.6.patch
Normal file
13
package/lean/aic8800/patches/032-wireless-6.6.patch
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
--- a/src/SDIO/driver_fw/driver/aic8800/aic8800_fdrv/rwnx_compat.h
|
||||||
|
+++ b/src/SDIO/driver_fw/driver/aic8800/aic8800_fdrv/rwnx_compat.h
|
||||||
|
@@ -47,8 +47,8 @@
|
||||||
|
#else
|
||||||
|
#define HIGH_KERNEL_VERSION KERNEL_VERSION(6, 0, 0)
|
||||||
|
#define HIGH_KERNEL_VERSION2 KERNEL_VERSION(6, 1, 0)
|
||||||
|
-#define HIGH_KERNEL_VERSION3 KERNEL_VERSION(6, 3, 0)
|
||||||
|
-#define HIGH_KERNEL_VERSION4 KERNEL_VERSION(6, 3, 0)
|
||||||
|
+#define HIGH_KERNEL_VERSION3 KERNEL_VERSION(6, 9, 0)
|
||||||
|
+#define HIGH_KERNEL_VERSION4 KERNEL_VERSION(6, 9, 0)
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
32
package/lean/aic8800/patches/040-disable-log.patch
Normal file
32
package/lean/aic8800/patches/040-disable-log.patch
Normal file
@ -0,0 +1,32 @@
|
|||||||
|
--- a/src/SDIO/driver_fw/driver/aic8800/aic8800_bsp/aic_bsp_main.c
|
||||||
|
+++ b/src/SDIO/driver_fw/driver/aic8800/aic8800_bsp/aic_bsp_main.c
|
||||||
|
@@ -15,7 +15,7 @@
|
||||||
|
#define DRV_AUTHOR "AICSemi"
|
||||||
|
#define DRV_VERS_MOD "1.0"
|
||||||
|
|
||||||
|
-int aicwf_dbg_level_bsp = LOGERROR|LOGINFO|LOGDEBUG|LOGTRACE;
|
||||||
|
+int aicwf_dbg_level_bsp = LOGDATA;
|
||||||
|
|
||||||
|
static struct platform_device *aicbsp_pdev;
|
||||||
|
|
||||||
|
--- a/src/SDIO/driver_fw/driver/aic8800/aic8800_fdrv/rwnx_main.c
|
||||||
|
+++ b/src/SDIO/driver_fw/driver/aic8800/aic8800_fdrv/rwnx_main.c
|
||||||
|
@@ -503,7 +503,7 @@ static const int rwnx_hwq2uapsd[NL80211_
|
||||||
|
|
||||||
|
|
||||||
|
extern uint8_t scanning;
|
||||||
|
-int aicwf_dbg_level = LOGERROR|LOGINFO|LOGDEBUG|LOGTRACE;
|
||||||
|
+int aicwf_dbg_level = LOGWAKELOCK;
|
||||||
|
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_tx.c
|
||||||
|
+++ b/src/SDIO/driver_fw/driver/aic8800/aic8800_fdrv/rwnx_tx.c
|
||||||
|
@@ -169,7 +169,6 @@ void rwnx_ps_bh_traffic_req(struct rwnx_
|
||||||
|
// sta->mac_addr))
|
||||||
|
// return;
|
||||||
|
if (!sta->ps.active) {
|
||||||
|
- printk("sta %pM is not in Power Save mode", sta->mac_addr);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
#ifdef CREATE_TRACE_POINTS
|
Loading…
Reference in New Issue
Block a user