From owner-p4-projects@FreeBSD.ORG Sat Oct 18 23:15:59 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 0469D1065687; Sat, 18 Oct 2008 23:15:59 +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 BC25D1065699 for ; Sat, 18 Oct 2008 23:15:58 +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 AA1D28FC13 for ; Sat, 18 Oct 2008 23:15:58 +0000 (UTC) (envelope-from sam@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.3/8.14.3) with ESMTP id m9INFwJX076556 for ; Sat, 18 Oct 2008 23:15:58 GMT (envelope-from sam@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.3/8.14.3/Submit) id m9INFw4R076554 for perforce@freebsd.org; Sat, 18 Oct 2008 23:15:58 GMT (envelope-from sam@freebsd.org) Date: Sat, 18 Oct 2008 23:15:58 GMT Message-Id: <200810182315.m9INFw4R076554@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 151524 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: Sat, 18 Oct 2008 23:15:59 -0000 http://perforce.freebsd.org/chv.cgi?CH=151524 Change 151524 by sam@sam_ebb on 2008/10/18 23:15:52 remove driver-private txparms tracking, net80211 does this for us now Affected files ... .. //depot/projects/vap/sys/dev/mwl/if_mwl.c#18 edit .. //depot/projects/vap/sys/dev/mwl/if_mwlvar.h#3 edit Differences ... ==== //depot/projects/vap/sys/dev/mwl/if_mwl.c#18 (text+ko) ==== @@ -1068,31 +1068,20 @@ { struct mwl_vap *mvp = MWL_VAP(vap); struct ieee80211_node *ni = vap->iv_bss; - enum ieee80211_phymode mode; + const struct ieee80211_txparam *tp = ni->ni_txparms; MWL_HAL_TXRATE rates; KASSERT(vap->iv_state == IEEE80211_S_RUN, ("state %d", vap->iv_state)); - mode = ieee80211_chan2mode(ni->ni_chan); /* - * Use legacy rates when operating a mixed HT+non-HT bss. - * NB: this may violate POLA for sta and wds vap's. - */ - if (mode == IEEE80211_MODE_11NA && - (vap->iv_flags_ext & IEEE80211_FEXT_PUREN) == 0) - mode = IEEE80211_MODE_11A; - else if (mode == IEEE80211_MODE_11NG && - (vap->iv_flags_ext & IEEE80211_FEXT_PUREN) == 0) - mode = IEEE80211_MODE_11G; - /* * Update the h/w rate map. * NB: 0x80 for MCS is passed through unchanged */ memset(&rates, 0, sizeof(rates)); /* rate used to send management frames */ - rates.MgtRate = vap->iv_txparms[mode].mgmtrate; + rates.MgtRate = tp->mgmtrate; /* rate used to send multicast frames */ - rates.McastRate = vap->iv_txparms[mode].mcastrate; + rates.McastRate = tp->mcastrate; /* while here calculate EAPOL fixed rate cookie */ mvp->mv_eapolformat = htole16(mwl_calcformat(rates.MgtRate, ni)); @@ -2663,8 +2652,6 @@ /* XXX stat+msg */ return NULL; } - /* XXX setup initial mn_tp */ - DPRINTF(sc, MWL_DEBUG_NODE, "%s: mn %p\n", __func__, mn); return &mn->mn_node; } @@ -3688,7 +3675,7 @@ break; case IEEE80211_FC0_TYPE_DATA: if (!ismcast) { - const struct ieee80211_txparam *tp = mn->mn_tp; + const struct ieee80211_txparam *tp = ni->ni_txparms; /* * EAPOL frames get forced to a fixed rate and w/o * aggregation; otherwise check for any fixed rate @@ -4737,22 +4724,6 @@ __func__, error); /* XXX how to deal with error? */ } - /* - * Setup fixed rate state; it may change on re-associate (?). - */ - if (ni->ni_flags & IEEE80211_NODE_HT) { - if (IEEE80211_IS_CHAN_5GHZ(ni->ni_chan)) - mn->mn_tp = &vap->iv_txparms[IEEE80211_MODE_11NA]; - else - mn->mn_tp = &vap->iv_txparms[IEEE80211_MODE_11NG]; - } else { /* legacy rate handling */ - if (IEEE80211_IS_CHAN_A(ni->ni_chan)) - mn->mn_tp = &vap->iv_txparms[IEEE80211_MODE_11A]; - else if (ni->ni_flags & IEEE80211_NODE_ERP) - mn->mn_tp = &vap->iv_txparms[IEEE80211_MODE_11G]; - else - mn->mn_tp = &vap->iv_txparms[IEEE80211_MODE_11B]; - } } /* ==== //depot/projects/vap/sys/dev/mwl/if_mwlvar.h#3 (text+ko) ==== @@ -218,7 +218,6 @@ uint16_t mn_staid; /* firmware station id */ struct mwl_bastate mn_ba[MWL_MAXBA]; struct mwl_hal_vap *mn_hvap; /* hal vap handle */ - const struct ieee80211_txparam *mn_tp; }; #define MWL_NODE(ni) ((struct mwl_node *)(ni)) #define MWL_NODE_CONST(ni) ((const struct mwl_node *)(ni))