Merge tag 'auxdisplay-for-linus-v5.12' of git://github.com/ojeda/linux
[linux-2.6-microblaze.git] / net / mac80211 / vht.c
index c3ca973..e856f90 100644 (file)
@@ -484,6 +484,7 @@ enum ieee80211_sta_rx_bandwidth ieee80211_sta_cur_vht_bw(struct sta_info *sta)
 void ieee80211_sta_set_rx_nss(struct sta_info *sta)
 {
        u8 ht_rx_nss = 0, vht_rx_nss = 0, he_rx_nss = 0, rx_nss;
+       bool support_160;
 
        /* if we received a notification already don't overwrite it */
        if (sta->sta.rx_nss)
@@ -514,7 +515,13 @@ void ieee80211_sta_set_rx_nss(struct sta_info *sta)
                        }
                }
 
-               he_rx_nss = min(rx_mcs_80, rx_mcs_160);
+               support_160 = he_cap->he_cap_elem.phy_cap_info[0] &
+                             IEEE80211_HE_PHY_CAP0_CHANNEL_WIDTH_SET_160MHZ_IN_5G;
+
+               if (support_160)
+                       he_rx_nss = min(rx_mcs_80, rx_mcs_160);
+               else
+                       he_rx_nss = rx_mcs_80;
        }
 
        if (sta->sta.ht_cap.ht_supported) {