aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2011-01-18 07:51:05 -0500
committerJohn W. Linville <linville@tuxdriver.com>2011-01-19 11:36:11 -0500
commit0b01f030d38e00650e2db42da083d8647aad40a5 (patch)
tree14519750d9b6cdb046624dd87d5323a4826821e2 /drivers
parentac1bd8464f161ed1475ef73c431b926256c6b5bb (diff)
mac80211: track receiver's aggregation reorder buffer size
The aggregation code currently doesn't implement the buffer size negotiation. It will always request a max buffer size (which is fine, if a little pointless, as the mac80211 code doesn't know and might just use 0 instead), but if the peer requests a smaller size it isn't possible to honour this request. In order to fix this, look at the buffer size in the addBA response frame, keep track of it and pass it to the driver in the ampdu_action callback when called with the IEEE80211_AMPDU_TX_OPERATIONAL action. That way the driver can limit the number of subframes in aggregates appropriately. Note that this doesn't fix any drivers apart from the addition of the new argument -- they all need to be updated separately to use this variable! Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/wireless/ath/ar9170/main.c3
-rw-r--r--drivers/net/wireless/ath/ath9k/htc_drv_main.c2
-rw-r--r--drivers/net/wireless/ath/ath9k/main.c2
-rw-r--r--drivers/net/wireless/ath/carl9170/main.c2
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-agn.c3
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-agn.h3
-rw-r--r--drivers/net/wireless/mac80211_hwsim.c3
-rw-r--r--drivers/net/wireless/mwl8k.c3
-rw-r--r--drivers/net/wireless/rt2x00/rt2800lib.c3
-rw-r--r--drivers/net/wireless/rt2x00/rt2800lib.h3
-rw-r--r--drivers/net/wireless/rtlwifi/core.c3
11 files changed, 19 insertions, 11 deletions
diff --git a/drivers/net/wireless/ath/ar9170/main.c b/drivers/net/wireless/ath/ar9170/main.c
index 32bf79e6a320..a9111e1161fd 100644
--- a/drivers/net/wireless/ath/ar9170/main.c
+++ b/drivers/net/wireless/ath/ar9170/main.c
@@ -1945,7 +1945,8 @@ static int ar9170_conf_tx(struct ieee80211_hw *hw, u16 queue,
1945static int ar9170_ampdu_action(struct ieee80211_hw *hw, 1945static int ar9170_ampdu_action(struct ieee80211_hw *hw,
1946 struct ieee80211_vif *vif, 1946 struct ieee80211_vif *vif,
1947 enum ieee80211_ampdu_mlme_action action, 1947 enum ieee80211_ampdu_mlme_action action,
1948 struct ieee80211_sta *sta, u16 tid, u16 *ssn) 1948 struct ieee80211_sta *sta, u16 tid, u16 *ssn,
1949 u8 buf_size)
1949{ 1950{
1950 switch (action) { 1951 switch (action) {
1951 case IEEE80211_AMPDU_RX_START: 1952 case IEEE80211_AMPDU_RX_START:
diff --git a/drivers/net/wireless/ath/ath9k/htc_drv_main.c b/drivers/net/wireless/ath/ath9k/htc_drv_main.c
index 187af5b4440d..f14f37d29f45 100644
--- a/drivers/net/wireless/ath/ath9k/htc_drv_main.c
+++ b/drivers/net/wireless/ath/ath9k/htc_drv_main.c
@@ -1549,7 +1549,7 @@ static int ath9k_htc_ampdu_action(struct ieee80211_hw *hw,
1549 struct ieee80211_vif *vif, 1549 struct ieee80211_vif *vif,
1550 enum ieee80211_ampdu_mlme_action action, 1550 enum ieee80211_ampdu_mlme_action action,
1551 struct ieee80211_sta *sta, 1551 struct ieee80211_sta *sta,
1552 u16 tid, u16 *ssn) 1552 u16 tid, u16 *ssn, u8 buf_size)
1553{ 1553{
1554 struct ath9k_htc_priv *priv = hw->priv; 1554 struct ath9k_htc_priv *priv = hw->priv;
1555 struct ath9k_htc_sta *ista; 1555 struct ath9k_htc_sta *ista;
diff --git a/drivers/net/wireless/ath/ath9k/main.c b/drivers/net/wireless/ath/ath9k/main.c
index 174c016ef89d..c03184e7bffe 100644
--- a/drivers/net/wireless/ath/ath9k/main.c
+++ b/drivers/net/wireless/ath/ath9k/main.c
@@ -2165,7 +2165,7 @@ static int ath9k_ampdu_action(struct ieee80211_hw *hw,
2165 struct ieee80211_vif *vif, 2165 struct ieee80211_vif *vif,
2166 enum ieee80211_ampdu_mlme_action action, 2166 enum ieee80211_ampdu_mlme_action action,
2167 struct ieee80211_sta *sta, 2167 struct ieee80211_sta *sta,
2168 u16 tid, u16 *ssn) 2168 u16 tid, u16 *ssn, u8 buf_size)
2169{ 2169{
2170 struct ath_wiphy *aphy = hw->priv; 2170 struct ath_wiphy *aphy = hw->priv;
2171 struct ath_softc *sc = aphy->sc; 2171 struct ath_softc *sc = aphy->sc;
diff --git a/drivers/net/wireless/ath/carl9170/main.c b/drivers/net/wireless/ath/carl9170/main.c
index 870df8c42622..ecfb80b059d1 100644
--- a/drivers/net/wireless/ath/carl9170/main.c
+++ b/drivers/net/wireless/ath/carl9170/main.c
@@ -1279,7 +1279,7 @@ static int carl9170_op_ampdu_action(struct ieee80211_hw *hw,
1279 struct ieee80211_vif *vif, 1279 struct ieee80211_vif *vif,
1280 enum ieee80211_ampdu_mlme_action action, 1280 enum ieee80211_ampdu_mlme_action action,
1281 struct ieee80211_sta *sta, 1281 struct ieee80211_sta *sta,
1282 u16 tid, u16 *ssn) 1282 u16 tid, u16 *ssn, u8 buf_size)
1283{ 1283{
1284 struct ar9170 *ar = hw->priv; 1284 struct ar9170 *ar = hw->priv;
1285 struct carl9170_sta_info *sta_info = (void *) sta->drv_priv; 1285 struct carl9170_sta_info *sta_info = (void *) sta->drv_priv;
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn.c b/drivers/net/wireless/iwlwifi/iwl-agn.c
index 36335b1b54d4..8b045a401d62 100644
--- a/drivers/net/wireless/iwlwifi/iwl-agn.c
+++ b/drivers/net/wireless/iwlwifi/iwl-agn.c
@@ -3393,7 +3393,8 @@ int iwlagn_mac_set_key(struct ieee80211_hw *hw, enum set_key_cmd cmd,
3393int iwlagn_mac_ampdu_action(struct ieee80211_hw *hw, 3393int iwlagn_mac_ampdu_action(struct ieee80211_hw *hw,
3394 struct ieee80211_vif *vif, 3394 struct ieee80211_vif *vif,
3395 enum ieee80211_ampdu_mlme_action action, 3395 enum ieee80211_ampdu_mlme_action action,
3396 struct ieee80211_sta *sta, u16 tid, u16 *ssn) 3396 struct ieee80211_sta *sta, u16 tid, u16 *ssn,
3397 u8 buf_size)
3397{ 3398{
3398 struct iwl_priv *priv = hw->priv; 3399 struct iwl_priv *priv = hw->priv;
3399 int ret = -EINVAL; 3400 int ret = -EINVAL;
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn.h b/drivers/net/wireless/iwlwifi/iwl-agn.h
index da303585f801..822221a97e80 100644
--- a/drivers/net/wireless/iwlwifi/iwl-agn.h
+++ b/drivers/net/wireless/iwlwifi/iwl-agn.h
@@ -349,7 +349,8 @@ void iwlagn_mac_update_tkip_key(struct ieee80211_hw *hw,
349int iwlagn_mac_ampdu_action(struct ieee80211_hw *hw, 349int iwlagn_mac_ampdu_action(struct ieee80211_hw *hw,
350 struct ieee80211_vif *vif, 350 struct ieee80211_vif *vif,
351 enum ieee80211_ampdu_mlme_action action, 351 enum ieee80211_ampdu_mlme_action action,
352 struct ieee80211_sta *sta, u16 tid, u16 *ssn); 352 struct ieee80211_sta *sta, u16 tid, u16 *ssn,
353 u8 buf_size);
353int iwlagn_mac_sta_add(struct ieee80211_hw *hw, 354int iwlagn_mac_sta_add(struct ieee80211_hw *hw,
354 struct ieee80211_vif *vif, 355 struct ieee80211_vif *vif,
355 struct ieee80211_sta *sta); 356 struct ieee80211_sta *sta);
diff --git a/drivers/net/wireless/mac80211_hwsim.c b/drivers/net/wireless/mac80211_hwsim.c
index 454f045ddff3..5d39b2840584 100644
--- a/drivers/net/wireless/mac80211_hwsim.c
+++ b/drivers/net/wireless/mac80211_hwsim.c
@@ -943,7 +943,8 @@ static int mac80211_hwsim_testmode_cmd(struct ieee80211_hw *hw,
943static int mac80211_hwsim_ampdu_action(struct ieee80211_hw *hw, 943static int mac80211_hwsim_ampdu_action(struct ieee80211_hw *hw,
944 struct ieee80211_vif *vif, 944 struct ieee80211_vif *vif,
945 enum ieee80211_ampdu_mlme_action action, 945 enum ieee80211_ampdu_mlme_action action,
946 struct ieee80211_sta *sta, u16 tid, u16 *ssn) 946 struct ieee80211_sta *sta, u16 tid, u16 *ssn,
947 u8 buf_size)
947{ 948{
948 switch (action) { 949 switch (action) {
949 case IEEE80211_AMPDU_TX_START: 950 case IEEE80211_AMPDU_TX_START:
diff --git a/drivers/net/wireless/mwl8k.c b/drivers/net/wireless/mwl8k.c
index 809f2bf27958..106b427d0064 100644
--- a/drivers/net/wireless/mwl8k.c
+++ b/drivers/net/wireless/mwl8k.c
@@ -4356,7 +4356,8 @@ static int mwl8k_get_survey(struct ieee80211_hw *hw, int idx,
4356static int 4356static int
4357mwl8k_ampdu_action(struct ieee80211_hw *hw, struct ieee80211_vif *vif, 4357mwl8k_ampdu_action(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
4358 enum ieee80211_ampdu_mlme_action action, 4358 enum ieee80211_ampdu_mlme_action action,
4359 struct ieee80211_sta *sta, u16 tid, u16 *ssn) 4359 struct ieee80211_sta *sta, u16 tid, u16 *ssn,
4360 u8 buf_size)
4360{ 4361{
4361 switch (action) { 4362 switch (action) {
4362 case IEEE80211_AMPDU_RX_START: 4363 case IEEE80211_AMPDU_RX_START:
diff --git a/drivers/net/wireless/rt2x00/rt2800lib.c b/drivers/net/wireless/rt2x00/rt2800lib.c
index a25be625ee90..f8ba01cbc6dd 100644
--- a/drivers/net/wireless/rt2x00/rt2800lib.c
+++ b/drivers/net/wireless/rt2x00/rt2800lib.c
@@ -3533,7 +3533,8 @@ EXPORT_SYMBOL_GPL(rt2800_get_tsf);
3533 3533
3534int rt2800_ampdu_action(struct ieee80211_hw *hw, struct ieee80211_vif *vif, 3534int rt2800_ampdu_action(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
3535 enum ieee80211_ampdu_mlme_action action, 3535 enum ieee80211_ampdu_mlme_action action,
3536 struct ieee80211_sta *sta, u16 tid, u16 *ssn) 3536 struct ieee80211_sta *sta, u16 tid, u16 *ssn,
3537 u8 buf_size)
3537{ 3538{
3538 int ret = 0; 3539 int ret = 0;
3539 3540
diff --git a/drivers/net/wireless/rt2x00/rt2800lib.h b/drivers/net/wireless/rt2x00/rt2800lib.h
index e3c995a9dec4..3efafb78ff77 100644
--- a/drivers/net/wireless/rt2x00/rt2800lib.h
+++ b/drivers/net/wireless/rt2x00/rt2800lib.h
@@ -198,7 +198,8 @@ int rt2800_conf_tx(struct ieee80211_hw *hw, u16 queue_idx,
198u64 rt2800_get_tsf(struct ieee80211_hw *hw); 198u64 rt2800_get_tsf(struct ieee80211_hw *hw);
199int rt2800_ampdu_action(struct ieee80211_hw *hw, struct ieee80211_vif *vif, 199int rt2800_ampdu_action(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
200 enum ieee80211_ampdu_mlme_action action, 200 enum ieee80211_ampdu_mlme_action action,
201 struct ieee80211_sta *sta, u16 tid, u16 *ssn); 201 struct ieee80211_sta *sta, u16 tid, u16 *ssn,
202 u8 buf_size);
202int rt2800_get_survey(struct ieee80211_hw *hw, int idx, 203int rt2800_get_survey(struct ieee80211_hw *hw, int idx,
203 struct survey_info *survey); 204 struct survey_info *survey);
204 205
diff --git a/drivers/net/wireless/rtlwifi/core.c b/drivers/net/wireless/rtlwifi/core.c
index d6a924a05654..25d2d667ffba 100644
--- a/drivers/net/wireless/rtlwifi/core.c
+++ b/drivers/net/wireless/rtlwifi/core.c
@@ -748,7 +748,8 @@ static void rtl_op_sta_notify(struct ieee80211_hw *hw,
748static int rtl_op_ampdu_action(struct ieee80211_hw *hw, 748static int rtl_op_ampdu_action(struct ieee80211_hw *hw,
749 struct ieee80211_vif *vif, 749 struct ieee80211_vif *vif,
750 enum ieee80211_ampdu_mlme_action action, 750 enum ieee80211_ampdu_mlme_action action,
751 struct ieee80211_sta *sta, u16 tid, u16 * ssn) 751 struct ieee80211_sta *sta, u16 tid, u16 *ssn,
752 u8 buf_size)
752{ 753{
753 struct rtl_priv *rtlpriv = rtl_priv(hw); 754 struct rtl_priv *rtlpriv = rtl_priv(hw);
754 755