iPXE
ath5k_qcu.c File Reference
#include "ath5k.h"
#include "reg.h"
#include "base.h"

Go to the source code of this file.

Functions

 FILE_LICENCE (MIT)
 FILE_SECBOOT (FORBIDDEN)
int ath5k_hw_set_tx_queueprops (struct ath5k_hw *ah, const struct ath5k_txq_info *queue_info)
int ath5k_hw_setup_tx_queue (struct ath5k_hw *ah, enum ath5k_tx_queue queue_type, struct ath5k_txq_info *queue_info)
void ath5k_hw_release_tx_queue (struct ath5k_hw *ah)
int ath5k_hw_reset_tx_queue (struct ath5k_hw *ah)
int ath5k_hw_set_slot_time (struct ath5k_hw *ah, unsigned int slot_time)

Function Documentation

◆ FILE_LICENCE()

FILE_LICENCE ( MIT )

◆ FILE_SECBOOT()

FILE_SECBOOT ( FORBIDDEN )

◆ ath5k_hw_set_tx_queueprops()

int ath5k_hw_set_tx_queueprops ( struct ath5k_hw * ah,
const struct ath5k_txq_info * queue_info )

Definition at line 35 of file ath5k_qcu.c.

37{
38 if (ah->ah_txq.tqi_type == AR5K_TX_QUEUE_INACTIVE)
39 return -EIO;
40
41 memcpy(&ah->ah_txq, queue_info, sizeof(struct ath5k_txq_info));
42
43 /*XXX: Is this supported on 5210 ?*/
44 if ((queue_info->tqi_type == AR5K_TX_QUEUE_DATA &&
45 ((queue_info->tqi_subtype == AR5K_WME_AC_VI) ||
46 (queue_info->tqi_subtype == AR5K_WME_AC_VO))) ||
47 queue_info->tqi_type == AR5K_TX_QUEUE_UAPSD)
48 ah->ah_txq.tqi_flags |= AR5K_TXQ_FLAG_POST_FR_BKOFF_DIS;
49
50 return 0;
51}
@ AR5K_WME_AC_VO
Definition ath5k.h:466
@ AR5K_WME_AC_VI
Definition ath5k.h:465
#define AR5K_TXQ_FLAG_POST_FR_BKOFF_DIS
Definition ath5k.h:502
@ AR5K_TX_QUEUE_INACTIVE
Definition ath5k.h:447
@ AR5K_TX_QUEUE_DATA
Definition ath5k.h:448
@ AR5K_TX_QUEUE_UAPSD
Definition ath5k.h:452
#define EIO
Input/output error.
Definition errno.h:434
void * memcpy(void *dest, const void *src, size_t len) __nonnull
uint8_t ah
Definition registers.h:1
enum ath5k_tx_queue tqi_type
Definition ath5k.h:509
enum ath5k_tx_queue_subtype tqi_subtype
Definition ath5k.h:510

References ah, AR5K_TX_QUEUE_DATA, AR5K_TX_QUEUE_INACTIVE, AR5K_TX_QUEUE_UAPSD, AR5K_TXQ_FLAG_POST_FR_BKOFF_DIS, AR5K_WME_AC_VI, AR5K_WME_AC_VO, EIO, memcpy(), ath5k_txq_info::tqi_subtype, and ath5k_txq_info::tqi_type.

Referenced by ath5k_hw_setup_tx_queue().

◆ ath5k_hw_setup_tx_queue()

int ath5k_hw_setup_tx_queue ( struct ath5k_hw * ah,
enum ath5k_tx_queue queue_type,
struct ath5k_txq_info * queue_info )

Definition at line 56 of file ath5k_qcu.c.

