ath9k: Handle different TX and RX streams properly.
This patch fixes an issue when the TX and RX streams are different. Signed-off-by: Senthil Balasubramanian <senthilkumar@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
This commit is contained in:
Родитель
e5f0921a95
Коммит
140add2135
|
@ -889,6 +889,7 @@ static void setup_ht_cap(struct ath_softc *sc,
|
||||||
{
|
{
|
||||||
#define ATH9K_HT_CAP_MAXRXAMPDU_65536 0x3 /* 2 ^ 16 */
|
#define ATH9K_HT_CAP_MAXRXAMPDU_65536 0x3 /* 2 ^ 16 */
|
||||||
#define ATH9K_HT_CAP_MPDUDENSITY_8 0x6 /* 8 usec */
|
#define ATH9K_HT_CAP_MPDUDENSITY_8 0x6 /* 8 usec */
|
||||||
|
u8 tx_streams, rx_streams;
|
||||||
|
|
||||||
ht_info->ht_supported = true;
|
ht_info->ht_supported = true;
|
||||||
ht_info->cap = IEEE80211_HT_CAP_SUP_WIDTH_20_40 |
|
ht_info->cap = IEEE80211_HT_CAP_SUP_WIDTH_20_40 |
|
||||||
|
@ -901,21 +902,22 @@ static void setup_ht_cap(struct ath_softc *sc,
|
||||||
|
|
||||||
/* set up supported mcs set */
|
/* set up supported mcs set */
|
||||||
memset(&ht_info->mcs, 0, sizeof(ht_info->mcs));
|
memset(&ht_info->mcs, 0, sizeof(ht_info->mcs));
|
||||||
|
tx_streams = !(sc->tx_chainmask & (sc->tx_chainmask - 1)) ? 1 : 2;
|
||||||
|
rx_streams = !(sc->rx_chainmask & (sc->rx_chainmask - 1)) ? 1 : 2;
|
||||||
|
|
||||||
switch(sc->rx_chainmask) {
|
if (tx_streams != rx_streams) {
|
||||||
case 1:
|
DPRINTF(sc, ATH_DBG_CONFIG, "TX streams %d, RX streams: %d\n",
|
||||||
ht_info->mcs.rx_mask[0] = 0xff;
|
tx_streams, rx_streams);
|
||||||
break;
|
ht_info->mcs.tx_params |= IEEE80211_HT_MCS_TX_RX_DIFF;
|
||||||
case 3:
|
ht_info->mcs.tx_params |= ((tx_streams - 1) <<
|
||||||
case 5:
|
IEEE80211_HT_MCS_TX_MAX_STREAMS_SHIFT);
|
||||||
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;
|
ht_info->mcs.rx_mask[0] = 0xff;
|
||||||
|
if (rx_streams >= 2)
|
||||||
|
ht_info->mcs.rx_mask[1] = 0xff;
|
||||||
|
|
||||||
|
ht_info->mcs.tx_params |= IEEE80211_HT_MCS_TX_DEFINED;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void ath9k_bss_assoc_info(struct ath_softc *sc,
|
static void ath9k_bss_assoc_info(struct ath_softc *sc,
|
||||||
|
|
Загрузка…
Ссылка в новой задаче