From owner-svn-src-head@freebsd.org Tue Sep 29 03:40:23 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 19DB2A0B633; Tue, 29 Sep 2015 03:40:23 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id F22D91E99; Tue, 29 Sep 2015 03:40:22 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t8T3eMpu045853; Tue, 29 Sep 2015 03:40:22 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t8T3eMIi045851; Tue, 29 Sep 2015 03:40:22 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201509290340.t8T3eMIi045851@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Tue, 29 Sep 2015 03:40:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r288350 - head/sys/net80211 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 Sep 2015 03:40:23 -0000 Author: adrian Date: Tue Sep 29 03:40:21 2015 New Revision: 288350 URL: https://svnweb.freebsd.org/changeset/base/288350 Log: Defer calling into the driver to update the QOS (WME) configuration. This gets called from the driver RX path which leads to driver re-entry. Modified: head/sys/net80211/ieee80211_proto.c head/sys/net80211/ieee80211_var.h Modified: head/sys/net80211/ieee80211_proto.c ============================================================================== --- head/sys/net80211/ieee80211_proto.c Tue Sep 29 03:37:17 2015 (r288349) +++ head/sys/net80211/ieee80211_proto.c Tue Sep 29 03:40:21 2015 (r288350) @@ -107,6 +107,7 @@ static void update_mcast(void *, int); static void update_promisc(void *, int); static void update_channel(void *, int); static void update_chw(void *, int); +static void update_wme(void *, int); static void ieee80211_newstate_cb(void *, int); static int @@ -144,6 +145,7 @@ ieee80211_proto_attach(struct ieee80211c TASK_INIT(&ic->ic_chan_task, 0, update_channel, ic); TASK_INIT(&ic->ic_bmiss_task, 0, beacon_miss, ic); TASK_INIT(&ic->ic_chw_task, 0, update_chw, ic); + TASK_INIT(&ic->ic_wme_task, 0, update_wme, ic); ic->ic_wme.wme_hipri_switch_hysteresis = AGGRESSIVE_MODE_SWITCH_HYSTERESIS; @@ -1133,7 +1135,8 @@ ieee80211_wme_updateparams_locked(struct ieee80211_beacon_notify(vap, IEEE80211_BEACON_WME); } - wme->wme_update(ic); + /* schedule the deferred WME update */ + ieee80211_runtask(ic, &ic->ic_wme_task); IEEE80211_DPRINTF(vap, IEEE80211_MSG_WME, "%s: WME params updated, cap_info 0x%x\n", __func__, @@ -1198,6 +1201,17 @@ update_chw(void *arg, int npending) ic->ic_update_chw(ic); } +static void +update_wme(void *arg, int npending) +{ + struct ieee80211com *ic = arg; + + /* + * XXX should we defer the WME configuration update until now? + */ + ic->ic_wme.wme_update(ic); +} + /* * Block until the parent is in a known state. This is * used after any operations that dispatch a task (e.g. @@ -1213,6 +1227,7 @@ ieee80211_waitfor_parent(struct ieee8021 ieee80211_draintask(ic, &ic->ic_chan_task); ieee80211_draintask(ic, &ic->ic_bmiss_task); ieee80211_draintask(ic, &ic->ic_chw_task); + ieee80211_draintask(ic, &ic->ic_wme_task); taskqueue_unblock(ic->ic_tq); } Modified: head/sys/net80211/ieee80211_var.h ============================================================================== --- head/sys/net80211/ieee80211_var.h Tue Sep 29 03:37:17 2015 (r288349) +++ head/sys/net80211/ieee80211_var.h Tue Sep 29 03:40:21 2015 (r288350) @@ -133,6 +133,7 @@ struct ieee80211com { struct task ic_chan_task; /* deferred channel change */ struct task ic_bmiss_task; /* deferred beacon miss hndlr */ struct task ic_chw_task; /* deferred HT CHW update */ + struct task ic_wme_task; /* deferred WME update */ counter_u64_t ic_ierrors; /* input errors */ counter_u64_t ic_oerrors; /* output errors */