atheroswifi: Upgrade to FreeBSD 12.

Thanks return0e for testing!
This commit is contained in:
Augustin Cavalier 2019-01-08 17:21:31 -05:00
parent 3001575d60
commit ab3e2cf4bc
243 changed files with 2749 additions and 1011 deletions

View File

@ -100,12 +100,6 @@ enum GAIN_PARAMS_2133 {
GP_PWD_130,
};
enum {
HAL_RESET_POWER_ON,
HAL_RESET_WARM,
HAL_RESET_COLD,
};
typedef struct _gain_opt_step {
int16_t paramVal[NUM_CORNER_FIX_BITS_2133];
int32_t stepGain;
@ -1489,6 +1483,7 @@ extern HAL_BOOL ar9300_radar_wait(struct ath_hal *ah, struct ieee80211_channel
extern struct dfs_pulse * ar9300_get_dfs_radars(struct ath_hal *ah,
u_int32_t dfsdomain, int *numradars, struct dfs_bin5pulse **bin5pulses,
int *numb5radars, HAL_PHYERR_PARAM *pe);
extern HAL_BOOL ar9300_get_default_dfs_thresh(struct ath_hal *ah, HAL_PHYERR_PARAM *pe);
extern void ar9300_adjust_difs(struct ath_hal *ah, u_int32_t val);
extern u_int32_t ar9300_dfs_config_fft(struct ath_hal *ah, HAL_BOOL is_enable);
extern void ar9300_cac_tx_quiet(struct ath_hal *ah, HAL_BOOL enable);

View File

@ -1188,6 +1188,15 @@ ar9300_ani_ar_poll(struct ath_hal *ah, const HAL_NODE_STATS *stats,
cck_phy_err_cnt - ani_state->cck_phy_err_count;
ani_state->cck_phy_err_count = cck_phy_err_cnt;
/*
* Note - the ANI code is using the aggregate listen time.
* The AR_PHY_CNT1/AR_PHY_CNT2 registers here are also
* free running, not clear-on-read and are free-running.
*
* So, ofdm_phy_err_rate / cck_phy_err_rate are accumulating
* the same as listenTime is accumulating.
*/
#if HAL_ANI_DEBUG
HALDEBUG(ah, HAL_DEBUG_ANI,
"%s: Errors: OFDM=0x%08x-0x0=%d CCK=0x%08x-0x0=%d\n",

View File

@ -2339,7 +2339,9 @@ ar9300_attach(u_int16_t devid, HAL_SOFTC sc, HAL_BUS_TAG st,
} else {
ar9300_disable_pcie_phy(ah);
}
#if 0
ath_hal_printf(ah, "%s: calling ar9300_hw_attach\n", __func__);
#endif
ecode = ar9300_hw_attach(ah);
if (ecode != HAL_OK) {
goto bad;
@ -2878,7 +2880,6 @@ ar9300_fill_capability_info(struct ath_hal *ah)
#if ATH_SUPPORT_SPECTRAL
p_cap->halSpectralScanSupport = AH_TRUE;
#endif
ahpriv->ah_rfsilent = ar9300_eeprom_get(ahp, EEP_RF_SILENT);
if (ahpriv->ah_rfsilent & EEP_RFSILENT_ENABLED) {
ahp->ah_gpio_select = MS(ahpriv->ah_rfsilent, EEP_RFSILENT_GPIO_SEL);
@ -2998,8 +2999,8 @@ ar9300_fill_capability_info(struct ath_hal *ah)
p_cap->hal_cfend_fix_support = AH_FALSE;
p_cap->hal_aggr_extra_delim_war = AH_FALSE;
#endif
p_cap->halHasLongRxDescTsf = AH_TRUE;
// p_cap->hal_rx_desc_timestamp_bits = 32;
p_cap->halTxTstampPrecision = 32;
p_cap->halRxTstampPrecision = 32;
p_cap->halRxTxAbortSupport = AH_TRUE;
p_cap->hal_ani_poll_interval = AR9300_ANI_POLLINTERVAL;
p_cap->hal_channel_switch_time_usec = AR9300_CHANNEL_SWITCH_TIME_USEC;
@ -3235,7 +3236,9 @@ ar9300_hw_attach(struct ath_hal *ah)
return HAL_ESELFTEST;
}
#if 0
ath_hal_printf(ah, "%s: calling ar9300_eeprom_attach\n", __func__);
#endif
ecode = ar9300_eeprom_attach(ah);
ath_hal_printf(ah, "%s: ar9300_eeprom_attach returned %d\n", __func__, ecode);
if (ecode != HAL_OK) {

View File

@ -13,7 +13,7 @@
* disclaimer similar to the Disclaimer below and any redistribution
* must be conditioned upon including a substantially similar
* Disclaimer requirement for further binary redistribution.
* 4. Neither the names of the above-listed copyright holders nor the
* 3. Neither the names of the above-listed copyright holders nor the
* names of any contributors may be used to endorse or promote
* product derived from this software without specific prior written
* permission.

View File

@ -4397,7 +4397,7 @@ ar9300_eeprom_restore(struct ath_hal *ah)
#endif
/*
* At this point, mptr points to the eeprom data structure
* in it's "default" state. If this is big endian, swap the
* in its "default" state. If this is big endian, swap the
* data structures back to "little endian" form.
*/
if (ar9300_eeprom_restore_internal(ah, mptr, mdata_size) >= 0) {

View File

@ -109,6 +109,201 @@ ar9300_freebsd_set_tsf64(struct ath_hal *ah, uint64_t tsf64)
OS_REG_WRITE(ah, AR_TSF_U32, (tsf64 >> 32) & 0xffffffff);
}
/* Flags for pulse_bw_info */
#define PRI_CH_RADAR_FOUND 0x01
#define EXT_CH_RADAR_FOUND 0x02
#define EXT_CH_RADAR_EARLY_FOUND 0x04
static HAL_BOOL
ar9300_freebsd_proc_radar_event(struct ath_hal *ah, struct ath_rx_status *rxs,
uint64_t fulltsf, const char *buf, HAL_DFS_EVENT *event)
{
HAL_BOOL doDfsExtCh;
HAL_BOOL doDfsEnhanced;
HAL_BOOL doDfsCombinedRssi;
uint8_t rssi = 0, ext_rssi = 0;
uint8_t pulse_bw_info = 0, pulse_length_ext = 0, pulse_length_pri = 0;
uint32_t dur = 0;
int pri_found = 1, ext_found = 0;
int early_ext = 0;
int is_dc = 0;
uint16_t datalen; /* length from the RX status field */
/* Check whether the given phy error is a radar event */
if ((rxs->rs_phyerr != HAL_PHYERR_RADAR) &&
(rxs->rs_phyerr != HAL_PHYERR_FALSE_RADAR_EXT)) {
return AH_FALSE;
}
/* Grab copies of the capabilities; just to make the code clearer */
doDfsExtCh = AH_PRIVATE(ah)->ah_caps.halExtChanDfsSupport;
doDfsEnhanced = AH_PRIVATE(ah)->ah_caps.halEnhancedDfsSupport;
doDfsCombinedRssi = AH_PRIVATE(ah)->ah_caps.halUseCombinedRadarRssi;
datalen = rxs->rs_datalen;
/* If hardware supports it, use combined RSSI, else use chain 0 RSSI */
if (doDfsCombinedRssi)
rssi = (uint8_t) rxs->rs_rssi;
else
rssi = (uint8_t) rxs->rs_rssi_ctl[0];
/* Set this; but only use it if doDfsExtCh is set */
ext_rssi = (uint8_t) rxs->rs_rssi_ext[0];
/* Cap it at 0 if the RSSI is a negative number */
if (rssi & 0x80)
rssi = 0;
if (ext_rssi & 0x80)
ext_rssi = 0;
/*
* Fetch the relevant data from the frame
*/
if (doDfsExtCh) {
if (datalen < 3)
return AH_FALSE;
/* Last three bytes of the frame are of interest */
pulse_length_pri = *(buf + datalen - 3);
pulse_length_ext = *(buf + datalen - 2);
pulse_bw_info = *(buf + datalen - 1);
HALDEBUG(ah, HAL_DEBUG_DFS, "%s: rssi=%d, ext_rssi=%d, pulse_length_pri=%d,"
" pulse_length_ext=%d, pulse_bw_info=%x\n",
__func__, rssi, ext_rssi, pulse_length_pri, pulse_length_ext,
pulse_bw_info);
} else {
/* The pulse width is byte 0 of the data */
if (datalen >= 1)
dur = ((uint8_t) buf[0]) & 0xff;
else
dur = 0;
if (dur == 0 && rssi == 0) {
HALDEBUG(ah, HAL_DEBUG_DFS, "%s: dur and rssi are 0\n", __func__);
return AH_FALSE;
}
HALDEBUG(ah, HAL_DEBUG_DFS, "%s: rssi=%d, dur=%d\n", __func__, rssi, dur);
/* Single-channel only */
pri_found = 1;
ext_found = 0;
}
/*
* If doing extended channel data, pulse_bw_info must
* have one of the flags set.
*/
if (doDfsExtCh && pulse_bw_info == 0x0)
return AH_FALSE;
/*
* If the extended channel data is available, calculate
* which to pay attention to.
*/
if (doDfsExtCh) {
/* If pulse is on DC, take the larger duration of the two */
if ((pulse_bw_info & EXT_CH_RADAR_FOUND) &&
(pulse_bw_info & PRI_CH_RADAR_FOUND)) {
is_dc = 1;
if (pulse_length_ext > pulse_length_pri) {
dur = pulse_length_ext;
pri_found = 0;
ext_found = 1;
} else {
dur = pulse_length_pri;
pri_found = 1;
ext_found = 0;
}
} else if (pulse_bw_info & EXT_CH_RADAR_EARLY_FOUND) {
dur = pulse_length_ext;
pri_found = 0;
ext_found = 1;
early_ext = 1;
} else if (pulse_bw_info & PRI_CH_RADAR_FOUND) {
dur = pulse_length_pri;
pri_found = 1;
ext_found = 0;
} else if (pulse_bw_info & EXT_CH_RADAR_FOUND) {
dur = pulse_length_ext;
pri_found = 0;
ext_found = 1;
}
}
/*
* For enhanced DFS (Merlin and later), pulse_bw_info has
* implications for selecting the correct RSSI value.
*/
if (doDfsEnhanced) {
switch (pulse_bw_info & 0x03) {
case 0:
/* No radar? */
rssi = 0;
break;
case PRI_CH_RADAR_FOUND:
/* Radar in primary channel */
/* Cannot use ctrl channel RSSI if ext channel is stronger */
if (ext_rssi >= (rssi + 3)) {
rssi = 0;
}
break;
case EXT_CH_RADAR_FOUND:
/* Radar in extended channel */
/* Cannot use ext channel RSSI if ctrl channel is stronger */
if (rssi >= (ext_rssi + 12)) {
rssi = 0;
} else {
rssi = ext_rssi;
}
break;
case (PRI_CH_RADAR_FOUND | EXT_CH_RADAR_FOUND):
/* When both are present, use stronger one */
if (rssi < ext_rssi)
rssi = ext_rssi;
break;
}
}
/*
* If not doing enhanced DFS, choose the ext channel if
* it is stronger than the main channel
*/
if (doDfsExtCh && !doDfsEnhanced) {
if ((ext_rssi > rssi) && (ext_rssi < 128))
rssi = ext_rssi;
}
/*
* XXX what happens if the above code decides the RSSI
* XXX wasn't valid, an sets it to 0?
*/
/*
* Fill out dfs_event structure.
*/
event->re_full_ts = fulltsf;
event->re_ts = rxs->rs_tstamp;
event->re_rssi = rssi;
event->re_dur = dur;
event->re_flags = 0;
if (pri_found)
event->re_flags |= HAL_DFS_EVENT_PRICH;
if (ext_found)
event->re_flags |= HAL_DFS_EVENT_EXTCH;
if (early_ext)
event->re_flags |= HAL_DFS_EVENT_EXTEARLY;
if (is_dc)
event->re_flags |= HAL_DFS_EVENT_ISDC;
return AH_TRUE;
}
void
ar9300_attach_freebsd_ops(struct ath_hal *ah)
{
@ -219,10 +414,11 @@ ar9300_attach_freebsd_ops(struct ath_hal *ah)
/* DFS functions */
ah->ah_enableDfs = ar9300_enable_dfs;
ah->ah_getDfsThresh = ar9300_get_dfs_thresh;
ah->ah_getDfsDefaultThresh = ar9300_freebsd_get_dfs_default_thresh;
// procradarevent
ah->ah_getDfsDefaultThresh = ar9300_get_default_dfs_thresh;
ah->ah_procRadarEvent = ar9300_freebsd_proc_radar_event;
ah->ah_isFastClockEnabled = ar9300_is_fast_clock_enabled;
ah->ah_get11nExtBusy = ar9300_get_11n_ext_busy;
ah->ah_get11nExtBusy = ar9300_get_11n_ext_busy;
ah->ah_setDfsCacTxQuiet = ar9300_cac_tx_quiet;
/* Spectral Scan Functions */
ah->ah_spectralConfigure = ar9300_configure_spectral_scan;
@ -508,11 +704,16 @@ ar9300_proc_rx_desc_freebsd(struct ath_hal *ah, struct ath_desc *ds,
(void *) ds));
}
/*
* This is the primary way the ANI code gets the node statistics per packet.
*/
void
ar9300_ani_rxmonitor_freebsd(struct ath_hal *ah, const HAL_NODE_STATS *stats,
const struct ieee80211_channel *chan)
{
struct ath_hal_9300 *ahp = AH9300(ah);
ahp->ah_stats.ast_nodestats.ns_avgbrssi = stats->ns_avgbrssi;
}
void
@ -696,16 +897,6 @@ ar9300_freebsd_get_mib_cycle_counts(struct ath_hal *ah,
return (AH_FALSE);
}
HAL_BOOL
ar9300_freebsd_get_dfs_default_thresh(struct ath_hal *ah,
HAL_PHYERR_PARAM *pe)
{
/* XXX not yet */
return (AH_FALSE);
}
/*
* Clear multicast filter by index - from FreeBSD ar5212_recv.c
*/

View File

@ -26,7 +26,9 @@
#include "ar9300/ar9300.h"
#include "ar9300/ar9300reg.h"
#include "ar9300/ar9300phy.h"
#include "ar9300/ar9300desc.h"
static u_int32_t ar9300_read_loc_timer(struct ath_hal *ah);
void
ar9300_get_hw_hangs(struct ath_hal *ah, hal_hw_hangs_t *hangs)
@ -647,11 +649,12 @@ ar9300_set_quiet(struct ath_hal *ah, u_int32_t period, u_int32_t duration,
return status;
#undef TU_TO_USEC
}
#ifdef ATH_SUPPORT_DFS
//#ifdef ATH_SUPPORT_DFS
void
ar9300_cac_tx_quiet(struct ath_hal *ah, HAL_BOOL enable)
{
u32 reg1, reg2;
uint32_t reg1, reg2;
reg1 = OS_REG_READ(ah, AR_MAC_PCU_OFFSET(MAC_PCU_MISC_MODE));
reg2 = OS_REG_READ(ah, AR_MAC_PCU_OFFSET(MAC_PCU_QUIET_TIME_1));
@ -669,7 +672,7 @@ ar9300_cac_tx_quiet(struct ath_hal *ah, HAL_BOOL enable)
reg2 | AR_QUIET1_QUIET_ACK_CTS_ENABLE);
}
}
#endif /* ATH_SUPPORT_DFS */
//#endif /* ATH_SUPPORT_DFS */
void
ar9300_set_pcu_config(struct ath_hal *ah)
@ -947,6 +950,14 @@ ar9300_get_capability(struct ath_hal *ah, HAL_CAPABILITY_TYPE type,
return (HAL_ENOTSUPP);
(*result) = !! (ahp->ah_misc_mode & AR_PCU_TXOP_TBTT_LIMIT_ENA);
return (HAL_OK);
case HAL_CAP_TOA_LOCATIONING:
if (capability == 0)
return HAL_OK;
if (capability == 2) {
*result = ar9300_read_loc_timer(ah);
return (HAL_OK);
}
return HAL_ENOTSUPP;
default:
return ath_hal_getcapability(ah, type, capability, result);
}
@ -1060,6 +1071,14 @@ ar9300_set_capability(struct ath_hal *ah, HAL_CAPABILITY_TYPE type,
}
return AH_TRUE;
case HAL_CAP_TOA_LOCATIONING:
if (capability == 0)
return AH_TRUE;
if (capability == 1) {
ar9300_update_loc_ctl_reg(ah, setting);
return AH_TRUE;
}
return AH_FALSE;
/* fall thru... */
default:
return ath_hal_setcapability(ah, type, capability, setting, status);
@ -3855,6 +3874,13 @@ ar9300SetDfs3StreamFix(struct ath_hal *ah, u_int32_t val)
return AH_FALSE;
}
static u_int32_t
ar9300_read_loc_timer(struct ath_hal *ah)
{
return OS_REG_READ(ah, AR_LOC_TIMER_REG);
}
HAL_BOOL
ar9300_set_ctl_pwr(struct ath_hal *ah, u_int8_t *ctl_array)
{

View File

@ -235,7 +235,14 @@ ar9300_enable_dfs(struct ath_hal *ah, HAL_PHYERR_PARAM *pe)
int reg_writes = 0;
val = OS_REG_READ(ah, AR_PHY_RADAR_0);
val |= AR_PHY_RADAR_0_FFT_ENA | AR_PHY_RADAR_0_ENA;
val |= AR_PHY_RADAR_0_FFT_ENA;
if (pe->pe_enabled != HAL_PHYERR_PARAM_NOVAL) {
val &= ~AR_PHY_RADAR_0_ENA;
val |= SM(pe->pe_enabled, AR_PHY_RADAR_0_ENA);
}
if (pe->pe_firpwr != HAL_PHYERR_PARAM_NOVAL) {
val &= ~AR_PHY_RADAR_0_FIRPWR;
val |= SM(pe->pe_firpwr, AR_PHY_RADAR_0_FIRPWR);
@ -328,6 +335,7 @@ ar9300_get_dfs_thresh(struct ath_hal *ah, HAL_PHYERR_PARAM *pe)
pe->pe_height = MS(val, AR_PHY_RADAR_0_HEIGHT);
pe->pe_prssi = MS(val, AR_PHY_RADAR_0_PRSSI);
pe->pe_inband = MS(val, AR_PHY_RADAR_0_INBAND);
pe->pe_enabled = !! MS(val, AR_PHY_RADAR_0_ENA);
val = OS_REG_READ(ah, AR_PHY_RADAR_1);
@ -425,6 +433,23 @@ ar9300_get_dfs_radars(
return dfs_radars;
}
HAL_BOOL
ar9300_get_default_dfs_thresh(struct ath_hal *ah, HAL_PHYERR_PARAM *pe)
{
pe->pe_firpwr = AR9300_DFS_FIRPWR;
pe->pe_rrssi = AR9300_DFS_RRSSI;
pe->pe_height = AR9300_DFS_HEIGHT;
pe->pe_prssi = AR9300_DFS_PRSSI;
/* see prssi comment above */
pe->pe_inband = AR9300_DFS_INBAND;
pe->pe_relpwr = AR9300_DFS_RELPWR;
pe->pe_relstep = AR9300_DFS_RELSTEP;
pe->pe_maxlen = AR9300_DFS_MAXLEN;
return (AH_TRUE);
}
void ar9300_adjust_difs(struct ath_hal *ah, u_int32_t val)
{
if (val == 0) {

View File

@ -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;
@ -134,8 +141,8 @@ 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;

View File

@ -90,6 +90,29 @@ do { \
#define WAR_USB_DISABLE_PLL_LOCK_DETECT(__ah)
#endif
/*
* Note: the below is the version that ships with ath9k.
* The original HAL version is above.
*/
static void
ar9300_disable_pll_lock_detect(struct ath_hal *ah)
{
/*
* On AR9330 and AR9340 devices, some PHY registers must be
* tuned to gain better stability/performance. These registers
* might be changed while doing wlan reset so the registers must
* be reprogrammed after each reset.
*/
if (AR_SREV_HORNET(ah) || AR_SREV_WASP(ah)) {
HALDEBUG(ah, HAL_DEBUG_RESET, "%s: called\n", __func__);
OS_REG_CLR_BIT(ah, AR_PHY_USB_CTRL1, (1 << 20));
OS_REG_RMW(ah, AR_PHY_USB_CTRL2,
(1 << 21) | (0xf << 22),
(1 << 21) | (0x3 << 22));
}
}
static inline void
ar9300_attach_hw_platform(struct ath_hal *ah)
{
@ -1850,6 +1873,7 @@ ar9300_set_reset(struct ath_hal *ah, int type)
/* Clear AHB reset */
OS_REG_WRITE(ah, AR_HOSTIF_REG(ah, AR_RC), 0);
ar9300_disable_pll_lock_detect(ah);
ar9300_attach_hw_platform(ah);
@ -1984,6 +2008,7 @@ ar9300_phy_disable(struct ath_hal *ah)
ar9300_init_pll(ah, AH_NULL);
ar9300_disable_pll_lock_detect(ah);
return AH_TRUE;
}
@ -2468,15 +2493,23 @@ ar9300_calibration(struct ath_hal *ah, struct ieee80211_channel *chan, u_int8_t
chan->ic_state &= ~IEEE80211_CHANSTATE_CWINT;
if (nf_done) {
int ret;
/*
* Load the NF from history buffer of the current channel.
* NF is slow time-variant, so it is OK to use a historical value.
*/
ar9300_get_nf_hist_base(ah, ichan, is_scan, nf_buf);
ar9300_load_nf(ah, nf_buf);
ret = ar9300_load_nf(ah, nf_buf);
/* start NF calibration, without updating BB NF register*/
ar9300_start_nf_cal(ah);
/*
* If we failed the NF cal then tell the upper layer that we
* failed so we can do a full reset
*/
if (! ret)
return AH_FALSE;
}
}
return AH_TRUE;
@ -4263,11 +4296,11 @@ ar9300_init_user_settings(struct ath_hal *ah)
if (ahp->ah_beacon_rssi_threshold != 0) {
ar9300_set_hw_beacon_rssi_threshold(ah, ahp->ah_beacon_rssi_threshold);
}
#ifdef ATH_SUPPORT_DFS
//#ifdef ATH_SUPPORT_DFS
if (ahp->ah_cac_quiet_enabled) {
ar9300_cac_tx_quiet(ah, 1);
}
#endif /* ATH_SUPPORT_DFS */
//#endif /* ATH_SUPPORT_DFS */
}
int
@ -4454,6 +4487,7 @@ First_NFCal(struct ath_hal *ah, HAL_CHANNEL_INTERNAL *ichan,
ar9300_reset_nf_hist_buff(ah, ichan);
ar9300_get_nf_hist_base(ah, ichan, is_scan, nf_buf);
ar9300_load_nf(ah, nf_buf);
/* XXX TODO: handle failure from load_nf */
stats = 0;
} else {
stats = 1;
@ -4774,7 +4808,7 @@ ar9300_reset(struct ath_hal *ah, HAL_OPMODE opmode, struct ieee80211_channel *ch
* successfully - skip the rest of reset
*/
if (AH9300(ah)->ah_dma_stuck != AH_TRUE) {
WAR_USB_DISABLE_PLL_LOCK_DETECT(ah);
ar9300_disable_pll_lock_detect(ah);
#if ATH_SUPPORT_MCI
if (AH_PRIVATE(ah)->ah_caps.halMciSupport && ahp->ah_mci_ready)
{
@ -5278,6 +5312,7 @@ ar9300_reset(struct ath_hal *ah, HAL_OPMODE opmode, struct ieee80211_channel *ch
/* XXX FreeBSD is ichan appropariate? It was curchan.. */
ar9300_get_nf_hist_base(ah, ichan, is_scan, nf_buf);
ar9300_load_nf(ah, nf_buf);
/* XXX TODO: handle NF load failure */
if (nf_hist_buff_reset == 1)
{
nf_hist_buff_reset = 0;
@ -5350,7 +5385,7 @@ ar9300_reset(struct ath_hal *ah, HAL_OPMODE opmode, struct ieee80211_channel *ch
#undef REG_WRITE
#endif /* ATH_LOW_POWER_ENABLE */
WAR_USB_DISABLE_PLL_LOCK_DETECT(ah);
ar9300_disable_pll_lock_detect(ah);
/* H/W Green TX */
ar9300_control_signals_for_green_tx_mode(ah);

View File

@ -309,17 +309,27 @@ ar9300_noise_floor_power_get(struct ath_hal *ah, int freq_mhz, int ch)
void
ar9300_configure_spectral_scan(struct ath_hal *ah, HAL_SPECTRAL_PARAM *ss)
{
u_int32_t val, i;
u_int32_t val;
//uint32_t i;
struct ath_hal_9300 *ahp = AH9300(ah);
HAL_BOOL asleep = ahp->ah_chip_full_sleep;
int16_t nf_buf[HAL_NUM_NF_READINGS];
//int16_t nf_buf[HAL_NUM_NF_READINGS];
if ((AR_SREV_WASP(ah) || AR_SREV_SCORPION(ah)) && asleep) {
ar9300_set_power_mode(ah, HAL_PM_AWAKE, AH_TRUE);
}
HALDEBUG(ah, HAL_DEBUG_SPECTRAL, "%s: called\n", __func__);
HALDEBUG(ah, HAL_DEBUG_SPECTRAL, "ss_fft_period=%d\n", ss->ss_fft_period);
HALDEBUG(ah, HAL_DEBUG_SPECTRAL, "ss_period=%d\n", ss->ss_period);
HALDEBUG(ah, HAL_DEBUG_SPECTRAL, "ss_count=%d\n", ss->ss_count);
HALDEBUG(ah, HAL_DEBUG_SPECTRAL, "ss_short_report=%d\n", ss->ss_short_report);
HALDEBUG(ah, HAL_DEBUG_SPECTRAL, "ss_spectral_pri=%d\n", ss->ss_spectral_pri);
ar9300_prep_spectral_scan(ah);
#if 0
if (ss->ss_spectral_pri) {
for (i = 0; i < HAL_NUM_NF_READINGS; i++) {
nf_buf[i] = NOISE_PWR_DBM_2_INT(ss->ss_nf_cal[i]);
@ -333,6 +343,7 @@ ar9300_configure_spectral_scan(struct ath_hal *ah, HAL_SPECTRAL_PARAM *ss)
/*ar9300_disable_restart(ah);*/
#endif
}
#endif
val = OS_REG_READ(ah, AR_PHY_SPECTRAL_SCAN);
@ -364,18 +375,22 @@ ar9300_configure_spectral_scan(struct ath_hal *ah, HAL_SPECTRAL_PARAM *ss)
val |= SM(ss->ss_period, AR_PHY_SPECTRAL_SCAN_PERIOD);
}
if (ss->ss_short_report != HAL_SPECTRAL_PARAM_NOVAL) {
if (ss->ss_short_report == AH_TRUE) {
val |= AR_PHY_SPECTRAL_SCAN_SHORT_REPEAT;
} else {
val &= ~AR_PHY_SPECTRAL_SCAN_SHORT_REPEAT;
}
}
/* if noise power cal, force high priority */
if (ss->ss_spectral_pri != HAL_SPECTRAL_PARAM_NOVAL) {
if (ss->ss_spectral_pri) {
val |= AR_PHY_SPECTRAL_SCAN_PRIORITY_HI;
} else {
val &= ~AR_PHY_SPECTRAL_SCAN_PRIORITY_HI;
}
}
/* enable spectral scan */
OS_REG_WRITE(ah, AR_PHY_SPECTRAL_SCAN, val | AR_PHY_SPECTRAL_SCAN_ENABLE);
@ -400,6 +415,8 @@ ar9300_get_spectral_params(struct ath_hal *ah, HAL_SPECTRAL_PARAM *ss)
struct ath_hal_9300 *ahp = AH9300(ah);
HAL_BOOL asleep = ahp->ah_chip_full_sleep;
HALDEBUG(ah, HAL_DEBUG_SPECTRAL, "%s: called\n", __func__);
c = AH_PRIVATE(ah)->ah_curchan;
if (c != NULL)
chan = ath_hal_checkchannel(ah, c);
@ -416,6 +433,17 @@ ar9300_get_spectral_params(struct ath_hal *ah, HAL_SPECTRAL_PARAM *ss)
ss->ss_count = MS(val, AR_PHY_SPECTRAL_SCAN_COUNT);
ss->ss_short_report = (val & AR_PHY_SPECTRAL_SCAN_SHORT_REPEAT) ? 1:0;
ss->ss_spectral_pri = ( val & AR_PHY_SPECTRAL_SCAN_PRIORITY_HI) ? 1:0;
ss->ss_enabled = !! (val & AR_PHY_SPECTRAL_SCAN_ENABLE);
ss->ss_active = !! (val & AR_PHY_SPECTRAL_SCAN_ACTIVE);
HALDEBUG(ah, HAL_DEBUG_SPECTRAL, "ss_fft_period=%d\n", ss->ss_fft_period);
HALDEBUG(ah, HAL_DEBUG_SPECTRAL, "ss_period=%d\n", ss->ss_period);
HALDEBUG(ah, HAL_DEBUG_SPECTRAL, "ss_count=%d\n", ss->ss_count);
HALDEBUG(ah, HAL_DEBUG_SPECTRAL, "ss_short_report=%d\n", ss->ss_short_report);
HALDEBUG(ah, HAL_DEBUG_SPECTRAL, "ss_spectral_pri=%d\n", ss->ss_spectral_pri);
HALDEBUG(ah, HAL_DEBUG_SPECTRAL, "ss_enabled=%d\n", ss->ss_enabled);
HALDEBUG(ah, HAL_DEBUG_SPECTRAL, "ss_active=%d\n", ss->ss_active);
OS_MEMZERO(ss->ss_nf_cal, sizeof(ss->ss_nf_cal));
OS_MEMZERO(ss->ss_nf_pwr, sizeof(ss->ss_nf_cal));
ss->ss_nf_temp_data = 0;
@ -470,6 +498,8 @@ void ar9300_start_spectral_scan(struct ath_hal *ah)
ar9300_set_power_mode(ah, HAL_PM_AWAKE, AH_TRUE);
}
HALDEBUG(ah, HAL_DEBUG_SPECTRAL, "%s: called\n", __func__);
ar9300_prep_spectral_scan(ah);
/* activate spectral scan */

View File

@ -447,6 +447,8 @@ ar9300_reset_tx_queue(struct ath_hal *ah, u_int q)
*/
if (value < 10)
value = 10;
if (value < 0)
value = 10;
HALDEBUG(ah, HAL_DEBUG_TXQUEUE,
"%s: defaulting to rdytime = %d uS\n",
__func__, value);

View File

@ -335,6 +335,9 @@ ar9300_proc_tx_desc(struct ath_hal *ah, void *txstatus)
ts->ts_ba_low = ads->status5;
ts->ts_ba_high = ads->status6;
}
if (ads->status8 & AR_tx_fast_ts) {
ts->ts_flags |= HAL_TX_FAST_TS;
}
/*
* Extract the transmit rate.
@ -624,6 +627,11 @@ ar9300_set_11n_tx_desc(
ads->ds_ctl18 = 0;
ads->ds_ctl19 = AR_not_sounding; /* set not sounding for normal frame */
/* ToA/ToD positioning */
if (flags & HAL_TXDESC_POS) {
ads->ds_ctl12 |= AR_loc_mode;
ads->ds_ctl19 &= ~AR_not_sounding;
}
/*
* Clear Ness1/2/3 (Number of Extension Spatial Streams) fields.

View File

@ -139,7 +139,7 @@ enum Ar9300EepromTemplate
#define OSPREY_CUSTOMER_DATA_SIZE 20
#define FREQ2FBIN(x,y) \
(((y) == HAL_FREQ_BAND_2GHZ) ? ((x) - 2300) : (((x) - 4800) / 5))
(u_int8_t)(((y) == HAL_FREQ_BAND_2GHZ) ? ((x) - 2300) : (((x) - 4800) / 5))
#define FBIN2FREQ(x,y) \
(((y) == HAL_FREQ_BAND_2GHZ) ? (2300 + x) : (4800 + 5 * x))
#define OSPREY_MAX_CHAINS 3

View File

@ -222,6 +222,7 @@
#define AR_PHY_TIMING5_RSSI_THR1A_ENA (0x1 << 15)
/* BB_radar_detection) */
#define AR_PHY_RADAR_0_ENA 0x00000001 /* Enable radar detection */
#define AR_PHY_RADAR_0_ENA_S 0
#define AR_PHY_RADAR_0_FFT_ENA 0x80000000 /* Enable FFT data */
#define AR_PHY_RADAR_0_INBAND 0x0000003e /* Inband pulse threshold */
#define AR_PHY_RADAR_0_INBAND_S 1
@ -1882,6 +1883,12 @@
#define AR_PHY_PLL_BB_DPLL3 AR_PHY_65NM(overlay_0x16180.Osprey.ch0_bb_dpll3)
#define AR_PHY_PLL_BB_DPLL4 AR_PHY_65NM(overlay_0x16180.Osprey.ch0_bb_dpll4)
/*
* Wasp/Hornet PHY USB PLL control
*/
#define AR_PHY_USB_CTRL1 0x16c84
#define AR_PHY_USB_CTRL2 0x16c88
/*
* PMU Register Map
*/

View File

@ -1,4 +1,6 @@
/*-
* SPDX-License-Identifier: BSD-2-Clause-FreeBSD
*
* Copyright (c) 2002-2008 Sam Leffler, Errno Consulting
* All rights reserved.
*
@ -26,7 +28,7 @@
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
* THE POSSIBILITY OF SUCH DAMAGES.
*
* $FreeBSD: releng/11.1/sys/dev/ath/ah_osdep.c 293111 2016-01-03 17:58:11Z adrian $
* $FreeBSD: releng/12.0/sys/dev/ath/ah_osdep.c 326255 2017-11-27 14:52:40Z pfg $
*/
#include "opt_ah.h"
@ -41,6 +43,7 @@
#include <sys/pcpu.h>
#include <sys/lock.h>
#include <sys/mutex.h>
#include <sys/conf.h>
#include <machine/stdarg.h>
@ -70,15 +73,9 @@
* XXX This is a global lock for now; it should be pushed to
* a per-device lock in some platform-independent fashion.
*/
#ifndef __HAIKU__
struct mtx ah_regser_mtx;
MTX_SYSINIT(ah_regser, &ah_regser_mtx, "Atheros register access mutex",
MTX_SPIN);
#else
spinlock ah_regser_mtx = B_SPINLOCK_INITIALIZER;
#define mtx_lock_spin(a) acquire_spinlock(a)
#define mtx_unlock_spin(a) release_spinlock(a)
#endif
extern void ath_hal_printf(struct ath_hal *, const char*, ...)
__printflike(2,3);
@ -426,3 +423,33 @@ ath_hal_assert_failed(const char* filename, int lineno, const char *msg)
panic("ath_hal_assert");
}
#endif /* AH_ASSERT */
static int
ath_hal_modevent(module_t mod __unused, int type, void *data __unused)
{
int error = 0;
switch (type) {
case MOD_LOAD:
printf("[ath_hal] loaded\n");
break;
case MOD_UNLOAD:
printf("[ath_hal] unloaded\n");
break;
case MOD_SHUTDOWN:
break;
default:
error = EOPNOTSUPP;
break;
}
return (error);
}
MODULE_VERSION(ath_hal, 1);
#if defined(AH_DEBUG_ALQ)
MODULE_DEPEND(ath_hal, alq, 1, 1, 1);
#endif

View File

@ -1,4 +1,6 @@
/*-
* SPDX-License-Identifier: BSD-2-Clause-FreeBSD
*
* Copyright (c) 2002-2008 Sam Leffler, Errno Consulting
* All rights reserved.
*
@ -26,7 +28,7 @@
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
* THE POSSIBILITY OF SUCH DAMAGES.
*
* $FreeBSD: releng/11.1/sys/dev/ath/ah_osdep.h 293111 2016-01-03 17:58:11Z adrian $
* $FreeBSD: releng/12.0/sys/dev/ath/ah_osdep.h 326255 2017-11-27 14:52:40Z pfg $
*/
#ifndef _ATH_AH_OSDEP_H_
#define _ATH_AH_OSDEP_H_

View File

@ -1,4 +1,6 @@
/*-
* SPDX-License-Identifier: BSD-2-Clause-FreeBSD
*
* Copyright (c) 2011 Adrian Chadd, Xenion Pty Ltd
* All rights reserved.
*
@ -26,10 +28,10 @@
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
* THE POSSIBILITY OF SUCH DAMAGES.
*
* $FreeBSD: releng/11.1/sys/dev/ath/ath_dfs/null/dfs_null.c 298939 2016-05-02 19:56:48Z pfg $
* $FreeBSD: releng/12.0/sys/dev/ath/ath_dfs/null/dfs_null.c 326255 2017-11-27 14:52:40Z pfg $
*/
#include <sys/cdefs.h>
__FBSDID("$FreeBSD: releng/11.1/sys/dev/ath/ath_dfs/null/dfs_null.c 298939 2016-05-02 19:56:48Z pfg $");
__FBSDID("$FreeBSD: releng/12.0/sys/dev/ath/ath_dfs/null/dfs_null.c 326255 2017-11-27 14:52:40Z pfg $");
/*
* This implements an empty DFS module.
@ -102,7 +104,7 @@ ath_dfs_detach(struct ath_softc *sc)
int
ath_dfs_radar_enable(struct ath_softc *sc, struct ieee80211_channel *chan)
{
#if 0
#if 1
HAL_PHYERR_PARAM pe;
/* Check if the hardware supports radar reporting */
@ -155,7 +157,7 @@ ath_dfs_radar_enable(struct ath_softc *sc, struct ieee80211_channel *chan)
int
ath_dfs_radar_disable(struct ath_softc *sc)
{
#if 0
#if 1
HAL_PHYERR_PARAM pe;
(void) ath_hal_getdfsthresh(sc->sc_ah, &pe);

View File

@ -1,4 +1,6 @@
/*
/*-
* SPDX-License-Identifier: ISC
*
* Copyright (c) 2002-2009 Sam Leffler, Errno Consulting
* Copyright (c) 2002-2008 Atheros Communications, Inc.
*
@ -14,7 +16,7 @@
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
* $FreeBSD: releng/11.1/sys/dev/ath/ath_hal/ah.c 298939 2016-05-02 19:56:48Z pfg $
* $FreeBSD: releng/12.0/sys/dev/ath/ath_hal/ah.c 326695 2017-12-08 15:57:29Z pfg $
*/
#include "opt_ah.h"
@ -28,6 +30,23 @@
/* linker set of registered chips */
OS_SET_DECLARE(ah_chips, struct ath_hal_chip);
TAILQ_HEAD(, ath_hal_chip) ah_chip_list = TAILQ_HEAD_INITIALIZER(ah_chip_list);
int
ath_hal_add_chip(struct ath_hal_chip *ahc)
{
TAILQ_INSERT_TAIL(&ah_chip_list, ahc, node);
return (0);
}
int
ath_hal_remove_chip(struct ath_hal_chip *ahc)
{
TAILQ_REMOVE(&ah_chip_list, ahc, node);
return (0);
}
/*
* Check the set of registered chips to see if any recognize
@ -37,12 +56,22 @@ const char*
ath_hal_probe(uint16_t vendorid, uint16_t devid)
{
struct ath_hal_chip * const *pchip;
struct ath_hal_chip *pc;
/* Linker set */
OS_SET_FOREACH(pchip, ah_chips) {
const char *name = (*pchip)->probe(vendorid, devid);
if (name != AH_NULL)
return name;
}
/* List */
TAILQ_FOREACH(pc, &ah_chip_list, node) {
const char *name = pc->probe(vendorid, devid);
if (name != AH_NULL)
return name;
}
return AH_NULL;
}
@ -60,6 +89,7 @@ ath_hal_attach(uint16_t devid, HAL_SOFTC sc,
HAL_STATUS *error)
{
struct ath_hal_chip * const *pchip;
struct ath_hal_chip *pc;
OS_SET_FOREACH(pchip, ah_chips) {
struct ath_hal_chip *chip = *pchip;
@ -82,6 +112,30 @@ ath_hal_attach(uint16_t devid, HAL_SOFTC sc,
return ah;
}
}
/* List */
TAILQ_FOREACH(pc, &ah_chip_list, node) {
struct ath_hal_chip *chip = pc;
struct ath_hal *ah;
/* XXX don't have vendorid, assume atheros one works */
if (chip->probe(ATHEROS_VENDOR_ID, devid) == AH_NULL)
continue;
ah = chip->attach(devid, sc, st, sh, eepromdata, ah_config,
error);
if (ah != AH_NULL) {
/* copy back private state to public area */
ah->ah_devid = AH_PRIVATE(ah)->ah_devid;
ah->ah_subvendorid = AH_PRIVATE(ah)->ah_subvendorid;
ah->ah_macVersion = AH_PRIVATE(ah)->ah_macVersion;
ah->ah_macRev = AH_PRIVATE(ah)->ah_macRev;
ah->ah_phyRev = AH_PRIVATE(ah)->ah_phyRev;
ah->ah_analog5GhzRev = AH_PRIVATE(ah)->ah_analog5GhzRev;
ah->ah_analog2GhzRev = AH_PRIVATE(ah)->ah_analog2GhzRev;
return ah;
}
}
return AH_NULL;
}
@ -160,6 +214,23 @@ ath_hal_getwirelessmodes(struct ath_hal*ah)
/* linker set of registered RF backends */
OS_SET_DECLARE(ah_rfs, struct ath_hal_rf);
TAILQ_HEAD(, ath_hal_rf) ah_rf_list = TAILQ_HEAD_INITIALIZER(ah_rf_list);
int
ath_hal_add_rf(struct ath_hal_rf *arf)
{
TAILQ_INSERT_TAIL(&ah_rf_list, arf, node);
return (0);
}
int
ath_hal_remove_rf(struct ath_hal_rf *arf)
{
TAILQ_REMOVE(&ah_rf_list, arf, node);
return (0);
}
/*
* Check the set of registered RF backends to see if
@ -169,12 +240,18 @@ struct ath_hal_rf *
ath_hal_rfprobe(struct ath_hal *ah, HAL_STATUS *ecode)
{
struct ath_hal_rf * const *prf;
struct ath_hal_rf * rf;
OS_SET_FOREACH(prf, ah_rfs) {
struct ath_hal_rf *rf = *prf;
if (rf->probe(ah))
return rf;
}
TAILQ_FOREACH(rf, &ah_rf_list, node) {
if (rf->probe(ah))
return rf;
}
*ecode = HAL_ENOTSUPP;
return AH_NULL;
}
@ -227,7 +304,7 @@ ath_hal_rf_name(struct ath_hal *ah)
HAL_BOOL
ath_hal_wait(struct ath_hal *ah, u_int reg, uint32_t mask, uint32_t val)
{
#define AH_TIMEOUT 1000
#define AH_TIMEOUT 5000
return ath_hal_waitfor(ah, reg, mask, val, AH_TIMEOUT);
#undef AH_TIMEOUT
}
@ -275,7 +352,7 @@ ath_hal_reverseBits(uint32_t val, uint32_t n)
#define HT_STF 4
#define HT_LTF(n) ((n) * 4)
#define HT_RC_2_MCS(_rc) ((_rc) & 0xf)
#define HT_RC_2_MCS(_rc) ((_rc) & 0x1f)
#define HT_RC_2_STREAMS(_rc) ((((_rc) & 0x78) >> 3) + 1)
#define IS_HT_RATE(_rc) ( (_rc) & IEEE80211_RATE_MCS)
@ -284,7 +361,8 @@ ath_hal_reverseBits(uint32_t val, uint32_t n)
*/
uint32_t
ath_hal_pkt_txtime(struct ath_hal *ah, const HAL_RATE_TABLE *rates, uint32_t frameLen,
uint16_t rateix, HAL_BOOL isht40, HAL_BOOL shortPreamble)
uint16_t rateix, HAL_BOOL isht40, HAL_BOOL shortPreamble,
HAL_BOOL includeSifs)
{
uint8_t rc;
int numStreams;
@ -293,7 +371,8 @@ ath_hal_pkt_txtime(struct ath_hal *ah, const HAL_RATE_TABLE *rates, uint32_t fra
/* Legacy rate? Return the old way */
if (! IS_HT_RATE(rc))
return ath_hal_computetxtime(ah, rates, frameLen, rateix, shortPreamble);
return ath_hal_computetxtime(ah, rates, frameLen, rateix,
shortPreamble, includeSifs);
/* 11n frame - extract out the number of spatial streams */
numStreams = HT_RC_2_STREAMS(rc);
@ -301,7 +380,9 @@ ath_hal_pkt_txtime(struct ath_hal *ah, const HAL_RATE_TABLE *rates, uint32_t fra
("number of spatial streams needs to be 1..3: MCS rate 0x%x!",
rateix));
return ath_computedur_ht(frameLen, rc, numStreams, isht40, shortPreamble);
/* XXX TODO: Add SIFS */
return ath_computedur_ht(frameLen, rc, numStreams, isht40,
shortPreamble);
}
static const uint16_t ht20_bps[32] = {
@ -330,9 +411,9 @@ ath_computedur_ht(uint32_t frameLen, uint16_t rate, int streams,
KASSERT((rate &~ IEEE80211_RATE_MCS) < 31, ("bad mcs 0x%x", rate));
if (isht40)
bitsPerSymbol = ht40_bps[rate & 0x1f];
bitsPerSymbol = ht40_bps[HT_RC_2_MCS(rate)];
else
bitsPerSymbol = ht20_bps[rate & 0x1f];
bitsPerSymbol = ht20_bps[HT_RC_2_MCS(rate)];
numBits = OFDM_PLCP_BITS + (frameLen << 3);
numSymbols = howmany(numBits, bitsPerSymbol);
if (isShortGI)
@ -350,7 +431,7 @@ ath_computedur_ht(uint32_t frameLen, uint16_t rate, int streams,
uint16_t
ath_hal_computetxtime(struct ath_hal *ah,
const HAL_RATE_TABLE *rates, uint32_t frameLen, uint16_t rateix,
HAL_BOOL shortPreamble)
HAL_BOOL shortPreamble, HAL_BOOL includeSifs)
{
uint32_t bitsPerSymbol, numBits, numSymbols, phyTime, txTime;
uint32_t kbps;
@ -373,8 +454,10 @@ ath_hal_computetxtime(struct ath_hal *ah,
if (shortPreamble && rates->info[rateix].shortPreamble)
phyTime >>= 1;
numBits = frameLen << 3;
txTime = CCK_SIFS_TIME + phyTime
txTime = phyTime
+ ((numBits * 1000)/kbps);
if (includeSifs)
txTime += CCK_SIFS_TIME;
break;
case IEEE80211_T_OFDM:
bitsPerSymbol = (kbps * OFDM_SYMBOL_TIME) / 1000;
@ -382,9 +465,10 @@ ath_hal_computetxtime(struct ath_hal *ah,
numBits = OFDM_PLCP_BITS + (frameLen << 3);
numSymbols = howmany(numBits, bitsPerSymbol);
txTime = OFDM_SIFS_TIME
+ OFDM_PREAMBLE_TIME
txTime = OFDM_PREAMBLE_TIME
+ (numSymbols * OFDM_SYMBOL_TIME);
if (includeSifs)
txTime += OFDM_SIFS_TIME;
break;
case IEEE80211_T_OFDM_HALF:
bitsPerSymbol = (kbps * OFDM_HALF_SYMBOL_TIME) / 1000;
@ -392,9 +476,10 @@ ath_hal_computetxtime(struct ath_hal *ah,
numBits = OFDM_HALF_PLCP_BITS + (frameLen << 3);
numSymbols = howmany(numBits, bitsPerSymbol);
txTime = OFDM_HALF_SIFS_TIME
+ OFDM_HALF_PREAMBLE_TIME
txTime = OFDM_HALF_PREAMBLE_TIME
+ (numSymbols * OFDM_HALF_SYMBOL_TIME);
if (includeSifs)
txTime += OFDM_HALF_SIFS_TIME;
break;
case IEEE80211_T_OFDM_QUARTER:
bitsPerSymbol = (kbps * OFDM_QUARTER_SYMBOL_TIME) / 1000;
@ -402,9 +487,10 @@ ath_hal_computetxtime(struct ath_hal *ah,
numBits = OFDM_QUARTER_PLCP_BITS + (frameLen << 3);
numSymbols = howmany(numBits, bitsPerSymbol);
txTime = OFDM_QUARTER_SIFS_TIME
+ OFDM_QUARTER_PREAMBLE_TIME
txTime = OFDM_QUARTER_PREAMBLE_TIME
+ (numSymbols * OFDM_QUARTER_SYMBOL_TIME);
if (includeSifs)
txTime += OFDM_QUARTER_SIFS_TIME;
break;
case IEEE80211_T_TURBO:
bitsPerSymbol = (kbps * TURBO_SYMBOL_TIME) / 1000;
@ -412,9 +498,10 @@ ath_hal_computetxtime(struct ath_hal *ah,
numBits = TURBO_PLCP_BITS + (frameLen << 3);
numSymbols = howmany(numBits, bitsPerSymbol);
txTime = TURBO_SIFS_TIME
+ TURBO_PREAMBLE_TIME
txTime = TURBO_PREAMBLE_TIME
+ (numSymbols * TURBO_SYMBOL_TIME);
if (includeSifs)
txTime += TURBO_SIFS_TIME;
break;
default:
HALDEBUG(ah, HAL_DEBUG_PHYIO,
@ -480,6 +567,11 @@ typedef enum {
WIRELESS_MODE_MAX
} WIRELESS_MODE;
/*
* XXX TODO: for some (?) chips, an 11b mode still runs at 11bg.
* Maybe AR5211 has separate 11b and 11g only modes, so 11b is 22MHz
* and 11g is 44MHz, but AR5416 and later run 11b in 11bg mode, right?
*/
static WIRELESS_MODE
ath_hal_chan2wmode(struct ath_hal *ah, const struct ieee80211_channel *chan)
{
@ -532,23 +624,35 @@ ath_hal_mac_clks(struct ath_hal *ah, u_int usecs)
u_int
ath_hal_mac_usec(struct ath_hal *ah, u_int clks)
{
uint64_t psec;
psec = ath_hal_mac_psec(ah, clks);
return (psec / 1000000);
}
/*
* XXX TODO: half, quarter rates.
*/
uint64_t
ath_hal_mac_psec(struct ath_hal *ah, u_int clks)
{
const struct ieee80211_channel *c = AH_PRIVATE(ah)->ah_curchan;
u_int usec;
uint64_t psec;
/* NB: ah_curchan may be null when called attach time */
/* XXX merlin and later specific workaround - 5ghz fast clock is 44 */
if (c != AH_NULL && IS_5GHZ_FAST_CLOCK_EN(ah, c)) {
usec = clks / CLOCK_FAST_RATE_5GHZ_OFDM;
psec = (clks * 1000000ULL) / CLOCK_FAST_RATE_5GHZ_OFDM;
if (IEEE80211_IS_CHAN_HT40(c))
usec >>= 1;
psec >>= 1;
} else if (c != AH_NULL) {
usec = clks / CLOCK_RATE[ath_hal_chan2wmode(ah, c)];
psec = (clks * 1000000ULL) / CLOCK_RATE[ath_hal_chan2wmode(ah, c)];
if (IEEE80211_IS_CHAN_HT40(c))
usec >>= 1;
psec >>= 1;
} else
usec = clks / CLOCK_RATE[WIRELESS_MODE_11b];
return usec;
psec = (clks * 1000000ULL) / CLOCK_RATE[WIRELESS_MODE_11b];
return psec;
}
/*
@ -588,9 +692,9 @@ ath_hal_setupratetable(struct ath_hal *ah, HAL_RATE_TABLE *rt)
* 2Mb/s rate which will work but is suboptimal
*/
rt->info[i].lpAckDuration = ath_hal_computetxtime(ah, rt,
WLAN_CTRL_FRAME_SIZE, cix, AH_FALSE);
WLAN_CTRL_FRAME_SIZE, cix, AH_FALSE, AH_TRUE);
rt->info[i].spAckDuration = ath_hal_computetxtime(ah, rt,
WLAN_CTRL_FRAME_SIZE, cix, AH_TRUE);
WLAN_CTRL_FRAME_SIZE, cix, AH_TRUE, AH_TRUE);
}
#undef N
}
@ -749,7 +853,7 @@ ath_hal_getcapability(struct ath_hal *ah, HAL_CAPABILITY_TYPE type,
case HAL_CAP_HT20_SGI:
return pCap->halHTSGI20Support ? HAL_OK : HAL_ENOTSUPP;
case HAL_CAP_RXTSTAMP_PREC: /* rx desc tstamp precision (bits) */
*result = pCap->halTstampPrecision;
*result = pCap->halRxTstampPrecision;
return HAL_OK;
case HAL_CAP_ANT_DIV_COMB: /* AR9285/AR9485 LNA diversity */
return pCap->halAntDivCombSupport ? HAL_OK : HAL_ENOTSUPP;
@ -778,8 +882,6 @@ ath_hal_getcapability(struct ath_hal *ah, HAL_CAPABILITY_TYPE type,
}
case HAL_CAP_RXDESC_SELFLINK: /* hardware supports self-linked final RX descriptors correctly */
return pCap->halHasRxSelfLinkedTail ? HAL_OK : HAL_ENOTSUPP;
case HAL_CAP_LONG_RXDESC_TSF: /* 32 bit TSF in RX descriptor? */
return pCap->halHasLongRxDescTsf ? HAL_OK : HAL_ENOTSUPP;
case HAL_CAP_BB_READ_WAR: /* Baseband read WAR */
return pCap->halHasBBReadWar? HAL_OK : HAL_ENOTSUPP;
case HAL_CAP_SERIALISE_WAR: /* PCI register serialisation */
@ -791,6 +893,9 @@ ath_hal_getcapability(struct ath_hal *ah, HAL_CAPABILITY_TYPE type,
return pCap->halRxUsingLnaMixing ? HAL_OK : HAL_ENOTSUPP;
case HAL_CAP_DO_MYBEACON: /* Hardware supports filtering my-beacons */
return pCap->halRxDoMyBeacon ? HAL_OK : HAL_ENOTSUPP;
case HAL_CAP_TXTSTAMP_PREC: /* tx desc tstamp precision (bits) */
*result = pCap->halTxTstampPrecision;
return HAL_OK;
default:
return HAL_EINVAL;
}
@ -1085,7 +1190,6 @@ ath_hal_get_mimo_chan_noise(struct ath_hal *ah,
const struct ieee80211_channel *chan, int16_t *nf_ctl,
int16_t *nf_ext)
{
#ifdef AH_SUPPORT_AR5416
HAL_CHANNEL_INTERNAL *ichan;
int i;
@ -1140,9 +1244,6 @@ ath_hal_get_mimo_chan_noise(struct ath_hal *ah,
}
return 1;
}
#else
return 0;
#endif /* AH_SUPPORT_AR5416 */
}
/*
@ -1387,6 +1488,9 @@ ath_hal_setcca(struct ath_hal *ah, int ena)
/*
* Get CCA setting.
*
* XXX TODO: turn this and the above function into methods
* in case there are chipset differences in handling CCA.
*/
int
ath_hal_getcca(struct ath_hal *ah)
@ -1397,6 +1501,21 @@ ath_hal_getcca(struct ath_hal *ah)
return ((diag & 0x500000) == 0);
}
/*
* Set the current state of self-generated ACK and RTS/CTS frames.
*
* For correct DFS operation, the device should not even /ACK/ frames
* that are sent to it during CAC or CSA.
*/
void
ath_hal_set_dfs_cac_tx_quiet(struct ath_hal *ah, HAL_BOOL ena)
{
if (ah->ah_setDfsCacTxQuiet == NULL)
return;
ah->ah_setDfsCacTxQuiet(ah, ena);
}
/*
* This routine is only needed when supporting EEPROM-in-RAM setups
* (eg embedded SoCs and on-board PCI/PCIe devices.)

View File

@ -1,4 +1,6 @@
/*
/*-
* SPDX-License-Identifier: ISC
*
* Copyright (c) 2002-2009 Sam Leffler, Errno Consulting
* Copyright (c) 2002-2008 Atheros Communications, Inc.
*
@ -14,7 +16,7 @@
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
* $FreeBSD: releng/11.1/sys/dev/ath/ath_hal/ah.h 301043 2016-05-31 16:08:06Z adrian $
* $FreeBSD: releng/12.0/sys/dev/ath/ath_hal/ah.h 334197 2018-05-25 01:27:39Z adrian $
*/
#ifndef _ATH_AH_H_
@ -194,12 +196,13 @@ typedef enum {
HAL_CAP_BSSIDMATCH = 238, /* hardware has disable bssid match */
HAL_CAP_STREAMS = 239, /* how many 802.11n spatial streams are available */
HAL_CAP_RXDESC_SELFLINK = 242, /* support a self-linked tail RX descriptor */
HAL_CAP_LONG_RXDESC_TSF = 243, /* hardware supports 32bit TSF in RX descriptor */
HAL_CAP_BB_READ_WAR = 244, /* baseband read WAR */
HAL_CAP_SERIALISE_WAR = 245, /* serialise register access on PCI */
HAL_CAP_ENFORCE_TXOP = 246, /* Enforce TXOP if supported */
HAL_CAP_RX_LNA_MIXING = 247, /* RX hardware uses LNA mixing */
HAL_CAP_DO_MYBEACON = 248, /* Supports HAL_RX_FILTER_MYBEACON */
HAL_CAP_TOA_LOCATIONING = 249, /* time of flight / arrival locationing */
HAL_CAP_TXTSTAMP_PREC = 250, /* tx desc tstamp precision (bits) */
} HAL_CAPABILITY_TYPE;
/*
@ -634,7 +637,8 @@ typedef enum {
REG_EXT_JAPAN_MIDBAND = 1,
REG_EXT_FCC_DFS_HT40 = 2,
REG_EXT_JAPAN_NONDFS_HT40 = 3,
REG_EXT_JAPAN_DFS_HT40 = 4
REG_EXT_JAPAN_DFS_HT40 = 4,
REG_EXT_FCC_CH_144 = 5,
} REG_EXT_BITMAP;
enum {
@ -759,6 +763,12 @@ typedef enum {
HAL_RESET_FORCE_COLD = 2, /* Force full reset */
} HAL_RESET_TYPE;
enum {
HAL_RESET_POWER_ON,
HAL_RESET_WARM,
HAL_RESET_COLD
};
typedef struct {
uint8_t kv_type; /* one of HAL_CIPHER */
uint8_t kv_apsd; /* Mask for APSD enabled ACs */
@ -1393,6 +1403,7 @@ struct ath_hal {
struct ath_rx_status *rxs, uint64_t fulltsf,
const char *buf, HAL_DFS_EVENT *event);
HAL_BOOL __ahdecl(*ah_isFastClockEnabled)(struct ath_hal *ah);
void __ahdecl(*ah_setDfsCacTxQuiet)(struct ath_hal *, HAL_BOOL);
/* Spectral Scan functions */
void __ahdecl(*ah_spectralConfigure)(struct ath_hal *ah,
@ -1625,7 +1636,8 @@ extern int ath_hal_get_curmode(struct ath_hal *ah,
*/
extern uint32_t __ahdecl ath_hal_pkt_txtime(struct ath_hal *ah,
const HAL_RATE_TABLE *rates, uint32_t frameLen,
uint16_t rateix, HAL_BOOL isht40, HAL_BOOL shortPreamble);
uint16_t rateix, HAL_BOOL isht40, HAL_BOOL shortPreamble,
HAL_BOOL includeSifs);
/*
* Calculate the duration of an 11n frame.
@ -1638,7 +1650,8 @@ extern uint32_t __ahdecl ath_computedur_ht(uint32_t frameLen, uint16_t rate,
*/
extern uint16_t __ahdecl ath_hal_computetxtime(struct ath_hal *,
const HAL_RATE_TABLE *rates, uint32_t frameLen,
uint16_t rateix, HAL_BOOL shortPreamble);
uint16_t rateix, HAL_BOOL shortPreamble,
HAL_BOOL includeSifs);
/*
* Adjust the TSF.
@ -1655,6 +1668,11 @@ void __ahdecl ath_hal_setcca(struct ath_hal *ah, int ena);
*/
int __ahdecl ath_hal_getcca(struct ath_hal *ah);
/*
* Enable/disable and get self-gen frame (ACK, CTS) for CAC.
*/
void __ahdecl ath_hal_set_dfs_cac_tx_quiet(struct ath_hal *ah, HAL_BOOL ena);
/*
* Read EEPROM data from ah_eepromdata
*/
@ -1671,4 +1689,11 @@ ath_hal_get_mfp_qos(struct ath_hal *ah)
return HAL_MFP_QOSDATA;
}
/*
* Convert between microseconds and core system clocks.
*/
extern u_int ath_hal_mac_clks(struct ath_hal *ah, u_int usecs);
extern u_int ath_hal_mac_usec(struct ath_hal *ah, u_int clks);
extern uint64_t ath_hal_mac_psec(struct ath_hal *ah, u_int clks);
#endif /* _ATH_AH_H_ */

View File

@ -1,4 +1,6 @@
/*
/*-
* SPDX-License-Identifier: ISC
*
* Copyright (c) 2014 Qualcomm Atheros, Inc.
* All Rights Reserved.
*
@ -14,7 +16,7 @@
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
* $FreeBSD: releng/11.1/sys/dev/ath/ath_hal/ah_btcoex.h 301303 2016-06-04 07:28:09Z adrian $
* $FreeBSD: releng/12.0/sys/dev/ath/ath_hal/ah_btcoex.h 326695 2017-12-08 15:57:29Z pfg $
*/
#ifndef __ATH_HAL_BTCOEX_H__
#define __ATH_HAL_BTCOEX_H__

View File

@ -1,4 +1,6 @@
/*
/*-
* SPDX-License-Identifier: ISC
*
* Copyright (c) 2008 Sam Leffler, Errno Consulting
* Copyright (c) 2008 Atheros Communications, Inc.
*
@ -14,7 +16,7 @@
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
* $FreeBSD: releng/11.1/sys/dev/ath/ath_hal/ah_debug.h 249131 2013-04-05 07:41:47Z adrian $
* $FreeBSD: releng/12.0/sys/dev/ath/ath_hal/ah_debug.h 326695 2017-12-08 15:57:29Z pfg $
*/
#ifndef _ATH_AH_DEBUG_H_
#define _ATH_AH_DEBUG_H_
@ -54,6 +56,7 @@ enum {
HAL_DEBUG_PRINT_REG = 0x08000000,
HAL_DEBUG_FCS_RTT = 0x10000000,
HAL_DEBUG_BT_COEX = 0x20000000,
HAL_DEBUG_SPECTRAL = 0x40000000,
HAL_DEBUG_UNMASKABLE = 0x80000000, /* always printed */
HAL_DEBUG_ANY = 0xffffffff

View File

@ -1,4 +1,6 @@
/*
/*-
* SPDX-License-Identifier: ISC
*
* Copyright (c) 2002-2008 Sam Leffler, Errno Consulting
* Copyright (c) 2002-2008 Atheros Communications, Inc.
*
@ -14,7 +16,7 @@
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
* $FreeBSD: releng/11.1/sys/dev/ath/ath_hal/ah_decode.h 269749 2014-08-09 09:13:10Z adrian $
* $FreeBSD: releng/12.0/sys/dev/ath/ath_hal/ah_decode.h 326695 2017-12-08 15:57:29Z pfg $
*/
#ifndef _ATH_AH_DECODE_H_
#define _ATH_AH_DECODE_H_

View File

@ -1,4 +1,6 @@
/*
/*-
* SPDX-License-Identifier: ISC
*
* Copyright (c) 2002-2008 Sam Leffler, Errno Consulting
* Copyright (c) 2002-2008 Atheros Communications, Inc.
*
@ -14,27 +16,12 @@
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
* $FreeBSD: releng/11.1/sys/dev/ath/ath_hal/ah_desc.h 301041 2016-05-31 16:05:54Z adrian $
* $FreeBSD: releng/12.0/sys/dev/ath/ath_hal/ah_desc.h 326695 2017-12-08 15:57:29Z pfg $
*/
#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
@ -46,7 +33,8 @@
*/
struct ath_tx_status {
uint16_t ts_seqnum; /* h/w assigned sequence number */
uint16_t ts_tstamp; /* h/w assigned timestamp */
uint16_t ts_pad1[1];
uint32_t ts_tstamp; /* h/w assigned timestamp */
uint8_t ts_status; /* frame status, 0 => xmit ok */
uint8_t ts_rate; /* h/w transmit rate index */
int8_t ts_rssi; /* tx ack RSSI */
@ -55,7 +43,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 */
@ -70,7 +57,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 */
@ -86,6 +72,7 @@ struct ath_tx_status {
#define HAL_TX_DESC_CFG_ERR 0x10 /* Error in 20/40 desc config */
#define HAL_TX_DATA_UNDERRUN 0x20 /* Tx buffer underrun */
#define HAL_TX_DELIM_UNDERRUN 0x40 /* Tx delimiter underrun */
#define HAL_TX_FAST_TS 0x80 /* Tx locationing timestamp */
/*
* Receive descriptor status. This structure is filled
@ -119,7 +106,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] */
@ -128,12 +114,14 @@ struct ath_rx_status {
uint16_t rs_flags; /* misc flags */
uint8_t rs_num_delims; /* number of delims in aggr */
uint8_t rs_spare0; /* padding */
uint8_t rs_ness; /* number of extension spatial streams */
uint8_t rs_hw_upload_data_type; /* hw upload format */
uint16_t rs_spare1;
uint32_t rs_evm0; /* evm bytes */
uint32_t rs_evm1;
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 */
@ -156,6 +144,11 @@ struct ath_rx_status {
#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 */
#define HAL_RX_LOC_INFO 0x0400 /* RX locationing information */
#define HAL_RX_HW_UPLOAD_DATA 0x1000 /* This is a hardware data frame */
#define HAL_RX_HW_SOUNDING 0x2000 /* Rx sounding frame (TxBF, positioning) */
#define HAL_RX_UPLOAD_VALID 0x4000 /* This hardware data frame is valid */
/*
* This is the format of RSSI[2] on the AR9285/AR9485.
@ -231,11 +224,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 {
/*
@ -282,6 +271,7 @@ struct ath_desc_status {
#define HAL_TXDESC_LOWRXCHAIN 0x0400 /* switch to low RX chain */
#define HAL_TXDESC_LDPC 0x1000 /* Set LDPC TX for all rates */
#define HAL_TXDESC_HWTS 0x2000 /* Request Azimuth Timestamp in TX payload */
#define HAL_TXDESC_POS 0x4000 /* Request ToD/ToA locationing */
/* flags passed to rx descriptor setup methods */
#define HAL_RXDESC_INTREQ 0x0020 /* enable per-descriptor interrupt */

View File

@ -1,4 +1,6 @@
/*
/*-
* SPDX-License-Identifier: ISC
*
* Copyright (c) 2002-2008 Sam Leffler, Errno Consulting
* Copyright (c) 2002-2008 Atheros Communications, Inc.
*
@ -14,7 +16,7 @@
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
* $FreeBSD: releng/11.1/sys/dev/ath/ath_hal/ah_devid.h 291413 2015-11-28 00:27:16Z adrian $
* $FreeBSD: releng/12.0/sys/dev/ath/ath_hal/ah_devid.h 326695 2017-12-08 15:57:29Z pfg $
*/
#ifndef _DEV_ATH_DEVID_H_

View File

@ -1,4 +1,6 @@
/*
/*-
* SPDX-License-Identifier: ISC
*
* Copyright (c) 2002-2009 Sam Leffler, Errno Consulting
* Copyright (c) 2002-2008 Atheros Communications, Inc.
*
@ -14,7 +16,7 @@
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
* $FreeBSD: releng/11.1/sys/dev/ath/ath_hal/ah_diagcodes.h 239629 2012-08-24 00:17:39Z adrian $
* $FreeBSD: releng/12.0/sys/dev/ath/ath_hal/ah_diagcodes.h 326695 2017-12-08 15:57:29Z pfg $
*/
#ifndef _ATH_AH_DIAGCODES_H_
#define _ATH_AH_DIAGCODES_H_

View File

@ -1,4 +1,6 @@
/*
/*-
* SPDX-License-Identifier: ISC
*
* Copyright (c) 2002-2008 Sam Leffler, Errno Consulting
* Copyright (c) 2002-2008 Atheros Communications, Inc.
*
@ -14,7 +16,7 @@
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
* $FreeBSD: releng/11.1/sys/dev/ath/ath_hal/ah_eeprom.h 239637 2012-08-24 01:14:00Z adrian $
* $FreeBSD: releng/12.0/sys/dev/ath/ath_hal/ah_eeprom.h 326695 2017-12-08 15:57:29Z pfg $
*/
#ifndef _ATH_AH_EEPROM_H_
#define _ATH_AH_EEPROM_H_

View File

@ -1,4 +1,6 @@
/*
/*-
* SPDX-License-Identifier: ISC
*
* Copyright (c) 2008 Sam Leffler, Errno Consulting
* Copyright (c) 2010 Atheros Communications, Inc.
*
@ -14,7 +16,7 @@
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
* $FreeBSD: releng/11.1/sys/dev/ath/ath_hal/ah_eeprom_9287.c 239704 2012-08-26 04:26:49Z adrian $
* $FreeBSD: releng/12.0/sys/dev/ath/ath_hal/ah_eeprom_9287.c 326695 2017-12-08 15:57:29Z pfg $
*/
#include "opt_ah.h"

View File

@ -1,4 +1,6 @@
/*
/*-
* SPDX-License-Identifier: ISC
*
* Copyright (c) 2008-2009 Atheros Communications Inc.
*
* Permission to use, copy, modify, and/or distribute this software for any
@ -13,7 +15,7 @@
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
* $FreeBSD: releng/11.1/sys/dev/ath/ath_hal/ah_eeprom_9287.h 223615 2011-06-28 00:01:55Z adrian $
* $FreeBSD: releng/12.0/sys/dev/ath/ath_hal/ah_eeprom_9287.h 326695 2017-12-08 15:57:29Z pfg $
*/
#ifndef __AH_EEPROM_9287_H__

View File

@ -1,4 +1,6 @@
/*
/*-
* SPDX-License-Identifier: ISC
*
* Copyright (c) 2008 Sam Leffler, Errno Consulting
* Copyright (c) 2008 Atheros Communications, Inc.
*
@ -14,7 +16,7 @@
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
* $FreeBSD: releng/11.1/sys/dev/ath/ath_hal/ah_eeprom_v1.c 221896 2011-05-14 15:12:02Z adrian $
* $FreeBSD: releng/12.0/sys/dev/ath/ath_hal/ah_eeprom_v1.c 326695 2017-12-08 15:57:29Z pfg $
*/
#include "opt_ah.h"

View File

@ -1,4 +1,6 @@
/*
/*-
* SPDX-License-Identifier: ISC
*
* Copyright (c) 2002-2008 Sam Leffler, Errno Consulting
* Copyright (c) 2002-2008 Atheros Communications, Inc.
*
@ -14,7 +16,7 @@
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
* $FreeBSD: releng/11.1/sys/dev/ath/ath_hal/ah_eeprom_v1.h 204644 2010-03-03 17:32:32Z rpaulo $
* $FreeBSD: releng/12.0/sys/dev/ath/ath_hal/ah_eeprom_v1.h 326695 2017-12-08 15:57:29Z pfg $
*/
#ifndef _ATH_AH_EEPROM_V1_H_
#define _ATH_AH_EEPROM_V1_H_

View File

@ -1,4 +1,6 @@
/*
/*-
* SPDX-License-Identifier: ISC
*
* Copyright (c) 2008 Sam Leffler, Errno Consulting
* Copyright (c) 2008 Atheros Communications, Inc.
*
@ -14,7 +16,7 @@
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
* $FreeBSD: releng/11.1/sys/dev/ath/ath_hal/ah_eeprom_v14.c 224519 2011-07-30 13:45:12Z adrian $
* $FreeBSD: releng/12.0/sys/dev/ath/ath_hal/ah_eeprom_v14.c 326695 2017-12-08 15:57:29Z pfg $
*/
#include "opt_ah.h"

View File

@ -1,4 +1,6 @@
/*
/*-
* SPDX-License-Identifier: ISC
*
* Copyright (c) 2008 Sam Leffler, Errno Consulting
* Copyright (c) 2008 Atheros Communications, Inc.
*
@ -14,7 +16,7 @@
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
* $FreeBSD: releng/11.1/sys/dev/ath/ath_hal/ah_eeprom_v14.h 224519 2011-07-30 13:45:12Z adrian $
* $FreeBSD: releng/12.0/sys/dev/ath/ath_hal/ah_eeprom_v14.h 326695 2017-12-08 15:57:29Z pfg $
*/
#ifndef _AH_EEPROM_V14_H_
#define _AH_EEPROM_V14_H_

View File

@ -1,4 +1,6 @@
/*
/*-
* SPDX-License-Identifier: ISC
*
* Copyright (c) 2002-2008 Sam Leffler, Errno Consulting
* Copyright (c) 2002-2008 Atheros Communications, Inc.
*
@ -14,7 +16,7 @@
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
* $FreeBSD: releng/11.1/sys/dev/ath/ath_hal/ah_eeprom_v3.c 221896 2011-05-14 15:12:02Z adrian $
* $FreeBSD: releng/12.0/sys/dev/ath/ath_hal/ah_eeprom_v3.c 326695 2017-12-08 15:57:29Z pfg $
*/
#include "opt_ah.h"

View File

@ -1,4 +1,6 @@
/*
/*-
* SPDX-License-Identifier: ISC
*
* Copyright (c) 2002-2008 Sam Leffler, Errno Consulting
* Copyright (c) 2002-2008 Atheros Communications, Inc.
*
@ -14,7 +16,7 @@
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
* $FreeBSD: releng/11.1/sys/dev/ath/ath_hal/ah_eeprom_v3.h 204644 2010-03-03 17:32:32Z rpaulo $
* $FreeBSD: releng/12.0/sys/dev/ath/ath_hal/ah_eeprom_v3.h 326695 2017-12-08 15:57:29Z pfg $
*/
#ifndef _ATH_AH_EEPROM_V3_H_
#define _ATH_AH_EEPROM_V3_H_

View File

@ -1,4 +1,6 @@
/*
/*-
* SPDX-License-Identifier: ISC
*
* Copyright (c) 2009 Rui Paulo <rpaulo@FreeBSD.org>
* Copyright (c) 2008 Sam Leffler, Errno Consulting
* Copyright (c) 2008 Atheros Communications, Inc.
@ -15,7 +17,7 @@
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
* $FreeBSD: releng/11.1/sys/dev/ath/ath_hal/ah_eeprom_v4k.c 234508 2012-04-20 21:56:13Z adrian $
* $FreeBSD: releng/12.0/sys/dev/ath/ath_hal/ah_eeprom_v4k.c 326695 2017-12-08 15:57:29Z pfg $
*/
#include "opt_ah.h"

View File

@ -1,4 +1,6 @@
/*
/*-
* SPDX-License-Identifier: ISC
*
* Copyright (c) 2009 Rui Paulo <rpaulo@FreeBSD.org>
* Copyright (c) 2008 Sam Leffler, Errno Consulting
* Copyright (c) 2008 Atheros Communications, Inc.
@ -15,7 +17,7 @@
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
* $FreeBSD: releng/11.1/sys/dev/ath/ath_hal/ah_eeprom_v4k.h 220946 2011-04-22 10:57:46Z adrian $
* $FreeBSD: releng/12.0/sys/dev/ath/ath_hal/ah_eeprom_v4k.h 326695 2017-12-08 15:57:29Z pfg $
*/
#ifndef _AH_EEPROM_V4K_H_
#define _AH_EEPROM_V4K_H_

View File

@ -1,4 +1,6 @@
/*
/*-
* SPDX-License-Identifier: ISC
*
* Copyright (c) 2002-2009 Sam Leffler, Errno Consulting
* Copyright (c) 2002-2008 Atheros Communications, Inc.
*
@ -14,7 +16,7 @@
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
* $FreeBSD: releng/11.1/sys/dev/ath/ath_hal/ah_internal.h 291469 2015-11-30 06:26:59Z adrian $
* $FreeBSD: releng/12.0/sys/dev/ath/ath_hal/ah_internal.h 326695 2017-12-08 15:57:29Z pfg $
*/
#ifndef _ATH_AH_INTERAL_H_
#define _ATH_AH_INTERAL_H_
@ -28,11 +30,7 @@
#define AH_MAX(a,b) ((a)>(b)?(a):(b))
#include <net80211/_ieee80211.h>
#include "opt_ah.h" /* needed for AH_SUPPORT_AR5416 */
#ifndef AH_SUPPORT_AR5416
#define AH_SUPPORT_AR5416 1
#endif
#include <sys/queue.h> /* XXX for reasons */
#ifndef NBBY
#define NBBY 8 /* number of bits/byte */
@ -85,6 +83,11 @@ typedef enum {
/*
* Each chip or class of chips registers to offer support.
*
* Compiled-in versions will include a linker set to iterate through the
* linked in code.
*
* Modules will have to register HAL backends separately.
*/
struct ath_hal_chip {
const char *name;
@ -93,13 +96,14 @@ struct ath_hal_chip {
HAL_BUS_TAG, HAL_BUS_HANDLE, uint16_t *eepromdata,
HAL_OPS_CONFIG *ah,
HAL_STATUS *error);
TAILQ_ENTRY(ath_hal_chip) node;
};
#ifndef AH_CHIP
#define AH_CHIP(_name, _probe, _attach) \
static struct ath_hal_chip _name##_chip = { \
struct ath_hal_chip _name##_chip = { \
.name = #_name, \
.probe = _probe, \
.attach = _attach \
.attach = _attach, \
}; \
OS_DATA_SET(ah_chips, _name##_chip)
#endif
@ -108,18 +112,24 @@ OS_DATA_SET(ah_chips, _name##_chip)
* Each RF backend registers to offer support; this is mostly
* used by multi-chip 5212 solutions. Single-chip solutions
* have a fixed idea about which RF to use.
*
* Compiled in versions will include this linker set to iterate through
* the linked in code.
*
* Modules will have to register RF backends separately.
*/
struct ath_hal_rf {
const char *name;
HAL_BOOL (*probe)(struct ath_hal *ah);
HAL_BOOL (*attach)(struct ath_hal *ah, HAL_STATUS *ecode);
TAILQ_ENTRY(ath_hal_rf) node;
};
#ifndef AH_RF
#define AH_RF(_name, _probe, _attach) \
static struct ath_hal_rf _name##_rf = { \
struct ath_hal_rf _name##_rf = { \
.name = __STRING(_name), \
.probe = _probe, \
.attach = _attach \
.attach = _attach, \
}; \
OS_DATA_SET(ah_rfs, _name##_rf)
#endif
@ -134,7 +144,7 @@ struct ath_hal_rf *ath_hal_rfprobe(struct ath_hal *ah, HAL_STATUS *ecode);
* right now.
*/
#ifndef AH_MAXCHAN
#define AH_MAXCHAN 96
#define AH_MAXCHAN 128
#endif
#define HAL_NF_CAL_HIST_LEN_FULL 5
@ -188,10 +198,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 */
@ -260,7 +268,6 @@ typedef struct {
hal4kbSplitTransSupport : 1,
halHasRxSelfLinkedTail : 1,
halSupportsFastClock5GHz : 1,
halHasLongRxDescTsf : 1,
halHasBBReadWar : 1,
halSerialiseRegWar : 1,
halMciSupport : 1,
@ -290,7 +297,8 @@ typedef struct {
uint16_t halKeyCacheSize;
uint16_t halLow5GhzChan, halHigh5GhzChan;
uint16_t halLow2GhzChan, halHigh2GhzChan;
int halTstampPrecision;
int halTxTstampPrecision;
int halRxTstampPrecision;
int halRtsAggrLimit;
uint8_t halTxChainMask;
uint8_t halRxChainMask;
@ -726,12 +734,6 @@ ath_hal_gethwchannel(struct ath_hal *ah, const struct ieee80211_channel *c)
return ath_hal_checkchannel(ah, c)->channel;
}
/*
* Convert between microseconds and core system clocks.
*/
extern u_int ath_hal_mac_clks(struct ath_hal *ah, u_int usecs);
extern u_int ath_hal_mac_usec(struct ath_hal *ah, u_int clks);
/*
* Generic get/set capability support. Each chip overrides
* this routine to support chip-specific capabilities.
@ -1044,4 +1046,12 @@ extern void ath_hal_survey_clear(struct ath_hal *ah);
extern void ath_hal_survey_add_sample(struct ath_hal *ah,
HAL_SURVEY_SAMPLE *hs);
/*
* Chip registration - for modules.
*/
extern int ath_hal_add_chip(struct ath_hal_chip *ahc);
extern int ath_hal_remove_chip(struct ath_hal_chip *ahc);
extern int ath_hal_add_rf(struct ath_hal_rf *arf);
extern int ath_hal_remove_rf(struct ath_hal_rf *arf);
#endif /* _ATH_AH_INTERAL_H_ */

View File

@ -1,4 +1,6 @@
/*
/*-
* SPDX-License-Identifier: ISC
*
* Copyright (c) 2002-2009 Sam Leffler, Errno Consulting
* Copyright (c) 2005-2006 Atheros Communications, Inc.
* All rights reserved.
@ -15,7 +17,7 @@
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
* $FreeBSD: releng/11.1/sys/dev/ath/ath_hal/ah_regdomain.c 300267 2016-05-20 06:06:21Z adrian $
* $FreeBSD: releng/12.0/sys/dev/ath/ath_hal/ah_regdomain.c 326695 2017-12-08 15:57:29Z pfg $
*/
#include "opt_ah.h"
@ -426,6 +428,10 @@ addchan(struct ath_hal *ah, struct ieee80211_channel chans[],
if (*nchans >= maxchans)
return (HAL_ENOMEM);
HALDEBUG(ah, HAL_DEBUG_REGDOMAIN,
"%s: %d: freq=%d, flags=0x%08x\n",
__func__, *nchans, (int) freq, flags);
c = &chans[(*nchans)++];
c->ic_freq = freq;
c->ic_flags = flags;
@ -439,7 +445,7 @@ addchan(struct ath_hal *ah, struct ieee80211_channel chans[],
static int
copychan_prev(struct ath_hal *ah, struct ieee80211_channel chans[],
u_int maxchans, int *nchans, uint16_t freq)
u_int maxchans, int *nchans, uint16_t freq, uint32_t flags)
{
struct ieee80211_channel *c;
@ -449,6 +455,10 @@ copychan_prev(struct ath_hal *ah, struct ieee80211_channel chans[],
if (*nchans >= maxchans)
return (HAL_ENOMEM);
HALDEBUG(ah, HAL_DEBUG_REGDOMAIN,
"%s: %d: freq=%d, flags=0x%08x\n",
__func__, *nchans, (int) freq, flags);
c = &chans[(*nchans)++];
c[0] = c[-1];
c->ic_freq = freq;
@ -469,9 +479,13 @@ add_chanlist_band(struct ath_hal *ah, struct ieee80211_channel chans[],
if (freq_hi < freq_lo)
return (0);
HALDEBUG(ah, HAL_DEBUG_REGDOMAIN,
"%s: freq=%d..%d, flags=0x%08x, step=%d\n", __func__,
(int) freq_lo, (int) freq_hi, flags, step);
error = addchan(ah, chans, maxchans, nchans, freq, flags, fband, rd);
for (freq += step; freq <= freq_hi && error == 0; freq += step)
error = copychan_prev(ah, chans, maxchans, nchans, freq);
error = copychan_prev(ah, chans, maxchans, nchans, freq, flags);
return (error);
}
@ -548,13 +562,61 @@ add_chanlist_mode(struct ath_hal *ah, struct ieee80211_channel chans[],
continue;
}
#endif
/*
* XXX TODO: handle REG_EXT_FCC_CH_144.
*
* Figure out which instances/uses cause us to not
* be allowed to use channel 144 (pri or sec overlap.)
*/
bfreq_lo = MAX(fband->lowChannel + low_adj, freq_lo);
bfreq_hi = MIN(fband->highChannel + hi_adj, freq_hi);
/*
* Don't start the 5GHz channel list at 5120MHz.
*
* Unfortunately (sigh) the HT40 channel creation
* logic will create HT40U channels at 5120, 5160, 5200.
* This means that 36 (5180) isn't considered as a
* HT40 channel, and everything goes messed up from there.
*/
if ((cm->flags & IEEE80211_CHAN_5GHZ) &&
(cm->flags & IEEE80211_CHAN_HT40U)) {
if (bfreq_lo < 5180)
bfreq_lo = 5180;
}
/*
* Same with HT40D - need to start at 5200 or the low
* channels are all wrong again.
*/
if ((cm->flags & IEEE80211_CHAN_5GHZ) &&
(cm->flags & IEEE80211_CHAN_HT40D)) {
if (bfreq_lo < 5200)
bfreq_lo = 5200;
}
if (fband->channelSep >= channelSep)
step = fband->channelSep;
else
step = roundup(channelSep, fband->channelSep);
HALDEBUG(ah, HAL_DEBUG_REGDOMAIN,
"%s: freq_lo=%d, freq_hi=%d, low_adj=%d, hi_adj=%d, "
"bandlo=%d, bandhi=%d, bfreqlo=%d, bfreqhi=%d, step=%d, "
"flags=0x%08x\n",
__func__,
(int) freq_lo,
(int) freq_hi,
(int) low_adj,
(int) hi_adj,
(int) fband->lowChannel,
(int) fband->highChannel,
(int) bfreq_lo,
(int) bfreq_hi,
step,
(int) cm->flags);
error = add_chanlist_band(ah, chans, maxchans, nchans,
bfreq_lo, bfreq_hi, step, cm->flags, fband, rd);
if (error != 0) {

View File

@ -1,4 +1,6 @@
/*
/*-
* SPDX-License-Identifier: ISC
*
* Copyright (c) 2002-2009 Sam Leffler, Errno Consulting
* Copyright (c) 2005-2006 Atheros Communications, Inc.
* All rights reserved.
@ -15,7 +17,7 @@
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
* $FreeBSD: releng/11.1/sys/dev/ath/ath_hal/ah_regdomain.h 300246 2016-05-19 23:00:30Z avos $
* $FreeBSD: releng/12.0/sys/dev/ath/ath_hal/ah_regdomain.h 326695 2017-12-08 15:57:29Z pfg $
*/
#ifndef __AH_REGDOMAIN_H__
#define __AH_REGDOMAIN_H__

View File

@ -1,4 +1,6 @@
/*
/*-
* SPDX-License-Identifier: ISC
*
* Copyright (c) 2002-2009 Sam Leffler, Errno Consulting
* Copyright (c) 2005-2011 Atheros Communications, Inc.
* All rights reserved.
@ -15,7 +17,7 @@
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
* $FreeBSD: releng/11.1/sys/dev/ath/ath_hal/ah_regdomain/ah_rd_ctry.h 224226 2011-07-20 12:46:58Z adrian $
* $FreeBSD: releng/12.0/sys/dev/ath/ath_hal/ah_regdomain/ah_rd_ctry.h 326695 2017-12-08 15:57:29Z pfg $
*/
#ifndef __AH_REGDOMAIN_CTRY_H__

View File

@ -1,4 +1,6 @@
/*
/*-
* SPDX-License-Identifier: ISC
*
* Copyright (c) 2002-2009 Sam Leffler, Errno Consulting
* Copyright (c) 2005-2006 Atheros Communications, Inc.
* All rights reserved.
@ -15,7 +17,7 @@
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
* $FreeBSD: releng/11.1/sys/dev/ath/ath_hal/ah_regdomain/ah_rd_domains.h 248677 2013-03-24 04:42:56Z adrian $
* $FreeBSD: releng/12.0/sys/dev/ath/ath_hal/ah_regdomain/ah_rd_domains.h 326695 2017-12-08 15:57:29Z pfg $
*/
#ifndef __AH_REGDOMAIN_DOMAINS_H__
@ -242,6 +244,17 @@ static REG_DOMAIN regDomains[] = {
.chan11a_quarter = BM3(F8_5180_5240, F8_5260_5320,F10_5745_5825),
},
{.regDmnEnum = FCC6,
.conformanceTestLimit = FCC,
.chan11a = BM5(F8_5180_5240, F5_5260_5320, F1_5500_5580, F2_5660_5720, F6_5745_5825),
.chan11a_turbo = BM3(T7_5210_5210, T3_5250_5290, T2_5760_5800),
.chan11a_dyn_turbo = BM4(T7_5200_5200, T1_5240_5240, T2_5280_5280, T1_5765_5805),
#if 0
.chan11a_half = BM3(F7_5180_5240, F7_5260_5320, F9_5745_5825),
.chan11a_quarter = BM3(F8_5180_5240, F8_5260_5320,F10_5745_5825),
#endif
},
{.regDmnEnum = MKK1,
.conformanceTestLimit = MKK,
.pscan = PSCAN_MKK1,

View File

@ -1,4 +1,6 @@
/*
/*-
* SPDX-License-Identifier: ISC
*
* Copyright (c) 2002-2009 Sam Leffler, Errno Consulting
* Copyright (c) 2005-2006 Atheros Communications, Inc.
* All rights reserved.
@ -15,7 +17,7 @@
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
* $FreeBSD: releng/11.1/sys/dev/ath/ath_hal/ah_regdomain/ah_rd_freqbands.h 219442 2011-03-10 03:13:56Z adrian $
* $FreeBSD: releng/12.0/sys/dev/ath/ath_hal/ah_regdomain/ah_rd_freqbands.h 326695 2017-12-08 15:57:29Z pfg $
*/
#ifndef __AH_REGDOMAIN_FREQBANDS_H__
@ -125,8 +127,11 @@ static REG_DMN_FREQ_BAND regDmn5GhzFreq[] = {
{ 5280, 5320, 17, 6, 20, 20, DFS_FCC3 | DFS_ETSI, PSCAN_FCC },
#define F1_5280_5320 AFTER(F3_5260_5700)
{ 5500, 5580, 23, 6, 20, 20, DFS_FCC3, PSCAN_FCC },
#define F1_5500_5580 AFTER(F1_5280_5320)
{ 5500, 5620, 30, 6, 20, 20, DFS_ETSI, PSCAN_ETSI },
#define F1_5500_5620 AFTER(F1_5280_5320)
#define F1_5500_5620 AFTER(F1_5500_5580)
{ 5500, 5700, 20, 6, 20, 20, DFS_FCC3 | DFS_ETSI, PSCAN_FCC },
#define F1_5500_5700 AFTER(F1_5500_5620)
@ -136,9 +141,11 @@ static REG_DMN_FREQ_BAND regDmn5GhzFreq[] = {
#define F3_5500_5700 AFTER(F2_5500_5700)
{ 5500, 5700, 23, 0, 20, 20, DFS_FCC3 | DFS_ETSI | DFS_MKK4, PSCAN_MKK3 | PSCAN_FCC },
#define F4_5500_5700 AFTER(F3_5500_5700)
{ 5660, 5720, 23, 6, 20, 20, DFS_FCC3 | DFS_ETSI, PSCAN_FCC | PSCAN_ETSI },
#define F2_5660_5720 AFTER(F4_5500_5700)
{ 5745, 5805, 23, 0, 20, 20, NO_DFS, NO_PSCAN },
#define F1_5745_5805 AFTER(F4_5500_5700)
#define F1_5745_5805 AFTER(F2_5660_5720)
{ 5745, 5805, 30, 6, 20, 20, NO_DFS, NO_PSCAN },
#define F2_5745_5805 AFTER(F1_5745_5805)
{ 5745, 5805, 30, 6, 20, 20, DFS_ETSI, PSCAN_ETSI },
@ -191,6 +198,7 @@ static REG_DMN_FREQ_BAND regDmn5GhzFreq[] = {
#define W2_5825_5825 AFTER(W2_5180_5240)
};
/*
* 5GHz Turbo (dynamic & static) tags
*/
@ -203,13 +211,14 @@ static REG_DMN_FREQ_BAND regDmn5GhzTurboFreq[] = {
#define T1_5370_5490 AFTER(T1_5250_5330)
{ 5530, 5650, 5, 6, 40, 40, DFS_FCC3, NO_PSCAN },
#define T1_5530_5650 AFTER(T1_5370_5490)
{ 5200, 5200, 23, 6, 40, 40, NO_DFS, NO_PSCAN },
#define T7_5200_5200 AFTER(T1_5530_5650)
{ 5150, 5190, 5, 6, 40, 40, NO_DFS, NO_PSCAN },
#define T1_5150_5190 AFTER(T1_5530_5650)
{ 5230, 5310, 5, 6, 40, 40, DFS_FCC3, NO_PSCAN },
#define T1_5230_5310 AFTER(T1_5150_5190)
#define T1_5230_5310 AFTER(T7_5200_5200)
{ 5350, 5470, 5, 6, 40, 40, NO_DFS, NO_PSCAN },
#define T1_5350_5470 AFTER(T1_5230_5310)
#define T1_5150_5190 AFTER(T1_5230_5310)
{ 5230, 5310, 5, 6, 40, 40, DFS_FCC3, NO_PSCAN },
#define T1_5350_5470 AFTER(T1_5150_5190)
{ 5510, 5670, 5, 6, 40, 40, DFS_FCC3, NO_PSCAN },
#define T1_5510_5670 AFTER(T1_5350_5470)
@ -221,9 +230,13 @@ static REG_DMN_FREQ_BAND regDmn5GhzTurboFreq[] = {
#define T1_5210_5210 AFTER(T2_5200_5240)
{ 5210, 5210, 23, 0, 40, 40, NO_DFS, NO_PSCAN },
#define T2_5210_5210 AFTER(T1_5210_5210)
{ 5210, 5210, 23, 6, 40, 40, NO_DFS, NO_PSCAN },
#define T7_5210_5210 AFTER(T2_5210_5210)
{ 5240, 5240, 23, 6, 40, 40, NO_DFS, PSCAN_FCC_T },
#define T1_5240_5240 AFTER(T7_5210_5210)
{ 5280, 5280, 23, 6, 40, 40, DFS_FCC3, PSCAN_FCC_T },
#define T1_5280_5280 AFTER(T2_5210_5210)
#define T1_5280_5280 AFTER(T1_5240_5240)
{ 5280, 5280, 20, 6, 40, 40, DFS_FCC3, PSCAN_FCC_T },
#define T2_5280_5280 AFTER(T1_5280_5280)
{ 5250, 5250, 17, 0, 40, 40, DFS_FCC3, PSCAN_FCC_T },
@ -234,9 +247,11 @@ static REG_DMN_FREQ_BAND regDmn5GhzTurboFreq[] = {
#define T1_5250_5290 AFTER(T1_5290_5290)
{ 5250, 5290, 23, 6, 40, 40, DFS_FCC3, PSCAN_FCC_T },
#define T2_5250_5290 AFTER(T1_5250_5290)
{ 5250, 5290, 23, 6, 40, 40, NO_DFS, PSCAN_FCC_T },
#define T3_5250_5290 AFTER(T2_5250_5290)
{ 5540, 5660, 20, 6, 40, 40, DFS_FCC3, PSCAN_FCC_T },
#define T1_5540_5660 AFTER(T2_5250_5290)
#define T1_5540_5660 AFTER(T3_5250_5290)
{ 5760, 5800, 20, 0, 40, 40, NO_DFS, NO_PSCAN },
#define T1_5760_5800 AFTER(T1_5540_5660)
{ 5760, 5800, 30, 6, 40, 40, NO_DFS, NO_PSCAN },

View File

@ -1,4 +1,6 @@
/*
/*-
* SPDX-License-Identifier: ISC
*
* Copyright (c) 2002-2009 Sam Leffler, Errno Consulting
* Copyright (c) 2005-2011 Atheros Communications, Inc.
* All rights reserved.
@ -15,7 +17,7 @@
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
* $FreeBSD: releng/11.1/sys/dev/ath/ath_hal/ah_regdomain/ah_rd_regenum.h 262375 2014-02-23 18:07:17Z hiren $
* $FreeBSD: releng/12.0/sys/dev/ath/ath_hal/ah_regdomain/ah_rd_regenum.h 326695 2017-12-08 15:57:29Z pfg $
*/
#ifndef __AH_REGDOMAIN_REGENUM_H__

View File

@ -1,4 +1,6 @@
/*
/*-
* SPDX-License-Identifier: ISC
*
* Copyright (c) 2002-2009 Sam Leffler, Errno Consulting
* Copyright (c) 2005-2006 Atheros Communications, Inc.
* All rights reserved.
@ -15,7 +17,7 @@
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
* $FreeBSD: releng/11.1/sys/dev/ath/ath_hal/ah_regdomain/ah_rd_regmap.h 248677 2013-03-24 04:42:56Z adrian $
* $FreeBSD: releng/12.0/sys/dev/ath/ath_hal/ah_regdomain/ah_rd_regmap.h 326695 2017-12-08 15:57:29Z pfg $
*/
#ifndef __AH_REGDOMAIN_REGMAP_H__
@ -41,6 +43,7 @@ static REG_DMN_PAIR_MAPPING regDomainPairs[] = {
{FCC3_WORLD, FCC3, WORLD, NO_REQ, NO_REQ, PSCAN_DEFER, CTRY_DEFAULT },
{FCC4_FCCA, FCC4, FCCA, DISALLOW_ADHOC_11A | DISALLOW_ADHOC_11A_TURB, NO_REQ, PSCAN_DEFER, CTRY_DEFAULT },
{FCC5_FCCB, FCC5, FCCB, NO_REQ, NO_REQ, PSCAN_DEFER, CTRY_DEFAULT },
{FCC6_FCCA, FCC6, FCCA, NO_REQ, NO_REQ, PSCAN_DEFER, CTRY_DEFAULT },
{ETSI1_WORLD, ETSI1, WORLD, DISALLOW_ADHOC_11A | DISALLOW_ADHOC_11A_TURB, NO_REQ, PSCAN_DEFER, CTRY_DEFAULT },
{ETSI2_WORLD, ETSI2, WORLD, DISALLOW_ADHOC_11A | DISALLOW_ADHOC_11A_TURB, NO_REQ, PSCAN_DEFER, CTRY_DEFAULT },

View File

@ -1,4 +1,6 @@
/*
/*-
* SPDX-License-Identifier: ISC
*
* Copyright (c) 2002-2008 Sam Leffler, Errno Consulting
* Copyright (c) 2002-2008 Atheros Communications, Inc.
*
@ -14,7 +16,7 @@
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
* $FreeBSD: releng/11.1/sys/dev/ath/ath_hal/ah_soc.h 204644 2010-03-03 17:32:32Z rpaulo $
* $FreeBSD: releng/12.0/sys/dev/ath/ath_hal/ah_soc.h 326695 2017-12-08 15:57:29Z pfg $
*/
#ifndef _ATH_AH_SOC_H_
#define _ATH_AH_SOC_H_

View File

@ -1,4 +1,6 @@
/*
/*-
* SPDX-License-Identifier: ISC
*
* Copyright (c) 2002-2009 Sam Leffler, Errno Consulting
* Copyright (c) 2002-2004 Atheros Communications, Inc.
*
@ -14,7 +16,7 @@
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
* $FreeBSD: releng/11.1/sys/dev/ath/ath_hal/ar5210/ar5210.h 290612 2015-11-09 15:59:42Z adrian $
* $FreeBSD: releng/12.0/sys/dev/ath/ath_hal/ar5210/ar5210.h 326695 2017-12-08 15:57:29Z pfg $
*/
#ifndef _ATH_AR5210_H_
#define _ATH_AR5210_H_
@ -251,6 +253,8 @@ extern HAL_BOOL ar5210SetCTSTimeout(struct ath_hal *, u_int);
extern u_int ar5210GetCTSTimeout(struct ath_hal *);
extern HAL_BOOL ar5210SetDecompMask(struct ath_hal *, uint16_t, int);
void ar5210SetCoverageClass(struct ath_hal *, uint8_t, int);
extern HAL_STATUS ar5210SetQuiet(struct ath_hal *, uint32_t, uint32_t,
uint32_t, HAL_QUIET_FLAG);
extern HAL_STATUS ar5210GetCapability(struct ath_hal *, HAL_CAPABILITY_TYPE,
uint32_t, uint32_t *);
extern HAL_BOOL ar5210SetCapability(struct ath_hal *, HAL_CAPABILITY_TYPE,

View File

@ -1,4 +1,6 @@
/*
/*-
* SPDX-License-Identifier: ISC
*
* Copyright (c) 2002-2009 Sam Leffler, Errno Consulting
* Copyright (c) 2002-2004 Atheros Communications, Inc.
*
@ -14,7 +16,7 @@
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
* $FreeBSD: releng/11.1/sys/dev/ath/ath_hal/ar5210/ar5210_attach.c 272292 2014-09-30 03:19:29Z adrian $
* $FreeBSD: releng/12.0/sys/dev/ath/ath_hal/ar5210/ar5210_attach.c 326695 2017-12-08 15:57:29Z pfg $
*/
#include "opt_ah.h"
@ -135,6 +137,7 @@ static const struct ath_hal_private ar5210hal = {{
.ah_getCTSTimeout = ar5210GetCTSTimeout,
.ah_setDecompMask = ar5210SetDecompMask,
.ah_setCoverageClass = ar5210SetCoverageClass,
.ah_setQuiet = ar5210SetQuiet,
.ah_get11nExtBusy = ar5210Get11nExtBusy,
.ah_getMibCycleCounts = ar5210GetMibCycleCounts,
.ah_setChainMasks = ar5210SetChainMasks,
@ -390,7 +393,8 @@ ar5210FillCapabilityInfo(struct ath_hal *ah)
pCap->halRfSilentSupport = AH_TRUE;
}
pCap->halTstampPrecision = 15; /* NB: s/w extended from 13 */
pCap->halTxTstampPrecision = 16;
pCap->halRxTstampPrecision = 15; /* NB: s/w extended from 13 */
pCap->halIntrMask = (HAL_INT_COMMON - HAL_INT_BNR)
| HAL_INT_RX
| HAL_INT_TX

View File

@ -1,4 +1,6 @@
/*
/*-
* SPDX-License-Identifier: ISC
*
* Copyright (c) 2002-2008 Sam Leffler, Errno Consulting
* Copyright (c) 2002-2004 Atheros Communications, Inc.
*
@ -14,7 +16,7 @@
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
* $FreeBSD: releng/11.1/sys/dev/ath/ath_hal/ar5210/ar5210_beacon.c 225444 2011-09-08 01:23:05Z adrian $
* $FreeBSD: releng/12.0/sys/dev/ath/ath_hal/ar5210/ar5210_beacon.c 326695 2017-12-08 15:57:29Z pfg $
*/
#include "opt_ah.h"

View File

@ -1,4 +1,6 @@
/*
/*-
* SPDX-License-Identifier: ISC
*
* Copyright (c) 2002-2008 Sam Leffler, Errno Consulting
* Copyright (c) 2002-2004 Atheros Communications, Inc.
*
@ -14,7 +16,7 @@
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
* $FreeBSD: releng/11.1/sys/dev/ath/ath_hal/ar5210/ar5210_interrupts.c 192397 2009-05-19 17:35:15Z sam $
* $FreeBSD: releng/12.0/sys/dev/ath/ath_hal/ar5210/ar5210_interrupts.c 326695 2017-12-08 15:57:29Z pfg $
*/
#include "opt_ah.h"

View File

@ -1,4 +1,6 @@
/*
/*-
* SPDX-License-Identifier: ISC
*
* Copyright (c) 2002-2008 Sam Leffler, Errno Consulting
* Copyright (c) 2002-2004 Atheros Communications, Inc.
*
@ -14,7 +16,7 @@
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
* $FreeBSD: releng/11.1/sys/dev/ath/ath_hal/ar5210/ar5210_keycache.c 204644 2010-03-03 17:32:32Z rpaulo $
* $FreeBSD: releng/12.0/sys/dev/ath/ath_hal/ar5210/ar5210_keycache.c 326695 2017-12-08 15:57:29Z pfg $
*/
#include "opt_ah.h"

View File

@ -1,4 +1,6 @@
/*
/*-
* SPDX-License-Identifier: ISC
*
* Copyright (c) 2002-2009 Sam Leffler, Errno Consulting
* Copyright (c) 2002-2004 Atheros Communications, Inc.
*
@ -14,7 +16,7 @@
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
* $FreeBSD: releng/11.1/sys/dev/ath/ath_hal/ar5210/ar5210_misc.c 264899 2014-04-24 23:11:18Z adrian $
* $FreeBSD: releng/12.0/sys/dev/ath/ath_hal/ar5210/ar5210_misc.c 326695 2017-12-08 15:57:29Z pfg $
*/
#include "opt_ah.h"
@ -552,6 +554,13 @@ ar5210SetCoverageClass(struct ath_hal *ah, uint8_t coverageclass, int now)
{
}
HAL_STATUS
ar5210SetQuiet(struct ath_hal *ah, uint32_t period, uint32_t duration,
uint32_t next_start, HAL_QUIET_FLAG flags)
{
return HAL_OK;
}
/*
* Control Adaptive Noise Immunity Parameters
*/

View File

@ -1,4 +1,6 @@
/*
/*-
* SPDX-License-Identifier: ISC
*
* Copyright (c) 2002-2008 Sam Leffler, Errno Consulting
* Copyright (c) 2002-2004 Atheros Communications, Inc.
*
@ -14,7 +16,7 @@
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
* $FreeBSD: releng/11.1/sys/dev/ath/ath_hal/ar5210/ar5210_phy.c 191022 2009-04-13 21:01:08Z sam $
* $FreeBSD: releng/12.0/sys/dev/ath/ath_hal/ar5210/ar5210_phy.c 326695 2017-12-08 15:57:29Z pfg $
*/
#include "opt_ah.h"

View File

@ -1,4 +1,6 @@
/*
/*-
* SPDX-License-Identifier: ISC
*
* Copyright (c) 2002-2008 Sam Leffler, Errno Consulting
* Copyright (c) 2002-2004 Atheros Communications, Inc.
*
@ -14,7 +16,7 @@
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
* $FreeBSD: releng/11.1/sys/dev/ath/ath_hal/ar5210/ar5210_power.c 265112 2014-04-30 02:03:13Z adrian $
* $FreeBSD: releng/12.0/sys/dev/ath/ath_hal/ar5210/ar5210_power.c 326695 2017-12-08 15:57:29Z pfg $
*/
#include "opt_ah.h"

View File

@ -1,4 +1,6 @@
/*
/*-
* SPDX-License-Identifier: ISC
*
* Copyright (c) 2002-2008 Sam Leffler, Errno Consulting
* Copyright (c) 2002-2004 Atheros Communications, Inc.
*
@ -14,7 +16,7 @@
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
* $FreeBSD: releng/11.1/sys/dev/ath/ath_hal/ar5210/ar5210_recv.c 243317 2012-11-19 23:42:46Z adrian $
* $FreeBSD: releng/12.0/sys/dev/ath/ath_hal/ar5210/ar5210_recv.c 326695 2017-12-08 15:57:29Z pfg $
*/
#include "opt_ah.h"

View File

@ -1,4 +1,6 @@
/*
/*-
* SPDX-License-Identifier: ISC
*
* Copyright (c) 2002-2009 Sam Leffler, Errno Consulting
* Copyright (c) 2002-2004 Atheros Communications, Inc.
*
@ -14,7 +16,7 @@
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
* $FreeBSD: releng/11.1/sys/dev/ath/ath_hal/ar5210/ar5210_reset.c 290612 2015-11-09 15:59:42Z adrian $
* $FreeBSD: releng/12.0/sys/dev/ath/ath_hal/ar5210/ar5210_reset.c 326695 2017-12-08 15:57:29Z pfg $
*/
#include "opt_ah.h"

View File

@ -1,4 +1,6 @@
/*
/*-
* SPDX-License-Identifier: ISC
*
* Copyright (c) 2002-2009 Sam Leffler, Errno Consulting
* Copyright (c) 2002-2004 Atheros Communications, Inc.
*
@ -14,7 +16,7 @@
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
* $FreeBSD: releng/11.1/sys/dev/ath/ath_hal/ar5210/ar5210_xmit.c 243174 2012-11-17 02:39:37Z adrian $
* $FreeBSD: releng/12.0/sys/dev/ath/ath_hal/ar5210/ar5210_xmit.c 326695 2017-12-08 15:57:29Z pfg $
*/
#include "opt_ah.h"

View File

@ -1,4 +1,6 @@
/*
/*-
* SPDX-License-Identifier: ISC
*
* Copyright (c) 2002-2008 Sam Leffler, Errno Consulting
* Copyright (c) 2002-2004 Atheros Communications, Inc.
*
@ -14,7 +16,7 @@
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
* $FreeBSD: releng/11.1/sys/dev/ath/ath_hal/ar5210/ar5210desc.h 243173 2012-11-17 02:39:09Z adrian $
* $FreeBSD: releng/12.0/sys/dev/ath/ath_hal/ar5210/ar5210desc.h 326695 2017-12-08 15:57:29Z pfg $
*/
#ifndef _DEV_ATH_AR5210DESC_H
#define _DEV_ATH_AR5210DESC_H

View File

@ -1,4 +1,6 @@
/*
/*-
* SPDX-License-Identifier: ISC
*
* Copyright (c) 2002-2008 Sam Leffler, Errno Consulting
* Copyright (c) 2002-2004 Atheros Communications, Inc.
*
@ -14,7 +16,7 @@
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
* $FreeBSD: releng/11.1/sys/dev/ath/ath_hal/ar5210/ar5210phy.h 204644 2010-03-03 17:32:32Z rpaulo $
* $FreeBSD: releng/12.0/sys/dev/ath/ath_hal/ar5210/ar5210phy.h 326695 2017-12-08 15:57:29Z pfg $
*/
#ifndef _DEV_ATH_AR5210PHY_H
#define _DEV_ATH_AR5210PHY_H

View File

@ -1,4 +1,6 @@
/*
/*-
* SPDX-License-Identifier: ISC
*
* Copyright (c) 2002-2008 Sam Leffler, Errno Consulting
* Copyright (c) 2002-2004 Atheros Communications, Inc.
*
@ -14,7 +16,7 @@
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
* $FreeBSD: releng/11.1/sys/dev/ath/ath_hal/ar5210/ar5210reg.h 243317 2012-11-19 23:42:46Z adrian $
* $FreeBSD: releng/12.0/sys/dev/ath/ath_hal/ar5210/ar5210reg.h 326695 2017-12-08 15:57:29Z pfg $
*/
#ifndef _DEV_ATH_AR5210REG_H
#define _DEV_ATH_AR5210REG_H

View File

@ -14,7 +14,7 @@
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
* $FreeBSD: releng/11.1/sys/dev/ath/ath_hal/ar5210/ar5k_0007.ini 204644 2010-03-03 17:32:32Z rpaulo $
* $FreeBSD: releng/12.0/sys/dev/ath/ath_hal/ar5210/ar5k_0007.ini 204644 2010-03-03 17:32:32Z rpaulo $
*/
/* crete register init */

View File

@ -1,4 +1,6 @@
/*
/*-
* SPDX-License-Identifier: ISC
*
* Copyright (c) 2002-2009 Sam Leffler, Errno Consulting
* Copyright (c) 2002-2006 Atheros Communications, Inc.
*
@ -14,7 +16,7 @@
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
* $FreeBSD: releng/11.1/sys/dev/ath/ath_hal/ar5211/ar5211.h 290612 2015-11-09 15:59:42Z adrian $
* $FreeBSD: releng/12.0/sys/dev/ath/ath_hal/ar5211/ar5211.h 326695 2017-12-08 15:57:29Z pfg $
*/
#ifndef _ATH_AR5211_H_
#define _ATH_AR5211_H_
@ -271,6 +273,8 @@ extern HAL_BOOL ar5211SetSifsTime(struct ath_hal *, u_int);
extern u_int ar5211GetSifsTime(struct ath_hal *);
extern HAL_BOOL ar5211SetDecompMask(struct ath_hal *, uint16_t, int);
extern void ar5211SetCoverageClass(struct ath_hal *, uint8_t, int);
extern HAL_STATUS ar5211SetQuiet(struct ath_hal *, uint32_t, uint32_t,
uint32_t, HAL_QUIET_FLAG);
extern uint32_t ar5211GetCurRssi(struct ath_hal *);
extern u_int ar5211GetDefAntenna(struct ath_hal *);
extern void ar5211SetDefAntenna(struct ath_hal *ah, u_int antenna);

View File

@ -1,4 +1,6 @@
/*
/*-
* SPDX-License-Identifier: ISC
*
* Copyright (c) 2002-2009 Sam Leffler, Errno Consulting
* Copyright (c) 2002-2006 Atheros Communications, Inc.
*
@ -14,7 +16,7 @@
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
* $FreeBSD: releng/11.1/sys/dev/ath/ath_hal/ar5211/ar5211_attach.c 272292 2014-09-30 03:19:29Z adrian $
* $FreeBSD: releng/12.0/sys/dev/ath/ath_hal/ar5211/ar5211_attach.c 326695 2017-12-08 15:57:29Z pfg $
*/
#include "opt_ah.h"
@ -135,6 +137,7 @@ static const struct ath_hal_private ar5211hal = {{
.ah_getCTSTimeout = ar5211GetCTSTimeout,
.ah_setDecompMask = ar5211SetDecompMask,
.ah_setCoverageClass = ar5211SetCoverageClass,
.ah_setQuiet = ar5211SetQuiet,
.ah_get11nExtBusy = ar5211Get11nExtBusy,
.ah_getMibCycleCounts = ar5211GetMibCycleCounts,
.ah_setChainMasks = ar5211SetChainMasks,
@ -520,7 +523,8 @@ ar5211FillCapabilityInfo(struct ath_hal *ah)
pCap->halRfSilentSupport = AH_TRUE;
}
pCap->halTstampPrecision = 13;
pCap->halRxTstampPrecision = 13;
pCap->halTxTstampPrecision = 16;
pCap->halIntrMask = HAL_INT_COMMON
| HAL_INT_RX
| HAL_INT_TX

View File

@ -1,4 +1,6 @@
/*
/*-
* SPDX-License-Identifier: ISC
*
* Copyright (c) 2002-2008 Sam Leffler, Errno Consulting
* Copyright (c) 2002-2006 Atheros Communications, Inc.
*
@ -14,7 +16,7 @@
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
* $FreeBSD: releng/11.1/sys/dev/ath/ath_hal/ar5211/ar5211_beacon.c 225444 2011-09-08 01:23:05Z adrian $
* $FreeBSD: releng/12.0/sys/dev/ath/ath_hal/ar5211/ar5211_beacon.c 326695 2017-12-08 15:57:29Z pfg $
*/
#include "opt_ah.h"

View File

@ -1,4 +1,6 @@
/*
/*-
* SPDX-License-Identifier: ISC
*
* Copyright (c) 2002-2008 Sam Leffler, Errno Consulting
* Copyright (c) 2002-2006 Atheros Communications, Inc.
*
@ -14,7 +16,7 @@
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
* $FreeBSD: releng/11.1/sys/dev/ath/ath_hal/ar5211/ar5211_interrupts.c 192397 2009-05-19 17:35:15Z sam $
* $FreeBSD: releng/12.0/sys/dev/ath/ath_hal/ar5211/ar5211_interrupts.c 326695 2017-12-08 15:57:29Z pfg $
*/
#include "opt_ah.h"

View File

@ -1,4 +1,6 @@
/*
/*-
* SPDX-License-Identifier: ISC
*
* Copyright (c) 2002-2008 Sam Leffler, Errno Consulting
* Copyright (c) 2002-2006 Atheros Communications, Inc.
*
@ -14,7 +16,7 @@
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
* $FreeBSD: releng/11.1/sys/dev/ath/ath_hal/ar5211/ar5211_keycache.c 204644 2010-03-03 17:32:32Z rpaulo $
* $FreeBSD: releng/12.0/sys/dev/ath/ath_hal/ar5211/ar5211_keycache.c 326695 2017-12-08 15:57:29Z pfg $
*/
#include "opt_ah.h"

View File

@ -1,4 +1,6 @@
/*
/*-
* SPDX-License-Identifier: ISC
*
* Copyright (c) 2002-2009 Sam Leffler, Errno Consulting
* Copyright (c) 2002-2006 Atheros Communications, Inc.
*
@ -14,7 +16,7 @@
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
* $FreeBSD: releng/11.1/sys/dev/ath/ath_hal/ar5211/ar5211_misc.c 247286 2013-02-25 22:42:43Z adrian $
* $FreeBSD: releng/12.0/sys/dev/ath/ath_hal/ar5211/ar5211_misc.c 326695 2017-12-08 15:57:29Z pfg $
*/
#include "opt_ah.h"
@ -554,6 +556,13 @@ ar5211SetCoverageClass(struct ath_hal *ah, uint8_t coverageclass, int now)
{
}
HAL_STATUS
ar5211SetQuiet(struct ath_hal *ah, uint32_t period, uint32_t duration,
uint32_t next_start, HAL_QUIET_FLAG flags)
{
return HAL_OK;
}
/*
* Control Adaptive Noise Immunity Parameters
*/

View File

@ -1,4 +1,6 @@
/*
/*-
* SPDX-License-Identifier: ISC
*
* Copyright (c) 2002-2008 Sam Leffler, Errno Consulting
* Copyright (c) 2002-2006 Atheros Communications, Inc.
*
@ -14,7 +16,7 @@
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
* $FreeBSD: releng/11.1/sys/dev/ath/ath_hal/ar5211/ar5211_phy.c 191022 2009-04-13 21:01:08Z sam $
* $FreeBSD: releng/12.0/sys/dev/ath/ath_hal/ar5211/ar5211_phy.c 326695 2017-12-08 15:57:29Z pfg $
*/
#include "opt_ah.h"

View File

@ -1,4 +1,6 @@
/*
/*-
* SPDX-License-Identifier: ISC
*
* Copyright (c) 2002-2008 Sam Leffler, Errno Consulting
* Copyright (c) 2002-2006 Atheros Communications, Inc.
*
@ -14,7 +16,7 @@
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
* $FreeBSD: releng/11.1/sys/dev/ath/ath_hal/ar5211/ar5211_power.c 265112 2014-04-30 02:03:13Z adrian $
* $FreeBSD: releng/12.0/sys/dev/ath/ath_hal/ar5211/ar5211_power.c 326695 2017-12-08 15:57:29Z pfg $
*/
#include "opt_ah.h"

View File

@ -1,4 +1,6 @@
/*
/*-
* SPDX-License-Identifier: ISC
*
* Copyright (c) 2002-2008 Sam Leffler, Errno Consulting
* Copyright (c) 2002-2006 Atheros Communications, Inc.
*
@ -14,7 +16,7 @@
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
* $FreeBSD: releng/11.1/sys/dev/ath/ath_hal/ar5211/ar5211_recv.c 238278 2012-07-09 07:19:11Z adrian $
* $FreeBSD: releng/12.0/sys/dev/ath/ath_hal/ar5211/ar5211_recv.c 326695 2017-12-08 15:57:29Z pfg $
*/
#include "opt_ah.h"

View File

@ -1,4 +1,6 @@
/*
/*-
* SPDX-License-Identifier: ISC
*
* Copyright (c) 2002-2009 Sam Leffler, Errno Consulting
* Copyright (c) 2002-2006 Atheros Communications, Inc.
*
@ -14,7 +16,7 @@
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
* $FreeBSD: releng/11.1/sys/dev/ath/ath_hal/ar5211/ar5211_reset.c 298939 2016-05-02 19:56:48Z pfg $
* $FreeBSD: releng/12.0/sys/dev/ath/ath_hal/ar5211/ar5211_reset.c 326695 2017-12-08 15:57:29Z pfg $
*/
#include "opt_ah.h"

View File

@ -1,4 +1,6 @@
/*
/*-
* SPDX-License-Identifier: ISC
*
* Copyright (c) 2002-2009 Sam Leffler, Errno Consulting
* Copyright (c) 2002-2006 Atheros Communications, Inc.
*
@ -14,7 +16,7 @@
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
* $FreeBSD: releng/11.1/sys/dev/ath/ath_hal/ar5211/ar5211_xmit.c 239051 2012-08-05 10:12:27Z adrian $
* $FreeBSD: releng/12.0/sys/dev/ath/ath_hal/ar5211/ar5211_xmit.c 326695 2017-12-08 15:57:29Z pfg $
*/
#include "opt_ah.h"

View File

@ -1,4 +1,6 @@
/*
/*-
* SPDX-License-Identifier: ISC
*
* Copyright (c) 2002-2008 Sam Leffler, Errno Consulting
* Copyright (c) 2002-2006 Atheros Communications, Inc.
*
@ -14,7 +16,7 @@
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
* $FreeBSD: releng/11.1/sys/dev/ath/ath_hal/ar5211/ar5211desc.h 243249 2012-11-18 20:41:46Z adrian $
* $FreeBSD: releng/12.0/sys/dev/ath/ath_hal/ar5211/ar5211desc.h 326695 2017-12-08 15:57:29Z pfg $
*/
#ifndef _DEV_ATH_AR5211DESC_H
#define _DEV_ATH_AR5211DESC_H

View File

@ -1,4 +1,6 @@
/*
/*-
* SPDX-License-Identifier: ISC
*
* Copyright (c) 2002-2008 Sam Leffler, Errno Consulting
* Copyright (c) 2002-2006 Atheros Communications, Inc.
*
@ -14,7 +16,7 @@
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
* $FreeBSD: releng/11.1/sys/dev/ath/ath_hal/ar5211/ar5211phy.h 204644 2010-03-03 17:32:32Z rpaulo $
* $FreeBSD: releng/12.0/sys/dev/ath/ath_hal/ar5211/ar5211phy.h 326695 2017-12-08 15:57:29Z pfg $
*/
#ifndef _DEV_ATH_AR5211PHY_H
#define _DEV_ATH_AR5211PHY_H

View File

@ -1,4 +1,6 @@
/*
/*-
* SPDX-License-Identifier: ISC
*
* Copyright (c) 2002-2008 Sam Leffler, Errno Consulting
* Copyright (c) 2002-2006 Atheros Communications, Inc.
*
@ -14,7 +16,7 @@
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
* $FreeBSD: releng/11.1/sys/dev/ath/ath_hal/ar5211/ar5211reg.h 228980 2011-12-30 02:58:37Z dim $
* $FreeBSD: releng/12.0/sys/dev/ath/ath_hal/ar5211/ar5211reg.h 326695 2017-12-08 15:57:29Z pfg $
*/
#ifndef _DEV_ATH_AR5211REG_H
#define _DEV_ATH_AR5211REG_H

View File

@ -14,7 +14,7 @@
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
* $FreeBSD: releng/11.1/sys/dev/ath/ath_hal/ar5211/boss.ini 245952 2013-01-26 22:08:21Z pfg $
* $FreeBSD: releng/12.0/sys/dev/ath/ath_hal/ar5211/boss.ini 245952 2013-01-26 22:08:21Z pfg $
*/
/* Auto Generated PCI Register Writes. Created: 09/12/02 */

View File

@ -1,4 +1,6 @@
/*
/*-
* SPDX-License-Identifier: ISC
*
* Copyright (c) 2002-2009 Sam Leffler, Errno Consulting
* Copyright (c) 2002-2008 Atheros Communications, Inc.
*
@ -14,7 +16,7 @@
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
* $FreeBSD: releng/11.1/sys/dev/ath/ath_hal/ar5212/ar2316.c 298939 2016-05-02 19:56:48Z pfg $
* $FreeBSD: releng/12.0/sys/dev/ath/ath_hal/ar5212/ar2316.c 326695 2017-12-08 15:57:29Z pfg $
*/
#include "opt_ah.h"

View File

@ -1,4 +1,6 @@
/*
/*-
* SPDX-License-Identifier: ISC
*
* Copyright (c) 2002-2009 Sam Leffler, Errno Consulting
* Copyright (c) 2002-2008 Atheros Communications, Inc.
*
@ -14,7 +16,7 @@
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
* $FreeBSD: releng/11.1/sys/dev/ath/ath_hal/ar5212/ar2317.c 298939 2016-05-02 19:56:48Z pfg $
* $FreeBSD: releng/12.0/sys/dev/ath/ath_hal/ar5212/ar2317.c 326695 2017-12-08 15:57:29Z pfg $
*/
#include "opt_ah.h"

View File

@ -1,4 +1,6 @@
/*
/*-
* SPDX-License-Identifier: ISC
*
* Copyright (c) 2002-2009 Sam Leffler, Errno Consulting
* Copyright (c) 2002-2008 Atheros Communications, Inc.
*
@ -14,7 +16,7 @@
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
* $FreeBSD: releng/11.1/sys/dev/ath/ath_hal/ar5212/ar2413.c 298939 2016-05-02 19:56:48Z pfg $
* $FreeBSD: releng/12.0/sys/dev/ath/ath_hal/ar5212/ar2413.c 326695 2017-12-08 15:57:29Z pfg $
*/
#include "opt_ah.h"

View File

@ -1,4 +1,6 @@
/*
/*-
* SPDX-License-Identifier: ISC
*
* Copyright (c) 2002-2009 Sam Leffler, Errno Consulting
* Copyright (c) 2002-2008 Atheros Communications, Inc.
*
@ -14,7 +16,7 @@
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
* $FreeBSD: releng/11.1/sys/dev/ath/ath_hal/ar5212/ar2425.c 298939 2016-05-02 19:56:48Z pfg $
* $FreeBSD: releng/12.0/sys/dev/ath/ath_hal/ar5212/ar2425.c 326695 2017-12-08 15:57:29Z pfg $
*/
#include "opt_ah.h"

View File

@ -1,4 +1,6 @@
/*
/*-
* SPDX-License-Identifier: ISC
*
* Copyright (c) 2002-2009 Sam Leffler, Errno Consulting
* Copyright (c) 2002-2008 Atheros Communications, Inc.
*
@ -14,7 +16,7 @@
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
* $FreeBSD: releng/11.1/sys/dev/ath/ath_hal/ar5212/ar5111.c 187831 2009-01-28 18:00:22Z sam $
* $FreeBSD: releng/12.0/sys/dev/ath/ath_hal/ar5212/ar5111.c 326695 2017-12-08 15:57:29Z pfg $
*/
#include "opt_ah.h"

View File

@ -1,4 +1,6 @@
/*
/*-
* SPDX-License-Identifier: ISC
*
* Copyright (c) 2002-2009 Sam Leffler, Errno Consulting
* Copyright (c) 2002-2008 Atheros Communications, Inc.
*
@ -14,7 +16,7 @@
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
* $FreeBSD: releng/11.1/sys/dev/ath/ath_hal/ar5212/ar5112.c 225883 2011-09-30 05:17:57Z adrian $
* $FreeBSD: releng/12.0/sys/dev/ath/ath_hal/ar5212/ar5112.c 326695 2017-12-08 15:57:29Z pfg $
*/
#include "opt_ah.h"

View File

@ -1,4 +1,6 @@
/*
/*-
* SPDX-License-Identifier: ISC
*
* Copyright (c) 2002-2009 Sam Leffler, Errno Consulting
* Copyright (c) 2002-2008 Atheros Communications, Inc.
*
@ -14,7 +16,7 @@
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
* $FreeBSD: releng/11.1/sys/dev/ath/ath_hal/ar5212/ar5212.h 290612 2015-11-09 15:59:42Z adrian $
* $FreeBSD: releng/12.0/sys/dev/ath/ath_hal/ar5212/ar5212.h 326695 2017-12-08 15:57:29Z pfg $
*/
#ifndef _ATH_AR5212_H_
#define _ATH_AR5212_H_

View File

@ -14,7 +14,7 @@
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
* $FreeBSD: releng/11.1/sys/dev/ath/ath_hal/ar5212/ar5212.ini 204644 2010-03-03 17:32:32Z rpaulo $
* $FreeBSD: releng/12.0/sys/dev/ath/ath_hal/ar5212/ar5212.ini 204644 2010-03-03 17:32:32Z rpaulo $
*/
/* Auto Generated PCI Register Writes. Created: 09/01/04 */

View File

@ -1,4 +1,6 @@
/*
/*-
* SPDX-License-Identifier: ISC
*
* Copyright (c) 2002-2009 Sam Leffler, Errno Consulting
* Copyright (c) 2002-2008 Atheros Communications, Inc.
*
@ -14,7 +16,7 @@
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
* $FreeBSD: releng/11.1/sys/dev/ath/ath_hal/ar5212/ar5212_ani.c 280940 2015-04-01 03:42:46Z adrian $
* $FreeBSD: releng/12.0/sys/dev/ath/ath_hal/ar5212/ar5212_ani.c 334848 2018-06-08 18:15:23Z adrian $
*/
#include "opt_ah.h"
@ -998,6 +1000,9 @@ ar5212AniPoll(struct ath_hal *ah, const struct ieee80211_channel *chan)
ahp->ah_stats.ast_ani_lneg++;
/* restart ANI period if listenTime is invalid */
ar5212AniRestart(ah, aniState);
/* Don't do any further ANI processing here */
return;
}
/* XXX beware of overflow? */
aniState->listenTime += listenTime;

View File

@ -1,4 +1,6 @@
/*
/*-
* SPDX-License-Identifier: ISC
*
* Copyright (c) 2002-2009 Sam Leffler, Errno Consulting
* Copyright (c) 2002-2008 Atheros Communications, Inc.
*
@ -14,7 +16,7 @@
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
* $FreeBSD: releng/11.1/sys/dev/ath/ath_hal/ar5212/ar5212_attach.c 305614 2016-09-08 15:05:25Z pfg $
* $FreeBSD: releng/12.0/sys/dev/ath/ath_hal/ar5212/ar5212_attach.c 326695 2017-12-08 15:57:29Z pfg $
*/
#include "opt_ah.h"
@ -899,7 +901,8 @@ ar5212FillCapabilityInfo(struct ath_hal *ah)
pCap->halBssidMatchSupport = AH_TRUE;
}
pCap->halTstampPrecision = 15;
pCap->halRxTstampPrecision = 15;
pCap->halTxTstampPrecision = 16;
pCap->halIntrMask = HAL_INT_COMMON
| HAL_INT_RX
| HAL_INT_TX

View File

@ -1,4 +1,6 @@
/*
/*-
* SPDX-License-Identifier: ISC
*
* Copyright (c) 2002-2008 Sam Leffler, Errno Consulting
* Copyright (c) 2002-2008 Atheros Communications, Inc.
*
@ -14,7 +16,7 @@
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
* $FreeBSD: releng/11.1/sys/dev/ath/ath_hal/ar5212/ar5212_beacon.c 243588 2012-11-27 02:18:41Z adrian $
* $FreeBSD: releng/12.0/sys/dev/ath/ath_hal/ar5212/ar5212_beacon.c 326695 2017-12-08 15:57:29Z pfg $
*/
#include "opt_ah.h"

View File

@ -1,4 +1,6 @@
/*
/*-
* SPDX-License-Identifier: ISC
*
* Copyright (c) 2002-2008 Sam Leffler, Errno Consulting
* Copyright (c) 2002-2008 Atheros Communications, Inc.
*
@ -14,7 +16,7 @@
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
* $FreeBSD: releng/11.1/sys/dev/ath/ath_hal/ar5212/ar5212_eeprom.c 204644 2010-03-03 17:32:32Z rpaulo $
* $FreeBSD: releng/12.0/sys/dev/ath/ath_hal/ar5212/ar5212_eeprom.c 326695 2017-12-08 15:57:29Z pfg $
*/
#include "opt_ah.h"

View File

@ -1,4 +1,6 @@
/*
/*-
* SPDX-License-Identifier: ISC
*
* Copyright (c) 2002-2008 Sam Leffler, Errno Consulting
* Copyright (c) 2002-2008 Atheros Communications, Inc.
*
@ -14,7 +16,7 @@
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
* $FreeBSD: releng/11.1/sys/dev/ath/ath_hal/ar5212/ar5212_gpio.c 188974 2009-02-24 00:12:16Z sam $
* $FreeBSD: releng/12.0/sys/dev/ath/ath_hal/ar5212/ar5212_gpio.c 326695 2017-12-08 15:57:29Z pfg $
*/
#include "opt_ah.h"

View File

@ -1,4 +1,6 @@
/*
/*-
* SPDX-License-Identifier: ISC
*
* Copyright (c) 2002-2008 Sam Leffler, Errno Consulting
* Copyright (c) 2002-2008 Atheros Communications, Inc.
*
@ -14,7 +16,7 @@
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
* $FreeBSD: releng/11.1/sys/dev/ath/ath_hal/ar5212/ar5212_interrupts.c 201758 2010-01-07 21:01:37Z mbr $
* $FreeBSD: releng/12.0/sys/dev/ath/ath_hal/ar5212/ar5212_interrupts.c 326695 2017-12-08 15:57:29Z pfg $
*/
#include "opt_ah.h"

View File

@ -1,4 +1,6 @@
/*
/*-
* SPDX-License-Identifier: ISC
*
* Copyright (c) 2002-2008 Sam Leffler, Errno Consulting
* Copyright (c) 2002-2008 Atheros Communications, Inc.
*
@ -14,7 +16,7 @@
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
* $FreeBSD: releng/11.1/sys/dev/ath/ath_hal/ar5212/ar5212_keycache.c 218483 2011-02-09 15:23:16Z adrian $
* $FreeBSD: releng/12.0/sys/dev/ath/ath_hal/ar5212/ar5212_keycache.c 326695 2017-12-08 15:57:29Z pfg $
*/
#include "opt_ah.h"

View File

@ -1,4 +1,6 @@
/*
/*-
* SPDX-License-Identifier: ISC
*
* Copyright (c) 2002-2009 Sam Leffler, Errno Consulting
* Copyright (c) 2002-2008 Atheros Communications, Inc.
*
@ -14,7 +16,7 @@
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
* $FreeBSD: releng/11.1/sys/dev/ath/ath_hal/ar5212/ar5212_misc.c 281128 2015-04-06 01:12:53Z adrian $
* $FreeBSD: releng/12.0/sys/dev/ath/ath_hal/ar5212/ar5212_misc.c 326695 2017-12-08 15:57:29Z pfg $
*/
#include "opt_ah.h"

View File

@ -1,4 +1,6 @@
/*
/*-
* SPDX-License-Identifier: ISC
*
* Copyright (c) 2002-2008 Sam Leffler, Errno Consulting
* Copyright (c) 2002-2008 Atheros Communications, Inc.
*
@ -14,7 +16,7 @@
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
* $FreeBSD: releng/11.1/sys/dev/ath/ath_hal/ar5212/ar5212_phy.c 191022 2009-04-13 21:01:08Z sam $
* $FreeBSD: releng/12.0/sys/dev/ath/ath_hal/ar5212/ar5212_phy.c 326695 2017-12-08 15:57:29Z pfg $
*/
#include "opt_ah.h"

View File

@ -1,4 +1,6 @@
/*
/*-
* SPDX-License-Identifier: ISC
*
* Copyright (c) 2002-2008 Sam Leffler, Errno Consulting
* Copyright (c) 2002-2008 Atheros Communications, Inc.
*
@ -14,7 +16,7 @@
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
* $FreeBSD: releng/11.1/sys/dev/ath/ath_hal/ar5212/ar5212_power.c 298939 2016-05-02 19:56:48Z pfg $
* $FreeBSD: releng/12.0/sys/dev/ath/ath_hal/ar5212/ar5212_power.c 326695 2017-12-08 15:57:29Z pfg $
*/
#include "opt_ah.h"

View File

@ -1,4 +1,6 @@
/*
/*-
* SPDX-License-Identifier: ISC
*
* Copyright (c) 2002-2008 Sam Leffler, Errno Consulting
* Copyright (c) 2002-2008 Atheros Communications, Inc.
*
@ -14,7 +16,7 @@
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
* $FreeBSD: releng/11.1/sys/dev/ath/ath_hal/ar5212/ar5212_recv.c 243169 2012-11-17 02:02:36Z adrian $
* $FreeBSD: releng/12.0/sys/dev/ath/ath_hal/ar5212/ar5212_recv.c 326695 2017-12-08 15:57:29Z pfg $
*/
#include "opt_ah.h"

View File

@ -1,4 +1,6 @@
/*
/*-
* SPDX-License-Identifier: ISC
*
* Copyright (c) 2002-2009 Sam Leffler, Errno Consulting
* Copyright (c) 2002-2008 Atheros Communications, Inc.
*
@ -14,7 +16,7 @@
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
* $FreeBSD: releng/11.1/sys/dev/ath/ath_hal/ar5212/ar5212_reset.c 298939 2016-05-02 19:56:48Z pfg $
* $FreeBSD: releng/12.0/sys/dev/ath/ath_hal/ar5212/ar5212_reset.c 326695 2017-12-08 15:57:29Z pfg $
*/
#include "opt_ah.h"
@ -2735,7 +2737,7 @@ ar5212SetRateDurationTable(struct ath_hal *ah,
AR_RATE_DURATION(rt->info[i].rateCode),
ath_hal_computetxtime(ah, rt,
WLAN_CTRL_FRAME_SIZE,
rt->info[i].controlRate, AH_FALSE));
rt->info[i].controlRate, AH_FALSE, AH_TRUE));
if (!IEEE80211_IS_CHAN_TURBO(chan)) {
/* 11g Table is used to cover the CCK rates. */
rt = ar5212GetRateTable(ah, HAL_MODE_11G);
@ -2748,7 +2750,8 @@ ar5212SetRateDurationTable(struct ath_hal *ah,
OS_REG_WRITE(ah, reg,
ath_hal_computetxtime(ah, rt,
WLAN_CTRL_FRAME_SIZE,
rt->info[i].controlRate, AH_FALSE));
rt->info[i].controlRate, AH_FALSE,
AH_TRUE));
/* cck rates have short preamble option also */
if (rt->info[i].shortPreamble) {
reg += rt->info[i].shortPreamble << 2;
@ -2756,7 +2759,7 @@ ar5212SetRateDurationTable(struct ath_hal *ah,
ath_hal_computetxtime(ah, rt,
WLAN_CTRL_FRAME_SIZE,
rt->info[i].controlRate,
AH_TRUE));
AH_TRUE, AH_TRUE));
}
}
}

View File

@ -1,4 +1,6 @@
/*
/*-
* SPDX-License-Identifier: ISC
*
* Copyright (c) 2002-2008 Sam Leffler, Errno Consulting
* Copyright (c) 2002-2008 Atheros Communications, Inc.
*
@ -14,7 +16,7 @@
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
* $FreeBSD: releng/11.1/sys/dev/ath/ath_hal/ar5212/ar5212_rfgain.c 188197 2009-02-05 21:13:31Z sam $
* $FreeBSD: releng/12.0/sys/dev/ath/ath_hal/ar5212/ar5212_rfgain.c 326695 2017-12-08 15:57:29Z pfg $
*/
#include "opt_ah.h"

View File

@ -1,4 +1,6 @@
/*
/*-
* SPDX-License-Identifier: ISC
*
* Copyright (c) 2002-2009 Sam Leffler, Errno Consulting
* Copyright (c) 2002-2008 Atheros Communications, Inc.
*
@ -14,7 +16,7 @@
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
* $FreeBSD: releng/11.1/sys/dev/ath/ath_hal/ar5212/ar5212_xmit.c 243169 2012-11-17 02:02:36Z adrian $
* $FreeBSD: releng/12.0/sys/dev/ath/ath_hal/ar5212/ar5212_xmit.c 326695 2017-12-08 15:57:29Z pfg $
*/
#include "opt_ah.h"

View File

@ -1,4 +1,6 @@
/*
/*-
* SPDX-License-Identifier: ISC
*
* Copyright (c) 2002-2008 Sam Leffler, Errno Consulting
* Copyright (c) 2002-2008 Atheros Communications, Inc.
*
@ -14,7 +16,7 @@
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
* $FreeBSD: releng/11.1/sys/dev/ath/ath_hal/ar5212/ar5212desc.h 243168 2012-11-17 02:00:33Z adrian $
* $FreeBSD: releng/12.0/sys/dev/ath/ath_hal/ar5212/ar5212desc.h 326695 2017-12-08 15:57:29Z pfg $
*/
#ifndef _ATH_AR5212_DESC_H_
#define _ATH_AR5212_DESC_H_

View File

@ -1,4 +1,6 @@
/*
/*-
* SPDX-License-Identifier: ISC
*
* Copyright (c) 2002-2008 Sam Leffler, Errno Consulting
* Copyright (c) 2002-2008 Atheros Communications, Inc.
*
@ -14,7 +16,7 @@
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
* $FreeBSD: releng/11.1/sys/dev/ath/ath_hal/ar5212/ar5212phy.h 239801 2012-08-29 03:58:13Z adrian $
* $FreeBSD: releng/12.0/sys/dev/ath/ath_hal/ar5212/ar5212phy.h 326695 2017-12-08 15:57:29Z pfg $
*/
#ifndef _DEV_ATH_AR5212PHY_H_
#define _DEV_ATH_AR5212PHY_H_

Some files were not shown because too many files have changed in this diff Show More