Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 29 Sep 2015 19:15:09 +0000 (UTC)
From:      Adrian Chadd <adrian@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r288393 - head/sys/dev/iwn
Message-ID:  <201509291915.t8TJF9SE035883@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: adrian
Date: Tue Sep 29 19:15:08 2015
New Revision: 288393
URL: https://svnweb.freebsd.org/changeset/base/288393

Log:
  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

Modified:
  head/sys/dev/iwn/if_iwn.c

Modified: head/sys/dev/iwn/if_iwn.c
==============================================================================
--- head/sys/dev/iwn/if_iwn.c	Tue Sep 29 19:14:52 2015	(r288392)
+++ head/sys/dev/iwn/if_iwn.c	Tue Sep 29 19:15:08 2015	(r288393)
@@ -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__);
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201509291915.t8TJF9SE035883>