003 File Manager
Current Path:
/usr/src/sys/contrib/dev/ath/ath_hal/ar9300
usr
/
src
/
sys
/
contrib
/
dev
/
ath
/
ath_hal
/
ar9300
/
📁
..
📄
ar9300.h
(73.54 KB)
📄
ar9300_aic.c
(25.58 KB)
📄
ar9300_ani.c
(49.8 KB)
📄
ar9300_aphrodite10.ini
(59.29 KB)
📄
ar9300_attach.c
(174.66 KB)
📄
ar9300_beacon.c
(7.28 KB)
📄
ar9300_devid.h
(3.01 KB)
📄
ar9300_eeprom.c
(163.03 KB)
📄
ar9300_freebsd.c
(28.11 KB)
📄
ar9300_freebsd.h
(4 KB)
📄
ar9300_freebsd_inc.h
(11.58 KB)
📄
ar9300_gpio.c
(20.62 KB)
📄
ar9300_interrupts.c
(26.58 KB)
📄
ar9300_jupiter10.ini
(71.26 KB)
📄
ar9300_jupiter20.ini
(77.96 KB)
📄
ar9300_keycache.c
(21.45 KB)
📄
ar9300_mci.c
(72.45 KB)
📄
ar9300_misc.c
(137.4 KB)
📄
ar9300_osprey22.ini
(103.16 KB)
📄
ar9300_osprey22_scoemu.ini
(98.42 KB)
📄
ar9300_paprd.c
(95.21 KB)
📄
ar9300_phy.c
(46.46 KB)
📄
ar9300_power.c
(52.81 KB)
📄
ar9300_radar.c
(19.78 KB)
📄
ar9300_radio.c
(9.69 KB)
📄
ar9300_raw_adc_capture.c
(1.36 KB)
📄
ar9300_recv.c
(9.57 KB)
📄
ar9300_recv_ds.c
(7.81 KB)
📄
ar9300_reset.c
(225.67 KB)
📄
ar9300_rtt.c
(1020 B)
📄
ar9300_sim.c
(804 B)
📄
ar9300_sim.h
(871 B)
📄
ar9300_spectral.c
(19.97 KB)
📄
ar9300_stub.c
(7.26 KB)
📄
ar9300_stub.h
(145 B)
📄
ar9300_stub_funcs.c
(22.62 KB)
📄
ar9300_stub_funcs.h
(12.75 KB)
📄
ar9300_timer.c
(5.59 KB)
📄
ar9300_tx99_tgt.c
(31.81 KB)
📄
ar9300_txbf.c
(1017 B)
📄
ar9300_txbf.h
(856 B)
📄
ar9300_txbf_cal.c
(937 B)
📄
ar9300_xmit.c
(32.01 KB)
📄
ar9300_xmit_ds.c
(28.62 KB)
📄
ar9300desc.h
(21.6 KB)
📄
ar9300eep.h
(28.6 KB)
📄
ar9300paprd.h
(1.72 KB)
📄
ar9300phy.h
(94.99 KB)
📄
ar9300radar.h
(1.83 KB)
📄
ar9300reg.h
(153.77 KB)
📄
ar9300template_ap121.h
(22.42 KB)
📄
ar9300template_aphrodite.h
(22.17 KB)
📄
ar9300template_cus157.h
(21.77 KB)
📄
ar9300template_generic.h
(22.15 KB)
📄
ar9300template_hb112.h
(22.49 KB)
📄
ar9300template_hb116.h
(22.45 KB)
📄
ar9300template_osprey_k31.h
(22.51 KB)
📄
ar9300template_wasp_2.h
(21.97 KB)
📄
ar9300template_wasp_k31.h
(21.93 KB)
📄
ar9300template_xb112.h
(22.58 KB)
📄
ar9300template_xb113.h
(22.4 KB)
📄
ar9330_11.ini
(62.51 KB)
📄
ar9330_12.ini
(58.84 KB)
📄
ar9340.ini
(117.7 KB)
📄
ar9462_2p0_initvals.h
(42.75 KB)
📄
ar9462_2p1_initvals.h
(10.28 KB)
📄
ar9485.ini
(63.9 KB)
📄
ar9485_1_1.ini
(62.75 KB)
📄
ar953x.ini
(46.38 KB)
📄
ar955x.ini
(75.5 KB)
📄
ar9580.ini
(109.06 KB)
📄
eeprom.diff
(10.13 KB)
📄
osprey_reg_map.h
(227.66 KB)
📄
osprey_reg_map_macro.h
(3.91 MB)
📄
poseidon_reg_map_macro.h
(213.28 KB)
📄
scorpion_reg_map.h
(98.86 KB)
📄
scorpion_reg_map_macro.h
(3.11 MB)
📄
sources
(1.73 KB)
📄
wasp_reg_map.h
(4.55 KB)
Editing: ar9300_recv_ds.c
/* * Copyright (c) 2013 Qualcomm Atheros, Inc. * * Permission to use, copy, modify, and/or distribute this software for any * purpose with or without fee is hereby granted, provided that the above * copyright notice and this permission notice appear in all copies. * * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY * AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR * OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR * PERFORMANCE OF THIS SOFTWARE. */ #include "opt_ah.h" #include "ah.h" #include "ah_desc.h" #include "ah_internal.h" #include "ar9300/ar9300.h" #include "ar9300/ar9300reg.h" #include "ar9300/ar9300desc.h" /* * Process an RX descriptor, and return the status to the caller. * Copy some hardware specific items into the software portion * of the descriptor. * * NB: the caller is responsible for validating the memory contents * of the descriptor (e.g. flushing any cached copy). */ HAL_STATUS ar9300_proc_rx_desc_fast(struct ath_hal *ah, struct ath_desc *ds, u_int32_t pa, struct ath_desc *nds, struct ath_rx_status *rxs, void *buf_addr) { struct ar9300_rxs *rxsp = AR9300RXS(buf_addr); /* ath_hal_printf(ah,"CHH=RX: ds_info 0x%x status1: 0x%x status11: 0x%x\n", rxsp->ds_info,rxsp->status1,rxsp->status11); */ if ((rxsp->status11 & AR_rx_done) == 0) { return HAL_EINPROGRESS; } if (MS(rxsp->ds_info, AR_desc_id) != 0x168c) { #if __PKT_SERIOUS_ERRORS__ /*BUG: 63564-HT */ HALDEBUG(AH_NULL, HAL_DEBUG_UNMASKABLE, "%s: Rx Descriptor error 0x%x\n", __func__, rxsp->ds_info); #endif return HAL_EINVAL; } if ((rxsp->ds_info & (AR_tx_rx_desc | AR_ctrl_stat)) != 0) { #if __PKT_SERIOUS_ERRORS__ HALDEBUG(AH_NULL, HAL_DEBUG_UNMASKABLE, "%s: Rx Descriptor wrong info 0x%x\n", __func__, rxsp->ds_info); #endif return HAL_EINPROGRESS; } rxs->rs_status = 0; rxs->rs_flags = 0; rxs->rs_phyerr = 0; rxs->rs_datalen = rxsp->status2 & AR_data_len; rxs->rs_tstamp = rxsp->status3; /* XXX what about key_cache_miss? */ rxs->rs_rssi = MS(rxsp->status5, AR_rx_rssi_combined); rxs->rs_rssi_ctl[0] = MS(rxsp->status1, AR_rx_rssi_ant00); rxs->rs_rssi_ctl[1] = MS(rxsp->status1, AR_rx_rssi_ant01); rxs->rs_rssi_ctl[2] = MS(rxsp->status1, AR_rx_rssi_ant02); rxs->rs_rssi_ext[0] = MS(rxsp->status5, AR_rx_rssi_ant10); rxs->rs_rssi_ext[1] = MS(rxsp->status5, AR_rx_rssi_ant11); rxs->rs_rssi_ext[2] = MS(rxsp->status5, AR_rx_rssi_ant12); if (rxsp->status11 & AR_rx_key_idx_valid) { rxs->rs_keyix = MS(rxsp->status11, AR_key_idx); } else { rxs->rs_keyix = HAL_RXKEYIX_INVALID; } /* NB: caller expected to do rate table mapping */ rxs->rs_rate = MS(rxsp->status1, AR_rx_rate); rxs->rs_more = (rxsp->status2 & AR_rx_more) ? 1 : 0; rxs->rs_isaggr = (rxsp->status11 & AR_rx_aggr) ? 1 : 0; 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; /* 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; rxs->rs_evm1 = rxsp->status7; rxs->rs_evm2 = rxsp->status8; rxs->rs_evm3 = rxsp->status9; rxs->rs_evm4 = (rxsp->status10 & 0xffff); if (rxsp->status11 & AR_pre_delim_crc_err) { rxs->rs_flags |= HAL_RX_DELIM_CRC_PRE; } if (rxsp->status11 & AR_post_delim_crc_err) { rxs->rs_flags |= HAL_RX_DELIM_CRC_POST; } if (rxsp->status11 & AR_decrypt_busy_err) { rxs->rs_flags |= HAL_RX_DECRYPT_BUSY; } if (rxsp->status11 & AR_hi_rx_chain) { rxs->rs_flags |= HAL_RX_HI_RX_CHAIN; } if (rxsp->status11 & AR_key_miss) { rxs->rs_status |= HAL_RXERR_KEYMISS; } if ((rxsp->status11 & AR_rx_frame_ok) == 0) { /* * These four bits should not be set together. The * 9300 spec states a Michael error can only occur if * decrypt_crc_err not set (and TKIP is used). Experience * indicates however that you can also get Michael errors * when a CRC error is detected, but these are specious. * Consequently we filter them out here so we don't * confuse and/or complicate drivers. */ if (rxsp->status11 & AR_crc_err) { rxs->rs_status |= HAL_RXERR_CRC; /* * 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; rxs->rs_phyerr = phyerr; } } else if (rxsp->status11 & AR_phyerr) { u_int phyerr; /* * Packets with OFDM_RESTART on post delimiter are CRC OK and * usable and MAC ACKs them. * To avoid packet from being lost, we remove the PHY Err flag * so that lmac layer does not drop them. * (EV 70071) */ phyerr = MS(rxsp->status11, AR_phy_err_code); if ((phyerr == HAL_PHYERR_OFDM_RESTART) && (rxsp->status11 & AR_post_delim_crc_err)) { rxs->rs_phyerr = 0; } else { rxs->rs_status |= HAL_RXERR_PHY; rxs->rs_phyerr = phyerr; } } else if (rxsp->status11 & AR_decrypt_crc_err) { rxs->rs_status |= HAL_RXERR_DECRYPT; } 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; #endif return HAL_OK; } HAL_STATUS ar9300_proc_rx_desc(struct ath_hal *ah, struct ath_desc *ds, u_int32_t pa, struct ath_desc *nds, u_int64_t tsf, struct ath_rx_status *rxs) { return HAL_ENOTSUPP; } /* * rx path in ISR is different for ar9300 from ar5416, and * ath_rx_proc_descfast will not be called if edmasupport is true. * So this function ath_hal_get_rxkeyidx will not be * called for ar9300. * This function in ar9300's HAL is just a stub one because we need * to link something to the callback interface of the HAL module. */ HAL_STATUS ar9300_get_rx_key_idx(struct ath_hal *ah, struct ath_desc *ds, u_int8_t *keyix, u_int8_t *status) { *status = 0; *keyix = HAL_RXKEYIX_INVALID; return HAL_ENOTSUPP; }
Upload File
Create Folder