1 // SPDX-License-Identifier: GPL-2.0
2 /* Copyright(c) 2009-2012 Realtek Corporation.*/
15 static u8
_rtl92se_map_hwqueue_to_fwqueue(struct sk_buff
*skb
, u8 skb_queue
)
17 __le16 fc
= rtl_get_fc(skb
);
19 if (unlikely(ieee80211_is_beacon(fc
)))
21 if (ieee80211_is_mgmt(fc
) || ieee80211_is_ctl(fc
))
23 if (ieee80211_is_nullfunc(fc
))
26 /* Kernel commit 1bf4bbb4024dcdab changed EAPOL packets to use
27 * queue V0 at priority 7; however, the RTL8192SE appears to have
28 * that queue at priority 6
30 if (skb
->priority
== 7)
35 static void _rtl92se_query_rxphystatus(struct ieee80211_hw
*hw
,
36 struct rtl_stats
*pstats
, u8
*pdesc
,
37 struct rx_fwinfo
*p_drvinfo
,
38 bool packet_match_bssid
,
42 struct rtl_priv
*rtlpriv
= rtl_priv(hw
);
43 struct phy_sts_cck_8192s_t
*cck_buf
;
44 struct rtl_ps_ctl
*ppsc
= rtl_psc(rtlpriv
);
45 s8 rx_pwr_all
= 0, rx_pwr
[4];
46 u8 rf_rx_num
= 0, evm
, pwdb_all
;
47 u8 i
, max_spatial_stream
;
48 u32 rssi
, total_rssi
= 0;
49 bool is_cck
= pstats
->is_cck
;
51 pstats
->packet_matchbssid
= packet_match_bssid
;
52 pstats
->packet_toself
= packet_toself
;
53 pstats
->packet_beacon
= packet_beacon
;
54 pstats
->rx_mimo_sig_qual
[0] = -1;
55 pstats
->rx_mimo_sig_qual
[1] = -1;
58 u8 report
, cck_highpwr
;
59 cck_buf
= (struct phy_sts_cck_8192s_t
*)p_drvinfo
;
61 if (ppsc
->rfpwr_state
== ERFON
)
62 cck_highpwr
= (u8
) rtl_get_bbreg(hw
,
63 RFPGA0_XA_HSSIPARAMETER2
,
69 u8 cck_agc_rpt
= cck_buf
->cck_agc_rpt
;
70 report
= cck_buf
->cck_agc_rpt
& 0xc0;
74 rx_pwr_all
= -40 - (cck_agc_rpt
& 0x3e);
77 rx_pwr_all
= -20 - (cck_agc_rpt
& 0x3e);
80 rx_pwr_all
= -2 - (cck_agc_rpt
& 0x3e);
83 rx_pwr_all
= 14 - (cck_agc_rpt
& 0x3e);
87 u8 cck_agc_rpt
= cck_buf
->cck_agc_rpt
;
88 report
= p_drvinfo
->cfosho
[0] & 0x60;
92 rx_pwr_all
= -40 - ((cck_agc_rpt
& 0x1f) << 1);
95 rx_pwr_all
= -20 - ((cck_agc_rpt
& 0x1f) << 1);
98 rx_pwr_all
= -2 - ((cck_agc_rpt
& 0x1f) << 1);
101 rx_pwr_all
= 14 - ((cck_agc_rpt
& 0x1f) << 1);
106 pwdb_all
= rtl_query_rxpwrpercentage(rx_pwr_all
);
108 /* CCK gain is smaller than OFDM/MCS gain, */
109 /* so we add gain diff by experiences, the val is 6 */
113 /* modify the offset to make the same gain index with OFDM. */
114 if (pwdb_all
> 34 && pwdb_all
<= 42)
116 else if (pwdb_all
> 26 && pwdb_all
<= 34)
118 else if (pwdb_all
> 14 && pwdb_all
<= 26)
120 else if (pwdb_all
> 4 && pwdb_all
<= 14)
123 pstats
->rx_pwdb_all
= pwdb_all
;
124 pstats
->recvsignalpower
= rx_pwr_all
;
126 if (packet_match_bssid
) {
128 if (pstats
->rx_pwdb_all
> 40) {
131 sq
= cck_buf
->sq_rpt
;
137 sq
= ((64 - sq
) * 100) / 44;
140 pstats
->signalquality
= sq
;
141 pstats
->rx_mimo_sig_qual
[0] = sq
;
142 pstats
->rx_mimo_sig_qual
[1] = -1;
145 rtlpriv
->dm
.rfpath_rxenable
[0] =
146 rtlpriv
->dm
.rfpath_rxenable
[1] = true;
147 for (i
= RF90_PATH_A
; i
< RF6052_MAX_PATH
; i
++) {
148 if (rtlpriv
->dm
.rfpath_rxenable
[i
])
151 rx_pwr
[i
] = ((p_drvinfo
->gain_trsw
[i
] &
153 rssi
= rtl_query_rxpwrpercentage(rx_pwr
[i
]);
155 rtlpriv
->stats
.rx_snr_db
[i
] =
156 (long)(p_drvinfo
->rxsnr
[i
] / 2);
158 if (packet_match_bssid
)
159 pstats
->rx_mimo_signalstrength
[i
] = (u8
) rssi
;
162 rx_pwr_all
= ((p_drvinfo
->pwdb_all
>> 1) & 0x7f) - 110;
163 pwdb_all
= rtl_query_rxpwrpercentage(rx_pwr_all
);
164 pstats
->rx_pwdb_all
= pwdb_all
;
165 pstats
->rxpower
= rx_pwr_all
;
166 pstats
->recvsignalpower
= rx_pwr_all
;
168 if (pstats
->is_ht
&& pstats
->rate
>= DESC_RATEMCS8
&&
169 pstats
->rate
<= DESC_RATEMCS15
)
170 max_spatial_stream
= 2;
172 max_spatial_stream
= 1;
174 for (i
= 0; i
< max_spatial_stream
; i
++) {
175 evm
= rtl_evm_db_to_percentage(p_drvinfo
->rxevm
[i
]);
177 if (packet_match_bssid
) {
179 pstats
->signalquality
= (u8
)(evm
&
181 pstats
->rx_mimo_sig_qual
[i
] = (u8
) (evm
& 0xff);
187 pstats
->signalstrength
= (u8
)(rtl_signal_scale_mapping(hw
,
189 else if (rf_rx_num
!= 0)
190 pstats
->signalstrength
= (u8
) (rtl_signal_scale_mapping(hw
,
191 total_rssi
/= rf_rx_num
));
194 static void _rtl92se_translate_rx_signal_stuff(struct ieee80211_hw
*hw
,
195 struct sk_buff
*skb
, struct rtl_stats
*pstats
,
196 u8
*pdesc
, struct rx_fwinfo
*p_drvinfo
)
198 struct rtl_mac
*mac
= rtl_mac(rtl_priv(hw
));
199 struct rtl_efuse
*rtlefuse
= rtl_efuse(rtl_priv(hw
));
201 struct ieee80211_hdr
*hdr
;
206 bool packet_matchbssid
, packet_toself
, packet_beacon
= false;
208 tmp_buf
= skb
->data
+ pstats
->rx_drvinfo_size
+ pstats
->rx_bufshift
;
210 hdr
= (struct ieee80211_hdr
*)tmp_buf
;
211 fc
= hdr
->frame_control
;
212 cfc
= le16_to_cpu(fc
);
213 type
= WLAN_FC_GET_TYPE(fc
);
216 packet_matchbssid
= ((IEEE80211_FTYPE_CTL
!= type
) &&
217 ether_addr_equal(mac
->bssid
,
218 (cfc
& IEEE80211_FCTL_TODS
) ? hdr
->addr1
:
219 (cfc
& IEEE80211_FCTL_FROMDS
) ? hdr
->addr2
:
221 (!pstats
->hwerror
) && (!pstats
->crc
) && (!pstats
->icv
));
223 packet_toself
= packet_matchbssid
&&
224 ether_addr_equal(praddr
, rtlefuse
->dev_addr
);
226 if (ieee80211_is_beacon(fc
))
227 packet_beacon
= true;
229 _rtl92se_query_rxphystatus(hw
, pstats
, pdesc
, p_drvinfo
,
230 packet_matchbssid
, packet_toself
, packet_beacon
);
231 rtl_process_phyinfo(hw
, tmp_buf
, pstats
);
234 bool rtl92se_rx_query_desc(struct ieee80211_hw
*hw
, struct rtl_stats
*stats
,
235 struct ieee80211_rx_status
*rx_status
, u8
*pdesc
,
238 struct rx_fwinfo
*p_drvinfo
;
239 u32 phystatus
= (u32
)GET_RX_STATUS_DESC_PHY_STATUS(pdesc
);
240 struct ieee80211_hdr
*hdr
;
242 stats
->length
= (u16
)GET_RX_STATUS_DESC_PKT_LEN(pdesc
);
243 stats
->rx_drvinfo_size
= (u8
)GET_RX_STATUS_DESC_DRVINFO_SIZE(pdesc
) * 8;
244 stats
->rx_bufshift
= (u8
)(GET_RX_STATUS_DESC_SHIFT(pdesc
) & 0x03);
245 stats
->icv
= (u16
)GET_RX_STATUS_DESC_ICV(pdesc
);
246 stats
->crc
= (u16
)GET_RX_STATUS_DESC_CRC32(pdesc
);
247 stats
->hwerror
= (u16
)(stats
->crc
| stats
->icv
);
248 stats
->decrypted
= !GET_RX_STATUS_DESC_SWDEC(pdesc
);
250 stats
->rate
= (u8
)GET_RX_STATUS_DESC_RX_MCS(pdesc
);
251 stats
->shortpreamble
= (u16
)GET_RX_STATUS_DESC_SPLCP(pdesc
);
252 stats
->isampdu
= (bool)(GET_RX_STATUS_DESC_PAGGR(pdesc
) == 1);
253 stats
->isfirst_ampdu
= (bool) ((GET_RX_STATUS_DESC_PAGGR(pdesc
) == 1)
254 && (GET_RX_STATUS_DESC_FAGGR(pdesc
) == 1));
255 stats
->timestamp_low
= GET_RX_STATUS_DESC_TSFL(pdesc
);
256 stats
->rx_is40mhzpacket
= (bool)GET_RX_STATUS_DESC_BW(pdesc
);
257 stats
->is_ht
= (bool)GET_RX_STATUS_DESC_RX_HT(pdesc
);
258 stats
->is_cck
= SE_RX_HAL_IS_CCK_RATE(pdesc
);
263 rx_status
->freq
= hw
->conf
.chandef
.chan
->center_freq
;
264 rx_status
->band
= hw
->conf
.chandef
.chan
->band
;
267 rx_status
->flag
|= RX_FLAG_FAILED_FCS_CRC
;
269 if (stats
->rx_is40mhzpacket
)
270 rx_status
->bw
= RATE_INFO_BW_40
;
273 rx_status
->encoding
= RX_ENC_HT
;
275 rx_status
->flag
|= RX_FLAG_MACTIME_START
;
277 /* hw will set stats->decrypted true, if it finds the
278 * frame is open data frame or mgmt frame,
279 * hw will not decrypt robust managment frame
280 * for IEEE80211w but still set stats->decrypted
281 * true, so here we should set it back to undecrypted
282 * for IEEE80211w frame, and mac80211 sw will help
284 if (stats
->decrypted
) {
285 hdr
= (struct ieee80211_hdr
*)(skb
->data
+
286 stats
->rx_drvinfo_size
+ stats
->rx_bufshift
);
288 if ((_ieee80211_is_robust_mgmt_frame(hdr
)) &&
289 (ieee80211_has_protected(hdr
->frame_control
)))
290 rx_status
->flag
&= ~RX_FLAG_DECRYPTED
;
292 rx_status
->flag
|= RX_FLAG_DECRYPTED
;
295 rx_status
->rate_idx
= rtlwifi_rate_mapping(hw
, stats
->is_ht
,
298 rx_status
->mactime
= stats
->timestamp_low
;
300 p_drvinfo
= (struct rx_fwinfo
*)(skb
->data
+
302 _rtl92se_translate_rx_signal_stuff(hw
, skb
, stats
, pdesc
,
306 /*rx_status->qual = stats->signal; */
307 rx_status
->signal
= stats
->recvsignalpower
+ 10;
312 void rtl92se_tx_fill_desc(struct ieee80211_hw
*hw
,
313 struct ieee80211_hdr
*hdr
, u8
*pdesc_tx
,
314 u8
*pbd_desc_tx
, struct ieee80211_tx_info
*info
,
315 struct ieee80211_sta
*sta
,
317 u8 hw_queue
, struct rtl_tcb_desc
*ptcb_desc
)
319 struct rtl_priv
*rtlpriv
= rtl_priv(hw
);
320 struct rtl_mac
*mac
= rtl_mac(rtl_priv(hw
));
321 struct rtl_pci
*rtlpci
= rtl_pcidev(rtl_pcipriv(hw
));
322 struct rtl_hal
*rtlhal
= rtl_hal(rtl_priv(hw
));
323 u8
*pdesc
= pdesc_tx
;
325 __le16 fc
= hdr
->frame_control
;
326 u8 reserved_macid
= 0;
327 u8 fw_qsel
= _rtl92se_map_hwqueue_to_fwqueue(skb
, hw_queue
);
328 bool firstseg
= (!(hdr
->seq_ctrl
& cpu_to_le16(IEEE80211_SCTL_FRAG
)));
329 bool lastseg
= (!(hdr
->frame_control
&
330 cpu_to_le16(IEEE80211_FCTL_MOREFRAGS
)));
331 dma_addr_t mapping
= pci_map_single(rtlpci
->pdev
, skb
->data
, skb
->len
,
335 if (pci_dma_mapping_error(rtlpci
->pdev
, mapping
)) {
336 RT_TRACE(rtlpriv
, COMP_SEND
, DBG_TRACE
,
337 "DMA mapping error\n");
340 if (mac
->opmode
== NL80211_IFTYPE_STATION
) {
342 } else if (mac
->opmode
== NL80211_IFTYPE_AP
||
343 mac
->opmode
== NL80211_IFTYPE_ADHOC
) {
345 bw_40
= sta
->bandwidth
>= IEEE80211_STA_RX_BW_40
;
348 seq_number
= (le16_to_cpu(hdr
->seq_ctrl
) & IEEE80211_SCTL_SEQ
) >> 4;
350 rtl_get_tcb_desc(hw
, info
, sta
, skb
, ptcb_desc
);
352 CLEAR_PCI_TX_DESC_CONTENT(pdesc
, TX_DESC_SIZE_RTL8192S
);
354 if (ieee80211_is_nullfunc(fc
) || ieee80211_is_ctl(fc
)) {
360 if (rtlpriv
->dm
.useramask
) {
361 /* set txdesc macId */
362 if (ptcb_desc
->mac_id
< 32) {
363 SET_TX_DESC_MACID(pdesc
, ptcb_desc
->mac_id
);
364 reserved_macid
|= ptcb_desc
->mac_id
;
367 SET_TX_DESC_RSVD_MACID(pdesc
, reserved_macid
);
369 SET_TX_DESC_TXHT(pdesc
, ((ptcb_desc
->hw_rate
>=
370 DESC_RATEMCS0
) ? 1 : 0));
372 if (rtlhal
->version
== VERSION_8192S_ACUT
) {
373 if (ptcb_desc
->hw_rate
== DESC_RATE1M
||
374 ptcb_desc
->hw_rate
== DESC_RATE2M
||
375 ptcb_desc
->hw_rate
== DESC_RATE5_5M
||
376 ptcb_desc
->hw_rate
== DESC_RATE11M
) {
377 ptcb_desc
->hw_rate
= DESC_RATE12M
;
381 SET_TX_DESC_TX_RATE(pdesc
, ptcb_desc
->hw_rate
);
383 if (ptcb_desc
->use_shortgi
|| ptcb_desc
->use_shortpreamble
)
384 SET_TX_DESC_TX_SHORT(pdesc
, 0);
386 /* Aggregation related */
387 if (info
->flags
& IEEE80211_TX_CTL_AMPDU
)
388 SET_TX_DESC_AGG_ENABLE(pdesc
, 1);
390 /* For AMPDU, we must insert SSN into TX_DESC */
391 SET_TX_DESC_SEQ(pdesc
, seq_number
);
393 /* Protection mode related */
394 /* For 92S, if RTS/CTS are set, HW will execute RTS. */
395 /* We choose only one protection mode to execute */
396 SET_TX_DESC_RTS_ENABLE(pdesc
, ((ptcb_desc
->rts_enable
&&
397 !ptcb_desc
->cts_enable
) ? 1 : 0));
398 SET_TX_DESC_CTS_ENABLE(pdesc
, ((ptcb_desc
->cts_enable
) ?
400 SET_TX_DESC_RTS_STBC(pdesc
, ((ptcb_desc
->rts_stbc
) ? 1 : 0));
402 SET_TX_DESC_RTS_RATE(pdesc
, ptcb_desc
->rts_rate
);
403 SET_TX_DESC_RTS_BANDWIDTH(pdesc
, 0);
404 SET_TX_DESC_RTS_SUB_CARRIER(pdesc
, ptcb_desc
->rts_sc
);
405 SET_TX_DESC_RTS_SHORT(pdesc
, ((ptcb_desc
->rts_rate
<=
407 (ptcb_desc
->rts_use_shortpreamble
? 1 : 0)
408 : (ptcb_desc
->rts_use_shortgi
? 1 : 0)));
411 /* Set Bandwidth and sub-channel settings. */
413 if (ptcb_desc
->packet_bw
) {
414 SET_TX_DESC_TX_BANDWIDTH(pdesc
, 1);
415 /* use duplicated mode */
416 SET_TX_DESC_TX_SUB_CARRIER(pdesc
, 0);
418 SET_TX_DESC_TX_BANDWIDTH(pdesc
, 0);
419 SET_TX_DESC_TX_SUB_CARRIER(pdesc
,
420 mac
->cur_40_prime_sc
);
423 SET_TX_DESC_TX_BANDWIDTH(pdesc
, 0);
424 SET_TX_DESC_TX_SUB_CARRIER(pdesc
, 0);
427 /* 3 Fill necessary field in First Descriptor */
429 SET_TX_DESC_LINIP(pdesc
, 0);
430 SET_TX_DESC_OFFSET(pdesc
, 32);
431 SET_TX_DESC_PKT_SIZE(pdesc
, (u16
) skb
->len
);
434 SET_TX_DESC_RA_BRSR_ID(pdesc
, ptcb_desc
->ratr_index
);
436 /* Fill security related */
437 if (info
->control
.hw_key
) {
438 struct ieee80211_key_conf
*keyconf
;
440 keyconf
= info
->control
.hw_key
;
441 switch (keyconf
->cipher
) {
442 case WLAN_CIPHER_SUITE_WEP40
:
443 case WLAN_CIPHER_SUITE_WEP104
:
444 SET_TX_DESC_SEC_TYPE(pdesc
, 0x1);
446 case WLAN_CIPHER_SUITE_TKIP
:
447 SET_TX_DESC_SEC_TYPE(pdesc
, 0x2);
449 case WLAN_CIPHER_SUITE_CCMP
:
450 SET_TX_DESC_SEC_TYPE(pdesc
, 0x3);
453 SET_TX_DESC_SEC_TYPE(pdesc
, 0x0);
460 SET_TX_DESC_PACKET_ID(pdesc
, 0);
462 /* We will assign magement queue to BK. */
463 SET_TX_DESC_QUEUE_SEL(pdesc
, fw_qsel
);
465 /* Alwasy enable all rate fallback range */
466 SET_TX_DESC_DATA_RATE_FB_LIMIT(pdesc
, 0x1F);
468 /* Fix: I don't kown why hw use 6.5M to tx when set it */
469 SET_TX_DESC_USER_RATE(pdesc
,
470 ptcb_desc
->use_driver_rate
? 1 : 0);
472 /* Set NON_QOS bit. */
473 if (!ieee80211_is_data_qos(fc
))
474 SET_TX_DESC_NON_QOS(pdesc
, 1);
478 /* Fill fields that are required to be initialized
479 * in all of the descriptors */
481 SET_TX_DESC_FIRST_SEG(pdesc
, (firstseg
? 1 : 0));
482 SET_TX_DESC_LAST_SEG(pdesc
, (lastseg
? 1 : 0));
485 SET_TX_DESC_TX_BUFFER_SIZE(pdesc
, (u16
) skb
->len
);
488 SET_TX_DESC_TX_BUFFER_ADDRESS(pdesc
, mapping
);
490 RT_TRACE(rtlpriv
, COMP_SEND
, DBG_TRACE
, "\n");
493 void rtl92se_tx_fill_cmddesc(struct ieee80211_hw
*hw
, u8
*pdesc
,
494 bool firstseg
, bool lastseg
, struct sk_buff
*skb
)
496 struct rtl_priv
*rtlpriv
= rtl_priv(hw
);
497 struct rtl_pci
*rtlpci
= rtl_pcidev(rtl_pcipriv(hw
));
498 struct rtl_hal
*rtlhal
= rtl_hal(rtl_priv(hw
));
499 struct rtl_tcb_desc
*tcb_desc
= (struct rtl_tcb_desc
*)(skb
->cb
);
501 dma_addr_t mapping
= pci_map_single(rtlpci
->pdev
, skb
->data
, skb
->len
,
504 if (pci_dma_mapping_error(rtlpci
->pdev
, mapping
)) {
505 RT_TRACE(rtlpriv
, COMP_SEND
, DBG_TRACE
,
506 "DMA mapping error\n");
509 /* Clear all status */
510 CLEAR_PCI_TX_DESC_CONTENT(pdesc
, TX_CMDDESC_SIZE_RTL8192S
);
512 /* This bit indicate this packet is used for FW download. */
513 if (tcb_desc
->cmd_or_init
== DESC_PACKET_TYPE_INIT
) {
514 /* For firmware downlaod we only need to set LINIP */
515 SET_TX_DESC_LINIP(pdesc
, tcb_desc
->last_inipkt
);
517 /* 92SE must set as 1 for firmware download HW DMA error */
518 SET_TX_DESC_FIRST_SEG(pdesc
, 1);
519 SET_TX_DESC_LAST_SEG(pdesc
, 1);
521 /* 92SE need not to set TX packet size when firmware download */
522 SET_TX_DESC_PKT_SIZE(pdesc
, (u16
)(skb
->len
));
523 SET_TX_DESC_TX_BUFFER_SIZE(pdesc
, (u16
)(skb
->len
));
524 SET_TX_DESC_TX_BUFFER_ADDRESS(pdesc
, mapping
);
527 SET_TX_DESC_OWN(pdesc
, 1);
528 } else { /* H2C Command Desc format (Host TXCMD) */
529 /* 92SE must set as 1 for firmware download HW DMA error */
530 SET_TX_DESC_FIRST_SEG(pdesc
, 1);
531 SET_TX_DESC_LAST_SEG(pdesc
, 1);
533 SET_TX_DESC_OFFSET(pdesc
, 0x20);
535 /* Buffer size + command header */
536 SET_TX_DESC_PKT_SIZE(pdesc
, (u16
)(skb
->len
));
537 /* Fixed queue of H2C command */
538 SET_TX_DESC_QUEUE_SEL(pdesc
, 0x13);
540 le32p_replace_bits((__le32
*)skb
->data
, rtlhal
->h2c_txcmd_seq
,
542 SET_TX_DESC_TX_BUFFER_SIZE(pdesc
, (u16
)(skb
->len
));
543 SET_TX_DESC_TX_BUFFER_ADDRESS(pdesc
, mapping
);
546 SET_TX_DESC_OWN(pdesc
, 1);
551 void rtl92se_set_desc(struct ieee80211_hw
*hw
, u8
*pdesc
, bool istx
,
552 u8 desc_name
, u8
*val
)
558 SET_TX_DESC_OWN(pdesc
, 1);
560 case HW_DESC_TX_NEXTDESC_ADDR
:
561 SET_TX_DESC_NEXT_DESC_ADDRESS(pdesc
, *(u32
*) val
);
564 WARN_ONCE(true, "rtl8192se: ERR txdesc :%d not processed\n",
572 SET_RX_STATUS_DESC_OWN(pdesc
, 1);
574 case HW_DESC_RXBUFF_ADDR
:
575 SET_RX_STATUS__DESC_BUFF_ADDR(pdesc
, *(u32
*) val
);
577 case HW_DESC_RXPKT_LEN
:
578 SET_RX_STATUS_DESC_PKT_LEN(pdesc
, *(u32
*) val
);
581 SET_RX_STATUS_DESC_EOR(pdesc
, 1);
584 WARN_ONCE(true, "rtl8192se: ERR rxdesc :%d not processed\n",
591 u64
rtl92se_get_desc(struct ieee80211_hw
*hw
,
592 u8
*desc
, bool istx
, u8 desc_name
)
599 ret
= GET_TX_DESC_OWN(desc
);
601 case HW_DESC_TXBUFF_ADDR
:
602 ret
= GET_TX_DESC_TX_BUFFER_ADDRESS(desc
);
605 WARN_ONCE(true, "rtl8192se: ERR txdesc :%d not processed\n",
612 ret
= GET_RX_STATUS_DESC_OWN(desc
);
614 case HW_DESC_RXPKT_LEN
:
615 ret
= GET_RX_STATUS_DESC_PKT_LEN(desc
);
617 case HW_DESC_RXBUFF_ADDR
:
618 ret
= GET_RX_STATUS_DESC_BUFF_ADDR(desc
);
621 WARN_ONCE(true, "rtl8192se: ERR rxdesc :%d not processed\n",
629 void rtl92se_tx_polling(struct ieee80211_hw
*hw
, u8 hw_queue
)
631 struct rtl_priv
*rtlpriv
= rtl_priv(hw
);
632 rtl_write_word(rtlpriv
, TP_POLL
, BIT(0) << (hw_queue
));