linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RFC 0/2] advertise aggregate size limit
@ 2011-01-12 12:31 Johannes Berg
  2011-01-12 12:31 ` [RFC 1/2] mac80211: allow advertising correct maximum aggregate size Johannes Berg
  2011-01-12 12:31 ` [RFC 2/2] iwlwifi: advertise max " Johannes Berg
  0 siblings, 2 replies; 3+ messages in thread
From: Johannes Berg @ 2011-01-12 12:31 UTC (permalink / raw)
  To: linux-wireless

This can help optimise peers reorder buffer sizes.

johannes


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [RFC 1/2] mac80211: allow advertising correct maximum aggregate size
  2011-01-12 12:31 [RFC 0/2] advertise aggregate size limit Johannes Berg
@ 2011-01-12 12:31 ` Johannes Berg
  2011-01-12 12:31 ` [RFC 2/2] iwlwifi: advertise max " Johannes Berg
  1 sibling, 0 replies; 3+ messages in thread
From: Johannes Berg @ 2011-01-12 12:31 UTC (permalink / raw)
  To: linux-wireless

From: Johannes Berg <johannes.berg@intel.com>

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@intel.com>
---
 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-12 13:25:40.000000000 +0100
+++ wireless-testing/include/net/mac80211.h	2011-01-12 13:26:56.000000000 +0100
@@ -1147,6 +1147,10 @@ enum ieee80211_hw_flags {
  * @napi_weight: weight used for NAPI polling.  You must specify an
  *	appropriate value here if a napi_poll operation is provided
  *	by your driver.
+ *
+ * @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;
@@ -1165,6 +1169,7 @@ struct ieee80211_hw {
 	u8 max_rates;
 	u8 max_report_rates;
 	u8 max_rate_tries;
+	u8 max_tx_aggregation_subframes;
 };
 
 /**
--- wireless-testing.orig/net/mac80211/agg-tx.c	2011-01-12 13:27:01.000000000 +0100
+++ wireless-testing/net/mac80211/agg-tx.c	2011-01-12 13:27: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,



^ permalink raw reply	[flat|nested] 3+ messages in thread

* [RFC 2/2] iwlwifi: advertise max aggregate size
  2011-01-12 12:31 [RFC 0/2] advertise aggregate size limit Johannes Berg
  2011-01-12 12:31 ` [RFC 1/2] mac80211: allow advertising correct maximum aggregate size Johannes Berg
@ 2011-01-12 12:31 ` Johannes Berg
  1 sibling, 0 replies; 3+ messages in thread
From: Johannes Berg @ 2011-01-12 12:31 UTC (permalink / raw)
  To: linux-wireless

From: Johannes Berg <johannes.berg@intel.com>

Allow peers to size their reorder buffer more
accurately by advertising that we'll never send
aggregates longer than the default (31).

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
---
 drivers/net/wireless/iwlwifi/iwl-agn.c |    2 ++
 1 file changed, 2 insertions(+)

--- wireless-testing.orig/drivers/net/wireless/iwlwifi/iwl-agn.c	2011-01-12 13:28:18.000000000 +0100
+++ wireless-testing/drivers/net/wireless/iwlwifi/iwl-agn.c	2011-01-12 13:28:41.000000000 +0100
@@ -3191,6 +3191,8 @@ static int iwl_mac_setup_register(struct
 		    IEEE80211_HW_SPECTRUM_MGMT |
 		    IEEE80211_HW_REPORTS_TX_ACK_STATUS;
 
+	hw->max_tx_aggregation_subframes = LINK_QUAL_AGG_FRAME_LIMIT_DEF;
+
 	if (!priv->cfg->base_params->broken_powersave)
 		hw->flags |= IEEE80211_HW_SUPPORTS_PS |
 			     IEEE80211_HW_SUPPORTS_DYNAMIC_PS;



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2011-01-12 12:31 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-01-12 12:31 [RFC 0/2] advertise aggregate size limit Johannes Berg
2011-01-12 12:31 ` [RFC 1/2] mac80211: allow advertising correct maximum aggregate size Johannes Berg
2011-01-12 12:31 ` [RFC 2/2] iwlwifi: advertise max " Johannes Berg

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).