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
, __le32
*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 __le32
*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
));
200 struct ieee80211_hdr
*hdr
;
205 bool packet_matchbssid
, packet_toself
, packet_beacon
= false;
207 tmp_buf
= skb
->data
+ pstats
->rx_drvinfo_size
+ pstats
->rx_bufshift
;
209 hdr
= (struct ieee80211_hdr
*)tmp_buf
;
210 fc
= hdr
->frame_control
;
211 cfc
= le16_to_cpu(fc
);
212 type
= WLAN_FC_GET_TYPE(fc
);
215 packet_matchbssid
= ((IEEE80211_FTYPE_CTL
!= type
) &&
216 ether_addr_equal(mac
->bssid
,
217 (cfc
& IEEE80211_FCTL_TODS
) ? hdr
->addr1
:
218 (cfc
& IEEE80211_FCTL_FROMDS
) ? hdr
->addr2
:
220 (!pstats
->hwerror
) && (!pstats
->crc
) && (!pstats
->icv
));
222 packet_toself
= packet_matchbssid
&&
223 ether_addr_equal(praddr
, rtlefuse
->dev_addr
);
225 if (ieee80211_is_beacon(fc
))
226 packet_beacon
= true;
228 _rtl92se_query_rxphystatus(hw
, pstats
, pdesc
, p_drvinfo
,
229 packet_matchbssid
, packet_toself
, packet_beacon
);
230 rtl_process_phyinfo(hw
, tmp_buf
, pstats
);
233 bool rtl92se_rx_query_desc(struct ieee80211_hw
*hw
, struct rtl_stats
*stats
,
234 struct ieee80211_rx_status
*rx_status
, u8
*pdesc8
,
237 struct rx_fwinfo
*p_drvinfo
;
238 __le32
*pdesc
= (__le32
*)pdesc8
;
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
*pdesc8
,
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 __le32
*pdesc
= (__le32
*)pdesc8
;
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
) ?
399 set_tx_desc_cts_enable(pdesc
, ((ptcb_desc
->cts_enable
) ?
401 set_tx_desc_rts_stbc(pdesc
, ((ptcb_desc
->rts_stbc
) ? 1 : 0));
403 set_tx_desc_rts_rate(pdesc
, ptcb_desc
->rts_rate
);
404 set_tx_desc_rts_bandwidth(pdesc
, 0);
405 set_tx_desc_rts_sub_carrier(pdesc
, ptcb_desc
->rts_sc
);
406 set_tx_desc_rts_short(pdesc
, ((ptcb_desc
->rts_rate
<=
408 (ptcb_desc
->rts_use_shortpreamble
? 1 : 0)
409 : (ptcb_desc
->rts_use_shortgi
? 1 : 0)));
412 /* Set Bandwidth and sub-channel settings. */
414 if (ptcb_desc
->packet_bw
) {
415 set_tx_desc_tx_bandwidth(pdesc
, 1);
416 /* use duplicated mode */
417 set_tx_desc_tx_sub_carrier(pdesc
, 0);
419 set_tx_desc_tx_bandwidth(pdesc
, 0);
420 set_tx_desc_tx_sub_carrier(pdesc
,
421 mac
->cur_40_prime_sc
);
424 set_tx_desc_tx_bandwidth(pdesc
, 0);
425 set_tx_desc_tx_sub_carrier(pdesc
, 0);
428 /* 3 Fill necessary field in First Descriptor */
430 set_tx_desc_linip(pdesc
, 0);
431 set_tx_desc_offset(pdesc
, 32);
432 set_tx_desc_pkt_size(pdesc
, (u16
)skb
->len
);
435 set_tx_desc_ra_brsr_id(pdesc
, ptcb_desc
->ratr_index
);
437 /* Fill security related */
438 if (info
->control
.hw_key
) {
439 struct ieee80211_key_conf
*keyconf
;
441 keyconf
= info
->control
.hw_key
;
442 switch (keyconf
->cipher
) {
443 case WLAN_CIPHER_SUITE_WEP40
:
444 case WLAN_CIPHER_SUITE_WEP104
:
445 set_tx_desc_sec_type(pdesc
, 0x1);
447 case WLAN_CIPHER_SUITE_TKIP
:
448 set_tx_desc_sec_type(pdesc
, 0x2);
450 case WLAN_CIPHER_SUITE_CCMP
:
451 set_tx_desc_sec_type(pdesc
, 0x3);
454 set_tx_desc_sec_type(pdesc
, 0x0);
461 set_tx_desc_packet_id(pdesc
, 0);
463 /* We will assign magement queue to BK. */
464 set_tx_desc_queue_sel(pdesc
, fw_qsel
);
466 /* Alwasy enable all rate fallback range */
467 set_tx_desc_data_rate_fb_limit(pdesc
, 0x1F);
469 /* Fix: I don't kown why hw use 6.5M to tx when set it */
470 set_tx_desc_user_rate(pdesc
,
471 ptcb_desc
->use_driver_rate
? 1 : 0);
473 /* Set NON_QOS bit. */
474 if (!ieee80211_is_data_qos(fc
))
475 set_tx_desc_non_qos(pdesc
, 1);
479 /* Fill fields that are required to be initialized
480 * in all of the descriptors */
482 set_tx_desc_first_seg(pdesc
, (firstseg
? 1 : 0));
483 set_tx_desc_last_seg(pdesc
, (lastseg
? 1 : 0));
486 set_tx_desc_tx_buffer_size(pdesc
, (u16
)skb
->len
);
489 set_tx_desc_tx_buffer_address(pdesc
, mapping
);
491 RT_TRACE(rtlpriv
, COMP_SEND
, DBG_TRACE
, "\n");
494 void rtl92se_tx_fill_cmddesc(struct ieee80211_hw
*hw
, u8
*pdesc8
,
495 bool firstseg
, bool lastseg
, struct sk_buff
*skb
)
497 struct rtl_priv
*rtlpriv
= rtl_priv(hw
);
498 struct rtl_pci
*rtlpci
= rtl_pcidev(rtl_pcipriv(hw
));
499 struct rtl_hal
*rtlhal
= rtl_hal(rtl_priv(hw
));
500 struct rtl_tcb_desc
*tcb_desc
= (struct rtl_tcb_desc
*)(skb
->cb
);
501 __le32
*pdesc
= (__le32
*)pdesc8
;
503 dma_addr_t mapping
= pci_map_single(rtlpci
->pdev
, skb
->data
, skb
->len
,
506 if (pci_dma_mapping_error(rtlpci
->pdev
, mapping
)) {
507 RT_TRACE(rtlpriv
, COMP_SEND
, DBG_TRACE
,
508 "DMA mapping error\n");
511 /* Clear all status */
512 CLEAR_PCI_TX_DESC_CONTENT(pdesc
, TX_CMDDESC_SIZE_RTL8192S
);
514 /* This bit indicate this packet is used for FW download. */
515 if (tcb_desc
->cmd_or_init
== DESC_PACKET_TYPE_INIT
) {
516 /* For firmware downlaod we only need to set LINIP */
517 set_tx_desc_linip(pdesc
, tcb_desc
->last_inipkt
);
519 /* 92SE must set as 1 for firmware download HW DMA error */
520 set_tx_desc_first_seg(pdesc
, 1);
521 set_tx_desc_last_seg(pdesc
, 1);
523 /* 92SE need not to set TX packet size when firmware download */
524 set_tx_desc_pkt_size(pdesc
, (u16
)(skb
->len
));
525 set_tx_desc_tx_buffer_size(pdesc
, (u16
)(skb
->len
));
526 set_tx_desc_tx_buffer_address(pdesc
, mapping
);
529 set_tx_desc_own(pdesc
, 1);
530 } else { /* H2C Command Desc format (Host TXCMD) */
531 /* 92SE must set as 1 for firmware download HW DMA error */
532 set_tx_desc_first_seg(pdesc
, 1);
533 set_tx_desc_last_seg(pdesc
, 1);
535 set_tx_desc_offset(pdesc
, 0x20);
537 /* Buffer size + command header */
538 set_tx_desc_pkt_size(pdesc
, (u16
)(skb
->len
));
539 /* Fixed queue of H2C command */
540 set_tx_desc_queue_sel(pdesc
, 0x13);
542 le32p_replace_bits((__le32
*)skb
->data
, rtlhal
->h2c_txcmd_seq
,
544 set_tx_desc_tx_buffer_size(pdesc
, (u16
)(skb
->len
));
545 set_tx_desc_tx_buffer_address(pdesc
, mapping
);
548 set_tx_desc_own(pdesc
, 1);
553 void rtl92se_set_desc(struct ieee80211_hw
*hw
, u8
*pdesc8
, bool istx
,
554 u8 desc_name
, u8
*val
)
556 __le32
*pdesc
= (__le32
*)pdesc8
;
562 set_tx_desc_own(pdesc
, 1);
564 case HW_DESC_TX_NEXTDESC_ADDR
:
565 set_tx_desc_next_desc_address(pdesc
, *(u32
*)val
);
568 WARN_ONCE(true, "rtl8192se: ERR txdesc :%d not processed\n",
576 set_rx_status_desc_own(pdesc
, 1);
578 case HW_DESC_RXBUFF_ADDR
:
579 set_rx_status__desc_buff_addr(pdesc
, *(u32
*)val
);
581 case HW_DESC_RXPKT_LEN
:
582 set_rx_status_desc_pkt_len(pdesc
, *(u32
*)val
);
585 set_rx_status_desc_eor(pdesc
, 1);
588 WARN_ONCE(true, "rtl8192se: ERR rxdesc :%d not processed\n",
595 u64
rtl92se_get_desc(struct ieee80211_hw
*hw
,
596 u8
*desc8
, bool istx
, u8 desc_name
)
599 __le32
*desc
= (__le32
*)desc8
;
604 ret
= get_tx_desc_own(desc
);
606 case HW_DESC_TXBUFF_ADDR
:
607 ret
= get_tx_desc_tx_buffer_address(desc
);
610 WARN_ONCE(true, "rtl8192se: ERR txdesc :%d not processed\n",
617 ret
= get_rx_status_desc_own(desc
);
619 case HW_DESC_RXPKT_LEN
:
620 ret
= get_rx_status_desc_pkt_len(desc
);
622 case HW_DESC_RXBUFF_ADDR
:
623 ret
= get_rx_status_desc_buff_addr(desc
);
626 WARN_ONCE(true, "rtl8192se: ERR rxdesc :%d not processed\n",
634 void rtl92se_tx_polling(struct ieee80211_hw
*hw
, u8 hw_queue
)
636 struct rtl_priv
*rtlpriv
= rtl_priv(hw
);
637 rtl_write_word(rtlpriv
, TP_POLL
, BIT(0) << (hw_queue
));