58{
59 int ret;
60
61 /*
62 * Setup internal queue structure
63 */
64 memset(&ah->ah_txq, 0, sizeof(struct ath5k_txq_info));
65 ah->ah_txq.tqi_type = queue_type;
66
67 if (queue_info != NULL) {
68 queue_info->tqi_type = queue_type;
69 ret = ath5k_hw_set_tx_queueprops(ah, queue_info);
70 if (ret)
71 return ret;
72 }
73
74 /*
75 * We use ah_txq_status to hold a temp value for
76 * the Secondary interrupt mask registers on 5211+
77 * check out ath5k_hw_reset_tx_queue
78 */
79 AR5K_Q_ENABLE_BITS(ah->ah_txq_status, 0);
80
81 return 0;
82}
#define NULL
NULL pointer (VOID *)
Definition Base.h:322
#define AR5K_Q_ENABLE_BITS(_reg, _queue)
Definition ath5k.h:126
int ath5k_hw_set_tx_queueprops(struct ath5k_hw *ah, const struct ath5k_txq_info *queue_info)
Definition ath5k_qcu.c:35
void * memset(void *dest, int character, size_t len) __nonnull

References ah, AR5K_Q_ENABLE_BITS, ath5k_hw_set_tx_queueprops(), memset(), NULL, and ath5k_txq_info::tqi_type.

Referenced by ath5k_txq_setup().

◆ ath5k_hw_release_tx_queue()

void ath5k_hw_release_tx_queue ( struct ath5k_hw * ah)

Definition at line 87 of file ath5k_qcu.c.

88{
89 /* This queue will be skipped in further operations */
90 ah->ah_txq.tqi_type = AR5K_TX_QUEUE_INACTIVE;
91 /*For SIMR setup*/
92 AR5K_Q_DISABLE_BITS(ah->ah_txq_status, 0);
93}
#define AR5K_Q_DISABLE_BITS(_reg, _queue)
Definition ath5k.h:130

References ah, AR5K_Q_DISABLE_BITS, and AR5K_TX_QUEUE_INACTIVE.

Referenced by ath5k_txq_release().

◆ ath5k_hw_reset_tx_queue()

int ath5k_hw_reset_tx_queue ( struct ath5k_hw * ah)

Definition at line 98 of file ath5k_qcu.c.

