mac80211: add A-MSDU tx support
RFC 1/1 mac80211: add A-MSDU tx support
Requires software tx queueing support. frag_list support (for zero-copy) is optional.
Signed-off-by Felix Fietkau <[email protected]>
--- include/net/mac80211.h | 10 ++++ net/mac80211/agg-tx.c | 5 ++ net/mac80211/debugfs.c | 2 + net/mac80211/ieee80211_i.h | 1 + net/mac80211/tx.c | 136 +++++++++++++++++++++++++++++++++++++++++++++ 5 files changed, 154 insertions(+)
include/net/mac80211.h +10 -0
@@ -709,6 +709,7 @@ enum mac80211_tx_info_flags {* @IEEE80211_TX_CTRL_PS_RESPONSE: This frame is a response to a poll * frame (PS-Poll or uAPSD). * @IEEE80211_TX_CTRL_RATE_INJECT: This frame is injected with rate information +* @IEEE80211_TX_CTRL_AMSDU: This frame is an A-MSDU frame * * These flags are used in tx_info->control.flags. */
@@ -716,6 +717,7 @@ enum mac80211_tx_control_flags {IEEE80211_TX_CTRL_PORT_CTRL_PROTO =BIT (0 ),IEEE80211_TX_CTRL_PS_RESPONSE =BIT (1 ),IEEE80211_TX_CTRL_RATE_INJECT =BIT (2 ), + IEEE80211_TX_CTRL_AMSDU = BIT(3), };/*
@@ -1964,6 +1966,12 @@ struct ieee80211_txq {* order and does not need to manage its own reorder buffer or BA session * timeout. * +* @IEEE80211_HW_TX_AMSDU: Hardware (or driver) supports software aggregated +* A-MSDU frames. Requires software tx queueing support. +* +* @IEEE80211_HW_TX_FRAG_LIST: Hardware (or driver) supports sending frag_list +* skbs, needed for zero-copy software A-MSDU. +* * @NUM_IEEE80211_HW_FLAGS: number of hardware flags, used for sizing arrays */ enum ieee80211_hw_flags {
@@ -2001,6 +2009,8 @@ enum ieee80211_hw_flags {IEEE80211_HW_BEACON_TX_STATUS ,IEEE80211_HW_NEEDS_UNIQUE_STA_ADDR ,IEEE80211_HW_SUPPORTS_REORDERING_BUFFER , +IEEE80211_HW_TX_AMSDU , +IEEE80211_HW_TX_FRAG_LIST ,/* keep last, obviously */ NUM_IEEE80211_HW_FLAGS
net/mac80211/agg-tx.c +5 -0
@@ -935,6 +935,7 @@ void ieee80211_process_addba_resp(struct ieee80211_local *local, size_t len) {struct tid_ampdu_tx *tid_tx; +struct ieee80211_txq *txq;u16 capab, tid;u8 buf_size;bool amsdu;
@@ -945,6 +946,10 @@ void ieee80211_process_addba_resp(struct ieee80211_local *local, buf_size = (capab &IEEE80211_ADDBA_PARAM_BUF_SIZE_MASK ) >>6 ; buf_size =min (buf_size, local->hw.max_tx_aggregation_subframes); + txq = sta->sta.txq[tid]; +if (!amsdu && txq) +set_bit (IEEE80211_TXQ_NO_AMSDU , &to_txq_info (txq)->flags); +mutex_lock (&sta->ampdu_mlme.mtx); tid_tx =rcu_dereference_protected_tid_tx (sta, tid);
net/mac80211/debugfs.c +2 -0
@@ -127,6 +127,8 @@ static const char *hw_flag_names[NUM_IEEE80211_HW_FLAGS + 1] = {FLAG (BEACON_TX_STATUS ),FLAG (NEEDS_UNIQUE_STA_ADDR ),FLAG (SUPPORTS_REORDERING_BUFFER ), +FLAG (TX_AMSDU ), +FLAG (TX_FRAG_LIST ),/* keep last for the build bug below */ (void *)0x1
net/mac80211/ieee80211_i.h +1 -0
@@ -799,6 +799,7 @@ struct mac80211_qos_map {enum txq_info_flags {IEEE80211_TXQ_STOP ,IEEE80211_TXQ_AMPDU , +IEEE80211_TXQ_NO_AMSDU , };struct txq_info {
net/mac80211/tx.c +136 -0
154 lines not on this page · raw message
Signature · 1 line
2.2.2