iPXE
ath9k_ar9002_mac.c
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2008-2011 Atheros Communications Inc.
3  *
4  * Modified for iPXE by Scott K Logan <logans@cottsay.net> July 2011
5  * Original from Linux kernel 3.0.1
6  *
7  * Permission to use, copy, modify, and/or distribute this software for any
8  * purpose with or without fee is hereby granted, provided that the above
9  * copyright notice and this permission notice appear in all copies.
10  *
11  * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
12  * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
13  * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
14  * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
15  * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
16  * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
17  * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
18  */
19 
20 FILE_SECBOOT ( FORBIDDEN );
21 
22 #include <ipxe/io.h>
23 
24 #include "hw.h"
25 
26 #define AR_BufLen 0x00000fff
27 
28 static void ar9002_hw_rx_enable(struct ath_hw *ah)
29 {
31 }
32 
34 {
35  ((struct ath_desc*) ds)->ds_link = ds_link;
36 }
37 
38 static void ar9002_hw_get_desc_link(void *ds, u32 **ds_link)
39 {
40  *ds_link = &((struct ath_desc *)ds)->ds_link;
41 }
42 
43 static int ar9002_hw_get_isr(struct ath_hw *ah, enum ath9k_int *masked)
44 {
45  u32 isr = 0;
46  u32 mask2 = 0;
47  struct ath9k_hw_capabilities *pCap = &ah->caps;
48  u32 sync_cause = 0;
49  int fatal_int = 0;
50 
51  if (!AR_SREV_9100(ah) && (ah->ah_ier & AR_IER_ENABLE)) {
54  == AR_RTC_STATUS_ON) {
55  isr = REG_READ(ah, AR_ISR);
56  }
57  }
58 
59  sync_cause = REG_READ(ah, AR_INTR_SYNC_CAUSE) &
61 
62  *masked = 0;
63 
64  if (!isr && !sync_cause)
65  return 0;
66  } else {
67  *masked = 0;
68  isr = REG_READ(ah, AR_ISR);
69  }
70 
71  if (isr) {
72  if (isr & AR_ISR_BCNMISC) {
73  u32 isr2;
74  isr2 = REG_READ(ah, AR_ISR_S2);
75  if (isr2 & AR_ISR_S2_TIM)
76  mask2 |= ATH9K_INT_TIM;
77  if (isr2 & AR_ISR_S2_DTIM)
78  mask2 |= ATH9K_INT_DTIM;
79  if (isr2 & AR_ISR_S2_DTIMSYNC)
80  mask2 |= ATH9K_INT_DTIMSYNC;
81  if (isr2 & (AR_ISR_S2_CABEND))
82  mask2 |= ATH9K_INT_CABEND;
83  if (isr2 & AR_ISR_S2_GTT)
84  mask2 |= ATH9K_INT_GTT;
85  if (isr2 & AR_ISR_S2_CST)
86  mask2 |= ATH9K_INT_CST;
87  if (isr2 & AR_ISR_S2_TSFOOR)
88  mask2 |= ATH9K_INT_TSFOOR;
89  }
90 
92  if (isr == 0xffffffff) {
93  *masked = 0;
94  return 0;
95  }
96 
97  *masked = isr & ATH9K_INT_COMMON;
98 
101  *masked |= ATH9K_INT_RX;
102 
103  if (isr &
105  AR_ISR_TXEOL)) {
106  u32 s0_s, s1_s;
107 
108  *masked |= ATH9K_INT_TX;
109 
110  s0_s = REG_READ(ah, AR_ISR_S0_S);
111  ah->intr_txqs |= MS(s0_s, AR_ISR_S0_QCU_TXOK);
112  ah->intr_txqs |= MS(s0_s, AR_ISR_S0_QCU_TXDESC);
113 
114  s1_s = REG_READ(ah, AR_ISR_S1_S);
115  ah->intr_txqs |= MS(s1_s, AR_ISR_S1_QCU_TXERR);
116  ah->intr_txqs |= MS(s1_s, AR_ISR_S1_QCU_TXEOL);
117  }
118 
119  if (isr & AR_ISR_RXORN) {
120  DBG("ath9k: "
121  "receive FIFO overrun interrupt\n");
122  }
123 
124  *masked |= mask2;
125  }
126 
127  if (AR_SREV_9100(ah))
128  return 1;
129 
130  if (isr & AR_ISR_GENTMR) {
131  u32 s5_s;
132 
133  s5_s = REG_READ(ah, AR_ISR_S5_S);
134  ah->intr_gen_timer_trigger =
136 
137  ah->intr_gen_timer_thresh =
139 
140  if (ah->intr_gen_timer_trigger)
141  *masked |= ATH9K_INT_GENTIMER;
142 
143  if ((s5_s & AR_ISR_S5_TIM_TIMER) &&
144  !(pCap->hw_caps & ATH9K_HW_CAP_AUTOSLEEP))
145  *masked |= ATH9K_INT_TIM_TIMER;
146  }
147 
148  if (sync_cause) {
149  fatal_int =
150  (sync_cause &
152  ? 1 : 0;
153 
154  if (fatal_int) {
155  if (sync_cause & AR_INTR_SYNC_HOST1_FATAL) {
156  DBG("ath9k: "
157  "received PCI FATAL interrupt\n");
158  }
159  if (sync_cause & AR_INTR_SYNC_HOST1_PERR) {
160  DBG("ath9k: "
161  "received PCI PERR interrupt\n");
162  }
163  *masked |= ATH9K_INT_FATAL;
164  }
165  if (sync_cause & AR_INTR_SYNC_RADM_CPL_TIMEOUT) {
166  DBG("ath9k: "
167  "AR_INTR_SYNC_RADM_CPL_TIMEOUT\n");
169  REG_WRITE(ah, AR_RC, 0);
170  *masked |= ATH9K_INT_FATAL;
171  }
172  if (sync_cause & AR_INTR_SYNC_LOCAL_TIMEOUT) {
173  DBG("ath9k: "
174  "AR_INTR_SYNC_LOCAL_TIMEOUT\n");
175  }
176 
177  REG_WRITE(ah, AR_INTR_SYNC_CAUSE_CLR, sync_cause);
179  }
180 
181  return 1;
182 }
183 
184 static void ar9002_hw_fill_txdesc(struct ath_hw *ah __unused, void *ds, u32 seglen,
185  int is_firstseg, int is_lastseg,
186  const void *ds0, u32 buf_addr,
187  unsigned int qcu __unused)
188 {
189  struct ar5416_desc *ads = AR5416DESC(ds);
190 
191  ads->ds_data = buf_addr;
192 
193  if (is_firstseg) {
194  ads->ds_ctl1 |= seglen | (is_lastseg ? 0 : AR_TxMore);
195  } else if (is_lastseg) {
196  ads->ds_ctl0 = 0;
197  ads->ds_ctl1 = seglen;
198  ads->ds_ctl2 = AR5416DESC_CONST(ds0)->ds_ctl2;
199  ads->ds_ctl3 = AR5416DESC_CONST(ds0)->ds_ctl3;
200  } else {
201  ads->ds_ctl0 = 0;
202  ads->ds_ctl1 = seglen | AR_TxMore;
203  ads->ds_ctl2 = 0;
204  ads->ds_ctl3 = 0;
205  }
206  ads->ds_txstatus0 = ads->ds_txstatus1 = 0;
207  ads->ds_txstatus2 = ads->ds_txstatus3 = 0;
208  ads->ds_txstatus4 = ads->ds_txstatus5 = 0;
209  ads->ds_txstatus6 = ads->ds_txstatus7 = 0;
210  ads->ds_txstatus8 = ads->ds_txstatus9 = 0;
211 }
212 
213 static int ar9002_hw_proc_txdesc(struct ath_hw *ah, void *ds,
214  struct ath_tx_status *ts)
215 {
216  struct ar5416_desc *ads = AR5416DESC(ds);
217  u32 status;
218 
219  status = *(volatile typeof(ads->ds_txstatus9) *)&(ads->ds_txstatus9);
220  if ((status & AR_TxDone) == 0)
221  return -EINPROGRESS;
222 
223  ts->ts_tstamp = ads->AR_SendTimestamp;
224  ts->ts_status = 0;
225  ts->ts_flags = 0;
226 
227  if (status & AR_TxOpExceeded)
229  ts->tid = MS(status, AR_TxTid);
231  ts->ts_seqnum = MS(status, AR_SeqNum);
232 
233  status = *(volatile typeof(ads->ds_txstatus0) *)&(ads->ds_txstatus0);
237  if (status & AR_TxBaStatus) {
238  ts->ts_flags |= ATH9K_TX_BA;
239  ts->ba_low = ads->AR_BaBitmapLow;
240  ts->ba_high = ads->AR_BaBitmapHigh;
241  }
242 
243  status = *(volatile typeof(ads->ds_txstatus1) *)&(ads->ds_txstatus1);
244  if (status & AR_FrmXmitOK)
245  ts->ts_status |= ATH9K_TX_ACKED;
246  else {
249  if (status & AR_Filtered)
251  if (status & AR_FIFOUnderrun) {
254  }
255  }
258  if (status & AR_DescCfgErr)
260  if (status & AR_TxDataUnderrun) {
263  }
264  if (status & AR_TxDelimUnderrun) {
267  }
271 
272  status = *(volatile typeof(ads->ds_txstatus5) *)&(ads->ds_txstatus5);
277 
278  ts->evm0 = ads->AR_TxEVM0;
279  ts->evm1 = ads->AR_TxEVM1;
280  ts->evm2 = ads->AR_TxEVM2;
281 
282  return 0;
283 }
284 
285 static void ar9002_hw_set11n_txdesc(struct ath_hw *ah, void *ds,
286  u32 pktLen, enum ath9k_pkt_type type,
287  u32 txPower, u32 keyIx,
288  enum ath9k_key_type keyType, u32 flags)
289 {
290  struct ar5416_desc *ads = AR5416DESC(ds);
291 
292  if (txPower > 63)
293  txPower = 63;
294 
295  ads->ds_ctl0 = (pktLen & AR_FrameLen)
297  | SM(txPower, AR_XmitPower)
298  | (flags & ATH9K_TXDESC_VEOL ? AR_VEOL : 0)
300  | (keyIx != ATH9K_TXKEYIX_INVALID ? AR_DestIdxValid : 0);
301 
302  ads->ds_ctl1 =
303  (keyIx != ATH9K_TXKEYIX_INVALID ? SM(keyIx, AR_DestIdx) : 0)
304  | SM(type, AR_FrameType)
305  | (flags & ATH9K_TXDESC_NOACK ? AR_NoAck : 0)
308 
309  ads->ds_ctl6 = SM(keyType, AR_EncrType);
310 
311  if (AR_SREV_9285(ah) || AR_SREV_9271(ah)) {
312  ads->ds_ctl8 = 0;
313  ads->ds_ctl9 = 0;
314  ads->ds_ctl10 = 0;
315  ads->ds_ctl11 = 0;
316  }
317 }
318 
319 static void ar9002_hw_set_clrdmask(struct ath_hw *ah __unused, void *ds, int val)
320 {
321  struct ar5416_desc *ads = AR5416DESC(ds);
322 
323  if (val)
324  ads->ds_ctl0 |= AR_ClrDestMask;
325  else
326  ads->ds_ctl0 &= ~AR_ClrDestMask;
327 }
328 
329 static void ar9002_hw_set11n_ratescenario(struct ath_hw *ah __unused, void *ds,
330  void *lastds,
331  u32 durUpdateEn, u32 rtsctsRate,
332  u32 rtsctsDuration __unused,
333  struct ath9k_11n_rate_series series[],
334  u32 nseries __unused, u32 flags)
335 {
336  struct ar5416_desc *ads = AR5416DESC(ds);
337  struct ar5416_desc *last_ads = AR5416DESC(lastds);
338  u32 ds_ctl0;
339 
341  ds_ctl0 = ads->ds_ctl0;
342 
343  if (flags & ATH9K_TXDESC_RTSENA) {
344  ds_ctl0 &= ~AR_CTSEnable;
346  } else {
347  ds_ctl0 &= ~AR_RTSEnable;
349  }
350 
351  ads->ds_ctl0 = ds_ctl0;
352  } else {
353  ads->ds_ctl0 =
354  (ads->ds_ctl0 & ~(AR_RTSEnable | AR_CTSEnable));
355  }
356 
357  ads->ds_ctl2 = set11nTries(series, 0)
358  | set11nTries(series, 1)
359  | set11nTries(series, 2)
360  | set11nTries(series, 3)
361  | (durUpdateEn ? AR_DurUpdateEna : 0)
362  | SM(0, AR_BurstDur);
363 
364  ads->ds_ctl3 = set11nRate(series, 0)
365  | set11nRate(series, 1)
366  | set11nRate(series, 2)
367  | set11nRate(series, 3);
368 
369  ads->ds_ctl4 = set11nPktDurRTSCTS(series, 0)
370  | set11nPktDurRTSCTS(series, 1);
371 
372  ads->ds_ctl5 = set11nPktDurRTSCTS(series, 2)
373  | set11nPktDurRTSCTS(series, 3);
374 
375  ads->ds_ctl7 = set11nRateFlags(series, 0)
376  | set11nRateFlags(series, 1)
377  | set11nRateFlags(series, 2)
378  | set11nRateFlags(series, 3)
379  | SM(rtsctsRate, AR_RTSCTSRate);
380  last_ads->ds_ctl2 = ads->ds_ctl2;
381  last_ads->ds_ctl3 = ads->ds_ctl3;
382 }
383 
384 static void ar9002_hw_set11n_aggr_first(struct ath_hw *ah __unused, void *ds,
385  u32 aggrLen)
386 {
387  struct ar5416_desc *ads = AR5416DESC(ds);
388 
389  ads->ds_ctl1 |= (AR_IsAggr | AR_MoreAggr);
390  ads->ds_ctl6 &= ~AR_AggrLen;
391  ads->ds_ctl6 |= SM(aggrLen, AR_AggrLen);
392 }
393 
394 static void ar9002_hw_set11n_aggr_middle(struct ath_hw *ah __unused, void *ds,
395  u32 numDelims)
396 {
397  struct ar5416_desc *ads = AR5416DESC(ds);
398  unsigned int ctl6;
399 
400  ads->ds_ctl1 |= (AR_IsAggr | AR_MoreAggr);
401 
402  ctl6 = ads->ds_ctl6;
403  ctl6 &= ~AR_PadDelim;
404  ctl6 |= SM(numDelims, AR_PadDelim);
405  ads->ds_ctl6 = ctl6;
406 }
407 
408 static void ar9002_hw_set11n_aggr_last(struct ath_hw *ah __unused, void *ds)
409 {
410  struct ar5416_desc *ads = AR5416DESC(ds);
411 
412  ads->ds_ctl1 |= AR_IsAggr;
413  ads->ds_ctl1 &= ~AR_MoreAggr;
414  ads->ds_ctl6 &= ~AR_PadDelim;
415 }
416 
417 static void ar9002_hw_clr11n_aggr(struct ath_hw *ah __unused, void *ds)
418 {
419  struct ar5416_desc *ads = AR5416DESC(ds);
420 
421  ads->ds_ctl1 &= (~AR_IsAggr & ~AR_MoreAggr);
422 }
423 
424 void ath9k_hw_setuprxdesc(struct ath_hw *ah, struct ath_desc *ds,
425  u32 size, u32 flags)
426 {
427  struct ar5416_desc *ads = AR5416DESC(ds);
428  struct ath9k_hw_capabilities *pCap = &ah->caps;
429 
430  ads->ds_ctl1 = size & AR_BufLen;
432  ads->ds_ctl1 |= AR_RxIntrReq;
433 
434  ads->ds_rxstatus8 &= ~AR_RxDone;
435  if (!(pCap->hw_caps & ATH9K_HW_CAP_AUTOSLEEP))
436  memset(&(ads->u), 0, sizeof(ads->u));
437 }
438 
440 {
441  struct ath_hw_ops *ops = ath9k_hw_ops(ah);
442 
446  ops->get_isr = ar9002_hw_get_isr;
456 }
#define AR_CR_RXE
Definition: reg.h:26
#define ATH9K_TX_DATA_UNDERRUN
Definition: mac.h:97
u8 ts_flags
Definition: mac.h:120
u8 ts_longretry
Definition: mac.h:118
#define AR_ISR_RAC
Definition: reg.h:334
#define AR_RTC_STATUS_ON
Definition: reg.h:1209
int8_t ts_rssi_ext1
Definition: mac.h:125
iPXE I/O API
#define ATH9K_TXDESC_NOACK
Definition: mac.h:250
u32 ds_ctl0
Definition: mac.h:280
#define AR_INTR_SYNC_CAUSE_CLR
Definition: reg.h:924
#define ATH9K_TXERR_FILT
Definition: mac.h:85
Definition: hw.h:657
#define ATH9K_TXDESC_EXT_ONLY
Definition: mac.h:268
#define AR_RTC_STATUS
Definition: reg.h:1200
#define AR_TxRSSIAnt10
Definition: mac.h:483
#define ATH9K_TXDESC_VEOL
Definition: mac.h:267
#define AR_VirtRetryCnt
Definition: mac.h:471
#define AR_INTR_ASYNC_CAUSE
Definition: reg.h:976
void __asmcall int val
Definition: setjmp.h:12
#define AR_ISR_S2_DTIM
Definition: reg.h:230
#define ATH9K_TXDESC_CTSENA
Definition: mac.h:252
static void ar9002_hw_clr11n_aggr(struct ath_hw *ah __unused, void *ds)
static void ar9002_hw_set11n_aggr_middle(struct ath_hw *ah __unused, void *ds, u32 numDelims)
u32 evm0
Definition: mac.h:132
#define AR_IsAggr
Definition: mac.h:378
int8_t ts_rssi_ctl1
Definition: mac.h:122
#define AR_TxRSSIAnt12
Definition: mac.h:487
static void ar9002_hw_rx_enable(struct ath_hw *ah)
#define AR_ISR_S5_TIM_TIMER
Definition: reg.h:245
void(* rx_enable)(struct ath_hw *ah)
Definition: hw.h:608
int8_t ts_rssi
Definition: mac.h:116
#define AR_ISR_S1_S
Definition: reg.h:341
#define AR_ISR_S2_CST
Definition: reg.h:223
#define MS(_v, _f)
Definition: hw.h:103
u8 ts_status
Definition: mac.h:114
uint32_t type
Operating system type.
Definition: ena.h:12
uint16_t size
Buffer size.
Definition: dwmac.h:14
#define AR_ISR_S5_GENTIMER_THRESH
Definition: reg.h:252
#define AR_RxDone
Definition: mac.h:556
ath9k_int
Definition: hw.h:252
static void ar9002_hw_fill_txdesc(struct ath_hw *ah __unused, void *ds, u32 seglen, int is_firstseg, int is_lastseg, const void *ds0, u32 buf_addr, unsigned int qcu __unused)
#define AR_TxIntrReq
Definition: mac.h:363
#define AR_TxRSSIAnt01
Definition: mac.h:450
#define AR_ISR_TXEOL
Definition: reg.h:185
u16 ts_seqnum
Definition: mac.h:113
#define ATH9K_TXDESC_EXT_AND_CTL
Definition: mac.h:269
#define AR_RTSCTSRate
Definition: mac.h:441
#define AR_RTSEnable
Definition: mac.h:359
#define AR_SREV_9100(ah)
Definition: reg.h:811
#define AR_ISR_S2_GTT
Definition: reg.h:224
#define AR_PadDelim
Definition: mac.h:418
#define AR_ISR_S2_TSFOOR
Definition: reg.h:231
void(* clr11n_aggr)(struct ath_hw *ah, void *ds)
Definition: hw.h:638
#define AR_SREV_9285(_ah)
Definition: reg.h:830
#define AR_CR
Definition: reg.h:25
#define AR_DurUpdateEna
Definition: mac.h:382
#define AR_ExtAndCtl
Definition: mac.h:376
Definition: mac.h:241
#define set11nTries(_series, _index)
Definition: mac.h:32
#define AR_RTC_STATUS_M
Definition: reg.h:1203
#define ATH9K_TXDESC_INTREQ
Definition: mac.h:266
#define AR_IER_ENABLE
Definition: reg.h:56
#define AR_MoreAggr
Definition: mac.h:377
#define AR_RC_HOSTIF
Definition: reg.h:697
#define AR_TxDone
Definition: mac.h:499
#define set11nRate(_series, _index)
Definition: mac.h:35
#define set11nRateFlags(_series, _index)
Definition: mac.h:43
void ar9002_hw_attach_mac_ops(struct ath_hw *ah)
static void ar9002_hw_set11n_aggr_last(struct ath_hw *ah __unused, void *ds)
#define AR_EncrType
Definition: mac.h:420
void(* set11n_aggr_last)(struct ath_hw *ah, void *ds)
Definition: hw.h:637
static void ar9002_hw_set11n_ratescenario(struct ath_hw *ah __unused, void *ds, void *lastds, u32 durUpdateEn, u32 rtsctsRate, u32 rtsctsDuration __unused, struct ath9k_11n_rate_series series[], u32 nseries __unused, u32 flags)
u8 ts_rateindex
Definition: mac.h:115
#define set11nPktDurRTSCTS(_series, _index)
Definition: mac.h:38
int(* get_isr)(struct ath_hw *ah, enum ath9k_int *masked)
Definition: hw.h:615
#define AR_FrameType
Definition: mac.h:370
u8 tid
Definition: mac.h:129
#define AR_DestIdxValid
Definition: mac.h:364
#define AR_ISR_S1_QCU_TXERR
Definition: reg.h:342
#define AR_ISR_S0_QCU_TXOK
Definition: reg.h:336
#define AR_ISR_RXORN
Definition: reg.h:180
#define AR_ISR_S5_S
Definition: reg.h:350
#define AR_NoAck
Definition: mac.h:372
#define AR_ISR_S5_GENTIMER_TRIG
Definition: reg.h:250
static void ar9002_hw_set_desc_link(void *ds, u32 ds_link)
#define AR_ISR_TXDESC
Definition: reg.h:182
u32 ds_link
Definition: desc.h:20
#define ATH9K_TX_BA
Definition: mac.h:94
#define SM(_v, _f)
Definition: hw.h:102
#define AR_BurstDur
Definition: mac.h:380
#define AR_TxOpExceeded
Definition: mac.h:503
#define AR_TxDelimUnderrun
Definition: mac.h:473
#define AR_ClrDestMask
Definition: mac.h:361
#define AR_TxTid
Definition: mac.h:492
void ath9k_hw_setuprxdesc(struct ath_hw *ah, struct ath_desc *ds, u32 size, u32 flags)
#define AR_TxRSSICombined
Definition: mac.h:489
#define AR5416DESC(_ds)
Definition: mac.h:319
ath9k_key_type
Definition: mac.h:665
int8_t ts_rssi_ext0
Definition: mac.h:124
#define __unused
Declare a variable or data structure as unused.
Definition: compiler.h:573
#define AR_AggrLen
Definition: mac.h:415
static int ar9002_hw_get_isr(struct ath_hw *ah, enum ath9k_int *masked)
#define AR_ISR_S0_QCU_TXDESC
Definition: reg.h:338
#define AR_ISR_S0_S
Definition: reg.h:335
int8_t ts_rssi_ctl0
Definition: mac.h:121
#define AR_ISR_RXOK
Definition: reg.h:173
static void ar9002_hw_set11n_txdesc(struct ath_hw *ah, void *ds, u32 pktLen, enum ath9k_pkt_type type, u32 txPower, u32 keyIx, enum ath9k_key_type keyType, u32 flags)
u32 ds_ctl1
Definition: mac.h:281
Definition: sis900.h:26
u32 ba_high
Definition: mac.h:131
#define AR_FrameLen
Definition: mac.h:354
#define AR_ISR_TXOK
Definition: reg.h:181
#define ATH9K_TX_DESC_CFG_ERR
Definition: mac.h:96
#define EINPROGRESS
Operation in progress.
Definition: errno.h:419
#define AR_INTR_SYNC_CAUSE
Definition: reg.h:923
void(* set11n_ratescenario)(struct ath_hw *ah, void *ds, void *lastds, u32 durUpdateEn, u32 rtsctsRate, u32 rtsctsDuration, struct ath9k_11n_rate_series series[], u32 nseries, u32 flags)
Definition: hw.h:627
#define ATH9K_TX_ACKED
Definition: mac.h:89
uint8_t flags
Flags.
Definition: ena.h:18
u8 ts_shortretry
Definition: mac.h:117
u32 evm2
Definition: mac.h:134
FILE_SECBOOT(FORBIDDEN)
#define AR_TxRSSIAnt02
Definition: mac.h:452
#define AR_VirtMoreFrag
Definition: mac.h:355
struct ath_hw_ops - callbacks used by hardware code and driver code
Definition: hw.h:604
void(* set11n_txdesc)(struct ath_hw *ah, void *ds, u32 pktLen, enum ath9k_pkt_type type, u32 txPower, u32 keyIx, enum ath9k_key_type keyType, u32 flags)
Definition: hw.h:622
#define ATH9K_TXDESC_RTSENA
Definition: mac.h:251
#define AR_ISR_S2
Definition: reg.h:220
#define AR_SeqNum
Definition: mac.h:500
union ar5416_desc::@34 u
u32 ts_tstamp
Definition: mac.h:112
u32 ctl6
Definition: mac.h:288
#define AR_FinalTxIdx
Definition: mac.h:505
static void ar9002_hw_set_clrdmask(struct ath_hw *ah __unused, void *ds, int val)
#define AR_ISR_S2_CABEND
Definition: reg.h:226
#define AR_ISR_S2_DTIMSYNC
Definition: reg.h:227
int ath9k_hw_updatetxtriglevel(struct ath_hw *ah, int bIncTrigLevel)
ath9k_hw_updatetxtriglevel - adjusts the frame trigger level
Definition: ath9k_mac.c:103
static int ar9002_hw_proc_txdesc(struct ath_hw *ah, void *ds, struct ath_tx_status *ts)
void(* set_clrdmask)(struct ath_hw *ah, void *ds, int val)
Definition: hw.h:639
#define AR_RTSFailCnt
Definition: mac.h:467
#define AR_Filtered
Definition: mac.h:466
uint32_t ds
Definition: librm.h:140
#define REG_READ(_ah, _reg)
Definition: hw.h:81
#define AR_DestIdx
Definition: mac.h:368
uint8_t status
Status.
Definition: ena.h:16
#define ATH9K_RXDESC_INTREQ
Definition: mac.h:275
#define ATH9K_TXERR_FIFO
Definition: mac.h:86
#define AR5416DESC_CONST(_ds)
Definition: mac.h:320
#define AR_TxRSSIAnt00
Definition: mac.h:448
static struct ath_hw_ops * ath9k_hw_ops(struct ath_hw *ah)
Definition: hw.h:885
int(* proc_txdesc)(struct ath_hw *ah, void *ds, struct ath_tx_status *ts)
Definition: hw.h:620
static void ar9002_hw_set11n_aggr_first(struct ath_hw *ah __unused, void *ds, u32 aggrLen)
int8_t ts_rssi_ext2
Definition: mac.h:126
void(* set11n_aggr_middle)(struct ath_hw *ah, void *ds, u32 numDelims)
Definition: hw.h:635
#define AR_ISR_TXERR
Definition: reg.h:183
#define AR_ExcessiveRetries
Definition: mac.h:464
u32 evm1
Definition: mac.h:133
#define AR_TxDataUnderrun
Definition: mac.h:474
#define AR_ISR_S1_QCU_TXEOL
Definition: reg.h:344
#define REG_WRITE(_ah, _reg, _val)
Definition: hw.h:78
#define AR_INTR_MAC_IRQ
Definition: reg.h:916
#define AR_ISR_RXMINTR
Definition: reg.h:204
#define AR_ISR_BCNMISC
Definition: reg.h:196
#define ATH9K_TX_DELIM_UNDERRUN
Definition: mac.h:98
#define ATH9K_TXERR_XTXOP
Definition: mac.h:87
#define AR_SREV_9271(_ah)
Definition: reg.h:854
#define AR_RxIntrReq
Definition: mac.h:514
#define AR_BufLen
#define ATH9K_TXDESC_VMF
Definition: mac.h:270
#define ATH9K_TXERR_TIMER_EXPIRED
Definition: mac.h:88
#define AR_TxRSSIAnt11
Definition: mac.h:485
#define AR_TxTimerExpired
Definition: mac.h:476
#define AR_ExtOnly
Definition: mac.h:375
#define AR_TxMore
Definition: mac.h:367
void(* set11n_aggr_first)(struct ath_hw *ah, void *ds, u32 aggrLen)
Definition: hw.h:633
#define AR_FrmXmitOK
Definition: mac.h:463
#define AR_ISR_GENTMR
Definition: reg.h:201
#define AR_ISR
Definition: reg.h:172
uint8_t ah
Definition: registers.h:85
#define AR_DescCfgErr
Definition: mac.h:475
static void ar9002_hw_get_desc_link(void *ds, u32 **ds_link)
#define AR_ISR_RXINTM
Definition: reg.h:206
typeof(acpi_finder=acpi_find)
ACPI table finder.
Definition: acpi.c:48
#define AR_DataFailCnt
Definition: mac.h:469
int8_t ts_rssi_ctl2
Definition: mac.h:123
#define DBG(...)
Print a debugging message.
Definition: compiler.h:498
ath9k_pkt_type
Definition: mac.h:605
#define AR_XmitPower
Definition: mac.h:357
#define AR_ISR_RXERR
Definition: reg.h:177
#define AR_TxBaStatus
Definition: mac.h:455
void(* fill_txdesc)(struct ath_hw *ah, void *ds, u32 seglen, int is_firstseg, int is_is_lastseg, const void *ds0, u32 buf_addr, unsigned int qcu)
Definition: hw.h:616
#define AR_VEOL
Definition: mac.h:360
#define ATH9K_TXERR_XRETRY
Definition: mac.h:84
u32 ds_data
Definition: mac.h:279
#define AR_RC
Definition: reg.h:694
#define ATH9K_TXKEYIX_INVALID
Definition: mac.h:205
void(* get_desc_link)(void *ds, u32 **link)
Definition: hw.h:610
u32 ba_low
Definition: mac.h:130
u8 ts_virtcol
Definition: mac.h:119
uint32_t u32
Definition: stdint.h:24
#define AR_ISR_S2_TIM
Definition: reg.h:225
void * memset(void *dest, int character, size_t len) __nonnull
#define AR_CTSEnable
Definition: mac.h:365
void(* set_desc_link)(void *ds, u32 link)
Definition: hw.h:609
#define AR_FIFOUnderrun
Definition: mac.h:465