Author: adrian
Date: Sat Apr  7 02:01:26 2012
New Revision: 233966
URL: http://svn.freebsd.org/changeset/base/233966

Log:
  Remove duplicate txflags field from ath_buf.
  
  rename bf_state.bfs_flags to bf_state.bfs_txflags, as that is what
  it effectively is.

Modified:
  head/sys/dev/ath/if_ath.c
  head/sys/dev/ath/if_ath_debug.c
  head/sys/dev/ath/if_ath_tx.c
  head/sys/dev/ath/if_ath_tx_ht.c
  head/sys/dev/ath/if_athvar.h

Modified: head/sys/dev/ath/if_ath.c
==============================================================================
--- head/sys/dev/ath/if_ath.c   Fri Apr  6 22:51:02 2012        (r233965)
+++ head/sys/dev/ath/if_ath.c   Sat Apr  7 02:01:26 2012        (r233966)
@@ -2273,7 +2273,6 @@ ath_buf_clone(struct ath_softc *sc, cons
        /* Copy basics */
        tbf->bf_next = NULL;
        tbf->bf_nseg = bf->bf_nseg;
-       tbf->bf_txflags = bf->bf_txflags;
        tbf->bf_flags = bf->bf_flags & ~ATH_BUF_BUSY;
        tbf->bf_status = bf->bf_status;
        tbf->bf_m = bf->bf_m;
@@ -4747,7 +4746,7 @@ ath_tx_update_stats(struct ath_softc *sc
                pri = M_WME_GETAC(bf->bf_m);
                if (pri >= WME_AC_VO)
                        ic->ic_wme.wme_hipri_traffic++;
-               if ((bf->bf_txflags & HAL_TXDESC_NOACK) == 0)
+               if ((bf->bf_state.bfs_txflags & HAL_TXDESC_NOACK) == 0)
                        ni->ni_inact = ni->ni_inact_reload;
        } else {
                if (ts->ts_status & HAL_TXERR_XRETRY)
@@ -4794,7 +4793,7 @@ ath_tx_default_comp(struct ath_softc *sc
        if (fail == 1)
                st = -1;
        else
-               st = ((bf->bf_txflags & HAL_TXDESC_NOACK) == 0) ?
+               st = ((bf->bf_state.bfs_txflags & HAL_TXDESC_NOACK) == 0) ?
                    ts->ts_status : HAL_TXERR_XRETRY;
 
        if (bf->bf_state.bfs_dobaw)
@@ -4947,7 +4946,7 @@ ath_tx_processq(struct ath_softc *sc, st
                 * workaround phantom bmiss interrupts.
                 */
                if (ni != NULL && ts->ts_status == 0 &&
-                   ((bf->bf_txflags & HAL_TXDESC_NOACK) == 0)) {
+                   ((bf->bf_state.bfs_txflags & HAL_TXDESC_NOACK) == 0)) {
                        nacked++;
                        sc->sc_stats.ast_tx_rssi = ts->ts_rssi;
                        ATH_RSSI_LPF(sc->sc_halstats.ns_avgtxrssi,
@@ -4972,7 +4971,7 @@ ath_tx_processq(struct ath_softc *sc, st
                 */
                if (bf->bf_comp == NULL) {
                        if ((ts->ts_status & HAL_TXERR_FILT) == 0 &&
-                           (bf->bf_txflags & HAL_TXDESC_NOACK) == 0) {
+                           (bf->bf_state.bfs_txflags & HAL_TXDESC_NOACK) == 0) 
{
                                /*
                                 * XXX assume this isn't an aggregate
                                 * frame.

Modified: head/sys/dev/ath/if_ath_debug.c
==============================================================================
--- head/sys/dev/ath/if_ath_debug.c     Fri Apr  6 22:51:02 2012        
(r233965)
+++ head/sys/dev/ath/if_ath_debug.c     Sat Apr  7 02:01:26 2012        
(r233966)
@@ -137,10 +137,9 @@ ath_printtxbuf(struct ath_softc *sc, con
                for (i = 0, ds = bf->bf_desc; i < bf->bf_nseg; i++, ds++) {
                        printf(" (DS.V:%p DS.P:%p) L:%08x D:%08x F:%04x%s\n",
                            ds, (const struct ath_desc *)bf->bf_daddr + i,
-                           ds->ds_link, ds->ds_data, bf->bf_txflags,
+                           ds->ds_link, ds->ds_data, bf->bf_state.bfs_txflags,
                            !done ? "" : (ts->ts_status == 0) ? " *" : " !");
-                       printf("        TXF: %04x Seq: %d swtry: %d ADDBAW?: %d 
DOBAW?: %d\n",
-                           bf->bf_state.bfs_flags,
+                       printf("        Seq: %d swtry: %d ADDBAW?: %d DOBAW?: 
%d\n",
                            bf->bf_state.bfs_seqno,
                            bf->bf_state.bfs_retries,
                            bf->bf_state.bfs_addedbaw,

Modified: head/sys/dev/ath/if_ath_tx.c
==============================================================================
--- head/sys/dev/ath/if_ath_tx.c        Fri Apr  6 22:51:02 2012        
(r233965)
+++ head/sys/dev/ath/if_ath_tx.c        Sat Apr  7 02:01:26 2012        
(r233966)
@@ -424,7 +424,7 @@ ath_tx_setds_11n(struct ath_softc *sc, s
        ath_hal_setupfirsttxdesc(sc->sc_ah,
            bf_first->bf_desc,
            bf_first->bf_state.bfs_al,
-           bf_first->bf_state.bfs_flags | HAL_TXDESC_INTREQ,
+           bf_first->bf_state.bfs_txflags | HAL_TXDESC_INTREQ,
            bf_first->bf_state.bfs_txpower,
            bf_first->bf_state.bfs_txrate0,
            bf_first->bf_state.bfs_try0,
@@ -812,7 +812,7 @@ ath_tx_set_rtscts(struct ath_softc *sc, 
        /*
         * No RTS/CTS enabled? Don't bother.
         */
-       if ((bf->bf_state.bfs_flags &
+       if ((bf->bf_state.bfs_txflags &
            (HAL_TXDESC_RTSENA | HAL_TXDESC_CTSENA)) == 0) {
                /* XXX is this really needed? */
                bf->bf_state.bfs_ctsrate = 0;
@@ -847,7 +847,7 @@ ath_tx_set_rtscts(struct ath_softc *sc, 
        if (! ath_tx_is_11n(sc))
                ctsduration = ath_tx_calc_ctsduration(sc->sc_ah, rix, cix,
                    bf->bf_state.bfs_shpream, bf->bf_state.bfs_pktlen,
-                   rt, bf->bf_state.bfs_flags);
+                   rt, bf->bf_state.bfs_txflags);
 
        /* Squirrel away in ath_buf */
        bf->bf_state.bfs_ctsrate = ctsrate;
@@ -881,7 +881,7 @@ ath_tx_setds(struct ath_softc *sc, struc
                , bf->bf_state.bfs_try0         /* series 0 rate/tries */
                , bf->bf_state.bfs_keyix        /* key cache index */
                , bf->bf_state.bfs_txantenna    /* antenna mode */
-               , bf->bf_state.bfs_flags        /* flags */
+               , bf->bf_state.bfs_txflags      /* flags */
                , bf->bf_state.bfs_ctsrate      /* rts/cts rate */
                , bf->bf_state.bfs_ctsduration  /* rts/cts duration */
        );
@@ -1352,8 +1352,7 @@ ath_tx_normal_setup(struct ath_softc *sc
        bf->bf_state.bfs_try0 = try0;
        bf->bf_state.bfs_keyix = keyix;
        bf->bf_state.bfs_txantenna = sc->sc_txantenna;
-       bf->bf_state.bfs_flags = flags;
-       bf->bf_txflags = flags;
+       bf->bf_state.bfs_txflags = flags;
        bf->bf_state.bfs_shpream = shortPreamble;
 
        /* XXX this should be done in ath_tx_setrate() */
@@ -1698,8 +1697,7 @@ ath_tx_raw_start(struct ath_softc *sc, s
        bf->bf_state.bfs_try0 = try0;
        bf->bf_state.bfs_keyix = keyix;
        bf->bf_state.bfs_txantenna = txantenna;
-       bf->bf_state.bfs_flags = flags;
-       bf->bf_txflags = flags;
+       bf->bf_state.bfs_txflags = flags;
        bf->bf_state.bfs_shpream =
            !! (params->ibp_flags & IEEE80211_BPF_SHORTPRE);
 
@@ -2999,7 +2997,7 @@ ath_tx_normal_comp(struct ath_softc *sc,
         * punt to rate control if we're not being cleaned up
         * during a hw queue drain and the frame wanted an ACK.
         */
-       if (fail == 0 && ((bf->bf_txflags & HAL_TXDESC_NOACK) == 0))
+       if (fail == 0 && ((bf->bf_state.bfs_txflags & HAL_TXDESC_NOACK) == 0))
                ath_tx_update_ratectrl(sc, ni, bf->bf_state.bfs_rc,
                    ts, bf->bf_state.bfs_pktlen,
                    1, (ts->ts_status == 0) ? 0 : 1);
@@ -3754,7 +3752,7 @@ ath_tx_aggr_comp_unaggr(struct ath_softc
         *
         * Do it outside of the TXQ lock.
         */
-       if (fail == 0 && ((bf->bf_txflags & HAL_TXDESC_NOACK) == 0))
+       if (fail == 0 && ((bf->bf_state.bfs_txflags & HAL_TXDESC_NOACK) == 0))
                ath_tx_update_ratectrl(sc, ni, bf->bf_state.bfs_rc,
                    &bf->bf_status.ds_txstat,
                    bf->bf_state.bfs_pktlen,

Modified: head/sys/dev/ath/if_ath_tx_ht.c
==============================================================================
--- head/sys/dev/ath/if_ath_tx_ht.c     Fri Apr  6 22:51:02 2012        
(r233965)
+++ head/sys/dev/ath/if_ath_tx_ht.c     Sat Apr  7 02:01:26 2012        
(r233966)
@@ -245,7 +245,7 @@ ath_tx_rate_fill_rcflags(struct ath_soft
                 */
                rc[i].ratecode = rate;
 
-               if (bf->bf_state.bfs_flags &
+               if (bf->bf_state.bfs_txflags &
                    (HAL_TXDESC_RTSENA | HAL_TXDESC_CTSENA))
                        rc[i].flags |= ATH_RC_RTSCTS_FLAG;
 
@@ -445,7 +445,7 @@ ath_rateseries_setup(struct ath_softc *s
        const HAL_RATE_TABLE *rt = sc->sc_currates;
        int i;
        int pktlen;
-       int flags = bf->bf_state.bfs_flags;
+       int flags = bf->bf_state.bfs_txflags;
        struct ath_rc_series *rc = bf->bf_state.bfs_rc;
 
        if ((ic->ic_flags & IEEE80211_F_SHPREAMBLE) &&
@@ -566,7 +566,7 @@ ath_buf_set_rate(struct ath_softc *sc, s
        struct ath_hal *ah = sc->sc_ah;
        int is_pspoll = (bf->bf_state.bfs_atype == HAL_PKT_TYPE_PSPOLL);
        int ctsrate = bf->bf_state.bfs_ctsrate;
-       int flags = bf->bf_state.bfs_flags;
+       int flags = bf->bf_state.bfs_txflags;
 
        /* Setup rate scenario */
        memset(&series, 0, sizeof(series));
@@ -822,11 +822,11 @@ ath_tx_form_aggr(struct ath_softc *sc, s
                 * XXX enforce ACK for aggregate frames (this needs to be
                 * XXX handled more gracefully?
                 */
-               if (bf->bf_state.bfs_flags & HAL_TXDESC_NOACK) {
+               if (bf->bf_state.bfs_txflags & HAL_TXDESC_NOACK) {
                        device_printf(sc->sc_dev,
                            "%s: HAL_TXDESC_NOACK set for an aggregate 
frame?\n",
                            __func__);
-                       bf->bf_state.bfs_flags &= (~HAL_TXDESC_NOACK);
+                       bf->bf_state.bfs_txflags &= (~HAL_TXDESC_NOACK);
                }
 
                /*

Modified: head/sys/dev/ath/if_athvar.h
==============================================================================
--- head/sys/dev/ath/if_athvar.h        Fri Apr  6 22:51:02 2012        
(r233965)
+++ head/sys/dev/ath/if_athvar.h        Sat Apr  7 02:01:26 2012        
(r233966)
@@ -175,7 +175,6 @@ struct ath_buf {
        TAILQ_ENTRY(ath_buf)    bf_list;
        struct ath_buf *        bf_next;        /* next buffer in the aggregate 
*/
        int                     bf_nseg;
-       uint16_t                bf_txflags;     /* tx descriptor flags */
        uint16_t                bf_flags;       /* status flags (below) */
        struct ath_desc         *bf_desc;       /* virtual addr of desc */
        struct ath_desc_status  bf_status;      /* tx/rx status */
@@ -229,7 +228,7 @@ struct ath_buf {
                int bfs_pktlen;         /* length of this packet */
                int bfs_hdrlen;         /* length of this packet header */
                uint16_t bfs_al;        /* length of aggregate */
-               int bfs_flags;          /* HAL descriptor flags */
+               int bfs_txflags;        /* HAL (tx) descriptor flags */
                int bfs_txrate0;        /* first TX rate */
                int bfs_try0;           /* first try count */
                uint8_t bfs_ctsrate0;   /* Non-zero - use this as ctsrate */
_______________________________________________
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to