112657Skvn#ifndef	__AR9300_STUB_FUNCS_H__
212657Skvn#define	__AR9300_STUB_FUNCS_H__
312657Skvn
412657Skvnextern	uint32_t ar9300_Stub_GetRadioRev(struct ath_hal *ah);
512657Skvn
612657Skvn#if 0
712657Skvnextern	void ar9300_Stub_InitState(struct ath_hal_5212 *, uint16_t devid, HAL_SOFTC,
812657Skvn		HAL_BUS_TAG st, HAL_BUS_HANDLE sh, HAL_STATUS *status);
912657Skvn#endif
1012657Skvnextern	void ar9300_Stub_Detach(struct ath_hal *ah);
1112657Skvnextern  HAL_BOOL ar9300_Stub_ChipTest(struct ath_hal *ah);
1212657Skvnextern  HAL_BOOL ar9300_Stub_GetChannelEdges(struct ath_hal *ah,
1312657Skvn                uint16_t flags, uint16_t *low, uint16_t *high);
1412657Skvnextern	HAL_BOOL ar9300_Stub_FillCapabilityInfo(struct ath_hal *ah);
1512657Skvn
1612657Skvnextern	void ar9300_Stub_SetBeaconTimers(struct ath_hal *ah,
1712657Skvn		const HAL_BEACON_TIMERS *);
1812657Skvnextern	void ar9300_Stub_BeaconInit(struct ath_hal *ah,
1912657Skvn		uint32_t next_beacon, uint32_t beacon_period);
2012657Skvnextern	void ar9300_Stub_ResetStaBeaconTimers(struct ath_hal *ah);
2112657Skvnextern	void ar9300_Stub_SetStaBeaconTimers(struct ath_hal *ah,
2212657Skvn		const HAL_BEACON_STATE *);
2312657Skvnextern	uint64_t ar9300_Stub_GetNextTBTT(struct ath_hal *);
2412657Skvn
2512657Skvnextern	HAL_BOOL ar9300_Stub_IsInterruptPending(struct ath_hal *ah);
2612657Skvnextern	HAL_BOOL ar9300_Stub_GetPendingInterrupts(struct ath_hal *ah, HAL_INT *);
2712657Skvnextern	HAL_INT ar9300_Stub_GetInterrupts(struct ath_hal *ah);
2812657Skvnextern	HAL_INT ar9300_Stub_SetInterrupts(struct ath_hal *ah, HAL_INT ints);
2912657Skvn
3012657Skvnextern	uint32_t ar9300_Stub_GetKeyCacheSize(struct ath_hal *);
3112657Skvnextern	HAL_BOOL ar9300_Stub_IsKeyCacheEntryValid(struct ath_hal *, uint16_t entry);
3212657Skvnextern	HAL_BOOL ar9300_Stub_ResetKeyCacheEntry(struct ath_hal *ah, uint16_t entry);
3312657Skvnextern	HAL_BOOL ar9300_Stub_SetKeyCacheEntryMac(struct ath_hal *,
3412657Skvn			uint16_t entry, const uint8_t *mac);
3512657Skvnextern	HAL_BOOL ar9300_Stub_SetKeyCacheEntry(struct ath_hal *ah, uint16_t entry,
3612657Skvn                       const HAL_KEYVAL *k, const uint8_t *mac, int xorKey);
3712657Skvn
3812657Skvnextern	void ar9300_Stub_GetMacAddress(struct ath_hal *ah, uint8_t *mac);
3912657Skvnextern	HAL_BOOL ar9300_Stub_SetMacAddress(struct ath_hal *ah, const uint8_t *);
4012657Skvnextern	void ar9300_Stub_GetBssIdMask(struct ath_hal *ah, uint8_t *mac);
4112657Skvnextern	HAL_BOOL ar9300_Stub_SetBssIdMask(struct ath_hal *, const uint8_t *);
4212657Skvnextern	HAL_BOOL ar9300_Stub_EepromRead(struct ath_hal *, u_int off, uint16_t *data);
4312657Skvnextern	HAL_BOOL ar9300_Stub_EepromWrite(struct ath_hal *, u_int off, uint16_t data);
4412657Skvnextern	HAL_BOOL ar9300_Stub_SetRegulatoryDomain(struct ath_hal *ah,
4512657Skvn		uint16_t regDomain, HAL_STATUS *stats);
4612657Skvnextern	u_int ar9300_Stub_GetWirelessModes(struct ath_hal *ah);
4712657Skvnextern	void ar9300_Stub_EnableRfKill(struct ath_hal *);
4812657Skvnextern	HAL_BOOL ar9300_Stub_GpioCfgOutput(struct ath_hal *, uint32_t gpio,
4912657Skvn		HAL_GPIO_MUX_TYPE);
5012657Skvnextern	HAL_BOOL ar9300_Stub_GpioCfgInput(struct ath_hal *, uint32_t gpio);
5112657Skvnextern	HAL_BOOL ar9300_Stub_GpioSet(struct ath_hal *, uint32_t gpio, uint32_t val);
5212657Skvnextern	uint32_t ar9300_Stub_GpioGet(struct ath_hal *ah, uint32_t gpio);
5312657Skvnextern	void ar9300_Stub_GpioSetIntr(struct ath_hal *ah, u_int, uint32_t ilevel);
5412657Skvnextern	void ar9300_Stub_SetLedState(struct ath_hal *ah, HAL_LED_STATE state);
5512657Skvnextern	void ar9300_Stub_WriteAssocid(struct ath_hal *ah, const uint8_t *bssid,
5612657Skvn		uint16_t assocId);
5712657Skvnextern	uint32_t ar9300_Stub_GetTsf32(struct ath_hal *ah);
58extern	uint64_t ar9300_Stub_GetTsf64(struct ath_hal *ah);
59extern	void ar9300_Stub_SetTsf64(struct ath_hal *ah, uint64_t tsf64);
60extern	void ar9300_Stub_ResetTsf(struct ath_hal *ah);
61extern	void ar9300_Stub_SetBasicRate(struct ath_hal *ah, HAL_RATE_SET *pSet);
62extern	uint32_t ar9300_Stub_GetRandomSeed(struct ath_hal *ah);
63extern	HAL_BOOL ar9300_Stub_DetectCardPresent(struct ath_hal *ah);
64extern	void ar9300_Stub_EnableMibCounters(struct ath_hal *);
65extern	void ar9300_Stub_DisableMibCounters(struct ath_hal *);
66extern	void ar9300_Stub_UpdateMibCounters(struct ath_hal *ah, HAL_MIB_STATS* stats);
67extern	HAL_BOOL ar9300_Stub_IsJapanChannelSpreadSupported(struct ath_hal *ah);
68extern	uint32_t ar9300_Stub_GetCurRssi(struct ath_hal *ah);
69extern	u_int ar9300_Stub_GetDefAntenna(struct ath_hal *ah);
70extern	void ar9300_Stub_SetDefAntenna(struct ath_hal *ah, u_int antenna);
71extern	HAL_ANT_SETTING ar9300_Stub_GetAntennaSwitch(struct ath_hal *);
72extern	HAL_BOOL ar9300_Stub_SetAntennaSwitch(struct ath_hal *, HAL_ANT_SETTING);
73extern	HAL_BOOL ar9300_Stub_IsSleepAfterBeaconBroken(struct ath_hal *ah);
74extern	HAL_BOOL ar9300_Stub_SetSifsTime(struct ath_hal *, u_int);
75extern	u_int ar9300_Stub_GetSifsTime(struct ath_hal *);
76extern	HAL_BOOL ar9300_Stub_SetSlotTime(struct ath_hal *, u_int);
77extern	u_int ar9300_Stub_GetSlotTime(struct ath_hal *);
78extern	HAL_BOOL ar9300_Stub_SetAckTimeout(struct ath_hal *, u_int);
79extern	u_int ar9300_Stub_GetAckTimeout(struct ath_hal *);
80extern	HAL_BOOL ar9300_Stub_SetAckCTSRate(struct ath_hal *, u_int);
81extern	u_int ar9300_Stub_GetAckCTSRate(struct ath_hal *);
82extern	HAL_BOOL ar9300_Stub_SetCTSTimeout(struct ath_hal *, u_int);
83extern	u_int ar9300_Stub_GetCTSTimeout(struct ath_hal *);
84extern  HAL_BOOL ar9300_Stub_SetDecompMask(struct ath_hal *, uint16_t, int);
85void 	ar9300_Stub_SetCoverageClass(struct ath_hal *, uint8_t, int);
86extern	void ar9300_Stub_SetPCUConfig(struct ath_hal *);
87extern	HAL_BOOL ar9300_Stub_Use32KHzclock(struct ath_hal *ah, HAL_OPMODE opmode);
88extern	void ar9300_Stub_SetupClock(struct ath_hal *ah, HAL_OPMODE opmode);
89extern	void ar9300_Stub_RestoreClock(struct ath_hal *ah, HAL_OPMODE opmode);
90extern	int16_t ar9300_Stub_GetNfAdjust(struct ath_hal *,
91		const HAL_CHANNEL_INTERNAL *);
92extern	void ar9300_Stub_SetCompRegs(struct ath_hal *ah);
93extern	HAL_STATUS ar9300_Stub_GetCapability(struct ath_hal *, HAL_CAPABILITY_TYPE,
94		uint32_t, uint32_t *);
95extern	HAL_BOOL ar9300_Stub_SetCapability(struct ath_hal *, HAL_CAPABILITY_TYPE,
96		uint32_t, uint32_t, HAL_STATUS *);
97extern	HAL_BOOL ar9300_Stub_GetDiagState(struct ath_hal *ah, int request,
98		const void *args, uint32_t argsize,
99		void **result, uint32_t *resultsize);
100extern	HAL_STATUS ar9300_Stub_SetQuiet(struct ath_hal *ah, uint32_t period,
101		uint32_t duration, uint32_t nextStart, HAL_QUIET_FLAG flag);
102extern	HAL_BOOL ar9300_Stub_GetMibCycleCounts(struct ath_hal *,
103		HAL_SURVEY_SAMPLE *);
104
105extern	HAL_BOOL ar9300_Stub_SetPowerMode(struct ath_hal *ah, HAL_POWER_MODE mode,
106		int setChip);
107extern	HAL_POWER_MODE ar9300_Stub_GetPowerMode(struct ath_hal *ah);
108extern	HAL_BOOL ar9300_Stub_GetPowerStatus(struct ath_hal *ah);
109
110extern	uint32_t ar9300_Stub_GetRxDP(struct ath_hal *ath, HAL_RX_QUEUE);
111extern	void ar9300_Stub_SetRxDP(struct ath_hal *ah, uint32_t rxdp,
112	    HAL_RX_QUEUE);
113extern	void ar9300_Stub_EnableReceive(struct ath_hal *ah);
114extern	HAL_BOOL ar9300_Stub_StopDmaReceive(struct ath_hal *ah);
115extern	void ar9300_Stub_StartPcuReceive(struct ath_hal *ah);
116extern	void ar9300_Stub_StopPcuReceive(struct ath_hal *ah);
117extern	void ar9300_Stub_SetMulticastFilter(struct ath_hal *ah,
118		uint32_t filter0, uint32_t filter1);
119extern	HAL_BOOL ar9300_Stub_ClrMulticastFilterIndex(struct ath_hal *, uint32_t ix);
120extern	HAL_BOOL ar9300_Stub_SetMulticastFilterIndex(struct ath_hal *, uint32_t ix);
121extern	uint32_t ar9300_Stub_GetRxFilter(struct ath_hal *ah);
122extern	void ar9300_Stub_SetRxFilter(struct ath_hal *ah, uint32_t bits);
123extern	HAL_BOOL ar9300_Stub_SetupRxDesc(struct ath_hal *,
124		struct ath_desc *, uint32_t size, u_int flags);
125extern	HAL_STATUS ar9300_Stub_ProcRxDesc(struct ath_hal *ah, struct ath_desc *,
126		uint32_t, struct ath_desc *, uint64_t,
127		struct ath_rx_status *);
128
129extern	HAL_BOOL ar9300_Stub_Reset(struct ath_hal *ah, HAL_OPMODE opmode,
130		struct ieee80211_channel *chan, HAL_BOOL bChannelChange,
131		HAL_STATUS *status);
132extern	HAL_BOOL ar9300_Stub_SetChannel(struct ath_hal *,
133		const struct ieee80211_channel *);
134extern	void ar9300_Stub_SetOperatingMode(struct ath_hal *ah, int opmode);
135extern	HAL_BOOL ar9300_Stub_PhyDisable(struct ath_hal *ah);
136extern	HAL_BOOL ar9300_Stub_Disable(struct ath_hal *ah);
137extern	HAL_BOOL ar9300_Stub_ChipReset(struct ath_hal *ah,
138		const struct ieee80211_channel *);
139extern	HAL_BOOL ar9300_Stub_PerCalibration(struct ath_hal *ah,
140		struct ieee80211_channel *chan, HAL_BOOL *isIQdone);
141extern	HAL_BOOL ar9300_Stub_PerCalibrationN(struct ath_hal *ah,
142		struct ieee80211_channel *chan, u_int chainMask,
143		HAL_BOOL longCal, HAL_BOOL *isCalDone);
144extern	HAL_BOOL ar9300_Stub_ResetCalValid(struct ath_hal *ah,
145		const struct ieee80211_channel *);
146extern	int16_t ar9300_Stub_GetNoiseFloor(struct ath_hal *ah);
147extern	void ar9300_Stub_InitNfCalHistBuffer(struct ath_hal *);
148extern	int16_t ar9300_Stub_GetNfHistMid(const int16_t calData[]);
149extern	void ar9300_Stub_SetSpurMitigation(struct ath_hal *,
150		 const struct ieee80211_channel *);
151extern	HAL_BOOL ar9300_Stub_SetAntennaSwitchInternal(struct ath_hal *ah,
152		HAL_ANT_SETTING settings, const struct ieee80211_channel *);
153extern	HAL_BOOL ar9300_Stub_SetTxPowerLimit(struct ath_hal *ah, uint32_t limit);
154extern	HAL_BOOL ar9300_Stub_GetChipPowerLimits(struct ath_hal *ah,
155		struct ieee80211_channel *chan);
156extern	void ar9300_Stub_InitializeGainValues(struct ath_hal *);
157extern	HAL_RFGAIN ar9300_Stub_GetRfgain(struct ath_hal *ah);
158extern	void ar9300_Stub_RequestRfgain(struct ath_hal *);
159
160extern	HAL_BOOL ar9300_Stub_UpdateTxTrigLevel(struct ath_hal *,
161		HAL_BOOL IncTrigLevel);
162extern  HAL_BOOL ar9300_Stub_SetTxQueueProps(struct ath_hal *ah, int q,
163		const HAL_TXQ_INFO *qInfo);
164extern	HAL_BOOL ar9300_Stub_GetTxQueueProps(struct ath_hal *ah, int q,
165		HAL_TXQ_INFO *qInfo);
166extern	int ar9300_Stub_SetupTxQueue(struct ath_hal *ah, HAL_TX_QUEUE type,
167		const HAL_TXQ_INFO *qInfo);
168extern	HAL_BOOL ar9300_Stub_ReleaseTxQueue(struct ath_hal *ah, u_int q);
169extern	HAL_BOOL ar9300_Stub_ResetTxQueue(struct ath_hal *ah, u_int q);
170extern	uint32_t ar9300_Stub_GetTxDP(struct ath_hal *ah, u_int q);
171extern	HAL_BOOL ar9300_Stub_SetTxDP(struct ath_hal *ah, u_int q, uint32_t txdp);
172extern	HAL_BOOL ar9300_Stub_StartTxDma(struct ath_hal *ah, u_int q);
173extern	uint32_t ar9300_Stub_NumTxPending(struct ath_hal *ah, u_int q);
174extern	HAL_BOOL ar9300_Stub_StopTxDma(struct ath_hal *ah, u_int q);
175extern	HAL_BOOL ar9300_Stub_SetupTxDesc(struct ath_hal *ah, struct ath_desc *ds,
176		u_int pktLen, u_int hdrLen, HAL_PKT_TYPE type, u_int txPower,
177		u_int txRate0, u_int txTries0,
178		u_int keyIx, u_int antMode, u_int flags,
179		u_int rtsctsRate, u_int rtsctsDuration,
180		u_int compicvLen, u_int compivLen, u_int comp);
181extern	HAL_BOOL ar9300_Stub_SetupXTxDesc(struct ath_hal *, struct ath_desc *,
182		u_int txRate1, u_int txRetries1,
183		u_int txRate2, u_int txRetries2,
184		u_int txRate3, u_int txRetries3);
185extern	HAL_BOOL ar9300_Stub_FillTxDesc(struct ath_hal *ah, struct ath_desc *ds,
186		HAL_DMA_ADDR *bufAddrList, uint32_t *segLenList,
187		u_int descId, u_int qcuId,
188		HAL_BOOL firstSeg, HAL_BOOL lastSeg,
189		const struct ath_desc *ds0);
190extern	HAL_STATUS ar9300_Stub_ProcTxDesc(struct ath_hal *ah,
191		struct ath_desc *, struct ath_tx_status *);
192extern  void ar9300_Stub_GetTxIntrQueue(struct ath_hal *ah, uint32_t *);
193extern  void ar9300_Stub_IntrReqTxDesc(struct ath_hal *ah, struct ath_desc *);
194extern	HAL_BOOL ar9300_Stub_GetTxCompletionRates(struct ath_hal *ah,
195		const struct ath_desc *ds0, int *rates, int *tries);
196
197extern	const HAL_RATE_TABLE * ar9300_Stub_GetRateTable(struct ath_hal *, u_int mode);
198
199#if 0
200extern	void ar9300_Stub_AniAttach(struct ath_hal *, const struct ar9300_Stub_AniParams *,
201		const struct ar9300_Stub_AniParams *, HAL_BOOL ena);
202#endif
203extern	void ar9300_Stub_AniDetach(struct ath_hal *);
204extern	struct ar9300_Stub_AniState *ar5212AniGetCurrentState(struct ath_hal *);
205extern	struct ar9300_Stub_Stats *ar5212AniGetCurrentStats(struct ath_hal *);
206extern	HAL_BOOL ar9300_Stub_AniControl(struct ath_hal *, HAL_ANI_CMD cmd, int param);
207#if 0
208extern	HAL_BOOL ar9300_Stub_AniSetParams(struct ath_hal *,
209		const struct ar9300_Stub_AniParams *, const struct ar9300_Stub_AniParams *);
210#endif
211struct ath_rx_status;
212extern	void ar9300_Stub_AniPhyErrReport(struct ath_hal *ah,
213		const struct ath_rx_status *rs);
214extern	void ar9300_Stub_ProcessMibIntr(struct ath_hal *, const HAL_NODE_STATS *);
215extern	void ar9300_Stub_RxMonitor(struct ath_hal *, const HAL_NODE_STATS *,
216			     const struct ieee80211_channel *);
217extern	void ar9300_Stub_AniPoll(struct ath_hal *, const struct ieee80211_channel *);
218extern	void ar9300_Stub_AniReset(struct ath_hal *, const struct ieee80211_channel *,
219		HAL_OPMODE, int);
220
221extern	HAL_BOOL ar9300_Stub_IsNFCalInProgress(struct ath_hal *ah);
222extern	HAL_BOOL ar9300_Stub_WaitNFCalComplete(struct ath_hal *ah, int i);
223extern	void ar9300_Stub_EnableDfs(struct ath_hal *ah, HAL_PHYERR_PARAM *pe);
224extern	void ar9300_Stub_GetDfsThresh(struct ath_hal *ah, HAL_PHYERR_PARAM *pe);
225extern	HAL_BOOL ar9300_Stub_ProcessRadarEvent(struct ath_hal *ah,
226	    struct ath_rx_status *rxs, uint64_t fulltsf, const char *buf,
227	    HAL_DFS_EVENT *event);
228extern	HAL_BOOL ar9300_Stub_IsFastClockEnabled(struct ath_hal *ah);
229extern	uint32_t ar9300_Stub_Get11nExtBusy(struct ath_hal *ah);
230
231extern	void ar9300_Stub_ConfigPCIE(struct ath_hal *ah, HAL_BOOL restore,
232	HAL_BOOL powerOff);
233extern	void ar9300_Stub_DisablePCIE(struct ath_hal *ah);
234
235
236
237#endif	/* __AR9300_STUB_FUNCS_H__ */
238