mac80211: Add a new event in ieee80211_ampdu_mlme_action
Send a notification to the driver on succesful reception of an ADDBA response, add IEEE80211_AMPDU_TX_RESUME for this purpose. Signed-off-by: Sujith <Sujith.Manoharan@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
This commit is contained in:
parent
dca3edb88e
commit
8469cdef1f
|
@ -581,6 +581,7 @@ void ath_tx_aggr_teardown(struct ath_softc *sc,
|
||||||
int ath_tx_aggr_start(struct ath_softc *sc, struct ieee80211_sta *sta,
|
int ath_tx_aggr_start(struct ath_softc *sc, struct ieee80211_sta *sta,
|
||||||
u16 tid, u16 *ssn);
|
u16 tid, u16 *ssn);
|
||||||
int ath_tx_aggr_stop(struct ath_softc *sc, struct ieee80211_sta *sta, u16 tid);
|
int ath_tx_aggr_stop(struct ath_softc *sc, struct ieee80211_sta *sta, u16 tid);
|
||||||
|
void ath_tx_aggr_resume(struct ath_softc *sc, struct ieee80211_sta *sta, u16 tid);
|
||||||
void ath_newassoc(struct ath_softc *sc,
|
void ath_newassoc(struct ath_softc *sc,
|
||||||
struct ath_node *node, int isnew, int isuapsd);
|
struct ath_node *node, int isnew, int isuapsd);
|
||||||
void ath_node_attach(struct ath_softc *sc, struct ieee80211_sta *sta);
|
void ath_node_attach(struct ath_softc *sc, struct ieee80211_sta *sta);
|
||||||
|
|
|
@ -1482,6 +1482,9 @@ static int ath9k_ampdu_action(struct ieee80211_hw *hw,
|
||||||
|
|
||||||
ieee80211_stop_tx_ba_cb_irqsafe(hw, sta->addr, tid);
|
ieee80211_stop_tx_ba_cb_irqsafe(hw, sta->addr, tid);
|
||||||
break;
|
break;
|
||||||
|
case IEEE80211_AMPDU_TX_RESUME:
|
||||||
|
ath_tx_aggr_resume(sc, sta, tid);
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
DPRINTF(sc, ATH_DBG_FATAL,
|
DPRINTF(sc, ATH_DBG_FATAL,
|
||||||
"%s: Unknown AMPDU action\n", __func__);
|
"%s: Unknown AMPDU action\n", __func__);
|
||||||
|
|
|
@ -2371,6 +2371,25 @@ int ath_tx_aggr_stop(struct ath_softc *sc, struct ieee80211_sta *sta, u16 tid)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Resume tx aggregation */
|
||||||
|
|
||||||
|
void ath_tx_aggr_resume(struct ath_softc *sc, struct ieee80211_sta *sta, u16 tid)
|
||||||
|
{
|
||||||
|
struct ath_atx_tid *txtid;
|
||||||
|
struct ath_node *an;
|
||||||
|
|
||||||
|
an = (struct ath_node *)sta->drv_priv;
|
||||||
|
|
||||||
|
if (sc->sc_flags & SC_OP_TXAGGR) {
|
||||||
|
txtid = ATH_AN_2_TID(an, tid);
|
||||||
|
txtid->baw_size =
|
||||||
|
IEEE80211_MIN_AMPDU_BUF << sta->ht_cap.ampdu_factor;
|
||||||
|
txtid->state |= AGGR_ADDBA_COMPLETE;
|
||||||
|
txtid->state &= ~AGGR_ADDBA_PROGRESS;
|
||||||
|
ath_tx_resume_tid(sc, txtid);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Performs transmit side cleanup when TID changes from aggregated to
|
* Performs transmit side cleanup when TID changes from aggregated to
|
||||||
* unaggregated.
|
* unaggregated.
|
||||||
|
|
|
@ -1127,12 +1127,14 @@ enum ieee80211_filter_flags {
|
||||||
* @IEEE80211_AMPDU_RX_STOP: stop Rx aggregation
|
* @IEEE80211_AMPDU_RX_STOP: stop Rx aggregation
|
||||||
* @IEEE80211_AMPDU_TX_START: start Tx aggregation
|
* @IEEE80211_AMPDU_TX_START: start Tx aggregation
|
||||||
* @IEEE80211_AMPDU_TX_STOP: stop Tx aggregation
|
* @IEEE80211_AMPDU_TX_STOP: stop Tx aggregation
|
||||||
|
* @IEEE80211_AMPDU_TX_RESUME: resume TX aggregation
|
||||||
*/
|
*/
|
||||||
enum ieee80211_ampdu_mlme_action {
|
enum ieee80211_ampdu_mlme_action {
|
||||||
IEEE80211_AMPDU_RX_START,
|
IEEE80211_AMPDU_RX_START,
|
||||||
IEEE80211_AMPDU_RX_STOP,
|
IEEE80211_AMPDU_RX_STOP,
|
||||||
IEEE80211_AMPDU_TX_START,
|
IEEE80211_AMPDU_TX_START,
|
||||||
IEEE80211_AMPDU_TX_STOP,
|
IEEE80211_AMPDU_TX_STOP,
|
||||||
|
IEEE80211_AMPDU_TX_RESUME,
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -987,7 +987,7 @@ void ieee80211_process_addba_resp(struct ieee80211_local *local,
|
||||||
{
|
{
|
||||||
struct ieee80211_hw *hw = &local->hw;
|
struct ieee80211_hw *hw = &local->hw;
|
||||||
u16 capab;
|
u16 capab;
|
||||||
u16 tid;
|
u16 tid, start_seq_num;
|
||||||
u8 *state;
|
u8 *state;
|
||||||
|
|
||||||
capab = le16_to_cpu(mgmt->u.action.u.addba_resp.capab);
|
capab = le16_to_cpu(mgmt->u.action.u.addba_resp.capab);
|
||||||
|
@ -1024,6 +1024,14 @@ void ieee80211_process_addba_resp(struct ieee80211_local *local,
|
||||||
local->hw.ampdu_queues)
|
local->hw.ampdu_queues)
|
||||||
ieee80211_wake_queue(hw, sta->tid_to_tx_q[tid]);
|
ieee80211_wake_queue(hw, sta->tid_to_tx_q[tid]);
|
||||||
|
|
||||||
|
if (local->ops->ampdu_action) {
|
||||||
|
(void)local->ops->ampdu_action(hw,
|
||||||
|
IEEE80211_AMPDU_TX_RESUME,
|
||||||
|
&sta->sta, tid, &start_seq_num);
|
||||||
|
}
|
||||||
|
#ifdef CONFIG_MAC80211_HT_DEBUG
|
||||||
|
printk(KERN_DEBUG "Resuming TX aggregation for tid %d\n", tid);
|
||||||
|
#endif /* CONFIG_MAC80211_HT_DEBUG */
|
||||||
spin_unlock_bh(&sta->lock);
|
spin_unlock_bh(&sta->lock);
|
||||||
} else {
|
} else {
|
||||||
sta->ampdu_mlme.addba_req_num[tid]++;
|
sta->ampdu_mlme.addba_req_num[tid]++;
|
||||||
|
|
Loading…
Reference in New Issue