diff options
author | Felix Fietkau <nbd@openwrt.org> | 2010-12-18 18:31:55 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2010-12-20 14:52:18 -0500 |
commit | d4d5dc3d6f86cc70f08e45b840f3e681588d2718 (patch) | |
tree | 9c51f93979521600bd481753c26acd4e0d8b7c6b | |
parent | f1a8abb0459e96765bd1d300f434256d8dfac73d (diff) |
ath9k: do not limit the chainmask to 1 for legacy mode
Restricting the chainmask to 1 for legacy mode disables useful features
such as MRC, and it reduces the available transmit power.
I can't think of a good reason to do this in legacy mode, so let's just
get rid of that code.
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
-rw-r--r-- | drivers/net/wireless/ath/ath9k/ath9k.h | 1 | ||||
-rw-r--r-- | drivers/net/wireless/ath/ath9k/main.c | 32 | ||||
-rw-r--r-- | drivers/net/wireless/ath/ath9k/virtual.c | 1 |
3 files changed, 0 insertions, 34 deletions
diff --git a/drivers/net/wireless/ath/ath9k/ath9k.h b/drivers/net/wireless/ath/ath9k/ath9k.h index 9fd95191eebc..2c31f5142eda 100644 --- a/drivers/net/wireless/ath/ath9k/ath9k.h +++ b/drivers/net/wireless/ath/ath9k/ath9k.h | |||
@@ -675,7 +675,6 @@ void ath9k_deinit_device(struct ath_softc *sc); | |||
675 | void ath9k_set_hw_capab(struct ath_softc *sc, struct ieee80211_hw *hw); | 675 | void ath9k_set_hw_capab(struct ath_softc *sc, struct ieee80211_hw *hw); |
676 | void ath9k_update_ichannel(struct ath_softc *sc, struct ieee80211_hw *hw, | 676 | void ath9k_update_ichannel(struct ath_softc *sc, struct ieee80211_hw *hw, |
677 | struct ath9k_channel *ichan); | 677 | struct ath9k_channel *ichan); |
678 | void ath_update_chainmask(struct ath_softc *sc, int is_ht); | ||
679 | int ath_set_channel(struct ath_softc *sc, struct ieee80211_hw *hw, | 678 | int ath_set_channel(struct ath_softc *sc, struct ieee80211_hw *hw, |
680 | struct ath9k_channel *hchan); | 679 | struct ath9k_channel *hchan); |
681 | 680 | ||
diff --git a/drivers/net/wireless/ath/ath9k/main.c b/drivers/net/wireless/ath/ath9k/main.c index cb53fbb951f1..8a1691db166d 100644 --- a/drivers/net/wireless/ath/ath9k/main.c +++ b/drivers/net/wireless/ath/ath9k/main.c | |||
@@ -538,32 +538,6 @@ set_timer: | |||
538 | } | 538 | } |
539 | } | 539 | } |
540 | 540 | ||
541 | /* | ||
542 | * Update tx/rx chainmask. For legacy association, | ||
543 | * hard code chainmask to 1x1, for 11n association, use | ||
544 | * the chainmask configuration, for bt coexistence, use | ||
545 | * the chainmask configuration even in legacy mode. | ||
546 | */ | ||
547 | void ath_update_chainmask(struct ath_softc *sc, int is_ht) | ||
548 | { | ||
549 | struct ath_hw *ah = sc->sc_ah; | ||
550 | struct ath_common *common = ath9k_hw_common(ah); | ||
551 | |||
552 | if ((sc->sc_flags & SC_OP_OFFCHANNEL) || is_ht || | ||
553 | (ah->btcoex_hw.scheme != ATH_BTCOEX_CFG_NONE)) { | ||
554 | common->tx_chainmask = ah->caps.tx_chainmask; | ||
555 | common->rx_chainmask = ah->caps.rx_chainmask; | ||
556 | } else { | ||
557 | common->tx_chainmask = 1; | ||
558 | common->rx_chainmask = 1; | ||
559 | } | ||
560 | |||
561 | ath_dbg(common, ATH_DBG_CONFIG, | ||
562 | "tx chmask: %d, rx chmask: %d\n", | ||
563 | common->tx_chainmask, | ||
564 | common->rx_chainmask); | ||
565 | } | ||
566 | |||
567 | static void ath_node_attach(struct ath_softc *sc, struct ieee80211_sta *sta) | 541 | static void ath_node_attach(struct ath_softc *sc, struct ieee80211_sta *sta) |
568 | { | 542 | { |
569 | struct ath_node *an; | 543 | struct ath_node *an; |
@@ -1679,8 +1653,6 @@ static int ath9k_config(struct ieee80211_hw *hw, u32 changed) | |||
1679 | /* XXX: remove me eventualy */ | 1653 | /* XXX: remove me eventualy */ |
1680 | ath9k_update_ichannel(sc, hw, &sc->sc_ah->channels[pos]); | 1654 | ath9k_update_ichannel(sc, hw, &sc->sc_ah->channels[pos]); |
1681 | 1655 | ||
1682 | ath_update_chainmask(sc, conf_is_ht(conf)); | ||
1683 | |||
1684 | /* update survey stats for the old channel before switching */ | 1656 | /* update survey stats for the old channel before switching */ |
1685 | spin_lock_irqsave(&common->cc_lock, flags); | 1657 | spin_lock_irqsave(&common->cc_lock, flags); |
1686 | ath_update_survey_stats(sc); | 1658 | ath_update_survey_stats(sc); |
@@ -1912,10 +1884,6 @@ static void ath9k_bss_info_changed(struct ieee80211_hw *hw, | |||
1912 | /* Set aggregation protection mode parameters */ | 1884 | /* Set aggregation protection mode parameters */ |
1913 | sc->config.ath_aggr_prot = 0; | 1885 | sc->config.ath_aggr_prot = 0; |
1914 | 1886 | ||
1915 | /* Only legacy IBSS for now */ | ||
1916 | if (vif->type == NL80211_IFTYPE_ADHOC) | ||
1917 | ath_update_chainmask(sc, 0); | ||
1918 | |||
1919 | ath_dbg(common, ATH_DBG_CONFIG, "BSSID: %pM aid: 0x%x\n", | 1887 | ath_dbg(common, ATH_DBG_CONFIG, "BSSID: %pM aid: 0x%x\n", |
1920 | common->curbssid, common->curaid); | 1888 | common->curbssid, common->curaid); |
1921 | 1889 | ||
diff --git a/drivers/net/wireless/ath/ath9k/virtual.c b/drivers/net/wireless/ath/ath9k/virtual.c index fbfbc8239971..2dc7095e56d1 100644 --- a/drivers/net/wireless/ath/ath9k/virtual.c +++ b/drivers/net/wireless/ath/ath9k/virtual.c | |||
@@ -288,7 +288,6 @@ void ath9k_wiphy_chan_work(struct work_struct *work) | |||
288 | /* sync hw configuration for hw code */ | 288 | /* sync hw configuration for hw code */ |
289 | common->hw = aphy->hw; | 289 | common->hw = aphy->hw; |
290 | 290 | ||
291 | ath_update_chainmask(sc, sc->chan_is_ht); | ||
292 | if (ath_set_channel(sc, aphy->hw, | 291 | if (ath_set_channel(sc, aphy->hw, |
293 | &sc->sc_ah->channels[sc->chan_idx]) < 0) { | 292 | &sc->sc_ah->channels[sc->chan_idx]) < 0) { |
294 | printk(KERN_DEBUG "ath9k: Failed to set channel for new " | 293 | printk(KERN_DEBUG "ath9k: Failed to set channel for new " |