99{
100 u32 cw_min, cw_max, retry_lg, retry_sh;
101 struct ath5k_txq_info *tq = &ah->ah_txq;
102 const int queue = 0;
103
104 tq = &ah->ah_txq;
105
107 return 0;
108
109 if (ah->ah_version == AR5K_AR5210) {
110 /* Only handle data queues, others will be ignored */
111 if (tq->tqi_type != AR5K_TX_QUEUE_DATA)
112 return 0;
113
114 /* Set Slot time */
115 ath5k_hw_reg_write(ah, ah->ah_turbo ?
118 /* Set ACK_CTS timeout */
119 ath5k_hw_reg_write(ah, ah->ah_turbo ?
122 /* Set Transmit Latency */
123 ath5k_hw_reg_write(ah, ah->ah_turbo ?
126
127 /* Set IFS0 */
128 if (ah->ah_turbo) {
130 (ah->ah_aifs + tq->tqi_aifs) *
133 AR5K_IFS0);
134 } else {
136 (ah->ah_aifs + tq->tqi_aifs) *
139 }
140
141 /* Set IFS1 */
142 ath5k_hw_reg_write(ah, ah->ah_turbo ?
145 /* Set AR5K_PHY_SETTLING */
146 ath5k_hw_reg_write(ah, ah->ah_turbo ?
148 | 0x38 :
150 | 0x1C,
152 /* Set Frame Control Register */
153 ath5k_hw_reg_write(ah, ah->ah_turbo ?
155 AR5K_PHY_TURBO_SHORT | 0x2020) :
156 (AR5K_PHY_FRAME_CTL_INI | 0x1020),
158 }
159
160 /*
161 * Calculate cwmin/max by channel mode
162 */
163 cw_min = ah->ah_cw_min = AR5K_TUNE_CWMIN;
164 cw_max = ah->ah_cw_max = AR5K_TUNE_CWMAX;
165 ah->ah_aifs = AR5K_TUNE_AIFS;
166 /*XR is only supported on 5212*/
167 if (IS_CHAN_XR(ah->ah_current_channel) &&
168 ah->ah_version == AR5K_AR5212) {
169 cw_min = ah->ah_cw_min = AR5K_TUNE_CWMIN_XR;
170 cw_max = ah->ah_cw_max = AR5K_TUNE_CWMAX_XR;
171 ah->ah_aifs = AR5K_TUNE_AIFS_XR;
172 /*B mode is not supported on 5210*/
173 } else if (IS_CHAN_B(ah->ah_current_channel) &&
174 ah->ah_version != AR5K_AR5210) {
175 cw_min = ah->ah_cw_min = AR5K_TUNE_CWMIN_11B;
176 cw_max = ah->ah_cw_max = AR5K_TUNE_CWMAX_11B;
177 ah->ah_aifs = AR5K_TUNE_AIFS_11B;
178 }
179
180 cw_min = 1;
181 while (cw_min < ah->ah_cw_min)
182 cw_min = (cw_min << 1) | 1;
183
184 cw_min = tq->tqi_cw_min < 0 ? (cw_min >> (-tq->tqi_cw_min)) :
185 ((cw_min << tq->tqi_cw_min) + (1 << tq->tqi_cw_min) - 1);
186 cw_max = tq->tqi_cw_max < 0 ? (cw_max >> (-tq->tqi_cw_max)) :
187 ((cw_max << tq->tqi_cw_max) + (1 << tq->tqi_cw_max) - 1);
188
189 /*
190 * Calculate and set retry limits
191 */
192 if (ah->ah_software_retry) {
193 /* XXX Need to test this */
194 retry_lg = ah->ah_limit_tx_retries;
195 retry_sh = retry_lg = retry_lg > AR5K_DCU_RETRY_LMT_SH_RETRY ?
196 AR5K_DCU_RETRY_LMT_SH_RETRY : retry_lg;
197 } else {
198 retry_lg = AR5K_INIT_LG_RETRY;
199 retry_sh = AR5K_INIT_SH_RETRY;
200 }
201
202 /*No QCU/DCU [5210]*/
203 if (ah->ah_version == AR5K_AR5210) {
204 ath5k_hw_reg_write(ah,
205 (cw_min << AR5K_NODCU_RETRY_LMT_CW_MIN_S)
206 | AR5K_REG_SM(AR5K_INIT_SLG_RETRY,
207 AR5K_NODCU_RETRY_LMT_SLG_RETRY)
208 | AR5K_REG_SM(AR5K_INIT_SSH_RETRY,
209 AR5K_NODCU_RETRY_LMT_SSH_RETRY)
210 | AR5K_REG_SM(retry_lg, AR5K_NODCU_RETRY_LMT_LG_RETRY)
211 | AR5K_REG_SM(retry_sh, AR5K_NODCU_RETRY_LMT_SH_RETRY),
212 AR5K_NODCU_RETRY_LMT);
213 } else {
214 /*QCU/DCU [5211+]*/
215 ath5k_hw_reg_write(ah,
216 AR5K_REG_SM(AR5K_INIT_SLG_RETRY,
217 AR5K_DCU_RETRY_LMT_SLG_RETRY) |
218 AR5K_REG_SM(AR5K_INIT_SSH_RETRY,
219 AR5K_DCU_RETRY_LMT_SSH_RETRY) |
220 AR5K_REG_SM(retry_lg, AR5K_DCU_RETRY_LMT_LG_RETRY) |
221 AR5K_REG_SM(retry_sh, AR5K_DCU_RETRY_LMT_SH_RETRY),
222 AR5K_QUEUE_DFS_RETRY_LIMIT(queue));
223
224 /*===Rest is also for QCU/DCU only [5211+]===*/
225
226 /*
227 * Set initial content window (cw_min/cw_max)
228 * and arbitrated interframe space (aifs)...
229 */
230 ath5k_hw_reg_write(ah,
231 AR5K_REG_SM(cw_min, AR5K_DCU_LCL_IFS_CW_MIN) |
232 AR5K_REG_SM(cw_max, AR5K_DCU_LCL_IFS_CW_MAX) |
233 AR5K_REG_SM(ah->ah_aifs + tq->tqi_aifs,
234 AR5K_DCU_LCL_IFS_AIFS),
235 AR5K_QUEUE_DFS_LOCAL_IFS(queue));
236
237 /*
238 * Set misc registers
239 */
240 /* Enable DCU early termination for this queue */
241 AR5K_REG_ENABLE_BITS(ah, AR5K_QUEUE_MISC(queue),
242 AR5K_QCU_MISC_DCU_EARLY);
243
244 /* Enable DCU to wait for next fragment from QCU */
245 AR5K_REG_ENABLE_BITS(ah, AR5K_QUEUE_DFS_MISC(queue),
246 AR5K_DCU_MISC_FRAG_WAIT);
247
248 /* On Maui and Spirit use the global seqnum on DCU */
249 if (ah->ah_mac_version < AR5K_SREV_AR5211)
250 AR5K_REG_ENABLE_BITS(ah, AR5K_QUEUE_DFS_MISC(queue),
251 AR5K_DCU_MISC_SEQNUM_CTL);
252
253 if (tq->tqi_cbr_period) {
254 ath5k_hw_reg_write(ah, AR5K_REG_SM(tq->tqi_cbr_period,
255 AR5K_QCU_CBRCFG_INTVAL) |
256 AR5K_REG_SM(tq->tqi_cbr_overflow_limit,
257 AR5K_QCU_CBRCFG_ORN_THRES),
258 AR5K_QUEUE_CBRCFG(queue));
259 AR5K_REG_ENABLE_BITS(ah, AR5K_QUEUE_MISC(queue),
260 AR5K_QCU_MISC_FRSHED_CBR);
261 if (tq->tqi_cbr_overflow_limit)
262 AR5K_REG_ENABLE_BITS(ah,
263 AR5K_QUEUE_MISC(queue),
264 AR5K_QCU_MISC_CBR_THRES_ENABLE);
265 }
266
267 if (tq->tqi_ready_time &&
273
274 if (tq->tqi_burst_time) {
275 ath5k_hw_reg_write(ah, AR5K_REG_SM(tq->tqi_burst_time,
276 AR5K_DCU_CHAN_TIME_DUR) |
277 AR5K_DCU_CHAN_TIME_ENABLE,
278 AR5K_QUEUE_DFS_CHANNEL_TIME(queue));
279
280 if (tq->tqi_flags
281 & AR5K_TXQ_FLAG_RDYTIME_EXP_POLICY_ENABLE)
282 AR5K_REG_ENABLE_BITS(ah,
283 AR5K_QUEUE_MISC(queue),
284 AR5K_QCU_MISC_RDY_VEOL_POLICY);
285 }
286
290
294
295 /* TODO: Handle frame compression */
296
297 /*
298 * Enable interrupts for this tx queue
299 * in the secondary interrupt mask registers
300 */
302 AR5K_Q_ENABLE_BITS(ah->ah_txq_imr_txok, queue);
303
305 AR5K_Q_ENABLE_BITS(ah->ah_txq_imr_txerr, queue);
306
308 AR5K_Q_ENABLE_BITS(ah->ah_txq_imr_txurn, queue);
309
311 AR5K_Q_ENABLE_BITS(ah->ah_txq_imr_txdesc, queue);
312
314 AR5K_Q_ENABLE_BITS(ah->ah_txq_imr_txeol, queue);
315
317 AR5K_Q_ENABLE_BITS(ah->ah_txq_imr_cbrorn, queue);
318
320 AR5K_Q_ENABLE_BITS(ah->ah_txq_imr_cbrurn, queue);
321
323 AR5K_Q_ENABLE_BITS(ah->ah_txq_imr_qtrig, queue);
324
326 AR5K_Q_ENABLE_BITS(ah->ah_txq_imr_nofrm, queue);
327
328 /* Update secondary interrupt mask registers */
329
330 /* Filter out inactive queues */
331 ah->ah_txq_imr_txok &= ah->ah_txq_status;
332 ah->ah_txq_imr_txerr &= ah->ah_txq_status;
333 ah->ah_txq_imr_txurn &= ah->ah_txq_status;
334 ah->ah_txq_imr_txdesc &= ah->ah_txq_status;
335 ah->ah_txq_imr_txeol &= ah->ah_txq_status;
336 ah->ah_txq_imr_cbrorn &= ah->ah_txq_status;
337 ah->ah_txq_imr_cbrurn &= ah->ah_txq_status;
338 ah->ah_txq_imr_qtrig &= ah->ah_txq_status;
339 ah->ah_txq_imr_nofrm &= ah->ah_txq_status;
340
341 ath5k_hw_reg_write(ah, AR5K_REG_SM(ah->ah_txq_imr_txok,
343 AR5K_REG_SM(ah->ah_txq_imr_txdesc,
345 ath5k_hw_reg_write(ah, AR5K_REG_SM(ah->ah_txq_imr_txerr,
347 AR5K_REG_SM(ah->ah_txq_imr_txeol,
349 /* Update simr2 but don't overwrite rest simr2 settings */
352 AR5K_REG_SM(ah->ah_txq_imr_txurn,
354 ath5k_hw_reg_write(ah, AR5K_REG_SM(ah->ah_txq_imr_cbrorn,
356 AR5K_REG_SM(ah->ah_txq_imr_cbrurn,
358 ath5k_hw_reg_write(ah, AR5K_REG_SM(ah->ah_txq_imr_qtrig,
360 /* Set TXNOFRM_QCU for the queues with TXNOFRM enabled */
361 ath5k_hw_reg_write(ah, AR5K_REG_SM(ah->ah_txq_imr_nofrm,
363 /* No queue has TXNOFRM enabled, disable the interrupt
364 * by setting AR5K_TXNOFRM to zero */
365 if (ah->ah_txq_imr_nofrm == 0)
367
368 /* Set QCU mask for this DCU to save power */
370 }
371
372 return 0;
373}
#define AR5K_PHY_SETTLING
Definition reg.h:1970
#define AR5K_SIMR3_QCBRURN
Definition reg.h:447
#define AR5K_PHY_FRAME_CTL_INI
Definition reg.h:2283
#define AR5K_SIMR1
Definition reg.h:424
#define AR5K_SIMR1_QCU_TXERR
Definition reg.h:425
#define AR5K_PHY_TURBO_SHORT
Definition reg.h:1893
#define AR5K_SIMR0_QCU_TXOK
Definition reg.h:419
#define AR5K_TXNOFRM_QCU
Definition reg.h:239
#define AR5K_SIMR1_QCU_TXEOL
Definition reg.h:427
#define AR5K_SIMR0_QCU_TXDESC
Definition reg.h:421
#define AR5K_SIMR2_QCU_TXURN
Definition reg.h:431
#define AR5K_PHY_FRAME_CTL_5210
Definition reg.h:2266
#define AR5K_IFS0
Definition reg.h:1290
#define AR5K_IFS1
Definition reg.h:1299
#define AR5K_SLOT_TIME
Definition reg.h:1163
#define AR5K_QUEUE_DFS_MISC(_q)
Definition reg.h:747
#define AR5K_TXNOFRM
Definition reg.h:237
#define AR5K_SIMR4
Definition reg.h:450
#define AR5K_QCU_RDYTIMECFG_ENABLE
Definition reg.h:586
#define AR5K_DCU_MISC_POST_FR_BKOFF_DIS
Definition reg.h:743
#define AR5K_SIMR3_QCBRORN
Definition reg.h:445
#define AR5K_QCU_RDYTIMECFG_INTVAL
Definition reg.h:584
#define AR5K_DCU_MISC_BACKOFF_FRAG
Definition reg.h:728
#define AR5K_SIMR0
Definition reg.h:418
#define AR5K_QUEUE_QCUMASK(_q)
Definition reg.h:673
#define AR5K_IFS0_DIFS_S
Definition reg.h:1294
#define AR5K_SIMR4_QTRIG
Definition reg.h:451
#define AR5K_SIMR2
Definition reg.h:430
#define AR5K_QUEUE_RDYTIMECFG(_q)
Definition reg.h:587
#define AR5K_PHY_TURBO_MODE
Definition reg.h:1892
#define AR5K_USEC_5210
Definition reg.h:1215
#define AR5K_SIMR3
Definition reg.h:444
#define AR5K_TXQ_FLAG_TXURNINT_ENABLE
Definition ath5k.h:494
#define AR5K_INIT_SLOT_TIME_TURBO
Definition ath5k.h:217
#define AR5K_TXQ_FLAG_TXDESCINT_ENABLE
Definition ath5k.h:493
#define AR5K_TXQ_FLAG_QTRIGINT_ENABLE
Definition ath5k.h:497
#define AR5K_TUNE_CWMAX
Definition ath5k.h:189
#define AR5K_TXQ_FLAG_CBRORNINT_ENABLE
Definition ath5k.h:495
#define AR5K_TXQ_FLAG_TXNOFRMINT_ENABLE
Definition ath5k.h:498
#define AR5K_REG_SM(_val, _flags)
Definition ath5k.h:86
#define AR5K_REG_WRITE_Q(ah, _reg, _queue)
Definition ath5k.h:123
#define AR5K_INIT_ACK_CTS_TIMEOUT
Definition ath5k.h:218
#define AR5K_TXQ_FLAG_TXEOLINT_ENABLE
Definition ath5k.h:492
#define AR5K_TXQ_FLAG_TXOKINT_ENABLE
Definition ath5k.h:490
#define AR5K_TUNE_AIFS_11B
Definition ath5k.h:184
#define AR5K_REG_ENABLE_BITS(ah, _reg, _flags)
Definition ath5k.h:106
#define AR5K_INIT_SIFS_TURBO
Definition ath5k.h:225
#define AR5K_INIT_TRANSMIT_LATENCY
Definition ath5k.h:232
#define AR5K_TUNE_CWMIN_11B
Definition ath5k.h:187
#define AR5K_TUNE_AIFS
Definition ath5k.h:183
#define AR5K_TUNE_CWMAX_11B
Definition ath5k.h:190
#define AR5K_TUNE_AIFS_XR
Definition ath5k.h:185
#define AR5K_TUNE_CWMAX_XR
Definition ath5k.h:191
#define AR5K_INIT_SIFS
Definition ath5k.h:224
#define AR5K_INIT_SLOT_TIME
Definition ath5k.h:216
static u32 ath5k_hw_reg_read(struct ath5k_hw *ah, u16 reg)
Definition ath5k.h:1216
#define AR5K_INIT_PROTO_TIME_CNTRL_TURBO
Definition ath5k.h:244
#define AR5K_TXQ_FLAG_TXERRINT_ENABLE
Definition ath5k.h:491
#define AR5K_TXQ_FLAG_CBRURNINT_ENABLE
Definition ath5k.h:496
#define AR5K_TUNE_CWMIN_XR
Definition ath5k.h:188
@ AR5K_TX_QUEUE_CAB
Definition ath5k.h:451
#define IS_CHAN_B(_c)
Definition ath5k.h:660
@ AR5K_AR5210
Definition ath5k.h:256
@ AR5K_AR5212
Definition ath5k.h:258
#define AR5K_INIT_ACK_CTS_TIMEOUT_TURBO
Definition ath5k.h:219
static void ath5k_hw_reg_write(struct ath5k_hw *ah, u32 val, u16 reg)
Definition ath5k.h:1224
#define AR5K_REG_DISABLE_BITS(ah, _reg, _flags)
Definition ath5k.h:109
#define AR5K_INIT_PROTO_TIME_CNTRL
Definition ath5k.h:240
#define AR5K_TXQ_FLAG_BACKOFF_DISABLE
Definition ath5k.h:499
#define AR5K_TXQ_FLAG_FRAG_BURST_BACKOFF_ENABLE
Definition ath5k.h:501
#define IS_CHAN_XR(_c)
Definition ath5k.h:659
#define AR5K_INIT_TRANSMIT_LATENCY_TURBO
Definition ath5k.h:236
#define AR5K_TUNE_CWMIN
Definition ath5k.h:186
uint16_t queue
Queue ID.
Definition ena.h:11
if(natsemi->flags &NATSEMI_64BIT) return 1
u16 tqi_flags
Definition ath5k.h:511
u32 tqi_ready_time
Definition ath5k.h:518
s32 tqi_cw_max
Definition ath5k.h:514
s32 tqi_cw_min
Definition ath5k.h:513
u32 tqi_burst_time
Definition ath5k.h:517
#define u32
Definition vga.h:21

References ah, AR5K_AR5210, AR5K_AR5212, AR5K_DCU_CHAN_TIME_DUR, AR5K_DCU_CHAN_TIME_ENABLE, AR5K_DCU_LCL_IFS_AIFS, AR5K_DCU_LCL_IFS_CW_MAX, AR5K_DCU_LCL_IFS_CW_MIN, AR5K_DCU_MISC_BACKOFF_FRAG, AR5K_DCU_MISC_FRAG_WAIT, AR5K_DCU_MISC_POST_FR_BKOFF_DIS, AR5K_DCU_MISC_SEQNUM_CTL, AR5K_DCU_RETRY_LMT_LG_RETRY, AR5K_DCU_RETRY_LMT_SH_RETRY, AR5K_DCU_RETRY_LMT_SLG_RETRY, AR5K_DCU_RETRY_LMT_SSH_RETRY, AR5K_IFS0, AR5K_IFS0_DIFS_S, AR5K_IFS1, AR5K_INIT_ACK_CTS_TIMEOUT, AR5K_INIT_ACK_CTS_TIMEOUT_TURBO, AR5K_INIT_LG_RETRY, AR5K_INIT_PROTO_TIME_CNTRL, AR5K_INIT_PROTO_TIME_CNTRL_TURBO, AR5K_INIT_SH_RETRY, AR5K_INIT_SIFS, AR5K_INIT_SIFS_TURBO, AR5K_INIT_SLG_RETRY, AR5K_INIT_SLOT_TIME, AR5K_INIT_SLOT_TIME_TURBO, AR5K_INIT_SSH_RETRY, AR5K_INIT_TRANSMIT_LATENCY, AR5K_INIT_TRANSMIT_LATENCY_TURBO, AR5K_NODCU_RETRY_LMT, AR5K_NODCU_RETRY_LMT_CW_MIN_S, AR5K_NODCU_RETRY_LMT_LG_RETRY, AR5K_NODCU_RETRY_LMT_SH_RETRY, AR5K_NODCU_RETRY_LMT_SLG_RETRY, AR5K_NODCU_RETRY_LMT_SSH_RETRY, AR5K_PHY_FRAME_CTL_5210, AR5K_PHY_FRAME_CTL_INI, AR5K_PHY_SETTLING, AR5K_PHY_TURBO_MODE, AR5K_PHY_TURBO_SHORT, AR5K_Q_ENABLE_BITS, AR5K_QCU_CBRCFG_INTVAL, AR5K_QCU_CBRCFG_ORN_THRES, AR5K_QCU_MISC_CBR_THRES_ENABLE, AR5K_QCU_MISC_DCU_EARLY, AR5K_QCU_MISC_FRSHED_CBR, AR5K_QCU_MISC_RDY_VEOL_POLICY, AR5K_QCU_RDYTIMECFG_ENABLE, AR5K_QCU_RDYTIMECFG_INTVAL, AR5K_QUEUE_CBRCFG, AR5K_QUEUE_DFS_CHANNEL_TIME, AR5K_QUEUE_DFS_LOCAL_IFS, AR5K_QUEUE_DFS_MISC, AR5K_QUEUE_DFS_RETRY_LIMIT, AR5K_QUEUE_MISC, AR5K_QUEUE_QCUMASK, AR5K_QUEUE_RDYTIMECFG, AR5K_REG_DISABLE_BITS, AR5K_REG_ENABLE_BITS, AR5K_REG_SM, AR5K_REG_WRITE_Q, AR5K_SIMR0, AR5K_SIMR0_QCU_TXDESC, AR5K_SIMR0_QCU_TXOK, AR5K_SIMR1, AR5K_SIMR1_QCU_TXEOL, AR5K_SIMR1_QCU_TXERR, AR5K_SIMR2, AR5K_SIMR2_QCU_TXURN, AR5K_SIMR3, AR5K_SIMR3_QCBRORN, AR5K_SIMR3_QCBRURN, AR5K_SIMR4, AR5K_SIMR4_QTRIG, AR5K_SLOT_TIME, AR5K_SREV_AR5211, AR5K_TUNE_AIFS, AR5K_TUNE_AIFS_11B, AR5K_TUNE_AIFS_XR, AR5K_TUNE_CWMAX, AR5K_TUNE_CWMAX_11B, AR5K_TUNE_CWMAX_XR, AR5K_TUNE_CWMIN, AR5K_TUNE_CWMIN_11B, AR5K_TUNE_CWMIN_XR, AR5K_TX_QUEUE_CAB, AR5K_TX_QUEUE_DATA, AR5K_TX_QUEUE_INACTIVE, AR5K_TXNOFRM, AR5K_TXNOFRM_QCU, AR5K_TXQ_FLAG_BACKOFF_DISABLE, AR5K_TXQ_FLAG_CBRORNINT_ENABLE, AR5K_TXQ_FLAG_CBRURNINT_ENABLE, AR5K_TXQ_FLAG_FRAG_BURST_BACKOFF_ENABLE, AR5K_TXQ_FLAG_QTRIGINT_ENABLE, AR5K_TXQ_FLAG_RDYTIME_EXP_POLICY_ENABLE, AR5K_TXQ_FLAG_TXDESCINT_ENABLE, AR5K_TXQ_FLAG_TXEOLINT_ENABLE, AR5K_TXQ_FLAG_TXERRINT_ENABLE, AR5K_TXQ_FLAG_TXNOFRMINT_ENABLE, AR5K_TXQ_FLAG_TXOKINT_ENABLE, AR5K_TXQ_FLAG_TXURNINT_ENABLE, AR5K_USEC_5210, ath5k_hw_reg_read(), ath5k_hw_reg_write(), IS_CHAN_B, IS_CHAN_XR, queue, ath5k_txq_info::tqi_aifs, ath5k_txq_info::tqi_burst_time, ath5k_txq_info::tqi_cbr_overflow_limit, ath5k_txq_info::tqi_cbr_period, ath5k_txq_info::tqi_cw_max, ath5k_txq_info::tqi_cw_min, ath5k_txq_info::tqi_flags, ath5k_txq_info::tqi_ready_time, ath5k_txq_info::tqi_type, and u32.

Referenced by ath5k_hw_reset().

◆ ath5k_hw_set_slot_time()

int ath5k_hw_set_slot_time ( struct ath5k_hw * ah,
unsigned int slot_time )

Definition at line 378 of file ath5k_qcu.c.

379{
380 if (slot_time < AR5K_SLOT_TIME_9 || slot_time > AR5K_SLOT_TIME_MAX)
381 return -EINVAL;
382
383 if (ah->ah_version == AR5K_AR5210)
385 ah->ah_turbo), AR5K_SLOT_TIME);
386 else
388
389 return 0;
390}
#define AR5K_DCU_GBL_IFS_SLOT
Definition reg.h:765
#define AR5K_SLOT_TIME_MAX
Definition ath5k.h:627
static unsigned int ath5k_hw_htoclock(unsigned int usec, int turbo)
Definition ath5k.h:1199
#define EINVAL
Invalid argument.
Definition errno.h:429

References ah, AR5K_AR5210, AR5K_DCU_GBL_IFS_SLOT, AR5K_SLOT_TIME, AR5K_SLOT_TIME_MAX, ath5k_hw_htoclock(), ath5k_hw_reg_write(), and EINVAL.