mirror of
https://github.com/Ysurac/openmptcprouter.git
synced 2025-03-09 15:40:20 +00:00
Add kernel 6.1 support for BPI-R64
This commit is contained in:
parent
91028220c3
commit
49e5717c77
73 changed files with 7015 additions and 10 deletions
|
@ -0,0 +1,62 @@
|
|||
From: Ryder Lee <ryder.lee@mediatek.com>
|
||||
Date: Sat, 18 Feb 2023 01:49:25 +0800
|
||||
Subject: [PATCH] wifi: mac80211: add LDPC related flags in ieee80211_bss_conf
|
||||
|
||||
This is utilized to pass LDPC configurations from user space
|
||||
(i.e. hostapd) to driver.
|
||||
|
||||
Signed-off-by: Ryder Lee <ryder.lee@mediatek.com>
|
||||
Link: https://lore.kernel.org/r/1de696aaa34efd77a926eb657b8c0fda05aaa177.1676628065.git.ryder.lee@mediatek.com
|
||||
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
|
||||
---
|
||||
|
||||
--- a/include/net/mac80211.h
|
||||
+++ b/include/net/mac80211.h
|
||||
@@ -653,6 +653,9 @@ struct ieee80211_fils_discovery {
|
||||
* write-protected by sdata_lock and local->mtx so holding either is fine
|
||||
* for read access.
|
||||
* @color_change_color: the bss color that will be used after the change.
|
||||
+ * @ht_ldpc: in AP mode, indicates interface has HT LDPC capability.
|
||||
+ * @vht_ldpc: in AP mode, indicates interface has VHT LDPC capability.
|
||||
+ * @he_ldpc: in AP mode, indicates interface has HE LDPC capability.
|
||||
* @vht_su_beamformer: in AP mode, does this BSS support operation as an VHT SU
|
||||
* beamformer
|
||||
* @vht_su_beamformee: in AP mode, does this BSS support operation as an VHT SU
|
||||
@@ -744,6 +747,9 @@ struct ieee80211_bss_conf {
|
||||
bool color_change_active;
|
||||
u8 color_change_color;
|
||||
|
||||
+ bool ht_ldpc;
|
||||
+ bool vht_ldpc;
|
||||
+ bool he_ldpc;
|
||||
bool vht_su_beamformer;
|
||||
bool vht_su_beamformee;
|
||||
bool vht_mu_beamformer;
|
||||
--- a/net/mac80211/cfg.c
|
||||
+++ b/net/mac80211/cfg.c
|
||||
@@ -1252,7 +1252,15 @@ static int ieee80211_start_ap(struct wip
|
||||
prev_beacon_int = link_conf->beacon_int;
|
||||
link_conf->beacon_int = params->beacon_interval;
|
||||
|
||||
+ if (params->ht_cap)
|
||||
+ link_conf->ht_ldpc =
|
||||
+ params->ht_cap->cap_info &
|
||||
+ cpu_to_le16(IEEE80211_HT_CAP_LDPC_CODING);
|
||||
+
|
||||
if (params->vht_cap) {
|
||||
+ link_conf->vht_ldpc =
|
||||
+ params->vht_cap->vht_cap_info &
|
||||
+ cpu_to_le32(IEEE80211_VHT_CAP_RXLDPC);
|
||||
link_conf->vht_su_beamformer =
|
||||
params->vht_cap->vht_cap_info &
|
||||
cpu_to_le32(IEEE80211_VHT_CAP_SU_BEAMFORMER_CAPABLE);
|
||||
@@ -1282,6 +1290,9 @@ static int ieee80211_start_ap(struct wip
|
||||
}
|
||||
|
||||
if (params->he_cap) {
|
||||
+ link_conf->he_ldpc =
|
||||
+ params->he_cap->phy_cap_info[1] &
|
||||
+ IEEE80211_HE_PHY_CAP1_LDPC_CODING_IN_PAYLOAD;
|
||||
link_conf->he_su_beamformer =
|
||||
params->he_cap->phy_cap_info[3] &
|
||||
IEEE80211_HE_PHY_CAP3_SU_BEAMFORMER;
|
|
@ -8,11 +8,9 @@ PKG_LICENSE_FILES:=
|
|||
|
||||
PKG_SOURCE_URL:=https://github.com/openwrt/mt76
|
||||
PKG_SOURCE_PROTO:=git
|
||||
#PKG_SOURCE_DATE:=2023-03-01
|
||||
#PKG_SOURCE_VERSION:=c32d6d849c43792abd8007e13e468b12d6d6e0b7
|
||||
PKG_SOURCE_DATE:=2023-02-02
|
||||
PKG_SOURCE_VERSION:=4b229d2da5628bc10cbeb1047f3c888bb4d98271
|
||||
#PKG_MIRROR_HASH:=b7004bc920ba44cef2f7868d94beb2d288ff9d399af624ce5dad972f953723c8
|
||||
PKG_SOURCE_DATE:=2023-05-13
|
||||
PKG_SOURCE_VERSION:=969b7b5ebd129068ca56e4b0d831593a2f92382f
|
||||
PKG_MIRROR_HASH:=d28869591d1cb9a967b72f5cd8215c7b2c3388b7b31147b7b18c797018ab8ffb
|
||||
|
||||
PKG_MAINTAINER:=Felix Fietkau <nbd@nbd.name>
|
||||
PKG_USE_NINJA:=0
|
||||
|
@ -247,6 +245,12 @@ define KernelPackage/mt7916-firmware
|
|||
TITLE:=MediaTek MT7916 firmware
|
||||
endef
|
||||
|
||||
define KernelPackage/mt7981-firmware
|
||||
$(KernelPackage/mt76-default)
|
||||
DEPENDS:=@TARGET_mediatek_filogic
|
||||
TITLE:=MediaTek MT7981 firmware
|
||||
endef
|
||||
|
||||
define KernelPackage/mt7986-firmware
|
||||
$(KernelPackage/mt76-default)
|
||||
DEPENDS:=@TARGET_mediatek_filogic
|
||||
|
@ -258,6 +262,12 @@ define KernelPackage/mt7921-firmware
|
|||
TITLE:=MediaTek MT7921 firmware
|
||||
endef
|
||||
|
||||
define KernelPackage/mt7922-firmware
|
||||
$(KernelPackage/mt76-default)
|
||||
DEPENDS+=+kmod-mt7921-common
|
||||
TITLE:=MediaTek MT7922 firmware
|
||||
endef
|
||||
|
||||
define KernelPackage/mt7921-common
|
||||
$(KernelPackage/mt76-default)
|
||||
TITLE:=MediaTek MT7615 wireless driver common code
|
||||
|
@ -376,8 +386,8 @@ endif
|
|||
ifdef CONFIG_PACKAGE_kmod-mt7915e
|
||||
PKG_MAKE_FLAGS += CONFIG_MT7915E=m
|
||||
ifdef CONFIG_TARGET_mediatek_filogic
|
||||
PKG_MAKE_FLAGS += CONFIG_MT7986_WMAC=y
|
||||
NOSTDINC_FLAGS += -DCONFIG_MT7986_WMAC
|
||||
PKG_MAKE_FLAGS += CONFIG_MT798X_WMAC=y
|
||||
NOSTDINC_FLAGS += -DCONFIG_MT798X_WMAC
|
||||
endif
|
||||
endif
|
||||
ifdef CONFIG_PACKAGE_kmod-mt7921-common
|
||||
|
@ -499,6 +509,15 @@ define KernelPackage/mt7916-firmware/install
|
|||
$(1)/lib/firmware/mediatek
|
||||
endef
|
||||
|
||||
define KernelPackage/mt7981-firmware/install
|
||||
$(INSTALL_DIR) $(1)/lib/firmware/mediatek
|
||||
cp \
|
||||
$(PKG_BUILD_DIR)/firmware/mt7981_wa.bin \
|
||||
$(PKG_BUILD_DIR)/firmware/mt7981_wm.bin \
|
||||
$(PKG_BUILD_DIR)/firmware/mt7981_rom_patch.bin \
|
||||
$(1)/lib/firmware/mediatek
|
||||
endef
|
||||
|
||||
define KernelPackage/mt7986-firmware/install
|
||||
$(INSTALL_DIR) $(1)/lib/firmware/mediatek
|
||||
cp \
|
||||
|
@ -507,8 +526,6 @@ define KernelPackage/mt7986-firmware/install
|
|||
$(PKG_BUILD_DIR)/firmware/mt7986_wm.bin \
|
||||
$(PKG_BUILD_DIR)/firmware/mt7986_rom_patch_mt7975.bin \
|
||||
$(PKG_BUILD_DIR)/firmware/mt7986_rom_patch.bin \
|
||||
$(PKG_BUILD_DIR)/firmware/mt7986_eeprom_mt7975_dual.bin \
|
||||
$(PKG_BUILD_DIR)/firmware/mt7986_eeprom_mt7976_dual.bin \
|
||||
$(1)/lib/firmware/mediatek
|
||||
endef
|
||||
|
||||
|
@ -520,6 +537,14 @@ define KernelPackage/mt7921-firmware/install
|
|||
$(1)/lib/firmware/mediatek
|
||||
endef
|
||||
|
||||
define KernelPackage/mt7922-firmware/install
|
||||
$(INSTALL_DIR) $(1)/lib/firmware/mediatek
|
||||
cp \
|
||||
$(PKG_BUILD_DIR)/firmware/WIFI_MT7922_patch_mcu_1_1_hdr.bin \
|
||||
$(PKG_BUILD_DIR)/firmware/WIFI_RAM_CODE_MT7922_1.bin \
|
||||
$(1)/lib/firmware/mediatek
|
||||
endef
|
||||
|
||||
define Package/mt76-test/install
|
||||
mkdir -p $(1)/usr/sbin
|
||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/tools/mt76-test $(1)/usr/sbin
|
||||
|
@ -550,8 +575,10 @@ $(eval $(call KernelPackage,mt7663s))
|
|||
$(eval $(call KernelPackage,mt7915-firmware))
|
||||
$(eval $(call KernelPackage,mt7915e))
|
||||
$(eval $(call KernelPackage,mt7916-firmware))
|
||||
$(eval $(call KernelPackage,mt7981-firmware))
|
||||
$(eval $(call KernelPackage,mt7986-firmware))
|
||||
$(eval $(call KernelPackage,mt7921-firmware))
|
||||
$(eval $(call KernelPackage,mt7922-firmware))
|
||||
$(eval $(call KernelPackage,mt7921-common))
|
||||
$(eval $(call KernelPackage,mt7921u))
|
||||
$(eval $(call KernelPackage,mt7921s))
|
||||
|
|
59
6.1/package/kernel/mt76/patches/001-allow-vht-on-2g.patch
Normal file
59
6.1/package/kernel/mt76/patches/001-allow-vht-on-2g.patch
Normal file
|
@ -0,0 +1,59 @@
|
|||
From ed0b9c38becdbf9379787ca0b4db557f03a31dd7 Mon Sep 17 00:00:00 2001
|
||||
From: DENG Qingfang <dengqf6@mail2.sysu.edu.cn>
|
||||
Date: Mon, 23 Nov 2020 10:46:37 +0800
|
||||
Subject: [PATCH] mt76: allow VHT rate on 2.4GHz
|
||||
|
||||
Allow chips that support 11ac to use 256QAM on 2.4GHz
|
||||
|
||||
Signed-off-by: DENG Qingfang <dqfext@gmail.com>
|
||||
---
|
||||
mac80211.c | 10 +++++-----
|
||||
1 file changed, 5 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/mac80211.c b/mac80211.c
|
||||
index 766681a4..06aa4228 100644
|
||||
--- a/mac80211.c
|
||||
+++ b/mac80211.c
|
||||
@@ -282,7 +282,7 @@ static void mt76_init_stream_cap(struct mt76_phy *phy,
|
||||
void mt76_set_stream_caps(struct mt76_phy *phy, bool vht)
|
||||
{
|
||||
if (phy->cap.has_2ghz)
|
||||
- mt76_init_stream_cap(phy, &phy->sband_2g.sband, false);
|
||||
+ mt76_init_stream_cap(phy, &phy->sband_2g.sband, vht);
|
||||
if (phy->cap.has_5ghz)
|
||||
mt76_init_stream_cap(phy, &phy->sband_5g.sband, vht);
|
||||
if (phy->cap.has_6ghz)
|
||||
@@ -349,13 +349,13 @@ mt76_init_sband(struct mt76_phy *phy, struct mt76_sband *msband,
|
||||
|
||||
static int
|
||||
mt76_init_sband_2g(struct mt76_phy *phy, struct ieee80211_rate *rates,
|
||||
- int n_rates)
|
||||
+ int n_rates, bool vht)
|
||||
{
|
||||
phy->hw->wiphy->bands[NL80211_BAND_2GHZ] = &phy->sband_2g.sband;
|
||||
|
||||
return mt76_init_sband(phy, &phy->sband_2g, mt76_channels_2ghz,
|
||||
ARRAY_SIZE(mt76_channels_2ghz), rates,
|
||||
- n_rates, true, false);
|
||||
+ n_rates, true, vht);
|
||||
}
|
||||
|
||||
static int
|
||||
@@ -508,7 +508,7 @@ int mt76_register_phy(struct mt76_phy *phy, bool vht,
|
||||
return ret;
|
||||
|
||||
if (phy->cap.has_2ghz) {
|
||||
- ret = mt76_init_sband_2g(phy, rates, n_rates);
|
||||
+ ret = mt76_init_sband_2g(phy, rates, n_rates, vht);
|
||||
if (ret)
|
||||
return ret;
|
||||
}
|
||||
@@ -691,7 +691,7 @@ int mt76_register_device(struct mt76_dev *dev, bool vht,
|
||||
return ret;
|
||||
|
||||
if (phy->cap.has_2ghz) {
|
||||
- ret = mt76_init_sband_2g(phy, rates, n_rates);
|
||||
+ ret = mt76_init_sband_2g(phy, rates, n_rates, vht);
|
||||
if (ret)
|
||||
return ret;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue