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

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

mac80211: convert aggregation to operate on vifs/stas



The entire aggregation code currently operates on the
hw pointer and station addresses, but that needs to
change to make stations purely per-vif; As one step
preparing for that make the aggregation code callable
with the station, or by the combination of virtual
interface and station address.

Signed-off-by: default avatarJohannes Berg <johannes@sipsolutions.net>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent 3b53fde8
Loading
Loading
Loading
Loading
+3 −2
Original line number Original line Diff line number Diff line
@@ -2441,6 +2441,7 @@ 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,
			       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)
{
{
@@ -2470,7 +2471,7 @@ static int ar9170_ampdu_action(struct ieee80211_hw *hw,
		tid_info->state = AR9170_TID_STATE_PROGRESS;
		tid_info->state = AR9170_TID_STATE_PROGRESS;
		tid_info->active = false;
		tid_info->active = false;
		spin_unlock_irqrestore(&ar->tx_ampdu_list_lock, flags);
		spin_unlock_irqrestore(&ar->tx_ampdu_list_lock, flags);
		ieee80211_start_tx_ba_cb_irqsafe(hw, sta->addr, tid);
		ieee80211_start_tx_ba_cb_irqsafe(vif, sta->addr, tid);
		break;
		break;


	case IEEE80211_AMPDU_TX_STOP:
	case IEEE80211_AMPDU_TX_STOP:
@@ -2480,7 +2481,7 @@ static int ar9170_ampdu_action(struct ieee80211_hw *hw,
		tid_info->active = false;
		tid_info->active = false;
		skb_queue_purge(&tid_info->queue);
		skb_queue_purge(&tid_info->queue);
		spin_unlock_irqrestore(&ar->tx_ampdu_list_lock, flags);
		spin_unlock_irqrestore(&ar->tx_ampdu_list_lock, flags);
		ieee80211_stop_tx_ba_cb_irqsafe(hw, sta->addr, tid);
		ieee80211_stop_tx_ba_cb_irqsafe(vif, sta->addr, tid);
		break;
		break;


	case IEEE80211_AMPDU_TX_OPERATIONAL:
	case IEEE80211_AMPDU_TX_OPERATIONAL:
+3 −2
Original line number Original line Diff line number Diff line
@@ -3078,6 +3078,7 @@ static void ath9k_reset_tsf(struct ieee80211_hw *hw)
}
}


static int ath9k_ampdu_action(struct ieee80211_hw *hw,
static int ath9k_ampdu_action(struct ieee80211_hw *hw,
			      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)
@@ -3095,11 +3096,11 @@ static int ath9k_ampdu_action(struct ieee80211_hw *hw,
		break;
		break;
	case IEEE80211_AMPDU_TX_START:
	case IEEE80211_AMPDU_TX_START:
		ath_tx_aggr_start(sc, sta, tid, ssn);
		ath_tx_aggr_start(sc, sta, tid, ssn);
		ieee80211_start_tx_ba_cb_irqsafe(hw, sta->addr, tid);
		ieee80211_start_tx_ba_cb_irqsafe(vif, sta->addr, tid);
		break;
		break;
	case IEEE80211_AMPDU_TX_STOP:
	case IEEE80211_AMPDU_TX_STOP:
		ath_tx_aggr_stop(sc, sta, tid);
		ath_tx_aggr_stop(sc, sta, tid);
		ieee80211_stop_tx_ba_cb_irqsafe(hw, sta->addr, tid);
		ieee80211_stop_tx_ba_cb_irqsafe(vif, sta->addr, tid);
		break;
		break;
	case IEEE80211_AMPDU_TX_OPERATIONAL:
	case IEEE80211_AMPDU_TX_OPERATIONAL:
		ath_tx_aggr_resume(sc, sta, tid);
		ath_tx_aggr_resume(sc, sta, tid);
+1 −1
Original line number Original line Diff line number Diff line
@@ -1353,7 +1353,7 @@ static void ath_tx_status(void *priv, struct ieee80211_supported_band *sband,
			an = (struct ath_node *)sta->drv_priv;
			an = (struct ath_node *)sta->drv_priv;


			if(ath_tx_aggr_check(sc, an, tid))
			if(ath_tx_aggr_check(sc, an, tid))
				ieee80211_start_tx_ba_session(sc->hw, hdr->addr1, tid);
				ieee80211_start_tx_ba_session(sta, tid);
		}
		}
	}
	}


+1 −1
Original line number Original line Diff line number Diff line
@@ -301,7 +301,7 @@ static void rs_tl_turn_on_agg_for_tid(struct iwl_priv *priv,
	if (rs_tl_get_load(lq_data, tid) > IWL_AGG_LOAD_THRESHOLD) {
	if (rs_tl_get_load(lq_data, tid) > IWL_AGG_LOAD_THRESHOLD) {
		IWL_DEBUG_HT(priv, "Starting Tx agg: STA: %pM tid: %d\n",
		IWL_DEBUG_HT(priv, "Starting Tx agg: STA: %pM tid: %d\n",
				sta->addr, tid);
				sta->addr, tid);
		ieee80211_start_tx_ba_session(priv->hw, sta->addr, tid);
		ieee80211_start_tx_ba_session(sta, tid);
	}
	}
}
}


+1 −0
Original line number Original line Diff line number Diff line
@@ -2691,6 +2691,7 @@ static int iwl_mac_set_key(struct ieee80211_hw *hw, enum set_key_cmd cmd,
}
}


static int iwl_mac_ampdu_action(struct ieee80211_hw *hw,
static int iwl_mac_ampdu_action(struct ieee80211_hw *hw,
				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)
{
{
Loading