|
@@ -1324,6 +1324,33 @@ mwifiex_cfg80211_set_antenna(struct wiphy *wiphy, u32 tx_ant, u32 rx_ant)
|
|
|
tx_ant = RF_ANTENNA_AUTO;
|
|
|
rx_ant = RF_ANTENNA_AUTO;
|
|
|
}
|
|
|
+ } else {
|
|
|
+ struct ieee80211_sta_ht_cap *ht_info;
|
|
|
+ int rx_mcs_supp;
|
|
|
+ enum ieee80211_band band;
|
|
|
+
|
|
|
+ if ((tx_ant == 0x1 && rx_ant == 0x1)) {
|
|
|
+ adapter->user_dev_mcs_support = HT_STREAM_1X1;
|
|
|
+ if (adapter->is_hw_11ac_capable)
|
|
|
+ adapter->usr_dot_11ac_mcs_support =
|
|
|
+ MWIFIEX_11AC_MCS_MAP_1X1;
|
|
|
+ } else {
|
|
|
+ adapter->user_dev_mcs_support = HT_STREAM_2X2;
|
|
|
+ if (adapter->is_hw_11ac_capable)
|
|
|
+ adapter->usr_dot_11ac_mcs_support =
|
|
|
+ MWIFIEX_11AC_MCS_MAP_2X2;
|
|
|
+ }
|
|
|
+
|
|
|
+ for (band = 0; band < IEEE80211_NUM_BANDS; band++) {
|
|
|
+ if (!adapter->wiphy->bands[band])
|
|
|
+ continue;
|
|
|
+
|
|
|
+ ht_info = &adapter->wiphy->bands[band]->ht_cap;
|
|
|
+ rx_mcs_supp =
|
|
|
+ GET_RXMCSSUPP(adapter->user_dev_mcs_support);
|
|
|
+ memset(&ht_info->mcs, 0, adapter->number_of_antenna);
|
|
|
+ memset(&ht_info->mcs, 0xff, rx_mcs_supp);
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
ant_cfg.tx_ant = tx_ant;
|
|
@@ -2093,8 +2120,8 @@ mwifiex_setup_ht_caps(struct ieee80211_sta_ht_cap *ht_info,
|
|
|
ht_info->cap &= ~IEEE80211_HT_CAP_MAX_AMSDU;
|
|
|
ht_info->cap |= IEEE80211_HT_CAP_SM_PS;
|
|
|
|
|
|
- rx_mcs_supp = GET_RXMCSSUPP(adapter->hw_dev_mcs_support);
|
|
|
- /* Set MCS for 1x1 */
|
|
|
+ rx_mcs_supp = GET_RXMCSSUPP(adapter->user_dev_mcs_support);
|
|
|
+ /* Set MCS for 1x1/2x2 */
|
|
|
memset(mcs, 0xff, rx_mcs_supp);
|
|
|
/* Clear all the other values */
|
|
|
memset(&mcs[rx_mcs_supp], 0,
|