Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 134227
b: refs/heads/master
c: eb2599c
h: refs/heads/master
i:
  134225: b067d76
  134223: c97f204
v: v3
  • Loading branch information
Sujith authored and John W. Linville committed Jan 29, 2009
1 parent e6467e3 commit f80c366
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 6 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 27abe060aa9d3410545ef663676c7183fc2512c6
refs/heads/master: eb2599ca25be212bd37dd3e90ef13ea45758e838
23 changes: 18 additions & 5 deletions trunk/drivers/net/wireless/ath9k/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -854,7 +854,8 @@ static void ath_key_delete(struct ath_softc *sc, struct ieee80211_key_conf *key)
}
}

static void setup_ht_cap(struct ieee80211_sta_ht_cap *ht_info)
static void setup_ht_cap(struct ath_softc *sc,
struct ieee80211_sta_ht_cap *ht_info)
{
#define ATH9K_HT_CAP_MAXRXAMPDU_65536 0x3 /* 2 ^ 16 */
#define ATH9K_HT_CAP_MPDUDENSITY_8 0x6 /* 8 usec */
Expand All @@ -867,10 +868,22 @@ static void setup_ht_cap(struct ieee80211_sta_ht_cap *ht_info)

ht_info->ampdu_factor = ATH9K_HT_CAP_MAXRXAMPDU_65536;
ht_info->ampdu_density = ATH9K_HT_CAP_MPDUDENSITY_8;

/* set up supported mcs set */
memset(&ht_info->mcs, 0, sizeof(ht_info->mcs));
ht_info->mcs.rx_mask[0] = 0xff;
ht_info->mcs.rx_mask[1] = 0xff;

switch(sc->sc_rx_chainmask) {
case 1:
ht_info->mcs.rx_mask[0] = 0xff;
break;
case 5:
case 7:
default:
ht_info->mcs.rx_mask[0] = 0xff;
ht_info->mcs.rx_mask[1] = 0xff;
break;
}

ht_info->mcs.tx_params = IEEE80211_HT_MCS_TX_DEFINED;
}

Expand Down Expand Up @@ -1549,9 +1562,9 @@ int ath_attach(u16 devid, struct ath_softc *sc)
hw->rate_control_algorithm = "ath9k_rate_control";

if (sc->sc_ah->ah_caps.hw_caps & ATH9K_HW_CAP_HT) {
setup_ht_cap(&sc->sbands[IEEE80211_BAND_2GHZ].ht_cap);
setup_ht_cap(sc, &sc->sbands[IEEE80211_BAND_2GHZ].ht_cap);
if (test_bit(ATH9K_MODE_11A, sc->sc_ah->ah_caps.wireless_modes))
setup_ht_cap(&sc->sbands[IEEE80211_BAND_5GHZ].ht_cap);
setup_ht_cap(sc, &sc->sbands[IEEE80211_BAND_5GHZ].ht_cap);
}

hw->wiphy->bands[IEEE80211_BAND_2GHZ] = &sc->sbands[IEEE80211_BAND_2GHZ];
Expand Down

0 comments on commit f80c366

Please sign in to comment.