From: adrian Date: Tue, 29 Sep 2015 19:15:08 +0000 (+0000) Subject: Fix locking after my EDCA update change. X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=49fa77915cd9216082d882aa841865d30a67d898;p=people%2Fjulieng%2Ffreebsd.git Fix locking after my EDCA update change. The net80211 lock is no longer held during this call, so we don't have to unlock/relock. Noticed by: David Wolfskill --- diff --git a/sys/dev/iwn/if_iwn.c b/sys/dev/iwn/if_iwn.c index 54c8c83b8327..c1ed6ab00481 100644 --- a/sys/dev/iwn/if_iwn.c +++ b/sys/dev/iwn/if_iwn.c @@ -5344,6 +5344,8 @@ iwn_updateedca(struct ieee80211com *ic) memset(&cmd, 0, sizeof cmd); cmd.flags = htole32(IWN_EDCA_UPDATE); + + IEEE80211_LOCK(ic); for (aci = 0; aci < WME_NUM_AC; aci++) { const struct wmeParams *ac = &ic->ic_wme.wme_chanParams.cap_wmeParams[aci]; @@ -5354,10 +5356,10 @@ iwn_updateedca(struct ieee80211com *ic) htole16(IEEE80211_TXOP_TO_US(ac->wmep_txopLimit)); } IEEE80211_UNLOCK(ic); + IWN_LOCK(sc); (void)iwn_cmd(sc, IWN_CMD_EDCA_PARAMS, &cmd, sizeof cmd, 1); IWN_UNLOCK(sc); - IEEE80211_LOCK(ic); DPRINTF(sc, IWN_DEBUG_TRACE, "->%s: end\n",__func__);