mac80211: update support for QAM-256 in 2.4GHz

This commit is contained in:
Lucas Asvio
2024-07-17 20:25:26 +02:00
parent 16792da026
commit 2c62013cc0
4 changed files with 18 additions and 46 deletions

View File

@@ -12,11 +12,9 @@ Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
drivers/net/wireless/ath/ath10k/mac.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/net/wireless/ath/ath10k/mac.c b/drivers/net/wireless/ath/ath10k/mac.c
index 9c4bf2fdbc0f..8d362ba351e6 100644
--- a/drivers/net/wireless/ath/ath10k/mac.c
+++ b/drivers/net/wireless/ath/ath10k/mac.c
@@ -2749,9 +2749,9 @@ static void ath10k_peer_assoc_h_phymode(struct ath10k *ar,
@@ -2749,9 +2749,9 @@ static void ath10k_peer_assoc_h_phymode(
if (sta->deflink.vht_cap.vht_supported &&
!ath10k_peer_assoc_h_vht_masked(vht_mcs_mask)) {
if (sta->deflink.bandwidth == IEEE80211_STA_RX_BW_40)
@@ -28,7 +26,7 @@ index 9c4bf2fdbc0f..8d362ba351e6 100644
} else if (sta->deflink.ht_cap.ht_supported &&
!ath10k_peer_assoc_h_ht_masked(ht_mcs_mask)) {
if (sta->deflink.bandwidth == IEEE80211_STA_RX_BW_40)
@@ -4998,6 +4998,8 @@ static void ath10k_mac_setup_ht_vht_cap(struct ath10k *ar)
@@ -4998,6 +4998,8 @@ 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;
@@ -37,6 +35,3 @@ index 9c4bf2fdbc0f..8d362ba351e6 100644
}
if (ar->phy_capability & WHAL_WLAN_11A_CAPABILITY) {
band = &ar->mac.sbands[NL80211_BAND_5GHZ];
--
2.40.1

View File

@@ -13,11 +13,9 @@ Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
drivers/net/wireless/ath/ath11k/wmi.c | 2 ++
2 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/drivers/net/wireless/ath/ath11k/mac.c b/drivers/net/wireless/ath/ath11k/mac.c
index c947d1c8d8c1..1cadfdd50afc 100644
--- a/drivers/net/wireless/ath/ath11k/mac.c
+++ b/drivers/net/wireless/ath/ath11k/mac.c
@@ -2773,9 +2773,9 @@ static void ath11k_peer_assoc_h_phymode(struct ath11k *ar,
@@ -2773,9 +2773,9 @@ static void ath11k_peer_assoc_h_phymode(
} else if (sta->deflink.vht_cap.vht_supported &&
!ath11k_peer_assoc_h_vht_masked(vht_mcs_mask)) {
if (sta->deflink.bandwidth == IEEE80211_STA_RX_BW_40)
@@ -29,7 +27,7 @@ index c947d1c8d8c1..1cadfdd50afc 100644
} else if (sta->deflink.ht_cap.ht_supported &&
!ath11k_peer_assoc_h_ht_masked(ht_mcs_mask)) {
if (sta->deflink.bandwidth == IEEE80211_STA_RX_BW_40)
@@ -5613,6 +5613,9 @@ static void ath11k_mac_setup_ht_vht_cap(struct ath11k *ar,
@@ -5613,6 +5613,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);
@@ -39,11 +37,9 @@ index c947d1c8d8c1..1cadfdd50afc 100644
}
if (cap->supported_bands & WMI_HOST_WLAN_5G_CAP &&
diff --git a/drivers/net/wireless/ath/ath11k/wmi.c b/drivers/net/wireless/ath/ath11k/wmi.c
index 443199e85fa2..77054ed687d5 100644
--- a/drivers/net/wireless/ath/ath11k/wmi.c
+++ b/drivers/net/wireless/ath/ath11k/wmi.c
@@ -406,6 +406,8 @@ ath11k_pull_mac_phy_cap_svc_ready_ext(struct ath11k_pdev_wmi *wmi_handle,
@@ -406,6 +406,8 @@ ath11k_pull_mac_phy_cap_svc_ready_ext(st
* handled.
*/
if (mac_phy_caps->supported_bands & WMI_HOST_WLAN_2G_CAP) {
@@ -52,6 +48,3 @@ index 443199e85fa2..77054ed687d5 100644
pdev_cap->tx_chain_mask = mac_phy_caps->tx_chain_mask_2g;
pdev_cap->rx_chain_mask = mac_phy_caps->rx_chain_mask_2g;
}
--
2.40.1

View File

@@ -25,11 +25,9 @@ Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
net/mac80211/vht.c | 52 +++++++++++++++++++++++++++---------------
4 files changed, 51 insertions(+), 27 deletions(-)
diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h
index 1b8619685bf6..e9c9afae9a80 100644
--- a/include/net/cfg80211.h
+++ b/include/net/cfg80211.h
@@ -338,11 +338,13 @@ struct ieee80211_sta_ht_cap {
@@ -343,11 +343,13 @@ struct ieee80211_sta_ht_cap {
* to describe 802.11ac VHT capabilities for an STA.
*
* @vht_supported: is VHT supported by the STA
@@ -43,11 +41,9 @@ index 1b8619685bf6..e9c9afae9a80 100644
u32 cap; /* use IEEE80211_VHT_CAP_ */
struct ieee80211_vht_mcs_info vht_mcs;
};
diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c
index 3827b5dcdb03..9c3b3de28dc8 100644
--- a/net/mac80211/mlme.c
+++ b/net/mac80211/mlme.c
@@ -4720,7 +4720,7 @@ static int ieee80211_prep_channel(struct ieee80211_sub_if_data *sdata,
@@ -4637,7 +4637,7 @@ static int ieee80211_prep_channel(struct
const struct cfg80211_bss_ies *ies;
int ret;
u32 i;
@@ -56,7 +52,7 @@ index 3827b5dcdb03..9c3b3de28dc8 100644
rcu_read_lock();
@@ -4867,18 +4867,22 @@ static int ieee80211_prep_channel(struct ieee80211_sub_if_data *sdata,
@@ -4770,18 +4770,22 @@ static int ieee80211_prep_channel(struct
}
/* Allow VHT if at least one channel on the sband supports 80 MHz */
@@ -83,11 +79,9 @@ index 3827b5dcdb03..9c3b3de28dc8 100644
*conn_flags |= IEEE80211_CONN_DISABLE_VHT;
}
diff --git a/net/mac80211/util.c b/net/mac80211/util.c
index 083ad56d08d9..3fc1e84e4275 100644
--- a/net/mac80211/util.c
+++ b/net/mac80211/util.c
@@ -1951,7 +1951,7 @@ static int ieee80211_build_preq_ies_band(struct ieee80211_sub_if_data *sdata,
@@ -1843,7 +1843,7 @@ static int ieee80211_build_preq_ies_band
int ext_rates_len;
int shift;
u32 rate_flags;
@@ -96,7 +90,7 @@ index 083ad56d08d9..3fc1e84e4275 100644
*offset = 0;
@@ -2089,11 +2089,15 @@ static int ieee80211_build_preq_ies_band(struct ieee80211_sub_if_data *sdata,
@@ -1973,11 +1973,15 @@ static int ieee80211_build_preq_ies_band
IEEE80211_CHAN_NO_80MHZ))
continue;
@@ -114,20 +108,18 @@ index 083ad56d08d9..3fc1e84e4275 100644
if (end - pos < 2 + sizeof(struct ieee80211_vht_cap))
goto out_err;
pos = ieee80211_ie_build_vht_cap(pos, &sband->vht_cap,
diff --git a/net/mac80211/vht.c b/net/mac80211/vht.c
index c1250aa47808..37f4673d4194 100644
--- a/net/mac80211/vht.c
+++ b/net/mac80211/vht.c
@@ -121,7 +121,7 @@ ieee80211_vht_cap_ie_to_sta_vht_cap(struct ieee80211_sub_if_data *sdata,
@@ -122,7 +122,7 @@ ieee80211_vht_cap_ie_to_sta_vht_cap(stru
struct ieee80211_sta_vht_cap *vht_cap = &link_sta->pub->vht_cap;
struct ieee80211_sta_vht_cap own_cap;
u32 cap_info, i;
- bool have_80mhz;
+ bool can_vht;
u32 mpdu_len;
memset(vht_cap, 0, sizeof(*vht_cap));
@@ -132,17 +132,21 @@ ieee80211_vht_cap_ie_to_sta_vht_cap(struct ieee80211_sub_if_data *sdata,
@@ -134,17 +134,21 @@ ieee80211_vht_cap_ie_to_sta_vht_cap(stru
return;
/* Allow VHT if at least one channel on the sband supports 80 MHz */
@@ -152,7 +144,7 @@ index c1250aa47808..37f4673d4194 100644
return;
/*
@@ -346,16 +350,16 @@ ieee80211_sta_cap_rx_bw(struct link_sta_info *link_sta)
@@ -358,16 +362,16 @@ ieee80211_sta_cap_rx_bw(struct link_sta_
struct ieee80211_sta_vht_cap *vht_cap = &link_sta->pub->vht_cap;
struct ieee80211_sta_he_cap *he_cap = &link_sta->pub->he_cap;
struct ieee80211_sta_eht_cap *eht_cap = &link_sta->pub->eht_cap;
@@ -174,7 +166,7 @@ index c1250aa47808..37f4673d4194 100644
if (eht_cap->has_eht &&
link_conf->chandef.chan->band == NL80211_BAND_6GHZ) {
info = eht_cap->eht_cap_elem.phy_cap_info[0];
@@ -383,32 +387,42 @@ ieee80211_sta_cap_rx_bw(struct link_sta_info *link_sta)
@@ -395,32 +399,42 @@ ieee80211_sta_cap_rx_bw(struct link_sta_
ret = IEEE80211_STA_RX_BW_80;
else
ret = IEEE80211_STA_RX_BW_20;
@@ -217,16 +209,13 @@ index c1250aa47808..37f4673d4194 100644
+ ret = IEEE80211_STA_RX_BW_160;
+ goto out;
+ }
+
+ ret = IEEE80211_STA_RX_BW_80;
- return IEEE80211_STA_RX_BW_80;
+ ret = IEEE80211_STA_RX_BW_80;
+
+out:
+ rcu_read_unlock();
+ return ret;
}
enum nl80211_chan_width
--
2.40.1

View File

@@ -15,11 +15,9 @@ Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
net/mac80211/vht.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/net/mac80211/vht.c b/net/mac80211/vht.c
index 37f4673d4194..b57391a032c8 100644
--- a/net/mac80211/vht.c
+++ b/net/mac80211/vht.c
@@ -400,6 +400,12 @@ ieee80211_sta_cap_rx_bw(struct link_sta_info *link_sta)
@@ -412,6 +412,12 @@ ieee80211_sta_cap_rx_bw(struct link_sta_
goto out;
}
@@ -32,6 +30,3 @@ index 37f4673d4194..b57391a032c8 100644
cap_width = vht_cap->cap & IEEE80211_VHT_CAP_SUPP_CHAN_WIDTH_MASK;
if (cap_width == IEEE80211_VHT_CAP_SUPP_CHAN_WIDTH_160MHZ ||
--
2.40.1