From owner-p4-projects@FreeBSD.ORG Fri Mar 28 05:07:00 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id A46DF1065674; Fri, 28 Mar 2008 05:07:00 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 63CFE106566C for ; Fri, 28 Mar 2008 05:07:00 +0000 (UTC) (envelope-from sam@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 4D9668FC1B for ; Fri, 28 Mar 2008 05:07:00 +0000 (UTC) (envelope-from sam@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m2S570Ba028421 for ; Fri, 28 Mar 2008 05:07:00 GMT (envelope-from sam@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m2S570IQ028419 for perforce@freebsd.org; Fri, 28 Mar 2008 05:07:00 GMT (envelope-from sam@freebsd.org) Date: Fri, 28 Mar 2008 05:07:00 GMT Message-Id: <200803280507.m2S570IQ028419@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 Cc: Subject: PERFORCE change 138794 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 28 Mar 2008 05:07:01 -0000 http://perforce.freebsd.org/chv.cgi?CH=138794 Change 138794 by sam@sam_ebb on 2008/03/28 05:06:40 remove the old ic_mgtq; all the drivers now support the raw xmit path so no reason to keep it around Affected files ... .. //depot/projects/vap/sys/net80211/ieee80211_ddb.c#8 edit .. //depot/projects/vap/sys/net80211/ieee80211_ht.c#19 edit .. //depot/projects/vap/sys/net80211/ieee80211_proto.c#26 edit .. //depot/projects/vap/sys/net80211/ieee80211_var.h#34 edit Differences ... ==== //depot/projects/vap/sys/net80211/ieee80211_ddb.c#8 (text+ko) ==== @@ -469,7 +469,6 @@ db_printf("\n"); db_printf("\tifp %p", ic->ic_ifp); db_printf(" comlock %p", &ic->ic_comlock); - db_printf(" mgtq %p", &ic->ic_mgtq); db_printf("\n"); _db_show_stats(&ic->ic_stats); db_printf("\theadroom %d", ic->ic_headroom); ==== //depot/projects/vap/sys/net80211/ieee80211_ht.c#19 (text+ko) ==== @@ -1718,7 +1718,6 @@ } while (0) struct ieee80211vap *vap = ni->ni_vap; struct ieee80211com *ic = ni->ni_ic; - struct ifnet *ifp = ic->ic_ifp; struct ieee80211_frame_min *wh; struct mbuf *m; uint8_t *frm; @@ -1755,17 +1754,15 @@ ADDSHORT(frm, barseqctl); m->m_pkthdr.len = m->m_len = frm - mtod(m, uint8_t *); + M_WME_SETAC(m, WME_AC_VO); + IEEE80211_NODE_STAT(ni, tx_mgmt); /* XXX tx_ctl? */ IEEE80211_NOTE(vap, IEEE80211_MSG_DEBUG | IEEE80211_MSG_DUMPPKTS, ni, "send bar frame (tid %u start %u) on channel %u", tid, tap->txa_start, ieee80211_chan2ieee(ic, ic->ic_curchan)); - m->m_pkthdr.rcvif = (void *)ni; - IF_ENQUEUE(&ic->ic_mgtq, m); /* cheat */ - if_start(ifp); - - return 0; + return ic->ic_raw_xmit(ni, m, NULL); bad: ieee80211_free_node(ni); return ret; ==== //depot/projects/vap/sys/net80211/ieee80211_proto.c#26 (text+ko) ==== @@ -98,21 +98,15 @@ static int ieee80211_new_state_locked(struct ieee80211vap *, enum ieee80211_state, int); -/* - * This routine is for old drivers that expect mgt frames - * to come in through the ic_mgtq. Drivers that are - * prepared to handle queing themselves should override - * ic_raw_xmit and handle dispatch themselves. - */ static int -raw_xmit(struct ieee80211_node *ni, struct mbuf *m, +null_raw_xmit(struct ieee80211_node *ni, struct mbuf *m, const struct ieee80211_bpf_params *params) { - struct ieee80211com *ic = ni->ni_ic; + struct ifnet *ifp = ni->ni_ic->ic_ifp; - m->m_pkthdr.rcvif = (void *) ni; - IF_HANDOFF(&ic->ic_mgtq, m, ic->ic_ifp); - return 0; + if_printf(ifp, "missing ic_raw_xmit callback, drop frame\n"); + m_freem(m); + return ENETDOWN; } void @@ -132,7 +126,6 @@ max_hdr = max_linkhdr + max_protohdr; max_datalen = MHLEN - max_hdr; } - mtx_init(&ic->ic_mgtq.ifq_mtx, ifp->if_xname, "mgmt send q", MTX_DEF); ic->ic_protmode = IEEE80211_PROT_CTSONLY; ic->ic_wme.wme_hipri_switch_hysteresis = @@ -140,8 +133,7 @@ /* initialize management frame handlers */ ic->ic_send_mgmt = ieee80211_send_mgmt; - /* NB: setup helper for old-style drivers */ - ic->ic_raw_xmit = raw_xmit; + ic->ic_raw_xmit = null_raw_xmit; ieee80211_adhoc_attach(ic); ieee80211_sta_attach(ic); @@ -158,9 +150,6 @@ ieee80211_wds_detach(ic); ieee80211_adhoc_detach(ic); ieee80211_sta_detach(ic); - - ieee80211_drain_ifq(&ic->ic_mgtq); - mtx_destroy(&ic->ic_mgtq.ifq_mtx); } static void @@ -1509,12 +1498,8 @@ */ ieee80211_scan_flush(vap); - /* XXX can skip this if not using ic_mgtq */ - /* flush any frames for this vap in the shared q's */ - ieee80211_flush_ifq(&ic->ic_mgtq, vap); /* XXX NB: cast for altq */ - ieee80211_flush_ifq((struct ifqueue *) - &ic->ic_ifp->if_snd, vap); + ieee80211_flush_ifq((struct ifqueue *)&ic->ic_ifp->if_snd, vap); } vap->iv_newstate_cb = NULL; } ==== //depot/projects/vap/sys/net80211/ieee80211_var.h#34 (text+ko) ==== @@ -109,7 +109,6 @@ struct ifnet *ic_ifp; /* associated device */ ieee80211_com_lock_t ic_comlock; /* state update lock */ TAILQ_HEAD(, ieee80211vap) ic_vaps; /* list of vap instances */ - struct ifqueue ic_mgtq; /* only need one */ struct ieee80211_stats ic_stats; /* statistics */ int ic_headroom; /* driver tx headroom needs */ enum ieee80211_phytype ic_phytype; /* XXX wrong for multi-mode */