ath9k_htc: Support reporting tx and rx chain mask.
[cascardo/linux.git] / drivers / net / wireless / ath / ath9k / htc_drv_init.c
index 6eb4199..925c5b0 100644 (file)
@@ -517,6 +517,9 @@ static void setup_ht_cap(struct ath9k_htc_priv *priv,
        ath_dbg(common, CONFIG, "TX streams %d, RX streams: %d\n",
                tx_streams, rx_streams);
 
+       if (tx_streams >= 2)
+               ht_info->cap |= IEEE80211_HT_CAP_TX_STBC;
+
        if (tx_streams != rx_streams) {
                ht_info->mcs.tx_params |= IEEE80211_HT_MCS_TX_RX_DIFF;
                ht_info->mcs.tx_params |= ((tx_streams - 1) <<
@@ -713,6 +716,7 @@ static void ath9k_set_hw_capab(struct ath9k_htc_priv *priv,
                               struct ieee80211_hw *hw)
 {
        struct ath_common *common = ath9k_hw_common(priv->ah);
+       struct base_eep_header *pBase;
 
        hw->flags = IEEE80211_HW_SIGNAL_DBM |
                IEEE80211_HW_AMPDU_AGGREGATION |
@@ -722,6 +726,7 @@ static void ath9k_set_hw_capab(struct ath9k_htc_priv *priv,
                IEEE80211_HW_SUPPORTS_PS |
                IEEE80211_HW_PS_NULLFUNC_STACK |
                IEEE80211_HW_REPORTS_TX_ACK_STATUS |
+               IEEE80211_HW_MFP_CAPABLE |
                IEEE80211_HW_HOST_BROADCAST_PS_BUFFERING;
 
        hw->wiphy->interface_modes =
@@ -767,6 +772,12 @@ static void ath9k_set_hw_capab(struct ath9k_htc_priv *priv,
                                     &priv->sbands[IEEE80211_BAND_5GHZ].ht_cap);
        }
 
+       pBase = ath9k_htc_get_eeprom_base(priv);
+       if (pBase) {
+               hw->wiphy->available_antennas_rx = pBase->rxMask;
+               hw->wiphy->available_antennas_tx = pBase->txMask;
+       }
+
        SET_IEEE80211_PERM_ADDR(hw, common->macaddr);
 }