From 6ad4588a9b4f15ee5e526adf006d11c9dabc564c Mon Sep 17 00:00:00 2001 From: coolsnowwolf Date: Tue, 6 Jul 2021 00:08:31 +0800 Subject: [PATCH] ath11k: allow vht on 2.4g --- .../ath11k/983-ath11k-Enable-VHT-for-2G.patch | 35 +++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 package/kernel/mac80211/patches/ath11k/983-ath11k-Enable-VHT-for-2G.patch diff --git a/package/kernel/mac80211/patches/ath11k/983-ath11k-Enable-VHT-for-2G.patch b/package/kernel/mac80211/patches/ath11k/983-ath11k-Enable-VHT-for-2G.patch new file mode 100644 index 000000000..d5fab8b23 --- /dev/null +++ b/package/kernel/mac80211/patches/ath11k/983-ath11k-Enable-VHT-for-2G.patch @@ -0,0 +1,35 @@ +--- a/drivers/net/wireless/ath/ath11k/mac.c ++++ b/drivers/net/wireless/ath/ath11k/mac.c +@@ -1593,9 +1593,9 @@ static void ath11k_peer_assoc_h_phymode( + } else if (sta->vht_cap.vht_supported && + !ath11k_peer_assoc_h_vht_masked(vht_mcs_mask)) { + if (sta->bandwidth == IEEE80211_STA_RX_BW_40) +- phymode = MODE_11AC_VHT40; ++ phymode = MODE_11AC_VHT40_2G; + else +- phymode = MODE_11AC_VHT20; ++ phymode = MODE_11AC_VHT20_2G; + } else if (sta->ht_cap.ht_supported && + !ath11k_peer_assoc_h_ht_masked(ht_mcs_mask)) { + if (sta->bandwidth == IEEE80211_STA_RX_BW_40) +@@ -3552,6 +3552,9 @@ static void ath11k_mac_setup_ht_vht_cap( + *ht_cap_info = ht_cap; + band->ht_cap = ath11k_create_ht_cap(ar, ht_cap, + rate_cap_rx_chainmask); ++ ++ band->vht_cap = ath11k_create_vht_cap(ar, rate_cap_tx_chainmask, ++ rate_cap_rx_chainmask); + } + + if (cap->supported_bands & WMI_HOST_WLAN_5G_CAP && !ar->supports_6ghz) { +--- a/drivers/net/wireless/ath/ath11k/wmi.c ++++ b/drivers/net/wireless/ath/ath11k/wmi.c +@@ -346,6 +346,8 @@ ath11k_pull_mac_phy_cap_svc_ready_ext(st + * handled. + */ + if (mac_phy_caps->supported_bands & WMI_HOST_WLAN_2G_CAP) { ++ pdev_cap->vht_cap = mac_phy_caps->vht_cap_info_2g; ++ pdev_cap->vht_mcs = mac_phy_caps->vht_supp_mcs_2g; + pdev_cap->tx_chain_mask = mac_phy_caps->tx_chain_mask_2g; + pdev_cap->rx_chain_mask = mac_phy_caps->rx_chain_mask_2g; + } else if (mac_phy_caps->supported_bands & WMI_HOST_WLAN_5G_CAP) {