1250008Sadrian#ifndef	__AR9300_STUB_FUNCS_H__
2250008Sadrian#define	__AR9300_STUB_FUNCS_H__
3250008Sadrian
4250008Sadrianextern	uint32_t ar9300_Stub_GetRadioRev(struct ath_hal *ah);
5250008Sadrian
6250008Sadrian#if 0
7250008Sadrianextern	void ar9300_Stub_InitState(struct ath_hal_5212 *, uint16_t devid, HAL_SOFTC,
8250008Sadrian		HAL_BUS_TAG st, HAL_BUS_HANDLE sh, HAL_STATUS *status);
9250008Sadrian#endif
10250008Sadrianextern	void ar9300_Stub_Detach(struct ath_hal *ah);
11250008Sadrianextern  HAL_BOOL ar9300_Stub_ChipTest(struct ath_hal *ah);
12250008Sadrianextern  HAL_BOOL ar9300_Stub_GetChannelEdges(struct ath_hal *ah,
13250008Sadrian                uint16_t flags, uint16_t *low, uint16_t *high);
14250008Sadrianextern	HAL_BOOL ar9300_Stub_FillCapabilityInfo(struct ath_hal *ah);
15250008Sadrian
16250008Sadrianextern	void ar9300_Stub_SetBeaconTimers(struct ath_hal *ah,
17250008Sadrian		const HAL_BEACON_TIMERS *);
18250008Sadrianextern	void ar9300_Stub_BeaconInit(struct ath_hal *ah,
19250008Sadrian		uint32_t next_beacon, uint32_t beacon_period);
20250008Sadrianextern	void ar9300_Stub_ResetStaBeaconTimers(struct ath_hal *ah);
21250008Sadrianextern	void ar9300_Stub_SetStaBeaconTimers(struct ath_hal *ah,
22250008Sadrian		const HAL_BEACON_STATE *);
23250008Sadrianextern	uint64_t ar9300_Stub_GetNextTBTT(struct ath_hal *);
24250008Sadrian
25250008Sadrianextern	HAL_BOOL ar9300_Stub_IsInterruptPending(struct ath_hal *ah);
26250008Sadrianextern	HAL_BOOL ar9300_Stub_GetPendingInterrupts(struct ath_hal *ah, HAL_INT *);
27250008Sadrianextern	HAL_INT ar9300_Stub_GetInterrupts(struct ath_hal *ah);
28250008Sadrianextern	HAL_INT ar9300_Stub_SetInterrupts(struct ath_hal *ah, HAL_INT ints);
29250008Sadrian
30250008Sadrianextern	uint32_t ar9300_Stub_GetKeyCacheSize(struct ath_hal *);
31250008Sadrianextern	HAL_BOOL ar9300_Stub_IsKeyCacheEntryValid(struct ath_hal *, uint16_t entry);
32250008Sadrianextern	HAL_BOOL ar9300_Stub_ResetKeyCacheEntry(struct ath_hal *ah, uint16_t entry);
33250008Sadrianextern	HAL_BOOL ar9300_Stub_SetKeyCacheEntryMac(struct ath_hal *,
34250008Sadrian			uint16_t entry, const uint8_t *mac);
35250008Sadrianextern	HAL_BOOL ar9300_Stub_SetKeyCacheEntry(struct ath_hal *ah, uint16_t entry,
36250008Sadrian                       const HAL_KEYVAL *k, const uint8_t *mac, int xorKey);
37250008Sadrian
38250008Sadrianextern	void ar9300_Stub_GetMacAddress(struct ath_hal *ah, uint8_t *mac);
39250008Sadrianextern	HAL_BOOL ar9300_Stub_SetMacAddress(struct ath_hal *ah, const uint8_t *);
40250008Sadrianextern	void ar9300_Stub_GetBssIdMask(struct ath_hal *ah, uint8_t *mac);
41250008Sadrianextern	HAL_BOOL ar9300_Stub_SetBssIdMask(struct ath_hal *, const uint8_t *);
42250008Sadrianextern	HAL_BOOL ar9300_Stub_EepromRead(struct ath_hal *, u_int off, uint16_t *data);
43250008Sadrianextern	HAL_BOOL ar9300_Stub_EepromWrite(struct ath_hal *, u_int off, uint16_t data);
44250008Sadrianextern	HAL_BOOL ar9300_Stub_SetRegulatoryDomain(struct ath_hal *ah,
45250008Sadrian		uint16_t regDomain, HAL_STATUS *stats);
46250008Sadrianextern	u_int ar9300_Stub_GetWirelessModes(struct ath_hal *ah);
47250008Sadrianextern	void ar9300_Stub_EnableRfKill(struct ath_hal *);
48250008Sadrianextern	HAL_BOOL ar9300_Stub_GpioCfgOutput(struct ath_hal *, uint32_t gpio,
49250008Sadrian		HAL_GPIO_MUX_TYPE);
50250008Sadrianextern	HAL_BOOL ar9300_Stub_GpioCfgInput(struct ath_hal *, uint32_t gpio);
51250008Sadrianextern	HAL_BOOL ar9300_Stub_GpioSet(struct ath_hal *, uint32_t gpio, uint32_t val);
52250008Sadrianextern	uint32_t ar9300_Stub_GpioGet(struct ath_hal *ah, uint32_t gpio);
53250008Sadrianextern	void ar9300_Stub_GpioSetIntr(struct ath_hal *ah, u_int, uint32_t ilevel);
54250008Sadrianextern	void ar9300_Stub_SetLedState(struct ath_hal *ah, HAL_LED_STATE state);
55250008Sadrianextern	void ar9300_Stub_WriteAssocid(struct ath_hal *ah, const uint8_t *bssid,
56250008Sadrian		uint16_t assocId);
57250008Sadrianextern	uint32_t ar9300_Stub_GetTsf32(struct ath_hal *ah);
58250008Sadrianextern	uint64_t ar9300_Stub_GetTsf64(struct ath_hal *ah);
59250008Sadrianextern	void ar9300_Stub_SetTsf64(struct ath_hal *ah, uint64_t tsf64);
60250008Sadrianextern	void ar9300_Stub_ResetTsf(struct ath_hal *ah);
61250008Sadrianextern	void ar9300_Stub_SetBasicRate(struct ath_hal *ah, HAL_RATE_SET *pSet);
62250008Sadrianextern	uint32_t ar9300_Stub_GetRandomSeed(struct ath_hal *ah);
63250008Sadrianextern	HAL_BOOL ar9300_Stub_DetectCardPresent(struct ath_hal *ah);
64250008Sadrianextern	void ar9300_Stub_EnableMibCounters(struct ath_hal *);
65250008Sadrianextern	void ar9300_Stub_DisableMibCounters(struct ath_hal *);
66250008Sadrianextern	void ar9300_Stub_UpdateMibCounters(struct ath_hal *ah, HAL_MIB_STATS* stats);
67250008Sadrianextern	HAL_BOOL ar9300_Stub_IsJapanChannelSpreadSupported(struct ath_hal *ah);
68250008Sadrianextern	uint32_t ar9300_Stub_GetCurRssi(struct ath_hal *ah);
69250008Sadrianextern	u_int ar9300_Stub_GetDefAntenna(struct ath_hal *ah);
70250008Sadrianextern	void ar9300_Stub_SetDefAntenna(struct ath_hal *ah, u_int antenna);
71250008Sadrianextern	HAL_ANT_SETTING ar9300_Stub_GetAntennaSwitch(struct ath_hal *);
72250008Sadrianextern	HAL_BOOL ar9300_Stub_SetAntennaSwitch(struct ath_hal *, HAL_ANT_SETTING);
73250008Sadrianextern	HAL_BOOL ar9300_Stub_IsSleepAfterBeaconBroken(struct ath_hal *ah);
74250008Sadrianextern	HAL_BOOL ar9300_Stub_SetSifsTime(struct ath_hal *, u_int);
75250008Sadrianextern	u_int ar9300_Stub_GetSifsTime(struct ath_hal *);
76250008Sadrianextern	HAL_BOOL ar9300_Stub_SetSlotTime(struct ath_hal *, u_int);
77250008Sadrianextern	u_int ar9300_Stub_GetSlotTime(struct ath_hal *);
78250008Sadrianextern	HAL_BOOL ar9300_Stub_SetAckTimeout(struct ath_hal *, u_int);
79250008Sadrianextern	u_int ar9300_Stub_GetAckTimeout(struct ath_hal *);
80250008Sadrianextern	HAL_BOOL ar9300_Stub_SetAckCTSRate(struct ath_hal *, u_int);
81250008Sadrianextern	u_int ar9300_Stub_GetAckCTSRate(struct ath_hal *);
82250008Sadrianextern	HAL_BOOL ar9300_Stub_SetCTSTimeout(struct ath_hal *, u_int);
83250008Sadrianextern	u_int ar9300_Stub_GetCTSTimeout(struct ath_hal *);
84250008Sadrianextern  HAL_BOOL ar9300_Stub_SetDecompMask(struct ath_hal *, uint16_t, int);
85250008Sadrianvoid 	ar9300_Stub_SetCoverageClass(struct ath_hal *, uint8_t, int);
86250008Sadrianextern	void ar9300_Stub_SetPCUConfig(struct ath_hal *);
87250008Sadrianextern	HAL_BOOL ar9300_Stub_Use32KHzclock(struct ath_hal *ah, HAL_OPMODE opmode);
88250008Sadrianextern	void ar9300_Stub_SetupClock(struct ath_hal *ah, HAL_OPMODE opmode);
89250008Sadrianextern	void ar9300_Stub_RestoreClock(struct ath_hal *ah, HAL_OPMODE opmode);
90250008Sadrianextern	int16_t ar9300_Stub_GetNfAdjust(struct ath_hal *,
91250008Sadrian		const HAL_CHANNEL_INTERNAL *);
92250008Sadrianextern	void ar9300_Stub_SetCompRegs(struct ath_hal *ah);
93250008Sadrianextern	HAL_STATUS ar9300_Stub_GetCapability(struct ath_hal *, HAL_CAPABILITY_TYPE,
94250008Sadrian		uint32_t, uint32_t *);
95250008Sadrianextern	HAL_BOOL ar9300_Stub_SetCapability(struct ath_hal *, HAL_CAPABILITY_TYPE,
96250008Sadrian		uint32_t, uint32_t, HAL_STATUS *);
97250008Sadrianextern	HAL_BOOL ar9300_Stub_GetDiagState(struct ath_hal *ah, int request,
98250008Sadrian		const void *args, uint32_t argsize,
99250008Sadrian		void **result, uint32_t *resultsize);
100250008Sadrianextern	HAL_STATUS ar9300_Stub_SetQuiet(struct ath_hal *ah, uint32_t period,
101250008Sadrian		uint32_t duration, uint32_t nextStart, HAL_QUIET_FLAG flag);
102250008Sadrianextern	HAL_BOOL ar9300_Stub_GetMibCycleCounts(struct ath_hal *,
103250008Sadrian		HAL_SURVEY_SAMPLE *);
104250008Sadrian
105250008Sadrianextern	HAL_BOOL ar9300_Stub_SetPowerMode(struct ath_hal *ah, HAL_POWER_MODE mode,
106250008Sadrian		int setChip);
107250008Sadrianextern	HAL_POWER_MODE ar9300_Stub_GetPowerMode(struct ath_hal *ah);
108250008Sadrianextern	HAL_BOOL ar9300_Stub_GetPowerStatus(struct ath_hal *ah);
109250008Sadrian
110250008Sadrianextern	uint32_t ar9300_Stub_GetRxDP(struct ath_hal *ath, HAL_RX_QUEUE);
111250008Sadrianextern	void ar9300_Stub_SetRxDP(struct ath_hal *ah, uint32_t rxdp,
112250008Sadrian	    HAL_RX_QUEUE);
113250008Sadrianextern	void ar9300_Stub_EnableReceive(struct ath_hal *ah);
114250008Sadrianextern	HAL_BOOL ar9300_Stub_StopDmaReceive(struct ath_hal *ah);
115250008Sadrianextern	void ar9300_Stub_StartPcuReceive(struct ath_hal *ah);
116250008Sadrianextern	void ar9300_Stub_StopPcuReceive(struct ath_hal *ah);
117250008Sadrianextern	void ar9300_Stub_SetMulticastFilter(struct ath_hal *ah,
118250008Sadrian		uint32_t filter0, uint32_t filter1);
119250008Sadrianextern	HAL_BOOL ar9300_Stub_ClrMulticastFilterIndex(struct ath_hal *, uint32_t ix);
120250008Sadrianextern	HAL_BOOL ar9300_Stub_SetMulticastFilterIndex(struct ath_hal *, uint32_t ix);
121250008Sadrianextern	uint32_t ar9300_Stub_GetRxFilter(struct ath_hal *ah);
122250008Sadrianextern	void ar9300_Stub_SetRxFilter(struct ath_hal *ah, uint32_t bits);
123250008Sadrianextern	HAL_BOOL ar9300_Stub_SetupRxDesc(struct ath_hal *,
124250008Sadrian		struct ath_desc *, uint32_t size, u_int flags);
125250008Sadrianextern	HAL_STATUS ar9300_Stub_ProcRxDesc(struct ath_hal *ah, struct ath_desc *,
126250008Sadrian		uint32_t, struct ath_desc *, uint64_t,
127250008Sadrian		struct ath_rx_status *);
128250008Sadrian
129250008Sadrianextern	HAL_BOOL ar9300_Stub_Reset(struct ath_hal *ah, HAL_OPMODE opmode,
130250008Sadrian		struct ieee80211_channel *chan, HAL_BOOL bChannelChange,
131250008Sadrian		HAL_STATUS *status);
132250008Sadrianextern	HAL_BOOL ar9300_Stub_SetChannel(struct ath_hal *,
133250008Sadrian		const struct ieee80211_channel *);
134250008Sadrianextern	void ar9300_Stub_SetOperatingMode(struct ath_hal *ah, int opmode);
135250008Sadrianextern	HAL_BOOL ar9300_Stub_PhyDisable(struct ath_hal *ah);
136250008Sadrianextern	HAL_BOOL ar9300_Stub_Disable(struct ath_hal *ah);
137250008Sadrianextern	HAL_BOOL ar9300_Stub_ChipReset(struct ath_hal *ah,
138250008Sadrian		const struct ieee80211_channel *);
139250008Sadrianextern	HAL_BOOL ar9300_Stub_PerCalibration(struct ath_hal *ah,
140250008Sadrian		struct ieee80211_channel *chan, HAL_BOOL *isIQdone);
141250008Sadrianextern	HAL_BOOL ar9300_Stub_PerCalibrationN(struct ath_hal *ah,
142250008Sadrian		struct ieee80211_channel *chan, u_int chainMask,
143250008Sadrian		HAL_BOOL longCal, HAL_BOOL *isCalDone);
144250008Sadrianextern	HAL_BOOL ar9300_Stub_ResetCalValid(struct ath_hal *ah,
145250008Sadrian		const struct ieee80211_channel *);
146250008Sadrianextern	int16_t ar9300_Stub_GetNoiseFloor(struct ath_hal *ah);
147250008Sadrianextern	void ar9300_Stub_InitNfCalHistBuffer(struct ath_hal *);
148250008Sadrianextern	int16_t ar9300_Stub_GetNfHistMid(const int16_t calData[]);
149250008Sadrianextern	void ar9300_Stub_SetSpurMitigation(struct ath_hal *,
150250008Sadrian		 const struct ieee80211_channel *);
151250008Sadrianextern	HAL_BOOL ar9300_Stub_SetAntennaSwitchInternal(struct ath_hal *ah,
152250008Sadrian		HAL_ANT_SETTING settings, const struct ieee80211_channel *);
153250008Sadrianextern	HAL_BOOL ar9300_Stub_SetTxPowerLimit(struct ath_hal *ah, uint32_t limit);
154250008Sadrianextern	HAL_BOOL ar9300_Stub_GetChipPowerLimits(struct ath_hal *ah,
155250008Sadrian		struct ieee80211_channel *chan);
156250008Sadrianextern	void ar9300_Stub_InitializeGainValues(struct ath_hal *);
157250008Sadrianextern	HAL_RFGAIN ar9300_Stub_GetRfgain(struct ath_hal *ah);
158250008Sadrianextern	void ar9300_Stub_RequestRfgain(struct ath_hal *);
159250008Sadrian
160250008Sadrianextern	HAL_BOOL ar9300_Stub_UpdateTxTrigLevel(struct ath_hal *,
161250008Sadrian		HAL_BOOL IncTrigLevel);
162250008Sadrianextern  HAL_BOOL ar9300_Stub_SetTxQueueProps(struct ath_hal *ah, int q,
163250008Sadrian		const HAL_TXQ_INFO *qInfo);
164250008Sadrianextern	HAL_BOOL ar9300_Stub_GetTxQueueProps(struct ath_hal *ah, int q,
165250008Sadrian		HAL_TXQ_INFO *qInfo);
166250008Sadrianextern	int ar9300_Stub_SetupTxQueue(struct ath_hal *ah, HAL_TX_QUEUE type,
167250008Sadrian		const HAL_TXQ_INFO *qInfo);
168250008Sadrianextern	HAL_BOOL ar9300_Stub_ReleaseTxQueue(struct ath_hal *ah, u_int q);
169250008Sadrianextern	HAL_BOOL ar9300_Stub_ResetTxQueue(struct ath_hal *ah, u_int q);
170250008Sadrianextern	uint32_t ar9300_Stub_GetTxDP(struct ath_hal *ah, u_int q);
171250008Sadrianextern	HAL_BOOL ar9300_Stub_SetTxDP(struct ath_hal *ah, u_int q, uint32_t txdp);
172250008Sadrianextern	HAL_BOOL ar9300_Stub_StartTxDma(struct ath_hal *ah, u_int q);
173250008Sadrianextern	uint32_t ar9300_Stub_NumTxPending(struct ath_hal *ah, u_int q);
174250008Sadrianextern	HAL_BOOL ar9300_Stub_StopTxDma(struct ath_hal *ah, u_int q);
175250008Sadrianextern	HAL_BOOL ar9300_Stub_SetupTxDesc(struct ath_hal *ah, struct ath_desc *ds,
176250008Sadrian		u_int pktLen, u_int hdrLen, HAL_PKT_TYPE type, u_int txPower,
177250008Sadrian		u_int txRate0, u_int txTries0,
178250008Sadrian		u_int keyIx, u_int antMode, u_int flags,
179250008Sadrian		u_int rtsctsRate, u_int rtsctsDuration,
180250008Sadrian		u_int compicvLen, u_int compivLen, u_int comp);
181250008Sadrianextern	HAL_BOOL ar9300_Stub_SetupXTxDesc(struct ath_hal *, struct ath_desc *,
182250008Sadrian		u_int txRate1, u_int txRetries1,
183250008Sadrian		u_int txRate2, u_int txRetries2,
184250008Sadrian		u_int txRate3, u_int txRetries3);
185250008Sadrianextern	HAL_BOOL ar9300_Stub_FillTxDesc(struct ath_hal *ah, struct ath_desc *ds,
186250008Sadrian		HAL_DMA_ADDR *bufAddrList, uint32_t *segLenList,
187250008Sadrian		u_int descId, u_int qcuId,
188250008Sadrian		HAL_BOOL firstSeg, HAL_BOOL lastSeg,
189250008Sadrian		const struct ath_desc *ds0);
190250008Sadrianextern	HAL_STATUS ar9300_Stub_ProcTxDesc(struct ath_hal *ah,
191250008Sadrian		struct ath_desc *, struct ath_tx_status *);
192250008Sadrianextern  void ar9300_Stub_GetTxIntrQueue(struct ath_hal *ah, uint32_t *);
193250008Sadrianextern  void ar9300_Stub_IntrReqTxDesc(struct ath_hal *ah, struct ath_desc *);
194250008Sadrianextern	HAL_BOOL ar9300_Stub_GetTxCompletionRates(struct ath_hal *ah,
195250008Sadrian		const struct ath_desc *ds0, int *rates, int *tries);
196250008Sadrian
197250008Sadrianextern	const HAL_RATE_TABLE * ar9300_Stub_GetRateTable(struct ath_hal *, u_int mode);
198250008Sadrian
199250008Sadrian#if 0
200250008Sadrianextern	void ar9300_Stub_AniAttach(struct ath_hal *, const struct ar9300_Stub_AniParams *,
201250008Sadrian		const struct ar9300_Stub_AniParams *, HAL_BOOL ena);
202250008Sadrian#endif
203250008Sadrianextern	void ar9300_Stub_AniDetach(struct ath_hal *);
204250008Sadrianextern	struct ar9300_Stub_AniState *ar5212AniGetCurrentState(struct ath_hal *);
205250008Sadrianextern	struct ar9300_Stub_Stats *ar5212AniGetCurrentStats(struct ath_hal *);
206250008Sadrianextern	HAL_BOOL ar9300_Stub_AniControl(struct ath_hal *, HAL_ANI_CMD cmd, int param);
207250008Sadrian#if 0
208250008Sadrianextern	HAL_BOOL ar9300_Stub_AniSetParams(struct ath_hal *,
209250008Sadrian		const struct ar9300_Stub_AniParams *, const struct ar9300_Stub_AniParams *);
210250008Sadrian#endif
211250008Sadrianstruct ath_rx_status;
212250008Sadrianextern	void ar9300_Stub_AniPhyErrReport(struct ath_hal *ah,
213250008Sadrian		const struct ath_rx_status *rs);
214250008Sadrianextern	void ar9300_Stub_ProcessMibIntr(struct ath_hal *, const HAL_NODE_STATS *);
215250008Sadrianextern	void ar9300_Stub_RxMonitor(struct ath_hal *, const HAL_NODE_STATS *,
216250008Sadrian			     const struct ieee80211_channel *);
217250008Sadrianextern	void ar9300_Stub_AniPoll(struct ath_hal *, const struct ieee80211_channel *);
218250008Sadrianextern	void ar9300_Stub_AniReset(struct ath_hal *, const struct ieee80211_channel *,
219250008Sadrian		HAL_OPMODE, int);
220250008Sadrian
221250008Sadrianextern	HAL_BOOL ar9300_Stub_IsNFCalInProgress(struct ath_hal *ah);
222250008Sadrianextern	HAL_BOOL ar9300_Stub_WaitNFCalComplete(struct ath_hal *ah, int i);
223250008Sadrianextern	void ar9300_Stub_EnableDfs(struct ath_hal *ah, HAL_PHYERR_PARAM *pe);
224250008Sadrianextern	void ar9300_Stub_GetDfsThresh(struct ath_hal *ah, HAL_PHYERR_PARAM *pe);
225250008Sadrianextern	HAL_BOOL ar9300_Stub_ProcessRadarEvent(struct ath_hal *ah,
226250008Sadrian	    struct ath_rx_status *rxs, uint64_t fulltsf, const char *buf,
227250008Sadrian	    HAL_DFS_EVENT *event);
228250008Sadrianextern	HAL_BOOL ar9300_Stub_IsFastClockEnabled(struct ath_hal *ah);
229250008Sadrianextern	uint32_t ar9300_Stub_Get11nExtBusy(struct ath_hal *ah);
230250008Sadrian
231250008Sadrianextern	void ar9300_Stub_ConfigPCIE(struct ath_hal *ah, HAL_BOOL restore,
232250008Sadrian	HAL_BOOL powerOff);
233250008Sadrianextern	void ar9300_Stub_DisablePCIE(struct ath_hal *ah);
234250008Sadrian
235250008Sadrian
236250008Sadrian
237250008Sadrian#endif	/* __AR9300_STUB_FUNCS_H__ */
238