Author: adrian
Date: Thu May 25 04:26:26 2017
New Revision: 318857
URL: https://svnweb.freebsd.org/changeset/base/318857

Log:
  [ath] [ath_hal] retire AH_SUPPORT_AR5416 changing anything.
  
  Yes, the memory bloat is large, but it's 2017 and I'll fix it later
  by making it runtime configurable / per-chip configurable if I ever need to.

Modified:
  head/sys/dev/ath/ath_hal/ah.c
  head/sys/dev/ath/ath_hal/ah_desc.h
  head/sys/dev/ath/ath_hal/ah_internal.h
  head/sys/dev/ath/if_ath_rx.c

Modified: head/sys/dev/ath/ath_hal/ah.c
==============================================================================
--- head/sys/dev/ath/ath_hal/ah.c       Thu May 25 04:18:46 2017        
(r318856)
+++ head/sys/dev/ath/ath_hal/ah.c       Thu May 25 04:26:26 2017        
(r318857)
@@ -1188,7 +1188,6 @@ ath_hal_get_mimo_chan_noise(struct ath_h
     const struct ieee80211_channel *chan, int16_t *nf_ctl,
     int16_t *nf_ext)
 {
-#ifdef AH_SUPPORT_AR5416
        HAL_CHANNEL_INTERNAL *ichan;
        int i;
 
@@ -1243,9 +1242,6 @@ ath_hal_get_mimo_chan_noise(struct ath_h
                }
                return 1;
        }
-#else
-       return 0;
-#endif /* AH_SUPPORT_AR5416 */
 }
 
 /*

Modified: head/sys/dev/ath/ath_hal/ah_desc.h
==============================================================================
--- head/sys/dev/ath/ath_hal/ah_desc.h  Thu May 25 04:18:46 2017        
(r318856)
+++ head/sys/dev/ath/ath_hal/ah_desc.h  Thu May 25 04:26:26 2017        
(r318857)
@@ -20,21 +20,6 @@
 #ifndef _DEV_ATH_DESC_H
 #define _DEV_ATH_DESC_H
 
-#include "opt_ah.h"            /* NB: required for AH_SUPPORT_AR5416 */
-
-/*
- * For now, define this for the structure definitions.
- * Because of how the HAL / driver module currently builds,
- * it's not very feasible to build the module without
- * this defined.  The rest of the code (eg in the driver
- * body) can work fine with these fields being uninitialised;
- * they'll be initialised to 0 anyway.
- */
-
-#ifndef        AH_SUPPORT_AR5416
-#define        AH_SUPPORT_AR5416       1
-#endif
-
 /*
  * Transmit descriptor status.  This structure is filled
  * in only after the tx descriptor process method finds a
@@ -56,7 +41,6 @@ struct ath_tx_status {
        uint8_t         ts_virtcol;     /* virtual collision count */
        uint8_t         ts_antenna;     /* antenna information */
        uint8_t         ts_finaltsi;    /* final transmit series index */
-#ifdef AH_SUPPORT_AR5416
                                        /* 802.11n status */
        uint8_t         ts_flags;       /* misc flags */
        uint8_t         ts_queue_id;    /* AR9300: TX queue id */
@@ -71,7 +55,6 @@ struct ath_tx_status {
        int8_t          ts_rssi_ctl[3]; /* tx ack RSSI [ctl, chain 0-2] */
        int8_t          ts_rssi_ext[3]; /* tx ack RSSI [ext, chain 0-2] */
        uint8_t         ts_pad[2];
-#endif /* AH_SUPPORT_AR5416 */
 };
 
 /* bits found in ts_status */
