[ath_hal] add locationing / tx-beamforming RX status descriptor decoding.
* LOC_INFO is mostly just "did this packet come with a locationing timestamp instead of TSF"; * Decode not-sounding, uploaded-data, data-valid, data type and number of extension spatial streams.
This commit is contained in:
@@ -94,8 +94,15 @@ ar9300_proc_rx_desc_fast(struct ath_hal *ah, struct ath_desc *ds,
|
||||
rxs->rs_moreaggr = (rxsp->status11 & AR_rx_more_aggr) ? 1 : 0;
|
||||
rxs->rs_antenna = (MS(rxsp->status4, AR_rx_antenna) & 0x7);
|
||||
rxs->rs_flags = (rxsp->status11 & AR_apsd_trig) ? HAL_RX_IS_APSD : 0;
|
||||
rxs->rs_flags |= (rxsp->status4 & AR_gi) ? HAL_RX_GI : 0;
|
||||
rxs->rs_flags |= (rxsp->status4 & AR_2040) ? HAL_RX_2040 : 0;
|
||||
rxs->rs_flags |= (rxsp->status4 & AR_gi) ? HAL_RX_GI : 0;
|
||||
rxs->rs_flags |= (rxsp->status4 & AR_2040) ? HAL_RX_2040 : 0;
|
||||
|
||||
/* TX beamforming; CSI for locationing */
|
||||
rxs->rs_flags |= (rxsp->status2 & AR_hw_upload_data) ? HAL_RX_HW_UPLOAD_DATA : 0;
|
||||
rxs->rs_flags |= (rxsp->status4 & AR_rx_not_sounding) ? 0 : HAL_RX_HW_SOUNDING;
|
||||
rxs->rs_ness = MS(rxsp->status4, AR_rx_ness);
|
||||
rxs->rs_flags |= (rxsp->status4 & AR_hw_upload_data_valid) ? HAL_RX_UPLOAD_VALID : 0;
|
||||
rxs->rs_hw_upload_data_type = MS(rxsp->status11, AR_hw_upload_data_type);
|
||||
|
||||
/* Copy EVM information */
|
||||
rxs->rs_evm0 = rxsp->status6;
|
||||
@@ -133,9 +140,9 @@ ar9300_proc_rx_desc_fast(struct ath_hal *ah, struct ath_desc *ds,
|
||||
|
||||
if (rxsp->status11 & AR_crc_err) {
|
||||
rxs->rs_status |= HAL_RXERR_CRC;
|
||||
/*
|
||||
* ignore CRC flag for phy reports
|
||||
*/
|
||||
/*
|
||||
* ignore CRC flag for phy reports
|
||||
*/
|
||||
if (rxsp->status11 & AR_phyerr) {
|
||||
u_int phyerr = MS(rxsp->status11, AR_phy_err_code);
|
||||
rxs->rs_status |= HAL_RXERR_PHY;
|
||||
@@ -164,6 +171,23 @@ ar9300_proc_rx_desc_fast(struct ath_hal *ah, struct ath_desc *ds,
|
||||
} else if (rxsp->status11 & AR_michael_err) {
|
||||
rxs->rs_status |= HAL_RXERR_MIC;
|
||||
}
|
||||
} else {
|
||||
if (rxsp->status11 & AR_position_bit) {
|
||||
#if 1
|
||||
rxs->rs_flags |= HAL_RX_LOC_INFO;
|
||||
#else
|
||||
/*
|
||||
* If the locationing counter is enabled, Osprey always
|
||||
* seems to put AR_position_bit in each frame.
|
||||
* So, only do this if we also have a valid upload
|
||||
* and it's type "1" (which I'm guessing is CSI.)
|
||||
*/
|
||||
if ((rxs->rs_flags & HAL_RX_UPLOAD_VALID) &&
|
||||
(rxs->rs_hw_upload_data_type == 1)) {
|
||||
rxs->rs_flags |= HAL_RX_LOC_INFO;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
}
|
||||
#if 0
|
||||
rxs->rs_channel = AH_PRIVATE(ah)->ah_curchan->channel;
|
||||
|
||||
Reference in New Issue
Block a user