From owner-p4-projects@FreeBSD.ORG Sun May 8 23:12:14 2005 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 12A1B16A4E8; Sun, 8 May 2005 23:12:14 +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 C953216A4E6 for ; Sun, 8 May 2005 23:12:13 +0000 (GMT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9957F43D67 for ; Sun, 8 May 2005 23:12:13 +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 j48NCDpr007522 for ; Sun, 8 May 2005 23:12:13 GMT (envelope-from sam@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id j48NCD57007519 for perforce@freebsd.org; Sun, 8 May 2005 23:12:13 GMT (envelope-from sam@freebsd.org) Date: Sun, 8 May 2005 23:12:13 GMT Message-Id: <200505082312.j48NCD57007519@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 76716 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: Sun, 08 May 2005 23:12:14 -0000 http://perforce.freebsd.org/chv.cgi?CH=76716 Change 76716 by sam@sam_ebb on 2005/05/08 23:11:36 o assume 802.11 layer sets priority for outbound frames o count packets on base device (not quite right, we only count data frames on recv to avoid counting beacons while xmit stats include mgmt+ctl frames that come from above) Affected files ... .. //depot/projects/vap/sys/dev/ath/if_ath.c#8 edit Differences ... ==== //depot/projects/vap/sys/dev/ath/if_ath.c#8 (text+ko) ==== @@ -1375,12 +1375,8 @@ goto bad; } pktlen = bf->bf_m->m_pkthdr.len; /* NB: don't reference below */ - if (ath_tx_start(sc, ni, bf, bf->bf_m) == 0) { -#if 0 /*XXX*/ - ifp->if_opackets++; -#endif + if (ath_tx_start(sc, ni, bf, bf->bf_m) == 0) continue; - } bad: if (ni != NULL) ieee80211_free_node(ni); @@ -1601,10 +1597,6 @@ bfstaged, bf_list); ATH_TXBUF_UNLOCK(sc); } - } else { -#if 0 - ifp->if_opackets++; -#endif } } else { if (an->an_ff_buf[pri] != NULL) { @@ -1691,7 +1683,6 @@ continue; } } - ifp->if_opackets++; /* * Encapsulate the packet in prep for transmission. */ @@ -3680,6 +3671,10 @@ ds->ds_rxstat.rs_rssi, ds->ds_rxstat.rs_tstamp); } + if (type == IEEE80211_FC0_TYPE_DATA) { + ifp->if_ipackets++; + ifp->if_ibytes += len; + } if (sc->sc_diversity) { /* @@ -4124,6 +4119,7 @@ an = ATH_NODE(ni); flags = HAL_TXDESC_CLRDMASK; /* XXX needed for crypto errs */ + pri = M_WME_GETAC(m0); /* set by the 802.11 layer */ /* * Calculate Atheros packet type from IEEE80211 packet header, * setup for rate calculations, and select h/w transmit queue. @@ -4144,12 +4140,6 @@ if (shortPreamble) txrate |= rt->info[rix].shortPreamble; try0 = ATH_TXMAXTRY; - /* NB: force all management frames to highest queue */ - if (ni->ni_flags & IEEE80211_NODE_QOS) { - /* NB: force all management frames to highest queue */ - pri = WME_AC_VO; - } else - pri = WME_AC_BE; flags |= HAL_TXDESC_INTREQ; /* force interrupt */ break; case IEEE80211_FC0_TYPE_CTL: @@ -4158,12 +4148,6 @@ txrate = rt->info[rix].rateCode; if (shortPreamble) txrate |= rt->info[rix].shortPreamble; - /* NB: force all ctl frames to highest queue */ - if (ni->ni_flags & IEEE80211_NODE_QOS) { - /* NB: force all ctl frames to highest queue */ - pri = WME_AC_VO; - } else - pri = WME_AC_BE; flags |= HAL_TXDESC_INTREQ; /* force interrupt */ break; case IEEE80211_FC0_TYPE_DATA: @@ -4175,17 +4159,12 @@ &rix, &try0, &txrate); sc->sc_txrate = txrate; /* for LED blinking */ sc->sc_lastdatarix = rix; /* for fast frames */ - /* - * Default all non-QoS traffic to the best-effort queue. - */ if (wh->i_fc[0] & IEEE80211_FC0_SUBTYPE_QOS) { - pri = M_WME_GETAC(m0); if (cap->cap_wmeParams[pri].wmep_noackPolicy) { flags |= HAL_TXDESC_NOACK; sc->sc_stats.ast_tx_noack++; } - } else - pri = WME_AC_BE; + } break; default: if_printf(ifp, "bogus frame type 0x%x (%s)\n", @@ -4447,6 +4426,8 @@ ath_hal_txstart(ah, txq->axq_qnum); ATH_TXQ_UNLOCK(txq); + ifp->if_opackets++; + return 0; #undef updateCTSForBursting #undef CTS_DURATION