Search Linux Wireless

[PATCH] mac80211: allow advertising correct maximum aggregate size

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Johannes Berg <johannes.berg@xxxxxxxxx>

Currently, mac80211 always advertises that it may send
up to 64 subframes in an aggregate. This is fine, since
it's the max, but might as well be set to zero instead
since it doesn't have any information.

However, drivers might have that information, so allow
them to set a variable giving it, which will then be
used. The default of zero will be fine since to the
peer that means we don't know and it will just use its
own limit for the buffer size.

Signed-off-by: Johannes Berg <johannes.berg@xxxxxxxxx>
---
This will apply only after Luca's patch
"mac80211: add hw configuration for max ampdu buffer size"

 include/net/mac80211.h |    5 +++++
 net/mac80211/agg-tx.c  |    3 ++-
 2 files changed, 7 insertions(+), 1 deletion(-)

--- wireless-testing.orig/include/net/mac80211.h	2011-01-18 13:49:49.000000000 +0100
+++ wireless-testing/include/net/mac80211.h	2011-01-18 13:50:20.000000000 +0100
@@ -1154,6 +1154,10 @@ enum ieee80211_hw_flags {
  *	This is only relevant if the device has restrictions on the
  *	number of subframes, if it relies on mac80211 to do reordering
  *	it shouldn't be set.
+ *
+ * @max_tx_aggregation_subframes: maximum number of subframes in an
+ *	aggregate an HT driver will transmit, used by the peer as a
+ *	hint to size its reorder buffer.
  */
 struct ieee80211_hw {
 	struct ieee80211_conf conf;
@@ -1173,6 +1177,7 @@ struct ieee80211_hw {
 	u8 max_report_rates;
 	u8 max_rate_tries;
 	u8 max_rx_aggregation_subframes;
+	u8 max_tx_aggregation_subframes;
 };
 
 /**
--- wireless-testing.orig/net/mac80211/agg-tx.c	2011-01-18 13:49:49.000000000 +0100
+++ wireless-testing/net/mac80211/agg-tx.c	2011-01-18 13:50:20.000000000 +0100
@@ -342,7 +342,8 @@ void ieee80211_tx_ba_session_handle_star
 	/* send AddBA request */
 	ieee80211_send_addba_request(sdata, sta->sta.addr, tid,
 				     tid_tx->dialog_token, start_seq_num,
-				     0x40, tid_tx->timeout);
+				     local->hw.max_tx_aggregation_subframes,
+				     tid_tx->timeout);
 }
 
 int ieee80211_start_tx_ba_session(struct ieee80211_sta *pubsta, u16 tid,


--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux