mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-05 18:39:59 +00:00
wifi: cw1200: remove RCU STA pointer handling in TX
We can call this in one of two ways: through mac80211, where we're already in an RCU read-side critical section, or from some other code in the driver where this pointer can only be NULL. In any case, we get a 'free' already protected pointer to the sta through info->control.sta, so we can use it on the stack without any further protection. Remove the rcu_dereference() and critical section. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Kalle Valo <kvalo@kernel.org> Link: https://lore.kernel.org/r/20220904212910.e5bc20dd17bf.Ib570ff7fde33c2b6eddef493a3541fa04eb47181@changeid
This commit is contained in:
parent
fbe7e18581
commit
df8e1af22c
1 changed files with 1 additions and 4 deletions
|
@ -762,8 +762,7 @@ void cw1200_tx(struct ieee80211_hw *dev,
|
|||
if (ret)
|
||||
goto drop;
|
||||
|
||||
rcu_read_lock();
|
||||
sta = rcu_dereference(t.sta);
|
||||
sta = t.sta;
|
||||
|
||||
spin_lock_bh(&priv->ps_state_lock);
|
||||
{
|
||||
|
@ -776,8 +775,6 @@ void cw1200_tx(struct ieee80211_hw *dev,
|
|||
if (tid_update && sta)
|
||||
ieee80211_sta_set_buffered(sta, t.txpriv.tid, true);
|
||||
|
||||
rcu_read_unlock();
|
||||
|
||||
cw1200_bh_wakeup(priv);
|
||||
|
||||
return;
|
||||
|
|
Loading…
Reference in a new issue