Message ID | 20231016135925.129223-1-dmantipov@yandex.ru |
---|---|
State | New |
Headers | show |
Series | [1/3] wifi: rtlwifi: drop pre_fill_tx_bd_desc() from HAL interface | expand |
> -----Original Message----- > From: Dmitry Antipov <dmantipov@yandex.ru> > Sent: Monday, October 16, 2023 9:59 PM > To: Ping-Ke Shih <pkshih@realtek.com> > Cc: Kalle Valo <kvalo@kernel.org>; linux-wireless@vger.kernel.org; Dmitry Antipov <dmantipov@yandex.ru> > Subject: [PATCH 1/3] wifi: rtlwifi: drop pre_fill_tx_bd_desc() from HAL interface > > Since 'pre_fill_tx_bd_desc()' is actually used for rtl8192ee only, > there is no need to maintain function pointer in 'struct rtl_hal_ops', > and 'rtl92ee_pre_fill_tx_bd_desc()' may be converted to static. > Compile tested only. > > Signed-off-by: Dmitry Antipov <dmantipov@yandex.ru> Acked-by: Ping-Ke Shih <pkshih@realtek.com>
> -----Original Message----- > From: Dmitry Antipov <dmantipov@yandex.ru> > Sent: Monday, October 16, 2023 9:59 PM > To: Ping-Ke Shih <pkshih@realtek.com> > Cc: Kalle Valo <kvalo@kernel.org>; linux-wireless@vger.kernel.org; Dmitry Antipov <dmantipov@yandex.ru> > Subject: [PATCH 3/3] wifi: rtlwifi: drop chk_switch_dmdp() from HAL interface > > Since there is no chip-specific code behind 'chk_switch_dmdp()', > there is no need to maintain function pointer in 'struct rtl_hal_ops' > and relevant common code may be simplified. Compile tested only. > > Signed-off-by: Dmitry Antipov <dmantipov@yandex.ru> Acked-by: Ping-Ke Shih <pkshih@realtek.com> Thanks for the cleanup.
Dmitry Antipov <dmantipov@yandex.ru> wrote: > Since 'pre_fill_tx_bd_desc()' is actually used for rtl8192ee only, > there is no need to maintain function pointer in 'struct rtl_hal_ops', > and 'rtl92ee_pre_fill_tx_bd_desc()' may be converted to static. > Compile tested only. > > Signed-off-by: Dmitry Antipov <dmantipov@yandex.ru> > Acked-by: Ping-Ke Shih <pkshih@realtek.com> 3 patches applied to wireless-next.git, thanks. fc83ee9d587f wifi: rtlwifi: drop pre_fill_tx_bd_desc() from HAL interface 9e58030622d0 wifi: rtlwifi: drop fill_fake_txdesc() from HAL interface 2f4ae0feab8b wifi: rtlwifi: drop chk_switch_dmdp() from HAL interface
diff --git a/drivers/net/wireless/realtek/rtlwifi/rtl8192ee/sw.c b/drivers/net/wireless/realtek/rtlwifi/rtl8192ee/sw.c index 616a47d8d97a..011ce82efeff 100644 --- a/drivers/net/wireless/realtek/rtlwifi/rtl8192ee/sw.c +++ b/drivers/net/wireless/realtek/rtlwifi/rtl8192ee/sw.c @@ -199,7 +199,6 @@ static struct rtl_hal_ops rtl8192ee_hal_ops = { .get_hw_reg = rtl92ee_get_hw_reg, .set_hw_reg = rtl92ee_set_hw_reg, .update_rate_tbl = rtl92ee_update_hal_rate_tbl, - .pre_fill_tx_bd_desc = rtl92ee_pre_fill_tx_bd_desc, .rx_desc_buff_remained_cnt = rtl92ee_rx_desc_buff_remained_cnt, .rx_check_dma_ok = rtl92ee_rx_check_dma_ok, .fill_tx_desc = rtl92ee_tx_fill_desc, diff --git a/drivers/net/wireless/realtek/rtlwifi/rtl8192ee/trx.c b/drivers/net/wireless/realtek/rtlwifi/rtl8192ee/trx.c index 67388e0b3fa0..16589e18494b 100644 --- a/drivers/net/wireless/realtek/rtlwifi/rtl8192ee/trx.c +++ b/drivers/net/wireless/realtek/rtlwifi/rtl8192ee/trx.c @@ -550,9 +550,11 @@ u16 rtl92ee_get_available_desc(struct ieee80211_hw *hw, u8 q_idx) return point_diff; } -void rtl92ee_pre_fill_tx_bd_desc(struct ieee80211_hw *hw, - u8 *tx_bd_desc8, u8 *desc8, u8 queue_index, - struct sk_buff *skb, dma_addr_t addr) +static void rtl92ee_pre_fill_tx_bd_desc(struct ieee80211_hw *hw, + u8 *tx_bd_desc8, u8 *desc8, + u8 queue_index, + struct sk_buff *skb, + dma_addr_t addr) { struct rtl_priv *rtlpriv = rtl_priv(hw); struct rtl_pci *rtlpci = rtl_pcidev(rtl_pcipriv(hw)); diff --git a/drivers/net/wireless/realtek/rtlwifi/rtl8192ee/trx.h b/drivers/net/wireless/realtek/rtlwifi/rtl8192ee/trx.h index 3852a50a688b..4c6cf4f16f95 100644 --- a/drivers/net/wireless/realtek/rtlwifi/rtl8192ee/trx.h +++ b/drivers/net/wireless/realtek/rtlwifi/rtl8192ee/trx.h @@ -720,9 +720,6 @@ void rtl92ee_rx_check_dma_ok(struct ieee80211_hw *hw, u8 *header_desc, u16 rtl92ee_rx_desc_buff_remained_cnt(struct ieee80211_hw *hw, u8 queue_index); u16 rtl92ee_get_available_desc(struct ieee80211_hw *hw, u8 queue_index); -void rtl92ee_pre_fill_tx_bd_desc(struct ieee80211_hw *hw, - u8 *tx_bd_desc, u8 *desc, u8 queue_index, - struct sk_buff *skb, dma_addr_t addr); void rtl92ee_tx_fill_desc(struct ieee80211_hw *hw, struct ieee80211_hdr *hdr, u8 *pdesc_tx, diff --git a/drivers/net/wireless/realtek/rtlwifi/wifi.h b/drivers/net/wireless/realtek/rtlwifi/wifi.h index b60169196eab..cdaf0529244d 100644 --- a/drivers/net/wireless/realtek/rtlwifi/wifi.h +++ b/drivers/net/wireless/realtek/rtlwifi/wifi.h @@ -2231,9 +2231,6 @@ struct rtl_hal_ops { void (*update_rate_tbl)(struct ieee80211_hw *hw, struct ieee80211_sta *sta, u8 rssi_leve, bool update_bw); - void (*pre_fill_tx_bd_desc)(struct ieee80211_hw *hw, u8 *tx_bd_desc, - u8 *desc, u8 queue_index, - struct sk_buff *skb, dma_addr_t addr); void (*update_rate_mask)(struct ieee80211_hw *hw, u8 rssi_level); u16 (*rx_desc_buff_remained_cnt)(struct ieee80211_hw *hw, u8 queue_index);
Since 'pre_fill_tx_bd_desc()' is actually used for rtl8192ee only, there is no need to maintain function pointer in 'struct rtl_hal_ops', and 'rtl92ee_pre_fill_tx_bd_desc()' may be converted to static. Compile tested only. Signed-off-by: Dmitry Antipov <dmantipov@yandex.ru> --- drivers/net/wireless/realtek/rtlwifi/rtl8192ee/sw.c | 1 - drivers/net/wireless/realtek/rtlwifi/rtl8192ee/trx.c | 8 +++++--- drivers/net/wireless/realtek/rtlwifi/rtl8192ee/trx.h | 3 --- drivers/net/wireless/realtek/rtlwifi/wifi.h | 3 --- 4 files changed, 5 insertions(+), 10 deletions(-)