📄 ar5212.h
字号:
u_int32_t ah_gpioSelect; /* GPIO pin to use */ u_int32_t ah_polarity; /* polarity to disable RF */ u_int32_t ah_gpioBit; /* after init, prev value */ HAL_BOOL ah_eepEnabled; /* EEPROM bit for capability */ /* * ANI support. */ u_int32_t ah_procPhyErr; /* Process Phy errs */ HAL_BOOL ah_hasHwPhyCounters; /* Hardware has phy counters */ u_int32_t ah_aniPeriod; /* ani update list period */ struct ar5212AniState *ah_curani; /* cached last reference */ struct ar5212AniState ah_ani[64]; /* per-channel state */ /* * Ani tables that change between the 5212 and 5312. * These get set at attach time. * XXX don't belong here * XXX need better explanation */ int ah_totalSizeDesired[5]; int ah_coarseHigh[5]; int ah_coarseLow[5]; int ah_firpwr[5]; /* * Transmit power state. Note these are maintained * here so they can be retrieved by diagnostic tools. */ u_int16_t *ah_pcdacTable; u_int ah_pcdacTableSize; u_int16_t ah_ratesArray[16]; /* * Tx queue interrupt state. */ u_int32_t ah_intrTxqs; HAL_BOOL ah_xrEnable;};#define AH5212(_ah) ((struct ath_hal_5212 *)(_ah))#define IS_5112(ah) \ ((AH_PRIVATE(ah)->ah_analog5GhzRev&0xf0) >= AR_RAD5112_SREV_MAJOR \ && (AH_PRIVATE(ah)->ah_analog5GhzRev&0xf0) < AR_RAD2316_SREV_MAJOR )#define IS_RAD5112_REV1(ah) \ ((AH_PRIVATE(ah)->ah_analog5GhzRev&0x0f) < (AR_RAD5112_SREV_2_0&0x0f))#define IS_RADX112_REV2(ah) \ (IS_5112(ah) && \ ((AH_PRIVATE(ah)->ah_analog5GhzRev == AR_RAD5112_SREV_2_0) || \ (AH_PRIVATE(ah)->ah_analog5GhzRev == AR_RAD2112_SREV_2_0) || \ (AH_PRIVATE(ah)->ah_analog5GhzRev == AR_RAD2112_SREV_2_1) || \ (AH_PRIVATE(ah)->ah_analog5GhzRev == AR_RAD5112_SREV_2_1)))#define IS_5312_2_X(ah) \ (((AH_PRIVATE(ah)->ah_macVersion) == AR_SREV_VERSION_VENICE) && \ (((AH_PRIVATE(ah)->ah_macRev) == 2) || ((AH_PRIVATE(ah)->ah_macRev) == 7)))#define IS_2316(ah) \ ((AH_PRIVATE(ah)->ah_macVersion) == AR_SREV_2415)#define IS_2413(ah) \ ((AH_PRIVATE(ah)->ah_macVersion) == AR_SREV_2413 || IS_2316(ah))#define IS_5424(ah) \ ((AH_PRIVATE(ah)->ah_macVersion) == AR_SREV_5424)#define IS_5413(ah) \ (((AH_PRIVATE(ah)->ah_macVersion) == AR_SREV_5413) || IS_5424(ah))#define IS_PCIE(ah) IS_5424((ah))#define ar5212RfDetach(ah) do { \ if (AH5212(ah)->ah_rfHal.rfDetach != AH_NULL) \ AH5212(ah)->ah_rfHal.rfDetach(ah); \} while (0)#define ar5212GetRfBank(ah, b) \ AH5212(ah)->ah_rfHal.getRfBank(ah, b)extern HAL_BOOL ar5111RfAttach(struct ath_hal *, HAL_STATUS *);extern HAL_BOOL ar5112RfAttach(struct ath_hal *, HAL_STATUS *);extern HAL_BOOL ar2413RfAttach(struct ath_hal *, HAL_STATUS *);extern HAL_BOOL ar5413RfAttach(struct ath_hal *, HAL_STATUS *);extern HAL_BOOL ar2316RfAttach(struct ath_hal *, HAL_STATUS *);extern HAL_BOOL ar2317RfAttach(struct ath_hal *, HAL_STATUS *);struct ath_hal;extern u_int32_t ar5212GetRadioRev(struct ath_hal *ah);extern struct ath_hal_5212 * ar5212NewState(u_int16_t devid, HAL_SOFTC sc, HAL_BUS_TAG st, HAL_BUS_HANDLE sh, HAL_STATUS *status);extern struct ath_hal * ar5212Attach(u_int16_t devid, HAL_SOFTC sc, HAL_BUS_TAG st, HAL_BUS_HANDLE sh, HAL_STATUS *status);extern void ar5212Detach(struct ath_hal *ah);extern HAL_BOOL ar5212ChipTest(struct ath_hal *ah);extern HAL_BOOL ar5212GetChannelEdges(struct ath_hal *ah, u_int16_t flags, u_int16_t *low, u_int16_t *high);extern HAL_BOOL ar5212FillCapabilityInfo(struct ath_hal *ah);extern void ar5212BeaconInit(struct ath_hal *ah, u_int32_t next_beacon, u_int32_t beacon_period);extern HAL_BOOL ar5212WaitForBeaconDone(struct ath_hal *, HAL_BUS_ADDR baddr);extern void ar5212ResetStaBeaconTimers(struct ath_hal *ah);extern void ar5212SetStaBeaconTimers(struct ath_hal *ah, const HAL_BEACON_STATE *);extern HAL_BOOL ar5212IsInterruptPending(struct ath_hal *ah);extern HAL_BOOL ar5212GetPendingInterrupts(struct ath_hal *ah, HAL_INT *);extern HAL_INT ar5212GetInterrupts(struct ath_hal *ah);extern HAL_INT ar5212SetInterrupts(struct ath_hal *ah, HAL_INT ints);extern u_int32_t ar5212GetKeyCacheSize(struct ath_hal *);extern HAL_BOOL ar5212IsKeyCacheEntryValid(struct ath_hal *, u_int16_t entry);extern HAL_BOOL ar5212ResetKeyCacheEntry(struct ath_hal *ah, u_int16_t entry);extern HAL_BOOL ar5212SetKeyCacheEntryMac(struct ath_hal *, u_int16_t entry, const u_int8_t *mac);extern HAL_BOOL ar5212SetKeyCacheEntry(struct ath_hal *ah, u_int16_t entry, const HAL_KEYVAL *k, const u_int8_t *mac, int xorKey);extern void ar5212GetMacAddress(struct ath_hal *ah, u_int8_t *mac);extern HAL_BOOL ar5212SetMacAddress(struct ath_hal *ah, const u_int8_t *);extern void ar5212GetBssIdMask(struct ath_hal *ah, u_int8_t *mac);extern HAL_BOOL ar5212SetBssIdMask(struct ath_hal *, const u_int8_t *);extern HAL_BOOL ar5212SetRegulatoryDomain(struct ath_hal *ah, u_int16_t regDomain, HAL_STATUS *stats);extern u_int ar5212GetWirelessModes(struct ath_hal *ah);extern HAL_BOOL ar5212GetRfKill(struct ath_hal *ah);extern void ar5212EnableRfKill(struct ath_hal *);extern HAL_BOOL ar5212GpioCfgOutput(struct ath_hal *, u_int32_t gpio);extern HAL_BOOL ar5212GpioCfgInput(struct ath_hal *, u_int32_t gpio);extern HAL_BOOL ar5212GpioSet(struct ath_hal *, u_int32_t gpio, u_int32_t val);extern u_int32_t ar5212GpioGet(struct ath_hal *ah, u_int32_t gpio);extern void ar5212GpioSetIntr(struct ath_hal *ah, u_int, u_int32_t ilevel);extern void ar5212SetLedState(struct ath_hal *ah, HAL_LED_STATE state);extern void ar5212WriteAssocid(struct ath_hal *ah, const u_int8_t *bssid, u_int16_t assocId);extern u_int32_t ar5212GetTsf32(struct ath_hal *ah);extern u_int64_t ar5212GetTsf64(struct ath_hal *ah);extern void ar5212ResetTsf(struct ath_hal *ah);extern void ar5212SetBasicRate(struct ath_hal *ah, HAL_RATE_SET *pSet);extern u_int32_t ar5212GetRandomSeed(struct ath_hal *ah);extern HAL_BOOL ar5212DetectCardPresent(struct ath_hal *ah);extern void ar5212UpdateMibCounters(struct ath_hal *ah, HAL_MIB_STATS* stats);extern HAL_BOOL ar5212IsJapanChannelSpreadSupported(struct ath_hal *ah);extern u_int32_t ar5212GetCurRssi(struct ath_hal *ah);extern u_int ar5212GetDefAntenna(struct ath_hal *ah);extern void ar5212SetDefAntenna(struct ath_hal *ah, u_int antenna);extern HAL_BOOL ar5212SetAntennaSwitch(struct ath_hal *ah, HAL_ANT_SETTING settings, HAL_CHANNEL *chan);extern HAL_BOOL ar5212IsSleepAfterBeaconBroken(struct ath_hal *ah);extern HAL_BOOL ar5212SetSlotTime(struct ath_hal *, u_int);extern u_int ar5212GetSlotTime(struct ath_hal *);extern HAL_BOOL ar5212SetAckTimeout(struct ath_hal *, u_int);extern u_int ar5212GetAckTimeout(struct ath_hal *);extern HAL_BOOL ar5212SetCTSTimeout(struct ath_hal *, u_int);extern u_int ar5212GetCTSTimeout(struct ath_hal *);extern HAL_BOOL ar5212SetDecompMask(struct ath_hal *, u_int16_t, int);void ar5212SetCoverageClass(struct ath_hal *, u_int8_t, int);extern void ar5212SetPCUConfig(struct ath_hal *);extern HAL_BOOL ar5212Use32KHzclock(struct ath_hal *ah, HAL_OPMODE opmode);extern void ar5212SetupClock(struct ath_hal *ah, HAL_OPMODE opmode);extern void ar5212RestoreClock(struct ath_hal *ah, HAL_OPMODE opmode);extern HAL_STATUS ar5212GetCapability(struct ath_hal *, HAL_CAPABILITY_TYPE, u_int32_t, u_int32_t *);extern HAL_BOOL ar5212SetCapability(struct ath_hal *, HAL_CAPABILITY_TYPE, u_int32_t, u_int32_t, HAL_STATUS *);extern HAL_BOOL ar5212GetDiagState(struct ath_hal *ah, int request, const void *args, u_int32_t argsize, void **result, u_int32_t *resultsize);extern HAL_BOOL ar5212SetPowerMode(struct ath_hal *ah, HAL_POWER_MODE mode, int setChip);extern HAL_POWER_MODE ar5212GetPowerMode(struct ath_hal *ah);extern HAL_BOOL ar5212GetPowerStatus(struct ath_hal *ah);extern u_int32_t ar5212GetRxDP(struct ath_hal *ath);extern void ar5212SetRxDP(struct ath_hal *ah, u_int32_t rxdp);extern void ar5212EnableReceive(struct ath_hal *ah);extern HAL_BOOL ar5212StopDmaReceive(struct ath_hal *ah);extern void ar5212StartPcuReceive(struct ath_hal *ah);extern void ar5212StopPcuReceive(struct ath_hal *ah);extern void ar5212SetMulticastFilter(struct ath_hal *ah, u_int32_t filter0, u_int32_t filter1);extern HAL_BOOL ar5212ClrMulticastFilterIndex(struct ath_hal *, u_int32_t ix);extern HAL_BOOL ar5212SetMulticastFilterIndex(struct ath_hal *, u_int32_t ix);extern u_int32_t ar5212GetRxFilter(struct ath_hal *ah);extern void ar5212SetRxFilter(struct ath_hal *ah, u_int32_t bits);extern HAL_BOOL ar5212SetupRxDesc(struct ath_hal *, struct ath_desc *, u_int32_t size, u_int flags);extern HAL_STATUS ar5212ProcRxDesc(struct ath_hal *ah, struct ath_desc *, u_int32_t, struct ath_desc *, u_int64_t);extern HAL_BOOL ar5212Reset(struct ath_hal *ah, HAL_OPMODE opmode, HAL_CHANNEL *chan, HAL_BOOL bChannelChange, HAL_STATUS *status);extern void ar5212SetOperatingMode(struct ath_hal *ah, int opmode);extern HAL_BOOL ar5212PhyDisable(struct ath_hal *ah);extern HAL_BOOL ar5212Disable(struct ath_hal *ah);extern HAL_BOOL ar5212ChipReset(struct ath_hal *ah, HAL_CHANNEL *);extern HAL_BOOL ar5212PerCalibration(struct ath_hal *ah, HAL_CHANNEL *chan, HAL_BOOL *isIQdone);extern int16_t ar5212GetNoiseFloor(struct ath_hal *ah);extern HAL_BOOL ar5212SetTxPowerLimit(struct ath_hal *ah, u_int32_t limit);//extern HAL_BOOL ar5212GetChipPowerLimits(struct ath_hal *ah,// HAL_CHANNEL *chans, u_int32_t nchans);extern void ar5212InitializeGainValues(struct ath_hal *);extern HAL_RFGAIN ar5212GetRfgain(struct ath_hal *ah);extern HAL_BOOL ar5212UpdateTxTrigLevel(struct ath_hal *, HAL_BOOL IncTrigLevel);extern HAL_BOOL ar5212SetTxQueueProps(struct ath_hal *ah, int q, const HAL_TXQ_INFO *qInfo);extern HAL_BOOL ar5212GetTxQueueProps(struct ath_hal *ah, int q, HAL_TXQ_INFO *qInfo);extern int ar5212SetupTxQueue(struct ath_hal *ah, HAL_TX_QUEUE type, const HAL_TXQ_INFO *qInfo);extern HAL_BOOL ar5212ReleaseTxQueue(struct ath_hal *ah, u_int q);extern HAL_BOOL ar5212ResetTxQueue(struct ath_hal *ah, u_int q);extern u_int32_t ar5212GetTxDP(struct ath_hal *ah, u_int q);extern HAL_BOOL ar5212SetTxDP(struct ath_hal *ah, u_int q, u_int32_t txdp);extern HAL_BOOL ar5212StartTxDma(struct ath_hal *ah, u_int q);extern u_int32_t ar5212NumTxPending(struct ath_hal *ah, u_int q);extern HAL_BOOL ar5212StopTxDma(struct ath_hal *ah, u_int q);extern HAL_BOOL ar5212UpdateCTSForBursting(struct ath_hal *, struct ath_desc *, struct ath_desc *,struct ath_desc *, struct ath_desc *, u_int32_t, u_int32_t);extern HAL_BOOL ar5212SetupTxDesc(struct ath_hal *ah, struct ath_desc *ds, u_int pktLen, u_int hdrLen, HAL_PKT_TYPE type, u_int txPower, u_int txRate0, u_int txTries0, u_int keyIx, u_int antMode, u_int flags, u_int rtsctsRate, u_int rtsctsDuration, u_int compicvLen, u_int compivLen, u_int comp);extern HAL_BOOL ar5212SetupXTxDesc(struct ath_hal *, struct ath_desc *, u_int txRate1, u_int txRetries1, u_int txRate2, u_int txRetries2, u_int txRate3, u_int txRetries3);extern HAL_BOOL ar5212FillTxDesc(struct ath_hal *ah, struct ath_desc *ds, u_int segLen, HAL_BOOL firstSeg, HAL_BOOL lastSeg, const struct ath_desc *ds0);extern HAL_STATUS ar5212ProcTxDesc(struct ath_hal *ah, struct ath_desc *);extern void ar5212GetTxIntrQueue(struct ath_hal *ah, u_int32_t *);extern void ar5212IntrReqTxDesc(struct ath_hal *ah, struct ath_desc *);#ifdef AH_PRIVATE_DIAGextern void ar5212_ContTxMode(struct ath_hal *, struct ath_desc *, int mode);#endifextern const HAL_RATE_TABLE *ar5212GetRateTable(struct ath_hal *, u_int mode);extern void ar5212EnableMIBCounters(struct ath_hal *);extern void ar5212DisableMIBCounters(struct ath_hal *);extern void ar5212AniAttach(struct ath_hal *);extern void ar5212AniDetach(struct ath_hal *);extern struct ar5212AniState *ar5212AniGetCurrentState(struct ath_hal *);extern struct ar5212Stats *ar5212AniGetCurrentStats(struct ath_hal *);extern HAL_BOOL ar5212AniControl(struct ath_hal *, HAL_ANI_CMD cmd, int param);struct ath_rx_status;extern void ar5212AniPhyErrReport(struct ath_hal *ah, const struct ath_rx_status *rs);extern void ar5212ProcessMibIntr(struct ath_hal *, const HAL_NODE_STATS *);extern void ar5212AniArPoll(struct ath_hal *, const HAL_NODE_STATS *, HAL_CHANNEL *);extern void ar5212AniReset(struct ath_hal *);extern void ar5212CheckDfs(struct ath_hal *ah, HAL_CHANNEL *chan);extern void ar5212DfsFound(struct ath_hal *ah, HAL_CHANNEL *chan, u_int64_t nolTime);extern void ar5212EnableDfs(struct ath_hal *ah, HAL_PHYERR_PARAM *pe);extern void ar5212GetDfsThresh(struct ath_hal *ah, HAL_PHYERR_PARAM *pe);extern HAL_BOOL ar5212RadarWait(struct ath_hal *ah, HAL_CHANNEL *chan);extern void ar5212TxEnable(struct ath_hal *ah,HAL_BOOL enable);#if defined(AH_PRIVATE_DIAG) && defined(AH_SUPPORT_DFS)extern HAL_BOOL ar5212SetRadarThresholds(struct ath_hal *ah, const u_int32_t threshType, const u_int32_t value);extern HAL_BOOL ar5212GetRadarThresholds(struct ath_hal *ah, struct ar5212RadarState *thresh);#endifextern HAL_STATUS ar5212EepromAttach(struct ath_hal *ah);extern void ar5212XrEnable(struct ath_hal *ah);extern void ar5212XrDisable(struct ath_hal *ah);#endif /* _ATH_AR5212_H_ */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -