From owner-svn-src-user@FreeBSD.ORG Thu May 9 08:30:29 2013 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 2B5E4838; Thu, 9 May 2013 08:30:29 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 03C64881; Thu, 9 May 2013 08:30:29 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r498USAn075128; Thu, 9 May 2013 08:30:28 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r498USLk075127; Thu, 9 May 2013 08:30:28 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201305090830.r498USLk075127@svn.freebsd.org> From: Adrian Chadd Date: Thu, 9 May 2013 08:30:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r250404 - user/adrian/net80211_tx/sys/dev/ath X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 May 2013 08:30:29 -0000 Author: adrian Date: Thu May 9 08:30:28 2013 New Revision: 250404 URL: http://svnweb.freebsd.org/changeset/base/250404 Log: Use the TX lock instead of the NODE lock in the ps-poll code. Modified: user/adrian/net80211_tx/sys/dev/ath/if_ath.c Modified: user/adrian/net80211_tx/sys/dev/ath/if_ath.c ============================================================================== --- user/adrian/net80211_tx/sys/dev/ath/if_ath.c Thu May 9 08:21:53 2013 (r250403) +++ user/adrian/net80211_tx/sys/dev/ath/if_ath.c Thu May 9 08:30:28 2013 (r250404) @@ -6272,7 +6272,7 @@ ath_node_recv_pspoll(struct ieee80211_no * turn-around time. */ - ATH_NODE_LOCK(an); + ATH_TX_LOCK(sc); /* * Legacy - we're called and the node isn't asleep. @@ -6284,7 +6284,7 @@ ath_node_recv_pspoll(struct ieee80211_no __func__, ni->ni_macaddr, ":"); - ATH_NODE_UNLOCK(an); + ATH_TX_UNLOCK(sc); avp->av_recv_pspoll(ni, m); return; } @@ -6304,7 +6304,7 @@ ath_node_recv_pspoll(struct ieee80211_no * only care if there are any frames here! */ if (an->an_swq_depth == 0) { - ATH_NODE_UNLOCK(an); + ATH_TX_UNLOCK(sc); DPRINTF(sc, ATH_DEBUG_NODE_PWRSAVE, "%s: %6D: SWQ empty; punting to net80211\n", __func__, @@ -6314,13 +6314,10 @@ ath_node_recv_pspoll(struct ieee80211_no return; } - ATH_NODE_UNLOCK(an); - /* * Ok, let's schedule the highest TID that has traffic * and then schedule something. */ - ATH_TX_LOCK(sc); for (tid = IEEE80211_TID_SIZE - 1; tid >= 0; tid--) { struct ath_tid *atid = &an->an_tid[tid]; /* @@ -6334,6 +6331,7 @@ ath_node_recv_pspoll(struct ieee80211_no * scheduler code here to optimise latency * at the expense of a REALLY deep callstack. */ + ATH_TX_UNLOCK(sc); taskqueue_enqueue(sc->sc_tq, &sc->sc_txqtask); DPRINTF(sc, ATH_DEBUG_NODE_PWRSAVE, "%s: %6D: leaking frame to TID %d\n", @@ -6341,7 +6339,6 @@ ath_node_recv_pspoll(struct ieee80211_no ni->ni_macaddr, ":", tid); - ATH_TX_UNLOCK(sc); return; }