Some AP advertise 3 or 4 spatial stream MCS indexes in their basic HT-MCS set. On cards with lower (2x2) spatial streams, the check would fail, and we'd be stuck with no HT when it in fact work fine with 2-stream rate. This change makes it so the check is only performed in strict mode. Signed-off-by: Rio Liu --- My previous mail is showing up as empty on LKML for some reason. Apologies for that, trying again. There has been some reports that WIFI speed is capped on some routers: Link: https://linuxcommunity.io/t/intel-ax210-speeds-capped-at-20-mbps-on-multiple-distros/6708/28 Link: https://bbs.archlinux.org/viewtopic.php?id=312952 Link: https://bbs.archlinux.org/viewtopic.php?id=313033 Link: https://www.reddit.com/r/Rogers/comments/1s89j9f/xb8_5ghz_dfs_channel_broadcasting_at_54_mbps/ Link: https://www.reddit.com/r/Comcast_Xfinity/comments/1s7fc3f/recent_firmware_update_to_wifi_gateway_breaking/ Link: https://www.reddit.com/r/Comcast_Xfinity/comments/1sg9r6z/slow_internet_for_linux_computers/ Apparently some APs advertises higher MIMO streams than the device supports. In that case, HT-MCS check would fail and we fall back to 20MHz channel. A patch exists here that bypasses the check completely: https://github.com/WoodyWoodster/mac80211-mcs-patch, and have been reported to get 80MHz channel back. This patch adds a check on STRICT flag before verifying HT MCS set from the AP, similar to how it is done in ieee80211_verify_sta_vht_mcs_support. --- net/mac80211/mlme.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c index 810bea1aacc5..0e33733ac634 100644 --- a/net/mac80211/mlme.c +++ b/net/mac80211/mlme.c @@ -419,6 +419,15 @@ ieee80211_verify_sta_ht_mcs_support(struct ieee80211_sub_if_data *sdata, memcpy(&sta_ht_cap, &sband->ht_cap, sizeof(sta_ht_cap)); ieee80211_apply_htcap_overrides(sdata, &sta_ht_cap); + /* + * Some AP advertise 3 or 4 spatial stream MCS indexes in their basic HT-MCS + * set. On cards with lower (2x2) spatial streams, the check would fail, and + * we'd be stuck with no HT when it in fact work fine with 2-stream rate. So + * check it only in strict mode. + */ + if (!ieee80211_hw_check(&sdata->local->hw, STRICT)) + return true; + /* * P802.11REVme/D7.0 - 6.5.4.2.4 * ... -- base-commit: d65b175cfac64ee65506eea7fa573d291a9694ca