diff options
author | Johannes Berg <johannes.berg@intel.com> | 2023-08-28 14:00:05 +0200 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2023-09-11 11:27:22 +0200 |
commit | 0cd8080e46b834fa72026112488ab61d4b82f03a (patch) | |
tree | 9fc6171d8ed5ddf0cc06a4978c4653d5b906e714 /net/mac80211/tx.c | |
parent | 463559b7c3fe5fab1a4b60cd3454ef84a5dc51b8 (diff) |
wifi: mac80211: remove local->mtx
We now hold the wiphy mutex everywhere that we use or
needed the local->mtx, so we don't need this mutex any
more. Remove it.
Most of this change was done automatically with spatch.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/mac80211/tx.c')
-rw-r--r-- | net/mac80211/tx.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c index 1ff7d2368c32..d30b9f204d1b 100644 --- a/net/mac80211/tx.c +++ b/net/mac80211/tx.c @@ -6109,6 +6109,9 @@ int ieee80211_tx_control_port(struct wiphy *wiphy, struct net_device *dev, u32 flags = 0; int err; + /* mutex lock is only needed for incrementing the cookie counter */ + lockdep_assert_wiphy(local->hw.wiphy); + /* Only accept CONTROL_PORT_PROTOCOL configured in CONNECT/ASSOCIATE * or Pre-Authentication */ @@ -6199,15 +6202,10 @@ int ieee80211_tx_control_port(struct wiphy *wiphy, struct net_device *dev, rcu_read_unlock(); start_xmit: - /* mutex lock is only needed for incrementing the cookie counter */ - mutex_lock(&local->mtx); - local_bh_disable(); __ieee80211_subif_start_xmit(skb, skb->dev, flags, ctrl_flags, cookie); local_bh_enable(); - mutex_unlock(&local->mtx); - return 0; } |