diff options
author | Johannes Berg <johannes.berg@intel.com> | 2019-10-02 11:12:25 +0200 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2019-10-04 13:58:13 +0200 |
commit | 2ce113de31320756b25179f3f4512a522bc45263 (patch) | |
tree | 43a054c7d1036b8c269223e3ae2d69358132a59d /net/mac80211/agg-tx.c | |
parent | mac80211: pass internal sta to ieee80211_tx_frags() (diff) | |
download | linux-2ce113de31320756b25179f3f4512a522bc45263.tar.xz linux-2ce113de31320756b25179f3f4512a522bc45263.zip |
mac80211: simplify TX aggregation start
There really is no need to make drivers call the
ieee80211_start_tx_ba_cb_irqsafe() function and then
schedule the worker if all we want is to set a bit.
Add a new return value (that was previously considered
invalid) to indicate that the driver is immediately
ready for the session, and make drivers use it. The
only drivers that remain different are the Intel ones
as they need to negotiate more with the firmware.
Link: https://lore.kernel.org/r/1570007543-I152912660131cbab2e5d80b4218238c20f8a06e5@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/mac80211/agg-tx.c')
-rw-r--r-- | net/mac80211/agg-tx.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/net/mac80211/agg-tx.c b/net/mac80211/agg-tx.c index b11883d26875..33da6f738c99 100644 --- a/net/mac80211/agg-tx.c +++ b/net/mac80211/agg-tx.c @@ -485,7 +485,14 @@ void ieee80211_tx_ba_session_handle_start(struct sta_info *sta, int tid) params.ssn = sta->tid_seq[tid] >> 4; ret = drv_ampdu_action(local, sdata, ¶ms); - if (ret) { + if (ret == IEEE80211_AMPDU_TX_START_IMMEDIATE) { + /* + * We didn't send the request yet, so don't need to check + * here if we already got a response, just mark as driver + * ready immediately. + */ + set_bit(HT_AGG_STATE_DRV_READY, &tid_tx->state); + } else if (ret) { ht_dbg(sdata, "BA request denied - HW unavailable for %pM tid %d\n", sta->sta.addr, tid); |