diff options
author | avos <avos@FreeBSD.org> | 2016-02-28 23:48:34 +0000 |
---|---|---|
committer | avos <avos@FreeBSD.org> | 2016-02-28 23:48:34 +0000 |
commit | 8c268c22c442daea4acb917ace53d0d32e5cc169 (patch) | |
tree | 00f655c24b6007e3d20117d779482be37163bd0e | |
parent | e4f93d9c2b04fb1358a1791394b30f1fddbb1c61 (diff) | |
download | FreeBSD-src-8c268c22c442daea4acb917ace53d0d32e5cc169.zip FreeBSD-src-8c268c22c442daea4acb917ace53d0d32e5cc169.tar.gz |
net80211: remove redundant locking.
All callers of ieee80211_promisc()/ieee80211_allmulti()
(ieee80211_vap_detach(), ieee80211_ioctl(), ap_start() and ap_end())
already hold the com_lock while calling them.
Tested with RTL8188EU, STA mode.
Approved by: adrian (mentor)
Differential Revision: https://reviews.freebsd.org/D5475
-rw-r--r-- | sys/net80211/ieee80211.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/net80211/ieee80211.c b/sys/net80211/ieee80211.c index e727cb6..d64667e 100644 --- a/sys/net80211/ieee80211.c +++ b/sys/net80211/ieee80211.c @@ -714,7 +714,8 @@ ieee80211_promisc(struct ieee80211vap *vap, bool on) (vap->iv_caps & IEEE80211_C_TDMA) == 0))) return; - IEEE80211_LOCK(ic); + IEEE80211_LOCK_ASSERT(ic); + if (on) { if (++ic->ic_promisc == 1) ieee80211_runtask(ic, &ic->ic_promisc_task); @@ -724,7 +725,6 @@ ieee80211_promisc(struct ieee80211vap *vap, bool on) if (--ic->ic_promisc == 0) ieee80211_runtask(ic, &ic->ic_promisc_task); } - IEEE80211_UNLOCK(ic); } /* @@ -736,7 +736,8 @@ ieee80211_allmulti(struct ieee80211vap *vap, bool on) { struct ieee80211com *ic = vap->iv_ic; - IEEE80211_LOCK(ic); + IEEE80211_LOCK_ASSERT(ic); + if (on) { if (++ic->ic_allmulti == 1) ieee80211_runtask(ic, &ic->ic_mcast_task); @@ -746,7 +747,6 @@ ieee80211_allmulti(struct ieee80211vap *vap, bool on) if (--ic->ic_allmulti == 0) ieee80211_runtask(ic, &ic->ic_mcast_task); } - IEEE80211_UNLOCK(ic); } /* |