ath9k: add txq locking for ath_tx_aggr_start
Prevents race conditions when un-aggregated frames are pending in the driver. Signed-off-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
This commit is contained in:
parent
e78641c19d
commit
919123d246
1 changed files with 6 additions and 0 deletions
|
@ -1390,11 +1390,15 @@ int ath_tx_aggr_start(struct ath_softc *sc, struct ieee80211_sta *sta,
|
||||||
u16 tid, u16 *ssn)
|
u16 tid, u16 *ssn)
|
||||||
{
|
{
|
||||||
struct ath_atx_tid *txtid;
|
struct ath_atx_tid *txtid;
|
||||||
|
struct ath_txq *txq;
|
||||||
struct ath_node *an;
|
struct ath_node *an;
|
||||||
u8 density;
|
u8 density;
|
||||||
|
|
||||||
an = (struct ath_node *)sta->drv_priv;
|
an = (struct ath_node *)sta->drv_priv;
|
||||||
txtid = ATH_AN_2_TID(an, tid);
|
txtid = ATH_AN_2_TID(an, tid);
|
||||||
|
txq = txtid->ac->txq;
|
||||||
|
|
||||||
|
ath_txq_lock(sc, txq);
|
||||||
|
|
||||||
/* update ampdu factor/density, they may have changed. This may happen
|
/* update ampdu factor/density, they may have changed. This may happen
|
||||||
* in HT IBSS when a beacon with HT-info is received after the station
|
* in HT IBSS when a beacon with HT-info is received after the station
|
||||||
|
@ -1418,6 +1422,8 @@ int ath_tx_aggr_start(struct ath_softc *sc, struct ieee80211_sta *sta,
|
||||||
memset(txtid->tx_buf, 0, sizeof(txtid->tx_buf));
|
memset(txtid->tx_buf, 0, sizeof(txtid->tx_buf));
|
||||||
txtid->baw_head = txtid->baw_tail = 0;
|
txtid->baw_head = txtid->baw_tail = 0;
|
||||||
|
|
||||||
|
ath_txq_unlock_complete(sc, txq);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue