diff options
author | sam <sam@FreeBSD.org> | 2008-06-07 17:51:41 +0000 |
---|---|---|
committer | sam <sam@FreeBSD.org> | 2008-06-07 17:51:41 +0000 |
commit | cbfc222a8531691610103b4385fa39d29d114bbc (patch) | |
tree | 4e448ca19693e03cf7ef57d57481545f49f2ef69 /sys/net80211 | |
parent | 9def6ee8e7d0520560d3dc24085a4d3b6a1b2ff0 (diff) | |
download | FreeBSD-src-cbfc222a8531691610103b4385fa39d29d114bbc.zip FreeBSD-src-cbfc222a8531691610103b4385fa39d29d114bbc.tar.gz |
Split ieee80211_notify_erp into locked and unlocked variants
and use the locked version to handle the hostap input path
case where the com lock is not already held.
Noticed by: Jared Go
Diffstat (limited to 'sys/net80211')
-rw-r--r-- | sys/net80211/ieee80211_node.c | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/sys/net80211/ieee80211_node.c b/sys/net80211/ieee80211_node.c index bc96d21..c6aadb2 100644 --- a/sys/net80211/ieee80211_node.c +++ b/sys/net80211/ieee80211_node.c @@ -2088,8 +2088,8 @@ ieee80211_dump_nodes(struct ieee80211_node_table *nt) (ieee80211_iter_func *) ieee80211_dump_node, nt); } -void -ieee80211_notify_erp(struct ieee80211com *ic) +static void +ieee80211_notify_erp_locked(struct ieee80211com *ic) { struct ieee80211vap *vap; @@ -2100,6 +2100,14 @@ ieee80211_notify_erp(struct ieee80211com *ic) ieee80211_beacon_notify(vap, IEEE80211_BEACON_ERP); } +void +ieee80211_notify_erp(struct ieee80211com *ic) +{ + IEEE80211_LOCK(ic); + ieee80211_notify_erp_locked(ic); + IEEE80211_UNLOCK(ic); +} + /* * Handle a station joining an 11g network. */ @@ -2162,7 +2170,7 @@ ieee80211_node_join_11g(struct ieee80211_node *ni) IEEE80211_DPRINTF(ni->ni_vap, IEEE80211_MSG_ASSOC, "%s: enable use of protection\n", __func__); ic->ic_flags |= IEEE80211_F_USEPROT; - ieee80211_notify_erp(ic); + ieee80211_notify_erp_locked(ic); } } else ni->ni_flags |= IEEE80211_NODE_ERP; @@ -2251,7 +2259,7 @@ disable_protection(struct ieee80211com *ic) ic->ic_flags |= IEEE80211_F_SHPREAMBLE; ic->ic_flags &= ~IEEE80211_F_USEBARKER; } - ieee80211_notify_erp(ic); + ieee80211_notify_erp_locked(ic); } /* |