mirror of
https://github.com/coolsnowwolf/lede.git
synced 2025-04-15 18:03:30 +00:00
rtw88-usb: update to latest git HEAD
This commit is contained in:
parent
7ce7dc32e0
commit
44cccd68f5
@ -8,13 +8,13 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=rtw88-usb
|
||||
PKG_RELEASE:=2
|
||||
PKG_RELEASE:=1
|
||||
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_DATE:=2024-04-10
|
||||
PKG_SOURCE_DATE:=2024-11-01
|
||||
PKG_SOURCE_URL:=https://github.com/lwfinger/rtw88.git
|
||||
PKG_SOURCE_VERSION:=2e9f468009df592a51990d024928034e0af1c2b4
|
||||
PKG_MIRROR_HASH:=684b30e58d8b990bbe141baae00c48439f45c9f39faa6f552ffb18afb6594c74
|
||||
PKG_SOURCE_VERSION:=e9a6539a81a4ac1a539f510ded6a91c42efb7e2e
|
||||
PKG_MIRROR_HASH:=a1d667d3bbee5a9ac197a807950cdc0f6a60828898e42ca0cfb402cf6089eb0c
|
||||
|
||||
PKG_BUILD_PARALLEL:=1
|
||||
|
||||
@ -26,7 +26,7 @@ include $(INCLUDE_DIR)/package.mk
|
||||
define KernelPackage/rtw88-default
|
||||
SUBMENU:=Wireless Drivers
|
||||
TITLE:=Realtek rtw88 family usb driver
|
||||
DEPENDS:=+kmod-mac80211 +kmod-usb-core \
|
||||
DEPENDS:=@(LINUX_6_1||LINUX_6_6) +kmod-mac80211 \
|
||||
+@DRIVER_11N_SUPPORT +@DRIVER_11AC_SUPPORT
|
||||
endef
|
||||
|
||||
@ -36,19 +36,33 @@ define KernelPackage/rtw88-usb
|
||||
FILES:= \
|
||||
$(PKG_BUILD_DIR)/rtw_core.ko \
|
||||
$(PKG_BUILD_DIR)/rtw_usb.ko
|
||||
DEPENDS+=+kmod-usb-core
|
||||
endef
|
||||
|
||||
define KernelPackage/rtl8723du
|
||||
$(KernelPackage/rtw88-default)
|
||||
TITLE:=Realtek RTL8723DU support
|
||||
DEPENDS+=+kmod-rtw88-usb +rtl8723du-firmware
|
||||
DEPENDS+=+kmod-rtw88-usb +rtl8723de-firmware
|
||||
FILES:= \
|
||||
$(PKG_BUILD_DIR)/rtw88_8723x.ko \
|
||||
$(PKG_BUILD_DIR)/rtw_8723x.ko \
|
||||
$(PKG_BUILD_DIR)/rtw_8723d.ko \
|
||||
$(PKG_BUILD_DIR)/rtw_8723du.ko
|
||||
AUTOLOAD:=$(call AutoProbe,rtw_8723du)
|
||||
endef
|
||||
|
||||
define KernelPackage/rtl8821au
|
||||
$(KernelPackage/rtw88-default)
|
||||
TITLE:=Realtek RTL8812AU/RTL8821AU support
|
||||
DEPENDS+=+kmod-rtw88-usb +rtl8821au-firmware
|
||||
FILES:= \
|
||||
$(PKG_BUILD_DIR)/rtw_88xxa.ko \
|
||||
$(PKG_BUILD_DIR)/rtw_8812a.ko \
|
||||
$(PKG_BUILD_DIR)/rtw_8821a.ko \
|
||||
$(PKG_BUILD_DIR)/rtw_8812au.ko \
|
||||
$(PKG_BUILD_DIR)/rtw_8821au.ko
|
||||
AUTOLOAD:=$(call AutoProbe,rtw_8812au rtw_8821au)
|
||||
endef
|
||||
|
||||
define KernelPackage/rtl8821cu
|
||||
$(KernelPackage/rtw88-default)
|
||||
TITLE:=Realtek RTL8821CU support
|
||||
@ -99,8 +113,14 @@ define Build/Compile
|
||||
modules
|
||||
endef
|
||||
|
||||
define KernelPackage/rtl8821au/install
|
||||
$(INSTALL_DIR) $(1)/lib/firmware/rtw88
|
||||
$(INSTALL_DATA) $(PKG_BUILD_DIR)/firmware/rtw8812a_fw.bin $(1)/lib/firmware/rtw88
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,rtw88-usb))
|
||||
$(eval $(call KernelPackage,rtl8723du))
|
||||
$(eval $(call KernelPackage,rtl8821au))
|
||||
$(eval $(call KernelPackage,rtl8821cu))
|
||||
$(eval $(call KernelPackage,rtl8822bu))
|
||||
$(eval $(call KernelPackage,rtl8822cu))
|
||||
|
@ -1,96 +0,0 @@
|
||||
--- a/fw.c
|
||||
+++ b/fw.c
|
||||
@@ -1009,7 +1009,7 @@ static u8 rtw_get_rsvd_page_probe_req_location(struct rtw_dev *rtwdev,
|
||||
if (rsvd_pkt->type != RSVD_PROBE_REQ)
|
||||
continue;
|
||||
if ((!ssid && !rsvd_pkt->ssid) ||
|
||||
- cfg80211_ssid_eq(rsvd_pkt->ssid, ssid))
|
||||
+ cfg80211_ssid_eq(rsvd_pkt->ssid, ssid))
|
||||
location = rsvd_pkt->page;
|
||||
}
|
||||
|
||||
--- a/mac.c
|
||||
+++ b/mac.c
|
||||
@@ -316,13 +316,6 @@ static int rtw_mac_power_switch(struct rtw_dev *rtwdev, bool pwr_on)
|
||||
rtw_write8_clr(rtwdev, REG_SYS_STATUS1 + 1, BIT(0));
|
||||
}
|
||||
|
||||
- if (pwr_on && rtw_hci_type(rtwdev) == RTW_HCI_TYPE_USB) {
|
||||
- if (chip->id == RTW_CHIP_TYPE_8822C ||
|
||||
- chip->id == RTW_CHIP_TYPE_8822B ||
|
||||
- chip->id == RTW_CHIP_TYPE_8821C)
|
||||
- rtw_write8_clr(rtwdev, REG_SYS_STATUS1 + 1, BIT(0));
|
||||
- }
|
||||
-
|
||||
if (rtw_hci_type(rtwdev) == RTW_HCI_TYPE_SDIO)
|
||||
rtw_write32(rtwdev, REG_SDIO_HIMR, imr);
|
||||
|
||||
@@ -956,18 +949,6 @@ static int __rtw_download_firmware_legacy(struct rtw_dev *rtwdev,
|
||||
rtw_write8(rtwdev, REG_MCUFW_CTRL, 0x00);
|
||||
}
|
||||
|
||||
- /* reset firmware if still present */
|
||||
- if (rtwdev->chip->id == RTW_CHIP_TYPE_8703B &&
|
||||
- rtw_read8_mask(rtwdev, REG_MCUFW_CTRL, BIT_RAM_DL_SEL)) {
|
||||
- rtw_write8(rtwdev, REG_MCUFW_CTRL, 0x00);
|
||||
- }
|
||||
-
|
||||
- /* reset firmware if still present */
|
||||
- if (rtwdev->chip->id == RTW_CHIP_TYPE_8703B &&
|
||||
- rtw_read8_mask(rtwdev, REG_MCUFW_CTRL, BIT_RAM_DL_SEL)) {
|
||||
- rtw_write8(rtwdev, REG_MCUFW_CTRL, 0x00);
|
||||
- }
|
||||
-
|
||||
en_download_firmware_legacy(rtwdev, true);
|
||||
ret = download_firmware_legacy(rtwdev, fw->firmware->data, fw->firmware->size);
|
||||
en_download_firmware_legacy(rtwdev, false);
|
||||
--- a/main.c
|
||||
+++ b/main.c
|
||||
@@ -110,9 +110,7 @@ static const struct ieee80211_iface_limit rtw_iface_limits[] = {
|
||||
},
|
||||
{
|
||||
.max = 1,
|
||||
- .types = BIT(NL80211_IFTYPE_AP) |
|
||||
- BIT(NL80211_IFTYPE_P2P_CLIENT) |
|
||||
- BIT(NL80211_IFTYPE_P2P_GO)
|
||||
+ .types = BIT(NL80211_IFTYPE_AP),
|
||||
}
|
||||
};
|
||||
|
||||
@@ -2124,11 +2122,6 @@ static int rtw_chip_efuse_info_setup(struct rtw_dev *rtwdev)
|
||||
dev_warn(rtwdev->dev, "efuse MAC invalid, using random\n");
|
||||
}
|
||||
|
||||
- if (!is_valid_ether_addr(efuse->addr)) {
|
||||
- eth_random_addr(efuse->addr);
|
||||
- dev_warn(rtwdev->dev, "efuse MAC invalid, using random\n");
|
||||
- }
|
||||
-
|
||||
out_disable:
|
||||
rtw_chip_efuse_disable(rtwdev);
|
||||
|
||||
@@ -2361,9 +2354,7 @@ int rtw_register_hw(struct rtw_dev *rtwdev, struct ieee80211_hw *hw)
|
||||
hw->wiphy->interface_modes = BIT(NL80211_IFTYPE_STATION) |
|
||||
BIT(NL80211_IFTYPE_AP) |
|
||||
BIT(NL80211_IFTYPE_ADHOC) |
|
||||
- BIT(NL80211_IFTYPE_MESH_POINT) |
|
||||
- BIT(NL80211_IFTYPE_P2P_CLIENT) |
|
||||
- BIT(NL80211_IFTYPE_P2P_GO);
|
||||
+ BIT(NL80211_IFTYPE_MESH_POINT);
|
||||
hw->wiphy->available_antennas_tx = hal->antenna_tx;
|
||||
hw->wiphy->available_antennas_rx = hal->antenna_rx;
|
||||
|
||||
--- a/usb.c
|
||||
+++ b/usb.c
|
||||
@@ -93,11 +93,6 @@ static u32 rtw_usb_read(struct rtw_dev *rtwdev, u32 addr, u16 len)
|
||||
rtwdev->chip->id == RTW_CHIP_TYPE_8821C)
|
||||
rtw_usb_reg_sec(rtwdev, addr, data);
|
||||
|
||||
- if (rtwdev->chip->id == RTW_CHIP_TYPE_8822C ||
|
||||
- rtwdev->chip->id == RTW_CHIP_TYPE_8822B ||
|
||||
- rtwdev->chip->id == RTW_CHIP_TYPE_8821C)
|
||||
- rtw_usb_reg_sec(rtwdev, addr, data);
|
||||
-
|
||||
return le32_to_cpu(*data);
|
||||
}
|
||||
|
@ -1,432 +0,0 @@
|
||||
--- a/bf.c
|
||||
+++ b/bf.c
|
||||
@@ -57,7 +57,7 @@ void rtw_bf_assoc(struct rtw_dev *rtwdev, struct ieee80211_vif *vif,
|
||||
}
|
||||
|
||||
ic_vht_cap = &hw->wiphy->bands[NL80211_BAND_5GHZ]->vht_cap;
|
||||
-#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 19, 0)
|
||||
+#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 19, 0) && !defined(BUILD_OPENWRT)
|
||||
vht_cap = &sta->vht_cap;
|
||||
#else
|
||||
vht_cap = &sta->deflink.vht_cap;
|
||||
@@ -75,7 +75,7 @@ void rtw_bf_assoc(struct rtw_dev *rtwdev, struct ieee80211_vif *vif,
|
||||
ether_addr_copy(bfee->mac_addr, bssid);
|
||||
bfee->role = RTW_BFEE_MU;
|
||||
bfee->p_aid = (bssid[5] << 1) | (bssid[4] >> 7);
|
||||
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 0, 0)
|
||||
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 0, 0) || defined(BUILD_OPENWRT)
|
||||
bfee->aid = vif->cfg.aid;
|
||||
#else
|
||||
bfee->aid = bss_conf->aid;
|
||||
--- a/fw.c
|
||||
+++ b/fw.c
|
||||
@@ -191,7 +191,7 @@ legacy:
|
||||
si->ra_report.desc_rate = rate;
|
||||
si->ra_report.bit_rate = bit_rate;
|
||||
|
||||
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 1, 0)
|
||||
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 1, 0) || defined(BUILD_OPENWRT)
|
||||
sta->deflink.agg.max_rc_amsdu_len = get_max_amsdu_len(bit_rate);
|
||||
#else
|
||||
sta->max_rc_amsdu_len = get_max_amsdu_len(bit_rate);
|
||||
@@ -726,7 +726,7 @@ void rtw_fw_send_rssi_info(struct rtw_dev *rtwdev, struct rtw_sta_info *si)
|
||||
rtw_fw_send_h2c_command(rtwdev, h2c_pkt);
|
||||
}
|
||||
|
||||
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 18, 0)
|
||||
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 18, 0) || defined(BUILD_OPENWRT)
|
||||
void rtw_fw_send_ra_info(struct rtw_dev *rtwdev, struct rtw_sta_info *si,
|
||||
bool reset_ra_mask)
|
||||
#else
|
||||
@@ -735,7 +735,7 @@ void rtw_fw_send_ra_info(struct rtw_dev *rtwdev, struct rtw_sta_info *si)
|
||||
{
|
||||
u8 h2c_pkt[H2C_PKT_SIZE] = {0};
|
||||
bool disable_pt = true;
|
||||
-#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 18, 0)
|
||||
+#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 18, 0) && !defined(BUILD_OPENWRT)
|
||||
bool reset_ra_mask = true;
|
||||
#endif
|
||||
|
||||
@@ -1228,7 +1228,7 @@ static struct sk_buff *rtw_get_rsvd_page_skb(struct ieee80211_hw *hw,
|
||||
|
||||
switch (rsvd_pkt->type) {
|
||||
case RSVD_BEACON:
|
||||
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 0, 0))
|
||||
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 0, 0)) || defined(BUILD_OPENWRT)
|
||||
skb_new = ieee80211_beacon_get_tim(hw, vif, &tim_offset, NULL, 0);
|
||||
#else
|
||||
skb_new = ieee80211_beacon_get_tim(hw, vif, &tim_offset, NULL);
|
||||
@@ -1243,7 +1243,7 @@ static struct sk_buff *rtw_get_rsvd_page_skb(struct ieee80211_hw *hw,
|
||||
break;
|
||||
case RSVD_NULL:
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 14, 17)
|
||||
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 1, 0)
|
||||
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 1, 0) || defined(BUILD_OPENWRT)
|
||||
skb_new = ieee80211_nullfunc_get(hw, vif, -1, false);
|
||||
#else
|
||||
skb_new = ieee80211_nullfunc_get(hw, vif, false);
|
||||
@@ -1254,7 +1254,7 @@ static struct sk_buff *rtw_get_rsvd_page_skb(struct ieee80211_hw *hw,
|
||||
break;
|
||||
case RSVD_QOS_NULL:
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 14, 17)
|
||||
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 1, 0)
|
||||
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 1, 0) || defined(BUILD_OPENWRT)
|
||||
skb_new = ieee80211_nullfunc_get(hw, vif, -1, true);
|
||||
#else
|
||||
skb_new = ieee80211_nullfunc_get(hw, vif, true);
|
||||
--- a/fw.h
|
||||
+++ b/fw.h
|
||||
@@ -834,7 +834,7 @@ void rtw_fw_coex_query_hid_info(struct rtw_dev *rtwdev, u8 sub_id, u8 data);
|
||||
|
||||
void rtw_fw_bt_wifi_control(struct rtw_dev *rtwdev, u8 op_code, u8 *data);
|
||||
void rtw_fw_send_rssi_info(struct rtw_dev *rtwdev, struct rtw_sta_info *si);
|
||||
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 18, 0)
|
||||
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 18, 0) || defined(BUILD_OPENWRT)
|
||||
void rtw_fw_send_ra_info(struct rtw_dev *rtwdev, struct rtw_sta_info *si,
|
||||
bool reset_ra_mask);
|
||||
#else
|
||||
--- a/mac80211.c
|
||||
+++ b/mac80211.c
|
||||
@@ -365,7 +365,7 @@ static void rtw_conf_tx(struct rtw_dev *rtwdev,
|
||||
static void rtw_ops_bss_info_changed(struct ieee80211_hw *hw,
|
||||
struct ieee80211_vif *vif,
|
||||
struct ieee80211_bss_conf *conf,
|
||||
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 0, 0))
|
||||
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 0, 0)) || defined(BUILD_OPENWRT)
|
||||
u64 changed)
|
||||
#else
|
||||
u32 changed)
|
||||
@@ -383,7 +383,7 @@ static void rtw_ops_bss_info_changed(struct ieee80211_hw *hw,
|
||||
|
||||
if (changed & BSS_CHANGED_ASSOC) {
|
||||
rtw_vif_assoc_changed(rtwvif, conf);
|
||||
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 0, 0))
|
||||
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 0, 0)) || defined(BUILD_OPENWRT)
|
||||
if (vif->cfg.assoc) {
|
||||
#else
|
||||
if (conf->assoc) {
|
||||
@@ -393,7 +393,7 @@ static void rtw_ops_bss_info_changed(struct ieee80211_hw *hw,
|
||||
rtw_fw_download_rsvd_page(rtwdev);
|
||||
rtw_send_rsvd_page_h2c(rtwdev);
|
||||
rtw_fw_default_port(rtwdev, rtwvif);
|
||||
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 0, 0))
|
||||
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 0, 0)) || defined(BUILD_OPENWRT)
|
||||
rtw_coex_media_status_notify(rtwdev, vif->cfg.assoc);
|
||||
#else
|
||||
rtw_coex_media_status_notify(rtwdev, conf->assoc);
|
||||
@@ -460,7 +460,7 @@ static void rtw_ops_bss_info_changed(struct ieee80211_hw *hw,
|
||||
mutex_unlock(&rtwdev->mutex);
|
||||
}
|
||||
|
||||
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 0, 0))
|
||||
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 0, 0)) || defined(BUILD_OPENWRT)
|
||||
static int rtw_ops_start_ap(struct ieee80211_hw *hw,
|
||||
struct ieee80211_vif *vif,
|
||||
struct ieee80211_bss_conf *link_conf)
|
||||
@@ -481,7 +481,7 @@ static int rtw_ops_start_ap(struct ieee80211_hw *hw, struct ieee80211_vif *vif)
|
||||
return 0;
|
||||
}
|
||||
|
||||
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 0, 0))
|
||||
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 0, 0)) || defined(BUILD_OPENWRT)
|
||||
static void rtw_ops_stop_ap(struct ieee80211_hw *hw,
|
||||
struct ieee80211_vif *vif,
|
||||
struct ieee80211_bss_conf *link_conf)
|
||||
@@ -502,7 +502,7 @@ static void rtw_ops_stop_ap(struct ieee80211_hw *hw,
|
||||
|
||||
static int rtw_ops_conf_tx(struct ieee80211_hw *hw,
|
||||
struct ieee80211_vif *vif,
|
||||
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 0, 0))
|
||||
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 0, 0)) || defined(BUILD_OPENWRT)
|
||||
unsigned int link_id, u16 ac,
|
||||
#else
|
||||
u16 ac,
|
||||
@@ -731,7 +731,7 @@ static void rtw_ops_sw_scan_complete(struct ieee80211_hw *hw,
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 18, 0)
|
||||
static void rtw_ops_mgd_prepare_tx(struct ieee80211_hw *hw,
|
||||
struct ieee80211_vif *vif,
|
||||
- #if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,14,0))
|
||||
+ #if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,14,0)) || defined(BUILD_OPENWRT)
|
||||
struct ieee80211_prep_tx_info *info)
|
||||
#else
|
||||
u16 duration)
|
||||
--- a/main.c
|
||||
+++ b/main.c
|
||||
@@ -191,7 +191,7 @@ static void rtw_vif_watch_dog_iter(void *data, struct ieee80211_vif *vif)
|
||||
struct rtw_vif *rtwvif = (struct rtw_vif *)vif->drv_priv;
|
||||
|
||||
if (vif->type == NL80211_IFTYPE_STATION)
|
||||
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 0, 0)
|
||||
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 0, 0) || defined(BUILD_OPENWRT)
|
||||
if (vif->cfg.assoc)
|
||||
#else
|
||||
if (vif->bss_conf.assoc)
|
||||
@@ -343,7 +343,7 @@ int rtw_sta_add(struct rtw_dev *rtwdev, struct ieee80211_sta *sta,
|
||||
if (si->mac_id >= RTW_MAX_MAC_ID_NUM)
|
||||
return -ENOSPC;
|
||||
|
||||
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 0, 0)
|
||||
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 0, 0) || defined(BUILD_OPENWRT)
|
||||
if (vif->type == NL80211_IFTYPE_STATION && vif->cfg.assoc == 0)
|
||||
#else
|
||||
if (vif->type == NL80211_IFTYPE_STATION && vif->bss_conf.assoc == 0)
|
||||
@@ -572,7 +572,7 @@ EXPORT_SYMBOL(rtw_dump_reg);
|
||||
void rtw_vif_assoc_changed(struct rtw_vif *rtwvif,
|
||||
struct ieee80211_bss_conf *conf)
|
||||
{
|
||||
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 0, 0)
|
||||
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 0, 0) || defined(BUILD_OPENWRT)
|
||||
struct ieee80211_vif *vif = NULL;
|
||||
|
||||
if (conf)
|
||||
@@ -1000,7 +1000,7 @@ static void rtw_hw_config_rf_ant_num(struct rtw_dev *rtwdev, u8 hw_ant_num)
|
||||
static u64 get_vht_ra_mask(struct ieee80211_sta *sta)
|
||||
{
|
||||
u64 ra_mask = 0;
|
||||
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 19, 0)
|
||||
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 19, 0) || defined(BUILD_OPENWRT)
|
||||
u16 mcs_map = le16_to_cpu(sta->deflink.vht_cap.vht_mcs.rx_mcs_map);
|
||||
#else
|
||||
u16 mcs_map = le16_to_cpu(sta->vht_cap.vht_mcs.rx_mcs_map);
|
||||
@@ -1224,26 +1224,26 @@ void rtw_update_sta_info(struct rtw_dev *rtwdev, struct rtw_sta_info *si,
|
||||
bool is_vht_enable = false;
|
||||
bool is_support_sgi = false;
|
||||
|
||||
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 19, 0)
|
||||
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 19, 0) || defined(BUILD_OPENWRT)
|
||||
if (sta->deflink.vht_cap.vht_supported) {
|
||||
#else
|
||||
if (sta->vht_cap.vht_supported) {
|
||||
#endif
|
||||
is_vht_enable = true;
|
||||
ra_mask |= get_vht_ra_mask(sta);
|
||||
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 19, 0)
|
||||
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 19, 0) || defined(BUILD_OPENWRT)
|
||||
if (sta->deflink.vht_cap.cap & IEEE80211_VHT_CAP_RXSTBC_MASK)
|
||||
#else
|
||||
if (sta->vht_cap.cap & IEEE80211_VHT_CAP_RXSTBC_MASK)
|
||||
#endif
|
||||
stbc_en = VHT_STBC_EN;
|
||||
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 19, 0)
|
||||
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 19, 0) || defined(BUILD_OPENWRT)
|
||||
if (sta->deflink.vht_cap.cap & IEEE80211_VHT_CAP_RXLDPC)
|
||||
#else
|
||||
if (sta->vht_cap.cap & IEEE80211_VHT_CAP_RXLDPC)
|
||||
#endif
|
||||
ldpc_en = VHT_LDPC_EN;
|
||||
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 19, 0)
|
||||
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 19, 0) || defined(BUILD_OPENWRT)
|
||||
} else if (sta->deflink.ht_cap.ht_supported) {
|
||||
ra_mask |= (sta->deflink.ht_cap.mcs.rx_mask[1] << 20) |
|
||||
(sta->deflink.ht_cap.mcs.rx_mask[0] << 12);
|
||||
@@ -1266,20 +1266,20 @@ void rtw_update_sta_info(struct rtw_dev *rtwdev, struct rtw_sta_info *si,
|
||||
ra_mask &= RA_MASK_VHT_RATES_1SS | RA_MASK_HT_RATES_1SS;
|
||||
|
||||
if (hal->current_band_type == RTW_BAND_5G) {
|
||||
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 19, 0)
|
||||
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 19, 0) || defined(BUILD_OPENWRT)
|
||||
ra_mask |= (u64)sta->deflink.supp_rates[NL80211_BAND_5GHZ] << 4;
|
||||
#else
|
||||
ra_mask |= (u64)sta->supp_rates[NL80211_BAND_5GHZ] << 4;
|
||||
#endif
|
||||
ra_mask_bak = ra_mask;
|
||||
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 19, 0)
|
||||
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 19, 0) || defined(BUILD_OPENWRT)
|
||||
if (sta->deflink.vht_cap.vht_supported) {
|
||||
#else
|
||||
if (sta->vht_cap.vht_supported) {
|
||||
#endif
|
||||
ra_mask &= RA_MASK_VHT_RATES | RA_MASK_OFDM_IN_VHT;
|
||||
wireless_set = WIRELESS_OFDM | WIRELESS_VHT;
|
||||
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 19, 0)
|
||||
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 19, 0) || defined(BUILD_OPENWRT)
|
||||
} else if (sta->deflink.ht_cap.ht_supported) {
|
||||
#else
|
||||
} else if (sta->ht_cap.ht_supported) {
|
||||
@@ -1291,13 +1291,13 @@ void rtw_update_sta_info(struct rtw_dev *rtwdev, struct rtw_sta_info *si,
|
||||
}
|
||||
dm_info->rrsr_val_init = RRSR_INIT_5G;
|
||||
} else if (hal->current_band_type == RTW_BAND_2G) {
|
||||
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 19, 0)
|
||||
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 19, 0) || defined(BUILD_OPENWRT)
|
||||
ra_mask |= sta->deflink.supp_rates[NL80211_BAND_2GHZ];
|
||||
#else
|
||||
ra_mask |= sta->supp_rates[NL80211_BAND_2GHZ];
|
||||
#endif
|
||||
ra_mask_bak = ra_mask;
|
||||
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 19, 0)
|
||||
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 19, 0) || defined(BUILD_OPENWRT)
|
||||
if (sta->deflink.vht_cap.vht_supported) {
|
||||
#else
|
||||
if (sta->vht_cap.vht_supported) {
|
||||
@@ -1306,7 +1306,7 @@ void rtw_update_sta_info(struct rtw_dev *rtwdev, struct rtw_sta_info *si,
|
||||
RA_MASK_OFDM_IN_VHT;
|
||||
wireless_set = WIRELESS_CCK | WIRELESS_OFDM |
|
||||
WIRELESS_HT | WIRELESS_VHT;
|
||||
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 19, 0)
|
||||
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 19, 0) || defined(BUILD_OPENWRT)
|
||||
} else if (sta->deflink.ht_cap.ht_supported) {
|
||||
#else
|
||||
} else if (sta->ht_cap.ht_supported) {
|
||||
@@ -1315,7 +1315,7 @@ void rtw_update_sta_info(struct rtw_dev *rtwdev, struct rtw_sta_info *si,
|
||||
RA_MASK_OFDM_IN_HT_2G;
|
||||
wireless_set = WIRELESS_CCK | WIRELESS_OFDM |
|
||||
WIRELESS_HT;
|
||||
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 19, 0)
|
||||
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 19, 0) || defined(BUILD_OPENWRT)
|
||||
} else if (sta->deflink.supp_rates[0] <= 0xf) {
|
||||
#else
|
||||
} else if (sta->supp_rates[0] <= 0xf) {
|
||||
@@ -1332,14 +1332,14 @@ void rtw_update_sta_info(struct rtw_dev *rtwdev, struct rtw_sta_info *si,
|
||||
wireless_set = 0;
|
||||
}
|
||||
|
||||
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 19, 0)
|
||||
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 19, 0) || defined(BUILD_OPENWRT)
|
||||
switch (sta->deflink.bandwidth) {
|
||||
#else
|
||||
switch (sta->bandwidth) {
|
||||
#endif
|
||||
case IEEE80211_STA_RX_BW_80:
|
||||
bw_mode = RTW_CHANNEL_WIDTH_80;
|
||||
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 19, 0)
|
||||
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 19, 0) || defined(BUILD_OPENWRT)
|
||||
is_support_sgi = sta->deflink.vht_cap.vht_supported &&
|
||||
(sta->deflink.vht_cap.cap & IEEE80211_VHT_CAP_SHORT_GI_80);
|
||||
#else
|
||||
@@ -1349,7 +1349,7 @@ void rtw_update_sta_info(struct rtw_dev *rtwdev, struct rtw_sta_info *si,
|
||||
break;
|
||||
case IEEE80211_STA_RX_BW_40:
|
||||
bw_mode = RTW_CHANNEL_WIDTH_40;
|
||||
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 19, 0)
|
||||
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 19, 0) || defined(BUILD_OPENWRT)
|
||||
is_support_sgi = sta->deflink.ht_cap.ht_supported &&
|
||||
(sta->deflink.ht_cap.cap & IEEE80211_HT_CAP_SGI_40);
|
||||
#else
|
||||
@@ -1359,7 +1359,7 @@ void rtw_update_sta_info(struct rtw_dev *rtwdev, struct rtw_sta_info *si,
|
||||
break;
|
||||
default:
|
||||
bw_mode = RTW_CHANNEL_WIDTH_20;
|
||||
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 19, 0)
|
||||
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 19, 0) || defined(BUILD_OPENWRT)
|
||||
is_support_sgi = sta->deflink.ht_cap.ht_supported &&
|
||||
(sta->deflink.ht_cap.cap & IEEE80211_HT_CAP_SGI_20);
|
||||
#else
|
||||
@@ -1369,14 +1369,14 @@ void rtw_update_sta_info(struct rtw_dev *rtwdev, struct rtw_sta_info *si,
|
||||
break;
|
||||
}
|
||||
|
||||
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 19, 0)
|
||||
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 19, 0) || defined(BUILD_OPENWRT)
|
||||
if (sta->deflink.vht_cap.vht_supported && ra_mask & 0xffc00000) {
|
||||
#else
|
||||
if (sta->vht_cap.vht_supported && ra_mask & 0xffc00000) {
|
||||
#endif
|
||||
tx_num = 2;
|
||||
rf_type = RF_2T2R;
|
||||
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 19, 0)
|
||||
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 19, 0) || defined(BUILD_OPENWRT)
|
||||
} else if (sta->deflink.ht_cap.ht_supported && ra_mask & 0xfff00000) {
|
||||
#else
|
||||
} else if (sta->ht_cap.ht_supported && ra_mask & 0xfff00000) {
|
||||
@@ -1400,7 +1400,7 @@ void rtw_update_sta_info(struct rtw_dev *rtwdev, struct rtw_sta_info *si,
|
||||
si->ra_mask = ra_mask;
|
||||
si->rate_id = rate_id;
|
||||
|
||||
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 18, 0)
|
||||
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 18, 0) || defined(BUILD_OPENWRT)
|
||||
rtw_fw_send_ra_info(rtwdev, si, reset_ra_mask);
|
||||
#else
|
||||
rtw_fw_send_ra_info(rtwdev, si);
|
||||
@@ -1780,7 +1780,7 @@ static void rtw_vif_smps_iter(void *data, u8 *mac,
|
||||
{
|
||||
struct rtw_dev *rtwdev = (struct rtw_dev *)data;
|
||||
|
||||
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 0, 0)
|
||||
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 0, 0) || defined(BUILD_OPENWRT)
|
||||
if (vif->type != NL80211_IFTYPE_STATION || !vif->cfg.assoc)
|
||||
#else
|
||||
if (vif->type != NL80211_IFTYPE_STATION || !vif->bss_conf.assoc)
|
||||
@@ -1788,13 +1788,13 @@ static void rtw_vif_smps_iter(void *data, u8 *mac,
|
||||
return;
|
||||
|
||||
if (rtwdev->hal.txrx_1ss)
|
||||
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 0, 0)
|
||||
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 0, 0) || defined(BUILD_OPENWRT)
|
||||
ieee80211_request_smps(vif, 0, IEEE80211_SMPS_STATIC);
|
||||
#else
|
||||
ieee80211_request_smps(vif, IEEE80211_SMPS_STATIC);
|
||||
#endif
|
||||
else
|
||||
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 0, 0)
|
||||
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 0, 0) || defined(BUILD_OPENWRT)
|
||||
ieee80211_request_smps(vif, 0, IEEE80211_SMPS_OFF);
|
||||
#else
|
||||
ieee80211_request_smps(vif, IEEE80211_SMPS_OFF);
|
||||
@@ -2516,7 +2516,7 @@ static void rtw_check_sta_active_iter(void *data, struct ieee80211_vif *vif)
|
||||
if (vif->type != NL80211_IFTYPE_STATION)
|
||||
return;
|
||||
|
||||
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 0, 0)
|
||||
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 0, 0) || defined(BUILD_OPENWRT)
|
||||
if (vif->cfg.assoc || !is_zero_ether_addr(rtwvif->bssid))
|
||||
#else
|
||||
if (vif->bss_conf.assoc || !is_zero_ether_addr(rtwvif->bssid))
|
||||
--- a/ps.c
|
||||
+++ b/ps.c
|
||||
@@ -334,7 +334,7 @@ void rtw_recalc_lps(struct rtw_dev *rtwdev, struct ieee80211_vif *new_vif)
|
||||
__rtw_vif_recalc_lps(&data, new_vif);
|
||||
rtw_iterate_vifs(rtwdev, rtw_vif_recalc_lps_iter, &data);
|
||||
|
||||
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 0, 0))
|
||||
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 0, 0)) || defined(BUILD_OPENWRT)
|
||||
if (data.count == 1 && data.found_vif->cfg.ps) {
|
||||
rtwdev->ps_enabled = true;
|
||||
} else {
|
||||
--- a/tx.c
|
||||
+++ b/tx.c
|
||||
@@ -90,7 +90,7 @@ EXPORT_SYMBOL(rtw_tx_fill_tx_desc);
|
||||
|
||||
static u8 get_tx_ampdu_factor(struct ieee80211_sta *sta)
|
||||
{
|
||||
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 19, 0)
|
||||
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 19, 0) || defined(BUILD_OPENWRT)
|
||||
u8 exp = sta->deflink.ht_cap.ampdu_factor;
|
||||
#else
|
||||
u8 exp = sta->ht_cap.ampdu_factor;
|
||||
@@ -105,7 +105,7 @@ static u8 get_tx_ampdu_factor(struct ieee80211_sta *sta)
|
||||
|
||||
static u8 get_tx_ampdu_density(struct ieee80211_sta *sta)
|
||||
{
|
||||
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 19, 0)
|
||||
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 19, 0) || defined(BUILD_OPENWRT)
|
||||
return sta->deflink.ht_cap.ampdu_density;
|
||||
#else
|
||||
return sta->ht_cap.ampdu_density;
|
||||
@@ -117,7 +117,7 @@ static u8 get_highest_ht_tx_rate(struct rtw_dev *rtwdev,
|
||||
{
|
||||
u8 rate;
|
||||
|
||||
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 19, 0)
|
||||
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 19, 0) || defined(BUILD_OPENWRT)
|
||||
if (rtwdev->hal.rf_type == RF_2T2R && sta->deflink.ht_cap.mcs.rx_mask[1] != 0)
|
||||
#else
|
||||
if (rtwdev->hal.rf_type == RF_2T2R && sta->ht_cap.mcs.rx_mask[1] != 0)
|
||||
@@ -136,7 +136,7 @@ static u8 get_highest_vht_tx_rate(struct rtw_dev *rtwdev,
|
||||
u8 rate;
|
||||
u16 tx_mcs_map;
|
||||
|
||||
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 19, 0)
|
||||
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 19, 0) || defined(BUILD_OPENWRT)
|
||||
tx_mcs_map = le16_to_cpu(sta->deflink.vht_cap.vht_mcs.tx_mcs_map);
|
||||
#else
|
||||
tx_mcs_map = le16_to_cpu(sta->vht_cap.vht_mcs.tx_mcs_map);
|
||||
@@ -382,7 +382,7 @@ static void rtw_tx_data_pkt_info_update(struct rtw_dev *rtwdev,
|
||||
if (info->control.use_rts || skb->len > hw->wiphy->rts_threshold)
|
||||
pkt_info->rts = true;
|
||||
|
||||
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 19, 0)
|
||||
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 19, 0) || defined(BUILD_OPENWRT)
|
||||
if (sta->deflink.vht_cap.vht_supported)
|
||||
rate = get_highest_vht_tx_rate(rtwdev, sta);
|
||||
else if (sta->deflink.ht_cap.ht_supported)
|
11
package/kernel/rtw88-usb/patches/101-wireless-6.6.patch
Normal file
11
package/kernel/rtw88-usb/patches/101-wireless-6.6.patch
Normal file
@ -0,0 +1,11 @@
|
||||
--- a/rx.c
|
||||
+++ b/rx.c
|
||||
@@ -176,7 +176,7 @@ void rtw_update_rx_freq_from_ie(struct r
|
||||
else
|
||||
goto fill_rx_status;
|
||||
|
||||
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 4, 0))
|
||||
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 4, 0)) && !defined(BUILD_OPENWRT)
|
||||
channel_number = cfg80211_get_ies_channel_number(variable, ielen,
|
||||
NL80211_BAND_2GHZ);
|
||||
#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 17, 0))
|
@ -1,69 +0,0 @@
|
||||
--- a/Makefile
|
||||
+++ b/Makefile
|
||||
@@ -30,10 +30,6 @@ NO_SKIP_SIGN := y
|
||||
endif
|
||||
|
||||
EXTRA_CFLAGS += -O2
|
||||
-EXTRA_CFLAGS += -DCONFIG_RTW88_8822BE=1
|
||||
-EXTRA_CFLAGS += -DCONFIG_RTW88_8821CE=1
|
||||
-EXTRA_CFLAGS += -DCONFIG_RTW88_8822CE=1
|
||||
-EXTRA_CFLAGS += -DCONFIG_RTW88_8723DE=1
|
||||
EXTRA_CFLAGS += -DCONFIG_RTW88_DEBUG=1
|
||||
EXTRA_CFLAGS += -DCONFIG_RTW88_DEBUGFS=1
|
||||
#EXTRA_CFLAGS += -DCONFIG_RTW88_REGD_USER_REG_HINTS
|
||||
@@ -60,9 +56,6 @@ rtw_core-objs += main.o \
|
||||
obj-m += rtw_8822b.o
|
||||
rtw_8822b-objs := rtw8822b.o rtw8822b_table.o
|
||||
|
||||
-obj-m += rtw_8822be.o
|
||||
-rtw_8822be-objs := rtw8822be.o
|
||||
-
|
||||
obj-m += rtw_8822bu.o
|
||||
rtw_8822bu-objs := rtw8822bu.o
|
||||
|
||||
@@ -72,9 +65,6 @@ rtw_8822bs-objs := rtw8822bs.o
|
||||
obj-m += rtw_8822c.o
|
||||
rtw_8822c-objs := rtw8822c.o rtw8822c_table.o
|
||||
|
||||
-obj-m += rtw_8822ce.o
|
||||
-rtw_8822ce-objs := rtw8822ce.o
|
||||
-
|
||||
obj-m += rtw_8822cu.o
|
||||
rtw_8822cu-objs := rtw8822cu.o
|
||||
|
||||
@@ -102,9 +92,6 @@ rtw_8723cs-objs := rtw8723cs.o
|
||||
obj-m += rtw_8723d.o
|
||||
rtw_8723d-objs := rtw8723d.o rtw8723d_table.o
|
||||
|
||||
-obj-m += rtw_8723de.o
|
||||
-rtw_8723de-objs := rtw8723de.o
|
||||
-
|
||||
obj-m += rtw_8723du.o
|
||||
rtw_8723du-objs := rtw8723du.o
|
||||
|
||||
@@ -114,15 +101,9 @@ rtw_8723ds-objs := rtw8723ds.o
|
||||
obj-m += rtw_8821c.o
|
||||
rtw_8821c-objs := rtw8821c.o rtw8821c_table.o
|
||||
|
||||
-obj-m += rtw_8821ce.o
|
||||
-rtw_8821ce-objs := rtw8821ce.o
|
||||
-
|
||||
obj-m += rtw_8821a.o
|
||||
rtw_8821a-objs := rtw8821a.o rtw8821a_table.o
|
||||
|
||||
-obj-m += rtw_8821ae.o
|
||||
-rtw_8821ae-objs := rtw8821ae.o
|
||||
-
|
||||
obj-m += rtw_8821au.o
|
||||
rtw_8821au-objs := rtw8821au.o
|
||||
|
||||
@@ -132,9 +113,6 @@ rtw_8821cs-objs := rtw8821cs.o
|
||||
obj-m += rtw_8821cu.o
|
||||
rtw_8821cu-objs := rtw8821cu.o
|
||||
|
||||
-obj-m += rtw_pci.o
|
||||
-rtw_pci-objs := pci.o
|
||||
-
|
||||
obj-m += rtw_sdio.o
|
||||
rtw_sdio-objs := sdio.o
|
||||
|
Loading…
Reference in New Issue
Block a user