Author: adrian
Date: Fri Apr 19 21:49:11 2013
New Revision: 249662
URL: http://svnweb.freebsd.org/changeset/base/249662

Log:
  Initialise the chainmask fields regardless of whether 11n support
  is compiled in or not.
  
  This fixes issues with people running -HEAD but who build modules
  without doing a "make buildkernel KERNCONF=XXX", thus picking up
  opt_*.h.  The resulting module wouldn't have 11n enabled and the
  chainmask configuration would just be plain wrong.

Modified:
  head/sys/dev/ath/if_ath.c

Modified: head/sys/dev/ath/if_ath.c
==============================================================================
--- head/sys/dev/ath/if_ath.c   Fri Apr 19 21:09:27 2013        (r249661)
+++ head/sys/dev/ath/if_ath.c   Fri Apr 19 21:49:11 2013        (r249662)
@@ -721,6 +721,14 @@ ath_attach(u_int16_t devid, struct ath_s
        }
 
        /*
+        * Query the TX/RX chainmask configuration.
+        *
+        * This is only relevant for 11n devices.
+        */
+       ath_hal_getrxchainmask(ah, &sc->sc_rxchainmask);
+       ath_hal_gettxchainmask(ah, &sc->sc_txchainmask);
+
+       /*
         * Disable MRR with protected frames by default.
         * Only 802.11n series NICs can handle this.
         */
@@ -777,14 +785,6 @@ ath_attach(u_int16_t devid, struct ath_s
                 */
                (void) ath_hal_getcapability(ah, HAL_CAP_STREAMS, 0, &txs);
                (void) ath_hal_getcapability(ah, HAL_CAP_STREAMS, 1, &rxs);
-
-               ath_hal_getrxchainmask(ah, &sc->sc_rxchainmask);
-               ath_hal_gettxchainmask(ah, &sc->sc_txchainmask);
-
-               device_printf(sc->sc_dev, "Chainmasks: TX=0x%x; RX=0x%x\n",
-                   sc->sc_txchainmask,
-                   sc->sc_rxchainmask);
-
                ic->ic_txstream = txs;
                ic->ic_rxstream = rxs;
 
_______________________________________________
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to