wifi: rtlwifi: drop fill_fake_txdesc() from HAL interface
authorDmitry Antipov <dmantipov@yandex.ru>
Mon, 16 Oct 2023 13:59:09 +0000 (16:59 +0300)
committerKalle Valo <kvalo@kernel.org>
Thu, 19 Oct 2023 07:29:44 +0000 (10:29 +0300)
Since 'fill_fake_txdesc()' is actually implemented for rtl8192cu
only but never used, there is no need to maintain function pointer
in 'struct rtl_hal_ops' and 'rtl92cu_fill_fake_txdesc()' may be
dropped. Compile tested only.

Signed-off-by: Dmitry Antipov <dmantipov@yandex.ru>
Acked-by: Ping-Ke Shih <pkshih@realtek.com>
Signed-off-by: Kalle Valo <kvalo@kernel.org>
Link: https://lore.kernel.org/r/20231016135925.129223-2-dmantipov@yandex.ru
drivers/net/wireless/realtek/rtlwifi/rtl8192cu/sw.c
drivers/net/wireless/realtek/rtlwifi/rtl8192cu/trx.c
drivers/net/wireless/realtek/rtlwifi/rtl8192cu/trx.h
drivers/net/wireless/realtek/rtlwifi/wifi.h

index e6403d4c937c8cd21b9945aa1689b8b55f990dca..20b4aac696420530ee79422e9ee2f9856a6cf972 100644 (file)
@@ -102,7 +102,6 @@ static struct rtl_hal_ops rtl8192cu_hal_ops = {
        .set_hw_reg = rtl92cu_set_hw_reg,
        .update_rate_tbl = rtl92cu_update_hal_rate_tbl,
        .fill_tx_desc = rtl92cu_tx_fill_desc,
-       .fill_fake_txdesc = rtl92cu_fill_fake_txdesc,
        .fill_tx_cmddesc = rtl92cu_tx_fill_cmddesc,
        .query_rx_desc = rtl92cu_rx_query_desc,
        .set_channel_access = rtl92cu_update_channel_access_setting,
index 9969e9d1fc4bfd4704eb743dc41ca670d36586d1..2f44c8aa6066df64b021330126f061b57ec84d3a 100644 (file)
@@ -600,32 +600,6 @@ void rtl92cu_tx_fill_desc(struct ieee80211_hw *hw,
        rtl_dbg(rtlpriv, COMP_SEND, DBG_TRACE, "==>\n");
 }
 
-void rtl92cu_fill_fake_txdesc(struct ieee80211_hw *hw, u8 *pdesc8,
-                             u32 buffer_len, bool is_pspoll)
-{
-       __le32 *pdesc = (__le32 *)pdesc8;
-
-       /* Clear all status */
-       memset(pdesc, 0, RTL_TX_HEADER_SIZE);
-       set_tx_desc_first_seg(pdesc, 1); /* bFirstSeg; */
-       set_tx_desc_last_seg(pdesc, 1); /* bLastSeg; */
-       set_tx_desc_offset(pdesc, RTL_TX_HEADER_SIZE); /* Offset = 32 */
-       set_tx_desc_pkt_size(pdesc, buffer_len); /* Buffer size + command hdr */
-       set_tx_desc_queue_sel(pdesc, QSLT_MGNT); /* Fixed queue of Mgnt queue */
-       /* Set NAVUSEHDR to prevent Ps-poll AId filed to be changed to error
-        * vlaue by Hw. */
-       if (is_pspoll) {
-               set_tx_desc_nav_use_hdr(pdesc, 1);
-       } else {
-               set_tx_desc_hwseq_en(pdesc, 1); /* Hw set sequence number */
-               set_tx_desc_pkt_id(pdesc, BIT(3)); /* set bit3 to 1. */
-       }
-       set_tx_desc_use_rate(pdesc, 1); /* use data rate which is set by Sw */
-       set_tx_desc_own(pdesc, 1);
-       set_tx_desc_tx_rate(pdesc, DESC_RATE1M);
-       _rtl_tx_desc_checksum(pdesc);
-}
-
 void rtl92cu_tx_fill_cmddesc(struct ieee80211_hw *hw, u8 *pdesc8,
                             struct sk_buff *skb)
 {
index cc4ef2bfd2e76ced67cc672c0d1cdff48ca65b08..5f81cab205ccc0342b1c539ecba673ee97029af4 100644 (file)
@@ -394,8 +394,6 @@ void rtl92cu_tx_fill_desc(struct ieee80211_hw *hw,
                          struct sk_buff *skb,
                          u8 queue_index,
                          struct rtl_tcb_desc *tcb_desc);
-void rtl92cu_fill_fake_txdesc(struct ieee80211_hw *hw, u8 *pdesc,
-                              u32 buffer_len, bool ispspoll);
 void rtl92cu_tx_fill_cmddesc(struct ieee80211_hw *hw, u8 *pdesc,
                             struct sk_buff *skb);
 
index a712ac38eccc37770189539823e5b348b1301ef8..ef072b5c3fd3b39de0036d97553ac88cdacb3830 100644 (file)
@@ -2239,8 +2239,6 @@ struct rtl_hal_ops {
                             struct ieee80211_sta *sta,
                             struct sk_buff *skb, u8 hw_queue,
                             struct rtl_tcb_desc *ptcb_desc);
-       void (*fill_fake_txdesc)(struct ieee80211_hw *hw, u8 *pdesc,
-                                u32 buffer_len, bool bsspspoll);
        void (*fill_tx_cmddesc)(struct ieee80211_hw *hw, u8 *pdesc,
                                struct sk_buff *skb);
        void (*fill_tx_special_desc)(struct ieee80211_hw *hw,