* [PATCH 16/16] mac80211: Add a new event in ieee80211_ampdu_mlme_action
@ 2008-10-29 4:49 Sujith
2008-10-29 9:11 ` Tomas Winkler
0 siblings, 1 reply; 5+ messages in thread
From: Sujith @ 2008-10-29 4:49 UTC (permalink / raw)
To: linville; +Cc: linux-wireless, Jouni.Malinen, Luis.Rodriguez, johannes
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>
---
drivers/net/wireless/ath9k/core.h | 1 +
drivers/net/wireless/ath9k/main.c | 3 +++
drivers/net/wireless/ath9k/xmit.c | 19 +++++++++++++++++++
include/net/mac80211.h | 2 ++
net/mac80211/ht.c | 10 +++++++++-
5 files changed, 34 insertions(+), 1 deletions(-)
diff --git a/drivers/net/wireless/ath9k/core.h b/drivers/net/wireless/ath9k/core.h
index 5b17e88..69e8d3e 100644
--- a/drivers/net/wireless/ath9k/core.h
+++ b/drivers/net/wireless/ath9k/core.h
@@ -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,
u16 tid, u16 *ssn);
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,
struct ath_node *node, int isnew, int isuapsd);
void ath_node_attach(struct ath_softc *sc, struct ieee80211_sta *sta);
diff --git a/drivers/net/wireless/ath9k/main.c b/drivers/net/wireless/ath9k/main.c
index 376c530..5d07952 100644
--- a/drivers/net/wireless/ath9k/main.c
+++ b/drivers/net/wireless/ath9k/main.c
@@ -1484,6 +1484,9 @@ static int ath9k_ampdu_action(struct ieee80211_hw *hw,
ieee80211_stop_tx_ba_cb_irqsafe(hw, sta->addr, tid);
break;
+ case IEEE80211_AMPDU_TX_RESUME:
+ ath_tx_aggr_resume(sc, sta, tid);
+ break;
default:
DPRINTF(sc, ATH_DBG_FATAL,
"%s: Unknown AMPDU action\n", __func__);
diff --git a/drivers/net/wireless/ath9k/xmit.c b/drivers/net/wireless/ath9k/xmit.c
index 7e6f4e5..fe386b6 100644
--- a/drivers/net/wireless/ath9k/xmit.c
+++ b/drivers/net/wireless/ath9k/xmit.c
@@ -2371,6 +2371,25 @@ int ath_tx_aggr_stop(struct ath_softc *sc, struct ieee80211_sta *sta, u16 tid)
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
* unaggregated.
diff --git a/include/net/mac80211.h b/include/net/mac80211.h
index 0b983be..4051f0a 100644
--- a/include/net/mac80211.h
+++ b/include/net/mac80211.h
@@ -1136,12 +1136,14 @@ enum ieee80211_filter_flags {
* @IEEE80211_AMPDU_RX_STOP: stop Rx aggregation
* @IEEE80211_AMPDU_TX_START: start Tx aggregation
* @IEEE80211_AMPDU_TX_STOP: stop Tx aggregation
+ * @IEEE80211_AMPDU_TX_RESUME: resume TX aggregation
*/
enum ieee80211_ampdu_mlme_action {
IEEE80211_AMPDU_RX_START,
IEEE80211_AMPDU_RX_STOP,
IEEE80211_AMPDU_TX_START,
IEEE80211_AMPDU_TX_STOP,
+ IEEE80211_AMPDU_TX_RESUME,
};
/**
diff --git a/net/mac80211/ht.c b/net/mac80211/ht.c
index 1453cb5..0ffbe12 100644
--- a/net/mac80211/ht.c
+++ b/net/mac80211/ht.c
@@ -995,7 +995,7 @@ void ieee80211_process_addba_resp(struct ieee80211_local *local,
{
struct ieee80211_hw *hw = &local->hw;
u16 capab;
- u16 tid;
+ u16 tid, start_seq_num;
u8 *state;
capab = le16_to_cpu(mgmt->u.action.u.addba_resp.capab);
@@ -1032,6 +1032,14 @@ void ieee80211_process_addba_resp(struct ieee80211_local *local,
local->hw.ampdu_queues)
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);
} else {
sta->ampdu_mlme.addba_req_num[tid]++;
--
1.6.0.3
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH 16/16] mac80211: Add a new event in ieee80211_ampdu_mlme_action
2008-10-29 4:49 [PATCH 16/16] mac80211: Add a new event in ieee80211_ampdu_mlme_action Sujith
@ 2008-10-29 9:11 ` Tomas Winkler
2008-10-29 9:16 ` Sujith
0 siblings, 1 reply; 5+ messages in thread
From: Tomas Winkler @ 2008-10-29 9:11 UTC (permalink / raw)
To: Sujith; +Cc: linville, linux-wireless, Jouni.Malinen, Luis.Rodriguez, johannes
On Wed, Oct 29, 2008 at 6:49 AM, Sujith <Sujith.Manoharan@atheros.com> wrote:
> Send a notification to the driver on succesful
> reception of an ADDBA response, add IEEE80211_AMPDU_TX_RESUME
> for this purpose.
What what is wrong with IEEE80211_AMPDU_TX_START ? I don' t understand
why this is needed?
Tomas
>
> Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
> ---
> drivers/net/wireless/ath9k/core.h | 1 +
> drivers/net/wireless/ath9k/main.c | 3 +++
> drivers/net/wireless/ath9k/xmit.c | 19 +++++++++++++++++++
> include/net/mac80211.h | 2 ++
> net/mac80211/ht.c | 10 +++++++++-
> 5 files changed, 34 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/net/wireless/ath9k/core.h b/drivers/net/wireless/ath9k/core.h
> index 5b17e88..69e8d3e 100644
> --- a/drivers/net/wireless/ath9k/core.h
> +++ b/drivers/net/wireless/ath9k/core.h
> @@ -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,
> u16 tid, u16 *ssn);
> 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,
> struct ath_node *node, int isnew, int isuapsd);
> void ath_node_attach(struct ath_softc *sc, struct ieee80211_sta *sta);
> diff --git a/drivers/net/wireless/ath9k/main.c b/drivers/net/wireless/ath9k/main.c
> index 376c530..5d07952 100644
> --- a/drivers/net/wireless/ath9k/main.c
> +++ b/drivers/net/wireless/ath9k/main.c
> @@ -1484,6 +1484,9 @@ static int ath9k_ampdu_action(struct ieee80211_hw *hw,
>
> ieee80211_stop_tx_ba_cb_irqsafe(hw, sta->addr, tid);
> break;
> + case IEEE80211_AMPDU_TX_RESUME:
> + ath_tx_aggr_resume(sc, sta, tid);
> + break;
> default:
> DPRINTF(sc, ATH_DBG_FATAL,
> "%s: Unknown AMPDU action\n", __func__);
> diff --git a/drivers/net/wireless/ath9k/xmit.c b/drivers/net/wireless/ath9k/xmit.c
> index 7e6f4e5..fe386b6 100644
> --- a/drivers/net/wireless/ath9k/xmit.c
> +++ b/drivers/net/wireless/ath9k/xmit.c
> @@ -2371,6 +2371,25 @@ int ath_tx_aggr_stop(struct ath_softc *sc, struct ieee80211_sta *sta, u16 tid)
> 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
> * unaggregated.
> diff --git a/include/net/mac80211.h b/include/net/mac80211.h
> index 0b983be..4051f0a 100644
> --- a/include/net/mac80211.h
> +++ b/include/net/mac80211.h
> @@ -1136,12 +1136,14 @@ enum ieee80211_filter_flags {
> * @IEEE80211_AMPDU_RX_STOP: stop Rx aggregation
> * @IEEE80211_AMPDU_TX_START: start Tx aggregation
> * @IEEE80211_AMPDU_TX_STOP: stop Tx aggregation
> + * @IEEE80211_AMPDU_TX_RESUME: resume TX aggregation
> */
> enum ieee80211_ampdu_mlme_action {
> IEEE80211_AMPDU_RX_START,
> IEEE80211_AMPDU_RX_STOP,
> IEEE80211_AMPDU_TX_START,
> IEEE80211_AMPDU_TX_STOP,
> + IEEE80211_AMPDU_TX_RESUME,
> };
>
> /**
> diff --git a/net/mac80211/ht.c b/net/mac80211/ht.c
> index 1453cb5..0ffbe12 100644
> --- a/net/mac80211/ht.c
> +++ b/net/mac80211/ht.c
> @@ -995,7 +995,7 @@ void ieee80211_process_addba_resp(struct ieee80211_local *local,
> {
> struct ieee80211_hw *hw = &local->hw;
> u16 capab;
> - u16 tid;
> + u16 tid, start_seq_num;
> u8 *state;
>
> capab = le16_to_cpu(mgmt->u.action.u.addba_resp.capab);
> @@ -1032,6 +1032,14 @@ void ieee80211_process_addba_resp(struct ieee80211_local *local,
> local->hw.ampdu_queues)
> 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);
> } else {
> sta->ampdu_mlme.addba_req_num[tid]++;
> --
> 1.6.0.3
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 16/16] mac80211: Add a new event in ieee80211_ampdu_mlme_action
2008-10-29 9:11 ` Tomas Winkler
@ 2008-10-29 9:16 ` Sujith
2008-10-29 9:26 ` Tomas Winkler
0 siblings, 1 reply; 5+ messages in thread
From: Sujith @ 2008-10-29 9:16 UTC (permalink / raw)
To: Tomas Winkler
Cc: linville@tuxdriver.com, linux-wireless@vger.kernel.org,
Jouni Malinen, Luis Rodriguez, johannes@sipsolutions.net
Tomas Winkler wrote:
> On Wed, Oct 29, 2008 at 6:49 AM, Sujith <Sujith.Manoharan@atheros.com> wrote:
> > Send a notification to the driver on succesful
> > reception of an ADDBA response, add IEEE80211_AMPDU_TX_RESUME
> > for this purpose.
>
> What what is wrong with IEEE80211_AMPDU_TX_START ? I don' t understand
> why this is needed?
On receiving an IEEE80211_AMPDU_TX_START notification, packets destined to
that TID are stored in a buffer, and to send them out as aggregates, ath9k
needs to know whether the ADDBA exchange has completed or not.
If the ADDBA request has been declined, IEEE80211_AMPDU_TX_STOP is sent to
the driver, but no notification is sent if the ADDBA request has been accepted.
Sujith
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 16/16] mac80211: Add a new event in ieee80211_ampdu_mlme_action
2008-10-29 9:16 ` Sujith
@ 2008-10-29 9:26 ` Tomas Winkler
2008-10-29 9:28 ` Sujith
0 siblings, 1 reply; 5+ messages in thread
From: Tomas Winkler @ 2008-10-29 9:26 UTC (permalink / raw)
To: Sujith
Cc: linville@tuxdriver.com, linux-wireless@vger.kernel.org,
Jouni Malinen, Luis Rodriguez, johannes@sipsolutions.net
On Wed, Oct 29, 2008 at 11:16 AM, Sujith <Sujith.Manoharan@atheros.com> wrote:
> Tomas Winkler wrote:
>> On Wed, Oct 29, 2008 at 6:49 AM, Sujith <Sujith.Manoharan@atheros.com> wrote:
>> > Send a notification to the driver on succesful
>> > reception of an ADDBA response, add IEEE80211_AMPDU_TX_RESUME
>> > for this purpose.
>>
>> What what is wrong with IEEE80211_AMPDU_TX_START ? I don' t understand
>> why this is needed?
>
> On receiving an IEEE80211_AMPDU_TX_START notification, packets destined to
> that TID are stored in a buffer, and to send them out as aggregates, ath9k
> needs to know whether the ADDBA exchange has completed or not.
>
> If the ADDBA request has been declined, IEEE80211_AMPDU_TX_STOP is sent to
> the driver, but no notification is sent if the ADDBA request has been accepted.
Okay this means that we pushing this buffering to driver after all.
Otherwise mac80211 would just trigger the TX on successful ADDBA
Tomas
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 16/16] mac80211: Add a new event in ieee80211_ampdu_mlme_action
2008-10-29 9:26 ` Tomas Winkler
@ 2008-10-29 9:28 ` Sujith
0 siblings, 0 replies; 5+ messages in thread
From: Sujith @ 2008-10-29 9:28 UTC (permalink / raw)
To: Tomas Winkler
Cc: linville@tuxdriver.com, linux-wireless@vger.kernel.org,
Jouni Malinen, Luis Rodriguez, johannes@sipsolutions.net
Tomas Winkler wrote:
> Okay this means that we pushing this buffering to driver after all.
> Otherwise mac80211 would just trigger the TX on successful ADDBA
Currently yes, the buffering is done within ath9k.
Sujith
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2008-10-29 9:30 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-10-29 4:49 [PATCH 16/16] mac80211: Add a new event in ieee80211_ampdu_mlme_action Sujith
2008-10-29 9:11 ` Tomas Winkler
2008-10-29 9:16 ` Sujith
2008-10-29 9:26 ` Tomas Winkler
2008-10-29 9:28 ` Sujith
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox