From owner-p4-projects@FreeBSD.ORG Fri May 20 02:23:25 2005 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 6310C16A4CF; Fri, 20 May 2005 02:23:24 +0000 (GMT) Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 248BF16A4D0 for ; Fri, 20 May 2005 02:23:24 +0000 (GMT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id BF86443DA6 for ; Fri, 20 May 2005 02:23:23 +0000 (GMT) (envelope-from sam@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id j4K2NNAk095524 for ; Fri, 20 May 2005 02:23:23 GMT (envelope-from sam@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id j4K2NNcs095521 for perforce@freebsd.org; Fri, 20 May 2005 02:23:23 GMT (envelope-from sam@freebsd.org) Date: Fri, 20 May 2005 02:23:23 GMT Message-Id: <200505200223.j4K2NNcs095521@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to sam@freebsd.org using -f From: Sam Leffler To: Perforce Change Reviews Subject: PERFORCE change 77206 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 20 May 2005 02:23:25 -0000 http://perforce.freebsd.org/chv.cgi?CH=77206 Change 77206 by sam@sam_ebb on 2005/05/20 02:22:30 o move the bg scan check inside the loop in ieee80211_start just to be paranoid o mark ic_lastdata for each frame, not just on return from ieee80211_start to close any race against kicking off a bg scan o cleanup some debug msgs o check iv_set_tim against NULL before using it Affected files ... .. //depot/projects/vap/sys/net80211/ieee80211_output.c#13 edit Differences ... ==== //depot/projects/vap/sys/net80211/ieee80211_output.c#13 (text+ko) ==== @@ -217,9 +217,6 @@ /* NB: parent must be up and running */ if ((parent->if_flags & (IFF_RUNNING|IFF_UP)) != (IFF_RUNNING|IFF_UP)) return; - if (vap->iv_state == IEEE80211_S_RUN && - (ic->ic_flags & IEEE80211_F_SCAN)) /* cancel bg scan */ - ieee80211_cancel_scan(vap); for (;;) { /* * No data frames go out unless we're running. @@ -237,6 +234,8 @@ IFQ_DRV_DEQUEUE(&ifp->if_snd, m); /* XXX: LOCK */ if (m == NULL) break; + if (ic->ic_flags & IEEE80211_F_SCAN) /* cancel bg scan */ + ieee80211_cancel_scan(vap); /* * Find the node for the destination so we can do * things like power save and fast frames aggregation. @@ -292,8 +291,9 @@ ieee80211_free_node(ni); } else ifp->if_opackets++; + + ic->ic_lastdata = ticks; } - ic->ic_lastdata = ticks; } /* @@ -2249,7 +2249,7 @@ _IF_DROP(&ni->ni_savedq); IEEE80211_NODE_SAVEQ_UNLOCK(ni); IEEE80211_NOTE(vap, IEEE80211_MSG_ANY, ni, - "pwr save q overflow, drops %d (size %d)\n", + "pwr save q overflow, drops %d (size %d)", ni->ni_savedq.ifq_drops, IEEE80211_PS_MAX_QUEUE); #ifdef IEEE80211_DEBUG if (ieee80211_msg_dumppkts(vap)) @@ -2272,8 +2272,8 @@ IEEE80211_NODE_SAVEQ_UNLOCK(ni); IEEE80211_NOTE(vap, IEEE80211_MSG_POWER, ni, - "save frame, %u now queued\n", qlen); + "save frame, %u now queued", qlen); - if (qlen == 1) + if (qlen == 1 && vap->iv_set_tim != NULL) vap->iv_set_tim(ni, 1); }