ath9k: Fix multi-VIF BSS handling
mac80211 provides short preamble information and ERP protection information on a per-BSS basis, which can be used. Remove flags stored in the driver, which was incorrect since they were being used in a global manner. Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
This commit is contained in:
parent
3d4e20f2d1
commit
d47a61aa22
|
@ -584,16 +584,12 @@ struct ath_ant_comb {
|
|||
#define SC_OP_INVALID BIT(0)
|
||||
#define SC_OP_BEACONS BIT(1)
|
||||
#define SC_OP_OFFCHANNEL BIT(2)
|
||||
#define SC_OP_PREAMBLE_SHORT BIT(3)
|
||||
#define SC_OP_PROTECT_ENABLE BIT(4)
|
||||
#define SC_OP_RXFLUSH BIT(5)
|
||||
#define SC_OP_LED_ASSOCIATED BIT(6)
|
||||
#define SC_OP_LED_ON BIT(7)
|
||||
#define SC_OP_TSF_RESET BIT(8)
|
||||
#define SC_OP_BT_PRIORITY_DETECTED BIT(9)
|
||||
#define SC_OP_BT_SCAN BIT(10)
|
||||
#define SC_OP_ANI_RUN BIT(11)
|
||||
#define SC_OP_PRIM_STA_VIF BIT(12)
|
||||
#define SC_OP_RXFLUSH BIT(3)
|
||||
#define SC_OP_TSF_RESET BIT(4)
|
||||
#define SC_OP_BT_PRIORITY_DETECTED BIT(5)
|
||||
#define SC_OP_BT_SCAN BIT(6)
|
||||
#define SC_OP_ANI_RUN BIT(7)
|
||||
#define SC_OP_PRIM_STA_VIF BIT(8)
|
||||
|
||||
/* Powersave flags */
|
||||
#define PS_WAIT_FOR_BEACON BIT(0)
|
||||
|
|
|
@ -67,7 +67,7 @@ int ath_beaconq_config(struct ath_softc *sc)
|
|||
* up rate codes, and channel flags. Beacons are always sent out at the
|
||||
* lowest rate, and are not retried.
|
||||
*/
|
||||
static void ath_beacon_setup(struct ath_softc *sc, struct ath_vif *avp,
|
||||
static void ath_beacon_setup(struct ath_softc *sc, struct ieee80211_vif *vif,
|
||||
struct ath_buf *bf, int rateidx)
|
||||
{
|
||||
struct sk_buff *skb = bf->bf_mpdu;
|
||||
|
@ -82,7 +82,7 @@ static void ath_beacon_setup(struct ath_softc *sc, struct ath_vif *avp,
|
|||
|
||||
sband = &sc->sbands[common->hw->conf.channel->band];
|
||||
rate = sband->bitrates[rateidx].hw_value;
|
||||
if (sc->sc_flags & SC_OP_PREAMBLE_SHORT)
|
||||
if (vif->bss_conf.use_short_preamble)
|
||||
rate |= sband->bitrates[rateidx].hw_value_short;
|
||||
|
||||
memset(&info, 0, sizeof(info));
|
||||
|
@ -209,7 +209,7 @@ static struct ath_buf *ath_beacon_generate(struct ieee80211_hw *hw,
|
|||
}
|
||||
}
|
||||
|
||||
ath_beacon_setup(sc, avp, bf, info->control.rates[0].idx);
|
||||
ath_beacon_setup(sc, vif, bf, info->control.rates[0].idx);
|
||||
|
||||
while (skb) {
|
||||
ath_tx_cabq(hw, skb);
|
||||
|
|
|
@ -2044,25 +2044,6 @@ static void ath9k_bss_info_changed(struct ieee80211_hw *hw,
|
|||
ath_beacon_config(sc, vif);
|
||||
}
|
||||
|
||||
if (changed & BSS_CHANGED_ERP_PREAMBLE) {
|
||||
ath_dbg(common, CONFIG, "BSS Changed PREAMBLE %d\n",
|
||||
bss_conf->use_short_preamble);
|
||||
if (bss_conf->use_short_preamble)
|
||||
sc->sc_flags |= SC_OP_PREAMBLE_SHORT;
|
||||
else
|
||||
sc->sc_flags &= ~SC_OP_PREAMBLE_SHORT;
|
||||
}
|
||||
|
||||
if (changed & BSS_CHANGED_ERP_CTS_PROT) {
|
||||
ath_dbg(common, CONFIG, "BSS Changed CTS PROT %d\n",
|
||||
bss_conf->use_cts_prot);
|
||||
if (bss_conf->use_cts_prot &&
|
||||
hw->conf.channel->band != IEEE80211_BAND_5GHZ)
|
||||
sc->sc_flags |= SC_OP_PROTECT_ENABLE;
|
||||
else
|
||||
sc->sc_flags &= ~SC_OP_PROTECT_ENABLE;
|
||||
}
|
||||
|
||||
mutex_unlock(&sc->mutex);
|
||||
ath9k_ps_restore(sc);
|
||||
}
|
||||
|
|
|
@ -748,7 +748,8 @@ static void ath_rc_rate_set_rtscts(struct ath_softc *sc,
|
|||
* If 802.11g protection is enabled, determine whether to use RTS/CTS or
|
||||
* just CTS. Note that this is only done for OFDM/HT unicast frames.
|
||||
*/
|
||||
if ((sc->sc_flags & SC_OP_PROTECT_ENABLE) &&
|
||||
if ((tx_info->control.vif &&
|
||||
tx_info->control.vif->bss_conf.use_cts_prot) &&
|
||||
(rate_table->info[rix].phy == WLAN_RC_PHY_OFDM ||
|
||||
WLAN_RC_PHY_HT(rate_table->info[rix].phy))) {
|
||||
rates[0].flags |= IEEE80211_TX_RC_USE_CTS_PROTECT;
|
||||
|
|
|
@ -955,7 +955,9 @@ static void ath_buf_set_rate(struct ath_softc *sc, struct ath_buf *bf,
|
|||
*/
|
||||
rate = ieee80211_get_rts_cts_rate(sc->hw, tx_info);
|
||||
info->rtscts_rate = rate->hw_value;
|
||||
if (sc->sc_flags & SC_OP_PREAMBLE_SHORT)
|
||||
|
||||
if (tx_info->control.vif &&
|
||||
tx_info->control.vif->bss_conf.use_short_preamble)
|
||||
info->rtscts_rate |= rate->hw_value_short;
|
||||
|
||||
for (i = 0; i < 4; i++) {
|
||||
|
|
Loading…
Reference in New Issue