Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0b01f030 authored by Johannes Berg's avatar Johannes Berg Committed by John W. Linville
Browse files

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: default avatarJohannes Berg <johannes.berg@intel.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent ac1bd846
Loading
Loading
Loading
Loading
+2 −1
Original line number Original line Diff line number Diff line
@@ -1945,7 +1945,8 @@ static int ar9170_conf_tx(struct ieee80211_hw *hw, u16 queue,
static int ar9170_ampdu_action(struct ieee80211_hw *hw,
static int ar9170_ampdu_action(struct ieee80211_hw *hw,
			       struct ieee80211_vif *vif,
			       struct ieee80211_vif *vif,
			       enum ieee80211_ampdu_mlme_action action,
			       enum ieee80211_ampdu_mlme_action action,
			       struct ieee80211_sta *sta, u16 tid, u16 *ssn)
			       struct ieee80211_sta *sta, u16 tid, u16 *ssn,
			       u8 buf_size)
{
{
	switch (action) {
	switch (action) {
	case IEEE80211_AMPDU_RX_START:
	case IEEE80211_AMPDU_RX_START:
+1 −1
Original line number Original line Diff line number Diff line
@@ -1549,7 +1549,7 @@ static int ath9k_htc_ampdu_action(struct ieee80211_hw *hw,
				  struct ieee80211_vif *vif,
				  struct ieee80211_vif *vif,
				  enum ieee80211_ampdu_mlme_action action,
				  enum ieee80211_ampdu_mlme_action action,
				  struct ieee80211_sta *sta,
				  struct ieee80211_sta *sta,
				  u16 tid, u16 *ssn)
				  u16 tid, u16 *ssn, u8 buf_size)
{
{
	struct ath9k_htc_priv *priv = hw->priv;
	struct ath9k_htc_priv *priv = hw->priv;
	struct ath9k_htc_sta *ista;
	struct ath9k_htc_sta *ista;
+1 −1
Original line number Original line Diff line number Diff line
@@ -2165,7 +2165,7 @@ static int ath9k_ampdu_action(struct ieee80211_hw *hw,
			      struct ieee80211_vif *vif,
			      struct ieee80211_vif *vif,
			      enum ieee80211_ampdu_mlme_action action,
			      enum ieee80211_ampdu_mlme_action action,
			      struct ieee80211_sta *sta,
			      struct ieee80211_sta *sta,
			      u16 tid, u16 *ssn)
			      u16 tid, u16 *ssn, u8 buf_size)
{
{
	struct ath_wiphy *aphy = hw->priv;
	struct ath_wiphy *aphy = hw->priv;
	struct ath_softc *sc = aphy->sc;
	struct ath_softc *sc = aphy->sc;
+1 −1
Original line number Original line Diff line number Diff line
@@ -1279,7 +1279,7 @@ static int carl9170_op_ampdu_action(struct ieee80211_hw *hw,
				    struct ieee80211_vif *vif,
				    struct ieee80211_vif *vif,
				    enum ieee80211_ampdu_mlme_action action,
				    enum ieee80211_ampdu_mlme_action action,
				    struct ieee80211_sta *sta,
				    struct ieee80211_sta *sta,
				    u16 tid, u16 *ssn)
				    u16 tid, u16 *ssn, u8 buf_size)
{
{
	struct ar9170 *ar = hw->priv;
	struct ar9170 *ar = hw->priv;
	struct carl9170_sta_info *sta_info = (void *) sta->drv_priv;
	struct carl9170_sta_info *sta_info = (void *) sta->drv_priv;
+2 −1
Original line number Original line Diff line number Diff line
@@ -3393,7 +3393,8 @@ int iwlagn_mac_set_key(struct ieee80211_hw *hw, enum set_key_cmd cmd,
int iwlagn_mac_ampdu_action(struct ieee80211_hw *hw,
int iwlagn_mac_ampdu_action(struct ieee80211_hw *hw,
			    struct ieee80211_vif *vif,
			    struct ieee80211_vif *vif,
			    enum ieee80211_ampdu_mlme_action action,
			    enum ieee80211_ampdu_mlme_action action,
			    struct ieee80211_sta *sta, u16 tid, u16 *ssn)
			    struct ieee80211_sta *sta, u16 tid, u16 *ssn,
			    u8 buf_size)
{
{
	struct iwl_priv *priv = hw->priv;
	struct iwl_priv *priv = hw->priv;
	int ret = -EINVAL;
	int ret = -EINVAL;
Loading