@@ -121,7 +104,6 @@ struct ath_rx_status {
        uint8_t         rs_more;        /* more descriptors follow */
        uint32_t        rs_tstamp;      /* h/w assigned timestamp */
        uint32_t        rs_antenna;     /* antenna information */
-#ifdef AH_SUPPORT_AR5416
                                        /* 802.11n status */
        int8_t          rs_rssi_ctl[3]; /* rx frame RSSI [ctl, chain 0-2] */
        int8_t          rs_rssi_ext[3]; /* rx frame RSSI [ext, chain 0-2] */
@@ -138,7 +120,6 @@ struct ath_rx_status {
        uint32_t        rs_evm2;
        uint32_t        rs_evm3;        /* needed for ar9300 and later */
        uint32_t        rs_evm4;        /* needed for ar9300 and later */
-#endif /* AH_SUPPORT_AR5416 */
 };
 
 /* bits found in rs_status */
@@ -241,11 +222,7 @@ enum {
  * to complete the work.  Status for completed frames is returned
  * in a device-independent format.
  */
-#ifdef AH_SUPPORT_AR5416
 #define        HAL_DESC_HW_SIZE        20
-#else
-#define        HAL_DESC_HW_SIZE        4
-#endif /* AH_SUPPORT_AR5416 */
 
 struct ath_desc {
        /*

Modified: head/sys/dev/ath/ath_hal/ah_internal.h
==============================================================================
--- head/sys/dev/ath/ath_hal/ah_internal.h      Thu May 25 04:18:46 2017        
(r318856)
+++ head/sys/dev/ath/ath_hal/ah_internal.h      Thu May 25 04:26:26 2017        
(r318857)
@@ -29,11 +29,6 @@
 
 #include <net80211/_ieee80211.h>
 #include <sys/queue.h>                 /* XXX for reasons */
-#include "opt_ah.h"                    /* needed for AH_SUPPORT_AR5416 */
-
-#ifndef        AH_SUPPORT_AR5416
-#define        AH_SUPPORT_AR5416       1
-#endif
 
 #ifndef NBBY
 #define        NBBY    8                       /* number of bits/byte */
@@ -201,10 +196,8 @@ typedef struct {
        int8_t          qCoff;
        int16_t         rawNoiseFloor;
        int16_t         noiseFloorAdjust;
-#ifdef AH_SUPPORT_AR5416
        int16_t         noiseFloorCtl[AH_MAX_CHAINS];
        int16_t         noiseFloorExt[AH_MAX_CHAINS];
-#endif /* AH_SUPPORT_AR5416 */
        uint16_t        mainSpur;       /* cached spur value for this channel */
 
        /*XXX TODO: make these part of privFlags */

Modified: head/sys/dev/ath/if_ath_rx.c
==============================================================================
--- head/sys/dev/ath/if_ath_rx.c        Thu May 25 04:18:46 2017        
(r318856)
+++ head/sys/dev/ath/if_ath_rx.c        Thu May 25 04:26:26 2017        
(r318857)
@@ -569,7 +569,8 @@ ath_rx_tap(struct ath_softc *sc, struct 
        rix = rt->rateCodeToIndex[rs->rs_rate];
        sc->sc_rx_th.wr_rate = sc->sc_hwmap[rix].ieeerate;
        sc->sc_rx_th.wr_flags = sc->sc_hwmap[rix].rxflags;
-#ifdef AH_SUPPORT_AR5416
+
+       /* 802.11 specific flags */
        sc->sc_rx_th.wr_chan_flags &= ~CHAN_HT;
        if (rs->rs_status & HAL_RXERR_PHY) {
                /*
@@ -596,7 +597,6 @@ ath_rx_tap(struct ath_softc *sc, struct 
                        sc->sc_rx_th.wr_flags |= IEEE80211_RADIOTAP_F_SHORTGI;
        }
 
-#endif
        sc->sc_rx_th.wr_tsf = htole64(ath_extend_tsf(sc, rs->rs_tstamp, tsf));
        if (rs->rs_status & HAL_RXERR_CRC)
                sc->sc_rx_th.wr_flags |= IEEE80211_RADIOTAP_F_BADFCS;
@@ -654,8 +654,7 @@ ath_rx_pkt(struct ath_softc *sc, struct 
         */
        rstamp = ath_extend_tsf(sc, rs->rs_tstamp, tsf);
 
-       /* These aren't specifically errors */
-#ifdef AH_SUPPORT_AR5416
+       /* 802.11 return codes - These aren't specifically errors */
        if (rs->rs_flags & HAL_RX_GI)
                sc->sc_stats.ast_rx_halfgi++;
        if (rs->rs_flags & HAL_RX_2040)
@@ -670,7 +669,6 @@ ath_rx_pkt(struct ath_softc *sc, struct 
                sc->sc_stats.ast_rx_hi_rx_chain++;
        if (rs->rs_flags & HAL_RX_STBC)
                sc->sc_stats.ast_rx_stbc++;
-#endif /* AH_SUPPORT_AR5416 */
 
        if (rs->rs_status != 0) {
                if (rs->rs_status & HAL_RXERR_CRC)
@@ -906,11 +904,8 @@ rx_accept:
                        IEEE80211_KEYIX_NONE : rs->rs_keyix);
        sc->sc_lastrs = rs;
 
-#ifdef AH_SUPPORT_AR5416
        if (rs->rs_isaggr)
                sc->sc_stats.ast_rx_agg++;
-#endif /* AH_SUPPORT_AR5416 */
-
 
        /*
         * Populate the per-chain RSSI values where appropriate.
_______________________________________________
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to