Index: ah_osdep.c =================================================================== --- ah_osdep.c (revision 342921) +++ ah_osdep.c (working copy) @@ -43,6 +43,7 @@ #include #include #include +#include #include #include @@ -279,6 +280,7 @@ ah->ah_powerMode != HAL_PM_AWAKE) { ath_hal_printf(ah, "%s: reg=0x%08x, val=0x%08x, pm=%d\n", __func__, reg, val, ah->ah_powerMode); + kdb_backtrace(); } #endif @@ -314,6 +316,7 @@ ah->ah_powerMode != HAL_PM_AWAKE) { ath_hal_printf(ah, "%s: reg=0x%08x, pm=%d\n", __func__, reg, ah->ah_powerMode); + kdb_backtrace(); } #endif @@ -377,6 +380,7 @@ ah->ah_powerMode != HAL_PM_AWAKE) { ath_hal_printf(ah, "%s: reg=0x%08x, val=0x%08x, pm=%d\n", __func__, reg, val, ah->ah_powerMode); + kdb_backtrace(); } #endif @@ -401,6 +405,7 @@ ah->ah_powerMode != HAL_PM_AWAKE) { ath_hal_printf(ah, "%s: reg=0x%08x, pm=%d\n", __func__, reg, ah->ah_powerMode); + kdb_backtrace(); } #endif Index: if_ath_ioctl.c =================================================================== --- if_ath_ioctl.c (revision 342921) +++ if_ath_ioctl.c (working copy) @@ -273,6 +273,14 @@ case SIOCGATHAGSTATS: return copyout(&sc->sc_aggr_stats, ifr_data_get_ptr(ifr), sizeof (sc->sc_aggr_stats)); + case SIOCGATHTXRXCOMBSTATS: + /* + * XXX TODO: turn this into a method into if_ath_lna_div.c. + */ + if (sc->sc_lna_div == NULL) + return (EINVAL); + return copyout(sc->sc_lna_div, ifr_data_get_ptr(ifr), + sizeof(struct if_ath_ant_comb_state)); case SIOCZATHSTATS: { int error; @@ -283,6 +291,11 @@ sizeof(sc->sc_aggr_stats)); memset(&sc->sc_intr_stats, 0, sizeof(sc->sc_intr_stats)); + /* + * XXX TODO: zero the lna_div stats, which requires + * it to be refactored into a separate stats + * struct.. + */ } return (error); } Index: if_ath_lna_div.c =================================================================== --- if_ath_lna_div.c (revision 342921) +++ if_ath_lna_div.c (working copy) @@ -1018,4 +1018,3 @@ antcomb->main_recv_cnt = 0; antcomb->alt_recv_cnt = 0; } - Index: if_ath_lna_div.h =================================================================== --- if_ath_lna_div.h (revision 342921) +++ if_ath_lna_div.h (working copy) @@ -79,6 +79,8 @@ int lna1_lna2_delta; }; +#ifdef _KERNEL + extern int ath_lna_div_attach(struct ath_softc *sc); extern int ath_lna_div_detach(struct ath_softc *sc); extern int ath_lna_div_ioctl(struct ath_softc *sc, struct ath_diag *ad); @@ -87,5 +89,6 @@ extern void ath_lna_rx_comb_scan(struct ath_softc *sc, struct ath_rx_status *rs, unsigned long ticks, int hz); +#endif #endif /* __IF_ATH_LNA_DIV_H__ */ Index: if_athioctl.h =================================================================== --- if_athioctl.h (revision 342921) +++ if_athioctl.h (working copy) @@ -177,6 +177,8 @@ #define SIOCZATHSTATS _IOWR('i', 139, struct ifreq) #define SIOCGATHAGSTATS _IOWR('i', 141, struct ifreq) +#define SIOCGATHTXRXCOMBSTATS _IOWR('i', 142, struct ifreq) + struct ath_diag { char ad_name[IFNAMSIZ]; /* if name, e.g. "ath0" */ u_int16_t ad_id; @@ -193,7 +195,6 @@ #define SIOCGATHDIAG _IOWR('i', 138, struct ath_diag) #define SIOCGATHPHYERR _IOWR('i', 140, struct ath_diag) - /* * The rate control ioctl has to support multiple potential rate * control classes. For now, instead of trying to support an