mac80211: avoid looking up tid_tx/tid_rx from timers
There's no need to re-lookup the data structures now that we actually get them immediately with from_timer(), just avoid that. The struct has to be valid anyway, otherwise the timer object itself would no longer be valid, and we can't have a different version of the struct since only a single session per TID is permitted. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
This commit is contained in:
@@ -153,27 +153,16 @@ EXPORT_SYMBOL(ieee80211_stop_rx_ba_session);
|
||||
*/
|
||||
static void sta_rx_agg_session_timer_expired(struct timer_list *t)
|
||||
{
|
||||
struct tid_ampdu_rx *tid_rx_timer =
|
||||
from_timer(tid_rx_timer, t, session_timer);
|
||||
struct sta_info *sta = tid_rx_timer->sta;
|
||||
u8 tid = tid_rx_timer->tid;
|
||||
struct tid_ampdu_rx *tid_rx;
|
||||
struct tid_ampdu_rx *tid_rx = from_timer(tid_rx, t, session_timer);
|
||||
struct sta_info *sta = tid_rx->sta;
|
||||
u8 tid = tid_rx->tid;
|
||||
unsigned long timeout;
|
||||
|
||||
rcu_read_lock();
|
||||
tid_rx = rcu_dereference(sta->ampdu_mlme.tid_rx[tid]);
|
||||
if (!tid_rx) {
|
||||
rcu_read_unlock();
|
||||
return;
|
||||
}
|
||||
|
||||
timeout = tid_rx->last_rx + TU_TO_JIFFIES(tid_rx->timeout);
|
||||
if (time_is_after_jiffies(timeout)) {
|
||||
mod_timer(&tid_rx->session_timer, timeout);
|
||||
rcu_read_unlock();
|
||||
return;
|
||||
}
|
||||
rcu_read_unlock();
|
||||
|
||||
ht_dbg(sta->sdata, "RX session timer expired on %pM tid %d\n",
|
||||
sta->sta.addr, tid);
|
||||
|
Reference in New Issue
Block a user