From f8d1fc74ba618597f7b2d6b465a9783c3db69697 Mon Sep 17 00:00:00 2001 From: LEAN-ESX Date: Fri, 22 Nov 2019 05:18:02 -0800 Subject: [PATCH 1/2] mac80211/hostapd: add support for 256-QAM --- package/kernel/mac80211/Makefile | 2 +- .../files/lib/netifd/wireless/mac80211.sh | 4 +-- .../ath/983-ath10k-allow-vht-on-2g.patch | 10 ++++++ .../subsys/600-mac80211-allow-vht-on-2g.patch | 36 +++++++++++++++++++ package/network/services/hostapd/Makefile | 2 +- .../network/services/hostapd/files/hostapd.sh | 4 ++- 6 files changed, 53 insertions(+), 5 deletions(-) create mode 100644 package/kernel/mac80211/patches/ath/983-ath10k-allow-vht-on-2g.patch create mode 100644 package/kernel/mac80211/patches/subsys/600-mac80211-allow-vht-on-2g.patch diff --git a/package/kernel/mac80211/Makefile b/package/kernel/mac80211/Makefile index 422c0436e4..d8a5b96fce 100644 --- a/package/kernel/mac80211/Makefile +++ b/package/kernel/mac80211/Makefile @@ -11,7 +11,7 @@ include $(INCLUDE_DIR)/kernel.mk PKG_NAME:=mac80211 PKG_VERSION:=5.4-rc2-1 -PKG_RELEASE:=2 +PKG_RELEASE:=3 PKG_SOURCE_URL:=@KERNEL/linux/kernel/projects/backports/stable/v5.4-rc2/ PKG_HASH:=b3baedc135b455f09f266cb77e73276ca21bceeb0f24bac2184cc4b97d09cdbf diff --git a/package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh b/package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh index a04f1e3ca7..6ac31c42cc 100644 --- a/package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh +++ b/package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh @@ -103,7 +103,7 @@ mac80211_hostapd_setup_base() { [ -n "$acs_exclude_dfs" ] && [ "$acs_exclude_dfs" -gt 0 ] && append base_cfg "acs_exclude_dfs=1" "$N" - json_get_vars noscan ht_coex + json_get_vars noscan ht_coex vendor_vht json_get_values ht_capab_list ht_capab tx_burst [ -n "$noscan" -a "$noscan" -gt 0 ] && hostapd_noscan=1 @@ -217,7 +217,7 @@ mac80211_hostapd_setup_base() { ;; esac - if [ "$enable_ac" != "0" ]; then + if [ "$enable_ac" != "0" -o "$vendor_vht" = "1" ]; then json_get_vars \ rxldpc:1 \ short_gi_80:1 \ diff --git a/package/kernel/mac80211/patches/ath/983-ath10k-allow-vht-on-2g.patch b/package/kernel/mac80211/patches/ath/983-ath10k-allow-vht-on-2g.patch new file mode 100644 index 0000000000..eeca88a613 --- /dev/null +++ b/package/kernel/mac80211/patches/ath/983-ath10k-allow-vht-on-2g.patch @@ -0,0 +1,10 @@ +--- a/drivers/net/wireless/ath/ath10k/mac.c ++++ b/drivers/net/wireless/ath/ath10k/mac.c +@@ -4718,6 +4718,7 @@ static void ath10k_mac_setup_ht_vht_cap( + if (ar->phy_capability & WHAL_WLAN_11G_CAPABILITY) { + band = &ar->mac.sbands[NL80211_BAND_2GHZ]; + band->ht_cap = ht_cap; ++ band->vht_cap = vht_cap; + } + if (ar->phy_capability & WHAL_WLAN_11A_CAPABILITY) { + band = &ar->mac.sbands[NL80211_BAND_5GHZ]; diff --git a/package/kernel/mac80211/patches/subsys/600-mac80211-allow-vht-on-2g.patch b/package/kernel/mac80211/patches/subsys/600-mac80211-allow-vht-on-2g.patch new file mode 100644 index 0000000000..da9fcd2185 --- /dev/null +++ b/package/kernel/mac80211/patches/subsys/600-mac80211-allow-vht-on-2g.patch @@ -0,0 +1,36 @@ +--- a/net/mac80211/vht.c ++++ b/net/mac80211/vht.c +@@ -135,7 +135,8 @@ ieee80211_vht_cap_ie_to_sta_vht_cap(stru + have_80mhz = false; + for (i = 0; i < sband->n_channels; i++) { + if (sband->channels[i].flags & (IEEE80211_CHAN_DISABLED | +- IEEE80211_CHAN_NO_80MHZ)) ++ IEEE80211_CHAN_NO_80MHZ) && ++ (sband->band != NL80211_BAND_2GHZ)) + continue; + + have_80mhz = true; +--- a/net/mac80211/util.c ++++ b/net/mac80211/util.c +@@ -1769,7 +1769,8 @@ static int ieee80211_build_preq_ies_band + /* Check if any channel in this sband supports at least 80 MHz */ + for (i = 0; i < sband->n_channels; i++) { + if (sband->channels[i].flags & (IEEE80211_CHAN_DISABLED | +- IEEE80211_CHAN_NO_80MHZ)) ++ IEEE80211_CHAN_NO_80MHZ) && ++ (sband->band != NL80211_BAND_2GHZ)) + continue; + + have_80mhz = true; +--- a/net/mac80211/mlme.c ++++ b/net/mac80211/mlme.c +@@ -4824,7 +4824,8 @@ static int ieee80211_prep_channel(struct + have_80mhz = false; + for (i = 0; i < sband->n_channels; i++) { + if (sband->channels[i].flags & (IEEE80211_CHAN_DISABLED | +- IEEE80211_CHAN_NO_80MHZ)) ++ IEEE80211_CHAN_NO_80MHZ) && ++ (sband->band != NL80211_BAND_2GHZ)) + continue; + + have_80mhz = true; diff --git a/package/network/services/hostapd/Makefile b/package/network/services/hostapd/Makefile index 408c15390e..a04b1ad04a 100644 --- a/package/network/services/hostapd/Makefile +++ b/package/network/services/hostapd/Makefile @@ -7,7 +7,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=hostapd -PKG_RELEASE:=2 +PKG_RELEASE:=3 PKG_SOURCE_URL:=http://w1.fi/hostap.git PKG_SOURCE_PROTO:=git diff --git a/package/network/services/hostapd/files/hostapd.sh b/package/network/services/hostapd/files/hostapd.sh index f03b98ff85..beed61b084 100644 --- a/package/network/services/hostapd/files/hostapd.sh +++ b/package/network/services/hostapd/files/hostapd.sh @@ -92,6 +92,7 @@ hostapd_common_add_device_config() { config_add_boolean country_ie doth config_add_string require_mode config_add_boolean legacy_rates + config_add_boolean vendor_vht config_add_string acs_chan_bias config_add_array hostapd_options @@ -106,7 +107,7 @@ hostapd_prepare_device_config() { local base="${config%%.conf}" local base_cfg= - json_get_vars country country_ie beacon_int:100 doth require_mode legacy_rates acs_chan_bias + json_get_vars country country_ie beacon_int:100 doth require_mode legacy_rates acs_chan_bias vendor_vht hostapd_set_log_options base_cfg @@ -136,6 +137,7 @@ hostapd_prepare_device_config() { [ "$hwmode" = "g" ] && { [ "$legacy_rates" -eq 0 ] && set_default rate_list "6000 9000 12000 18000 24000 36000 48000 54000" [ -n "$require_mode" ] && set_default basic_rate_list "6000 12000 24000" + [ -n "$vendor_vht" ] && append base_cfg "vendor_vht=$vendor_vht" "$N" } case "$require_mode" in From 41a69567c0dd81822080a3c79949b425a7c25ef8 Mon Sep 17 00:00:00 2001 From: LEAN-ESX Date: Fri, 22 Nov 2019 05:29:00 -0800 Subject: [PATCH 2/2] mt76: bumpt to latest version --- package/kernel/mt76/Makefile | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/package/kernel/mt76/Makefile b/package/kernel/mt76/Makefile index f37aa4c745..ce2bf8f14b 100644 --- a/package/kernel/mt76/Makefile +++ b/package/kernel/mt76/Makefile @@ -8,9 +8,9 @@ PKG_LICENSE_FILES:= PKG_SOURCE_URL:=https://github.com/openwrt/mt76 PKG_SOURCE_PROTO:=git -PKG_SOURCE_DATE:=2019-07-13 -PKG_SOURCE_VERSION:=410923fa24de770c042ea816cff6c18b9b184a2d -PKG_MIRROR_HASH:=0f546ba43bb8212ec7851ac22f5d0d32e8dddb1b893aa6d0209c48488122df04 +PKG_SOURCE_DATE:=2019-10-10 +PKG_SOURCE_VERSION:=d3a589586d1b1d9e1422e31f642a500ff0195f20 +PKG_MIRROR_HASH:=46df12037db0d3438cb0ae97cded24a6562502d5cbd2d6d6d4e72ca807b0407e PKG_MAINTAINER:=Felix Fietkau PKG_BUILD_PARALLEL:=1 @@ -144,6 +144,7 @@ define KernelPackage/mt7615e DEPENDS+=@PCI_SUPPORT +kmod-mt76-core FILES:=\ $(PKG_BUILD_DIR)/mt7615/mt7615e.ko + MODPARAMS:=async_probe AUTOLOAD:=$(call AutoProbe,mt7615e) endef @@ -246,12 +247,12 @@ define KernelPackage/mt7603/install endef define KernelPackage/mt7615e/install - $(INSTALL_DIR) $(1)/lib/firmware + $(INSTALL_DIR) $(1)/lib/firmware/mediatek cp \ $(PKG_BUILD_DIR)/firmware/mt7615_cr4.bin \ $(PKG_BUILD_DIR)/firmware/mt7615_n9.bin \ $(PKG_BUILD_DIR)/firmware/mt7615_rom_patch.bin \ - $(1)/lib/firmware + $(1)/lib/firmware/mediatek endef $(eval $(call KernelPackage,mt76-core))