diff options
-rw-r--r-- | sys/dev/ath/ath_hal/ah_desc.h | 1 | ||||
-rw-r--r-- | sys/dev/ath/ath_hal/ar5416/ar5416_recv.c | 8 | ||||
-rw-r--r-- | sys/dev/ath/ath_hal/ar5416/ar5416desc.h | 1 | ||||
-rw-r--r-- | sys/dev/ath/if_ath_rx.c | 2 | ||||
-rw-r--r-- | sys/dev/ath/if_ath_sysctl.c | 3 | ||||
-rw-r--r-- | sys/dev/ath/if_athioctl.h | 4 |
6 files changed, 17 insertions, 2 deletions
diff --git a/sys/dev/ath/ath_hal/ah_desc.h b/sys/dev/ath/ath_hal/ah_desc.h index e7da3e4c0121..d788c2c5eac7 100644 --- a/sys/dev/ath/ath_hal/ah_desc.h +++ b/sys/dev/ath/ath_hal/ah_desc.h @@ -155,6 +155,7 @@ struct ath_rx_status { #define HAL_RX_DECRYPT_BUSY 0x0040 /* decrypt was too slow */ #define HAL_RX_HI_RX_CHAIN 0x0080 /* SM power save: hi Rx chain control */ #define HAL_RX_IS_APSD 0x0100 /* Is ASPD trigger frame */ +#define HAL_RX_STBC 0x0200 /* Is an STBC frame */ enum { HAL_PHYERR_UNDERRUN = 0, /* Transmit underrun */ diff --git a/sys/dev/ath/ath_hal/ar5416/ar5416_recv.c b/sys/dev/ath/ath_hal/ar5416/ar5416_recv.c index 9e4b8117250c..df096f93700e 100644 --- a/sys/dev/ath/ath_hal/ar5416/ar5416_recv.c +++ b/sys/dev/ath/ath_hal/ar5416/ar5416_recv.c @@ -209,6 +209,14 @@ ar5416ProcRxDesc(struct ath_hal *ah, struct ath_desc *ds, if (ads->ds_rxstatus3 & AR_2040) rs->rs_flags |= HAL_RX_2040; + /* + * Only the AR9280 and later chips support STBC RX, so + * ensure we only set this bit for those chips. + */ + if (AR_SREV_MERLIN_10_OR_LATER(ah) + && ads->ds_rxstatus3 & AR_STBCFrame) + rs->rs_flags |= HAL_RX_STBC; + if (ads->ds_rxstatus8 & AR_PreDelimCRCErr) rs->rs_flags |= HAL_RX_DELIM_CRC_PRE; if (ads->ds_rxstatus8 & AR_PostDelimCRCErr) diff --git a/sys/dev/ath/ath_hal/ar5416/ar5416desc.h b/sys/dev/ath/ath_hal/ar5416/ar5416desc.h index fab055ccb18b..27303946f927 100644 --- a/sys/dev/ath/ath_hal/ar5416/ar5416desc.h +++ b/sys/dev/ath/ath_hal/ar5416/ar5416desc.h @@ -357,6 +357,7 @@ struct ar5416_desc { #define AR_RxStatusRsvd30 0xfffff800 /* Owl 2.x only */ #define AR_DupFrame 0x00000004 +#define AR_STBCFrame 0x00000008 #define AR_RxAntenna 0xffffff00 #define AR_RxAntenna_S 8 diff --git a/sys/dev/ath/if_ath_rx.c b/sys/dev/ath/if_ath_rx.c index b8ff581a2ef0..ae478ab97698 100644 --- a/sys/dev/ath/if_ath_rx.c +++ b/sys/dev/ath/if_ath_rx.c @@ -545,6 +545,8 @@ ath_rx_pkt(struct ath_softc *sc, struct ath_rx_status *rs, HAL_STATUS status, sc->sc_stats.ast_rx_decrypt_busy_err++; if (rs->rs_flags & HAL_RX_HI_RX_CHAIN) 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) { diff --git a/sys/dev/ath/if_ath_sysctl.c b/sys/dev/ath/if_ath_sysctl.c index 4c0d2a203bca..01ad3c697f67 100644 --- a/sys/dev/ath/if_ath_sysctl.c +++ b/sys/dev/ath/if_ath_sysctl.c @@ -1076,6 +1076,9 @@ ath_sysctl_stats_attach(struct ath_softc *sc) &sc->sc_stats.ast_rx_keymiss, 0, ""); SYSCTL_ADD_UINT(ctx, child, OID_AUTO, "ast_tx_swfiltered", CTLFLAG_RD, &sc->sc_stats.ast_tx_swfiltered, 0, ""); + SYSCTL_ADD_UINT(ctx, child, OID_AUTO, "ast_rx_stbc", + CTLFLAG_RD, &sc->sc_stats.ast_rx_stbc, 0, + "Number of STBC frames received"); /* Attach the RX phy error array */ ath_sysctl_stats_attach_rxphyerr(sc, child); diff --git a/sys/dev/ath/if_athioctl.h b/sys/dev/ath/if_athioctl.h index 23387e9a7831..b730266fd9ac 100644 --- a/sys/dev/ath/if_athioctl.h +++ b/sys/dev/ath/if_athioctl.h @@ -163,9 +163,9 @@ struct ath_stats { u_int32_t ast_tx_mcastq_overflow; /* multicast queue overflow */ u_int32_t ast_rx_keymiss; u_int32_t ast_tx_swfiltered; + u_int32_t ast_rx_stbc; /* RX STBC frame */ u_int32_t ast_tx_nodeq_overflow; /* node sw queue overflow */ - - u_int32_t ast_pad[14]; + u_int32_t ast_pad[13]; }; #define SIOCGATHSTATS _IOWR('i', 137, struct ifreq) |