24 #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
75 ath5k_hw_setup_2word_tx_desc(
struct ath5k_hw *
ah,
81 unsigned int tx_rate0,
unsigned int tx_tries0,
83 unsigned int antenna_mode,
85 unsigned int rtscts_rate,
unsigned int rtscts_duration)
89 unsigned int frame_len;
118 frame_len = pkt_len - padsize +
FCS_LEN;
174 #define _TX_FLAGS(_c, _flag) \
175 if (flags & AR5K_TXDESC_##_flag) { \
176 tx_ctl->tx_control_##_c |= \
177 AR5K_2W_TX_DESC_CTL##_c##_##_flag; \
179 #define _TX_FLAGS_5211(_c, _flag) \
180 if (flags & AR5K_TXDESC_##_flag) { \
181 tx_ctl->tx_control_##_c |= \
182 AR5K_2W_TX_DESC_CTL##_c##_##_flag##_5211; \
194 #undef _TX_FLAGS_5211
241 ath5k_hw_setup_4word_tx_desc(
struct ath5k_hw *
ah,
247 unsigned int tx_rate0,
unsigned int tx_tries0,
249 unsigned int antenna_mode,
251 unsigned int rtscts_rate,
unsigned int rtscts_duration)
254 unsigned int frame_len;
260 u32 txctl0 = 0, txctl1 = 0, txctl2 = 0, txctl3 = 0;
294 frame_len = pkt_len - padsize +
FCS_LEN;
318 #define _TX_FLAGS(_c, _flag) \
319 if (flags & AR5K_TXDESC_##_flag) { \
320 txctl##_c |= AR5K_4W_TX_DESC_CTL##_c##_##_flag; \
397 if (
unlikely((tx_rate1 == 0 && tx_tries1 != 0) ||
398 (tx_rate2 == 0 && tx_tries2 != 0) ||
399 (tx_rate3 == 0 && tx_tries3 != 0))) {
408 #define _XTX_TRIES(_n) \
409 if (tx_tries##_n) { \
410 tx_ctl->tx_control_2 |= \
411 AR5K_REG_SM(tx_tries##_n, \
412 AR5K_4W_TX_DESC_CTL2_XMIT_TRIES##_n); \
413 tx_ctl->tx_control_3 |= \
414 AR5K_REG_SM(tx_rate##_n, \
415 AR5K_4W_TX_DESC_CTL3_XMIT_RATE##_n); \
442 ath5k_hw_proc_2word_tx_status(
struct ath5k_hw *ah,
494 ath5k_hw_proc_4word_tx_status(
struct ath5k_hw *ah,
499 u32 txstat0, txstat1;
565 rx_ctl = &desc->
ud.
ds_rx.rx_ctl;
601 ath5k_hw_proc_5210_rx_status(
struct ath5k_hw *ah,
607 rx_status = &desc->
ud.
ds_rx.rx_stat;
695 ath5k_hw_proc_5212_rx_status(
struct ath5k_hw *ah,
700 u32 rxstat0, rxstat1;
702 rx_status = &desc->
ud.
ds_rx.rx_stat;