* [PATCH] mac80211: Use appropriate TID for sending BAR, ADDBA and DELBA frames
@ 2011-12-14 14:10 Helmut Schaa
2011-12-14 22:11 ` Johannes Berg
2011-12-15 8:02 ` [PATCHv2] " Helmut Schaa
0 siblings, 2 replies; 6+ messages in thread
From: Helmut Schaa @ 2011-12-14 14:10 UTC (permalink / raw)
To: linux-wireless; +Cc: linville, johannes, adrian, Helmut Schaa
Currently BAR, ADDBA and DELBA frames are always sent using AC_VO. If
the TID for which a BA session is established is assigned to a different
queue BAR, ADDBA and DELBA frames can "overtake" frames of the according
BA session.
Hence, always put BA session related frames into the same queue as the
BA sessions data frames.
Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com>
---
I'm not sure if this fixes some "real-world" issues but the change
seems appropriate to me. And also during my testing some clients
that occasionally tear down the BA session seem to suffer less from
the tear down then before.
net/mac80211/agg-tx.c | 4 ++--
net/mac80211/ht.c | 2 +-
net/mac80211/ieee80211_i.h | 2 ++
net/mac80211/tx.c | 14 ++++++++++----
4 files changed, 15 insertions(+), 7 deletions(-)
diff --git a/net/mac80211/agg-tx.c b/net/mac80211/agg-tx.c
index 7380287..13ae622 100644
--- a/net/mac80211/agg-tx.c
+++ b/net/mac80211/agg-tx.c
@@ -105,7 +105,7 @@ static void ieee80211_send_addba_request(struct ieee80211_sub_if_data *sdata,
mgmt->u.action.u.addba_req.start_seq_num =
cpu_to_le16(start_seq_num << 4);
- ieee80211_tx_skb(sdata, skb);
+ ieee80211_tx_skb_tid(sdata, skb, tid);
}
void ieee80211_send_bar(struct ieee80211_vif *vif, u8 *ra, u16 tid, u16 ssn)
@@ -134,7 +134,7 @@ void ieee80211_send_bar(struct ieee80211_vif *vif, u8 *ra, u16 tid, u16 ssn)
bar->start_seq_num = cpu_to_le16(ssn);
IEEE80211_SKB_CB(skb)->flags |= IEEE80211_TX_INTFL_DONT_ENCRYPT;
- ieee80211_tx_skb(sdata, skb);
+ ieee80211_tx_skb_tid(sdata, skb, tid);
}
EXPORT_SYMBOL(ieee80211_send_bar);
diff --git a/net/mac80211/ht.c b/net/mac80211/ht.c
index 0fd9c2a..f25fff7 100644
--- a/net/mac80211/ht.c
+++ b/net/mac80211/ht.c
@@ -300,7 +300,7 @@ void ieee80211_send_delba(struct ieee80211_sub_if_data *sdata,
mgmt->u.action.u.delba.params = cpu_to_le16(params);
mgmt->u.action.u.delba.reason_code = cpu_to_le16(reason_code);
- ieee80211_tx_skb(sdata, skb);
+ ieee80211_tx_skb_tid(sdata, skb, tid);
}
void ieee80211_process_delba(struct ieee80211_sub_if_data *sdata,
diff --git a/net/mac80211/ieee80211_i.h b/net/mac80211/ieee80211_i.h
index 96fe754..93d7c86b 100644
--- a/net/mac80211/ieee80211_i.h
+++ b/net/mac80211/ieee80211_i.h
@@ -1350,6 +1350,8 @@ void mac80211_ev_michael_mic_failure(struct ieee80211_sub_if_data *sdata, int ke
void ieee80211_set_wmm_default(struct ieee80211_sub_if_data *sdata);
void ieee80211_xmit(struct ieee80211_sub_if_data *sdata, struct sk_buff *skb);
void ieee80211_tx_skb(struct ieee80211_sub_if_data *sdata, struct sk_buff *skb);
+void ieee80211_tx_skb_tid(struct ieee80211_sub_if_data *sdata,
+ struct sk_buff *skb, int tid);
void ieee802_11_parse_elems(u8 *start, size_t len,
struct ieee802_11_elems *elems);
u32 ieee802_11_parse_elems_crc(u8 *start, size_t len,
diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c
index e74652d..674f335 100644
--- a/net/mac80211/tx.c
+++ b/net/mac80211/tx.c
@@ -2700,15 +2700,14 @@ ieee80211_get_buffered_bc(struct ieee80211_hw *hw,
}
EXPORT_SYMBOL(ieee80211_get_buffered_bc);
-void ieee80211_tx_skb(struct ieee80211_sub_if_data *sdata, struct sk_buff *skb)
+void ieee80211_tx_skb_tid(struct ieee80211_sub_if_data *sdata, struct sk_buff *skb, int tid)
{
skb_set_mac_header(skb, 0);
skb_set_network_header(skb, 0);
skb_set_transport_header(skb, 0);
- /* Send all internal mgmt frames on VO. Accordingly set TID to 7. */
- skb_set_queue_mapping(skb, IEEE80211_AC_VO);
- skb->priority = 7;
+ skb_set_queue_mapping(skb, ieee802_1d_to_ac[tid]);
+ skb->priority = tid;
/*
* The other path calling ieee80211_xmit is from the tasklet,
@@ -2719,3 +2718,10 @@ void ieee80211_tx_skb(struct ieee80211_sub_if_data *sdata, struct sk_buff *skb)
ieee80211_xmit(sdata, skb);
local_bh_enable();
}
+
+void ieee80211_tx_skb(struct ieee80211_sub_if_data *sdata, struct sk_buff *skb)
+{
+ /* Send all internal mgmt frames on VO. Accordingly set TID to 7. */
+ ieee80211_tx_skb_tid(sdata, skb, 7);
+}
+
--
1.7.7
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH] mac80211: Use appropriate TID for sending BAR, ADDBA and DELBA frames
2011-12-14 14:10 [PATCH] mac80211: Use appropriate TID for sending BAR, ADDBA and DELBA frames Helmut Schaa
@ 2011-12-14 22:11 ` Johannes Berg
2011-12-15 8:02 ` [PATCHv2] " Helmut Schaa
1 sibling, 0 replies; 6+ messages in thread
From: Johannes Berg @ 2011-12-14 22:11 UTC (permalink / raw)
To: Helmut Schaa; +Cc: linux-wireless, linville, adrian
On Wed, 2011-12-14 at 15:10 +0100, Helmut Schaa wrote:
> +void ieee80211_tx_skb(struct ieee80211_sub_if_data *sdata, struct sk_buff *skb)
> +{
> + /* Send all internal mgmt frames on VO. Accordingly set TID to 7. */
> + ieee80211_tx_skb_tid(sdata, skb, 7);
> +}
> +
This is so trivial, maybe it should be an inline?
johannes
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCHv2] mac80211: Use appropriate TID for sending BAR, ADDBA and DELBA frames
2011-12-14 14:10 [PATCH] mac80211: Use appropriate TID for sending BAR, ADDBA and DELBA frames Helmut Schaa
2011-12-14 22:11 ` Johannes Berg
@ 2011-12-15 8:02 ` Helmut Schaa
2011-12-15 8:19 ` Johannes Berg
2011-12-15 9:18 ` [PATCHv3] " Helmut Schaa
1 sibling, 2 replies; 6+ messages in thread
From: Helmut Schaa @ 2011-12-15 8:02 UTC (permalink / raw)
To: linux-wireless; +Cc: linville, johannes, adrian, Helmut Schaa
Currently BAR, ADDBA and DELBA frames are always sent using AC_VO. If
the TID for which a BA session is established is assigned to a different
queue BAR, ADDBA and DELBA frames can "overtake" frames of the according
BA session.
Hence, always put BA session related frames into the same queue as the
BA sessions data frames.
Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com>
---
Changes in v2: Make ieee80211_tx_skb an inline function.
net/mac80211/agg-tx.c | 4 ++--
net/mac80211/ht.c | 2 +-
net/mac80211/ieee80211_i.h | 2 ++
net/mac80211/tx.c | 14 ++++++++++----
4 files changed, 15 insertions(+), 7 deletions(-)
diff --git a/net/mac80211/agg-tx.c b/net/mac80211/agg-tx.c
index 7380287..13ae622 100644
--- a/net/mac80211/agg-tx.c
+++ b/net/mac80211/agg-tx.c
@@ -105,7 +105,7 @@ static void ieee80211_send_addba_request(struct ieee80211_sub_if_data *sdata,
mgmt->u.action.u.addba_req.start_seq_num =
cpu_to_le16(start_seq_num << 4);
- ieee80211_tx_skb(sdata, skb);
+ ieee80211_tx_skb_tid(sdata, skb, tid);
}
void ieee80211_send_bar(struct ieee80211_vif *vif, u8 *ra, u16 tid, u16 ssn)
@@ -134,7 +134,7 @@ void ieee80211_send_bar(struct ieee80211_vif *vif, u8 *ra, u16 tid, u16 ssn)
bar->start_seq_num = cpu_to_le16(ssn);
IEEE80211_SKB_CB(skb)->flags |= IEEE80211_TX_INTFL_DONT_ENCRYPT;
- ieee80211_tx_skb(sdata, skb);
+ ieee80211_tx_skb_tid(sdata, skb, tid);
}
EXPORT_SYMBOL(ieee80211_send_bar);
diff --git a/net/mac80211/ht.c b/net/mac80211/ht.c
index 0fd9c2a..f25fff7 100644
--- a/net/mac80211/ht.c
+++ b/net/mac80211/ht.c
@@ -300,7 +300,7 @@ void ieee80211_send_delba(struct ieee80211_sub_if_data *sdata,
mgmt->u.action.u.delba.params = cpu_to_le16(params);
mgmt->u.action.u.delba.reason_code = cpu_to_le16(reason_code);
- ieee80211_tx_skb(sdata, skb);
+ ieee80211_tx_skb_tid(sdata, skb, tid);
}
void ieee80211_process_delba(struct ieee80211_sub_if_data *sdata,
diff --git a/net/mac80211/ieee80211_i.h b/net/mac80211/ieee80211_i.h
index 96fe754..93d7c86b 100644
--- a/net/mac80211/ieee80211_i.h
+++ b/net/mac80211/ieee80211_i.h
@@ -1350,6 +1350,8 @@ void mac80211_ev_michael_mic_failure(struct ieee80211_sub_if_data *sdata, int ke
void ieee80211_set_wmm_default(struct ieee80211_sub_if_data *sdata);
void ieee80211_xmit(struct ieee80211_sub_if_data *sdata, struct sk_buff *skb);
void ieee80211_tx_skb(struct ieee80211_sub_if_data *sdata, struct sk_buff *skb);
+void ieee80211_tx_skb_tid(struct ieee80211_sub_if_data *sdata,
+ struct sk_buff *skb, int tid);
void ieee802_11_parse_elems(u8 *start, size_t len,
struct ieee802_11_elems *elems);
u32 ieee802_11_parse_elems_crc(u8 *start, size_t len,
diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c
index e74652d..4fad705 100644
--- a/net/mac80211/tx.c
+++ b/net/mac80211/tx.c
@@ -2700,15 +2700,14 @@ ieee80211_get_buffered_bc(struct ieee80211_hw *hw,
}
EXPORT_SYMBOL(ieee80211_get_buffered_bc);
-void ieee80211_tx_skb(struct ieee80211_sub_if_data *sdata, struct sk_buff *skb)
+void ieee80211_tx_skb_tid(struct ieee80211_sub_if_data *sdata, struct sk_buff *skb, int tid)
{
skb_set_mac_header(skb, 0);
skb_set_network_header(skb, 0);
skb_set_transport_header(skb, 0);
- /* Send all internal mgmt frames on VO. Accordingly set TID to 7. */
- skb_set_queue_mapping(skb, IEEE80211_AC_VO);
- skb->priority = 7;
+ skb_set_queue_mapping(skb, ieee802_1d_to_ac[tid]);
+ skb->priority = tid;
/*
* The other path calling ieee80211_xmit is from the tasklet,
@@ -2719,3 +2718,10 @@ void ieee80211_tx_skb(struct ieee80211_sub_if_data *sdata, struct sk_buff *skb)
ieee80211_xmit(sdata, skb);
local_bh_enable();
}
+
+void inline ieee80211_tx_skb(struct ieee80211_sub_if_data *sdata, struct sk_buff *skb)
+{
+ /* Send all internal mgmt frames on VO. Accordingly set TID to 7. */
+ ieee80211_tx_skb_tid(sdata, skb, 7);
+}
+
--
1.7.7
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCHv2] mac80211: Use appropriate TID for sending BAR, ADDBA and DELBA frames
2011-12-15 8:02 ` [PATCHv2] " Helmut Schaa
@ 2011-12-15 8:19 ` Johannes Berg
2011-12-15 8:44 ` Helmut Schaa
2011-12-15 9:18 ` [PATCHv3] " Helmut Schaa
1 sibling, 1 reply; 6+ messages in thread
From: Johannes Berg @ 2011-12-15 8:19 UTC (permalink / raw)
To: Helmut Schaa; +Cc: linux-wireless, linville, adrian
On Thu, 2011-12-15 at 09:02 +0100, Helmut Schaa wrote:
> Changes in v2: Make ieee80211_tx_skb an inline function.
> +++ b/net/mac80211/tx.c
> @@ -2719,3 +2718,10 @@ void ieee80211_tx_skb(struct ieee80211_sub_if_data *sdata, struct sk_buff *skb)
> ieee80211_xmit(sdata, skb);
> local_bh_enable();
> }
> +
> +void inline ieee80211_tx_skb(struct ieee80211_sub_if_data *sdata, struct sk_buff *skb)
> +{
> + /* Send all internal mgmt frames on VO. Accordingly set TID to 7. */
> + ieee80211_tx_skb_tid(sdata, skb, 7);
> +}
Err, well, you should define inlines in a header file ... This inline
statement probably made no difference at all, except for potentially
causing a prototype mismatch compiler warning :)
johannes
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCHv2] mac80211: Use appropriate TID for sending BAR, ADDBA and DELBA frames
2011-12-15 8:19 ` Johannes Berg
@ 2011-12-15 8:44 ` Helmut Schaa
0 siblings, 0 replies; 6+ messages in thread
From: Helmut Schaa @ 2011-12-15 8:44 UTC (permalink / raw)
To: Johannes Berg; +Cc: linux-wireless, linville, adrian
On Thu, Dec 15, 2011 at 9:19 AM, Johannes Berg
<johannes@sipsolutions.net> wrote:
> On Thu, 2011-12-15 at 09:02 +0100, Helmut Schaa wrote:
>
>> Changes in v2: Make ieee80211_tx_skb an inline function.
>
>> +++ b/net/mac80211/tx.c
>
>> @@ -2719,3 +2718,10 @@ void ieee80211_tx_skb(struct ieee80211_sub_if_data *sdata, struct sk_buff *skb)
>> ieee80211_xmit(sdata, skb);
>> local_bh_enable();
>> }
>> +
>> +void inline ieee80211_tx_skb(struct ieee80211_sub_if_data *sdata, struct sk_buff *skb)
>> +{
>> + /* Send all internal mgmt frames on VO. Accordingly set TID to 7. */
>> + ieee80211_tx_skb_tid(sdata, skb, 7);
>> +}
>
> Err, well, you should define inlines in a header file ... This inline
> statement probably made no difference at all, except for potentially
> causing a prototype mismatch compiler warning :)
Ehm, too early in the morning I guess :)
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCHv3] mac80211: Use appropriate TID for sending BAR, ADDBA and DELBA frames
2011-12-15 8:02 ` [PATCHv2] " Helmut Schaa
2011-12-15 8:19 ` Johannes Berg
@ 2011-12-15 9:18 ` Helmut Schaa
1 sibling, 0 replies; 6+ messages in thread
From: Helmut Schaa @ 2011-12-15 9:18 UTC (permalink / raw)
To: linux-wireless; +Cc: linville, johannes, adrian, Helmut Schaa
Currently BAR, ADDBA and DELBA frames are always sent using AC_VO. If
the TID for which a BA session is established is assigned to a different
queue BAR, ADDBA and DELBA frames can "overtake" frames of the according
BA session.
Hence, always put BA session related frames into the same queue as the
BA sessions data frames.
Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com>
---
v3: Move ieee80211_tx_skb into ieee80211_i.h for correct inlining
net/mac80211/agg-tx.c | 4 ++--
net/mac80211/ht.c | 2 +-
net/mac80211/ieee80211_i.h | 11 ++++++++++-
net/mac80211/tx.c | 8 ++++----
4 files changed, 17 insertions(+), 8 deletions(-)
diff --git a/net/mac80211/agg-tx.c b/net/mac80211/agg-tx.c
index 7380287..13ae622 100644
--- a/net/mac80211/agg-tx.c
+++ b/net/mac80211/agg-tx.c
@@ -105,7 +105,7 @@ static void ieee80211_send_addba_request(struct ieee80211_sub_if_data *sdata,
mgmt->u.action.u.addba_req.start_seq_num =
cpu_to_le16(start_seq_num << 4);
- ieee80211_tx_skb(sdata, skb);
+ ieee80211_tx_skb_tid(sdata, skb, tid);
}
void ieee80211_send_bar(struct ieee80211_vif *vif, u8 *ra, u16 tid, u16 ssn)
@@ -134,7 +134,7 @@ void ieee80211_send_bar(struct ieee80211_vif *vif, u8 *ra, u16 tid, u16 ssn)
bar->start_seq_num = cpu_to_le16(ssn);
IEEE80211_SKB_CB(skb)->flags |= IEEE80211_TX_INTFL_DONT_ENCRYPT;
- ieee80211_tx_skb(sdata, skb);
+ ieee80211_tx_skb_tid(sdata, skb, tid);
}
EXPORT_SYMBOL(ieee80211_send_bar);
diff --git a/net/mac80211/ht.c b/net/mac80211/ht.c
index 0fd9c2a..f25fff7 100644
--- a/net/mac80211/ht.c
+++ b/net/mac80211/ht.c
@@ -300,7 +300,7 @@ void ieee80211_send_delba(struct ieee80211_sub_if_data *sdata,
mgmt->u.action.u.delba.params = cpu_to_le16(params);
mgmt->u.action.u.delba.reason_code = cpu_to_le16(reason_code);
- ieee80211_tx_skb(sdata, skb);
+ ieee80211_tx_skb_tid(sdata, skb, tid);
}
void ieee80211_process_delba(struct ieee80211_sub_if_data *sdata,
diff --git a/net/mac80211/ieee80211_i.h b/net/mac80211/ieee80211_i.h
index 96fe754..cba5866 100644
--- a/net/mac80211/ieee80211_i.h
+++ b/net/mac80211/ieee80211_i.h
@@ -1349,7 +1349,16 @@ void mac80211_ev_michael_mic_failure(struct ieee80211_sub_if_data *sdata, int ke
gfp_t gfp);
void ieee80211_set_wmm_default(struct ieee80211_sub_if_data *sdata);
void ieee80211_xmit(struct ieee80211_sub_if_data *sdata, struct sk_buff *skb);
-void ieee80211_tx_skb(struct ieee80211_sub_if_data *sdata, struct sk_buff *skb);
+
+void ieee80211_tx_skb_tid(struct ieee80211_sub_if_data *sdata,
+ struct sk_buff *skb, int tid);
+static void inline ieee80211_tx_skb(struct ieee80211_sub_if_data *sdata,
+ struct sk_buff *skb)
+{
+ /* Send all internal mgmt frames on VO. Accordingly set TID to 7. */
+ ieee80211_tx_skb_tid(sdata, skb, 7);
+}
+
void ieee802_11_parse_elems(u8 *start, size_t len,
struct ieee802_11_elems *elems);
u32 ieee802_11_parse_elems_crc(u8 *start, size_t len,
diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c
index e74652d..6f2a33e 100644
--- a/net/mac80211/tx.c
+++ b/net/mac80211/tx.c
@@ -2700,15 +2700,15 @@ ieee80211_get_buffered_bc(struct ieee80211_hw *hw,
}
EXPORT_SYMBOL(ieee80211_get_buffered_bc);
-void ieee80211_tx_skb(struct ieee80211_sub_if_data *sdata, struct sk_buff *skb)
+void ieee80211_tx_skb_tid(struct ieee80211_sub_if_data *sdata,
+ struct sk_buff *skb, int tid)
{
skb_set_mac_header(skb, 0);
skb_set_network_header(skb, 0);
skb_set_transport_header(skb, 0);
- /* Send all internal mgmt frames on VO. Accordingly set TID to 7. */
- skb_set_queue_mapping(skb, IEEE80211_AC_VO);
- skb->priority = 7;
+ skb_set_queue_mapping(skb, ieee802_1d_to_ac[tid]);
+ skb->priority = tid;
/*
* The other path calling ieee80211_xmit is from the tasklet,
--
1.7.7
^ permalink raw reply related [flat|nested] 6+ messages in thread
end of thread, other threads:[~2011-12-15 9:18 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-12-14 14:10 [PATCH] mac80211: Use appropriate TID for sending BAR, ADDBA and DELBA frames Helmut Schaa
2011-12-14 22:11 ` Johannes Berg
2011-12-15 8:02 ` [PATCHv2] " Helmut Schaa
2011-12-15 8:19 ` Johannes Berg
2011-12-15 8:44 ` Helmut Schaa
2011-12-15 9:18 ` [PATCHv3] " Helmut Schaa
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).