Skip to content

Commit

Permalink
wifi: rtlwifi: cleanup few rtlxxx_tx_fill_desc() routines
Browse files Browse the repository at this point in the history
Remove unreachable branches in 'rtl92ce_tx_fill_desc()',
'rtl92cu_tx_fill_desc()' and 'rtl8723e_tx_fill_desc()'.
Compile tested only.

Found by Linux Verification Center (linuxtesting.org) with SVACE.

Signed-off-by: Dmitry Antipov <[email protected]>
Signed-off-by: Kalle Valo <[email protected]>
Link: https://msgid.link/[email protected]
  • Loading branch information
dmantipov authored and Kalle Valo committed Jan 12, 2024
1 parent bcd1ae7 commit 0ac008b
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 12 deletions.
4 changes: 0 additions & 4 deletions drivers/net/wireless/realtek/rtlwifi/rtl8192ce/trx.c
Original file line number Diff line number Diff line change
Expand Up @@ -350,7 +350,6 @@ void rtl92ce_tx_fill_desc(struct ieee80211_hw *hw,
struct rtl_mac *mac = rtl_mac(rtl_priv(hw));
struct rtl_pci *rtlpci = rtl_pcidev(rtl_pcipriv(hw));
struct rtl_ps_ctl *ppsc = rtl_psc(rtl_priv(hw));
bool defaultadapter = true;
__le32 *pdesc = (__le32 *)pdesc8;
u16 seq_number;
__le16 fc = hdr->frame_control;
Expand Down Expand Up @@ -503,9 +502,6 @@ void rtl92ce_tx_fill_desc(struct ieee80211_hw *hw,
if ((!ieee80211_is_data_qos(fc)) && ppsc->fwctrl_lps) {
set_tx_desc_hwseq_en(pdesc, 1);
set_tx_desc_pkt_id(pdesc, 8);

if (!defaultadapter)
set_tx_desc_qos(pdesc, 1);
}

set_tx_desc_more_frag(pdesc, (lastseg ? 0 : 1));
Expand Down
3 changes: 0 additions & 3 deletions drivers/net/wireless/realtek/rtlwifi/rtl8192cu/trx.c
Original file line number Diff line number Diff line change
Expand Up @@ -475,7 +475,6 @@ void rtl92cu_tx_fill_desc(struct ieee80211_hw *hw,
struct rtl_priv *rtlpriv = rtl_priv(hw);
struct rtl_mac *mac = rtl_mac(rtl_priv(hw));
struct rtl_ps_ctl *ppsc = rtl_psc(rtl_priv(hw));
bool defaultadapter = true;
u8 *qc = ieee80211_get_qos_ctl(hdr);
u8 tid = qc[0] & IEEE80211_QOS_CTL_TID_MASK;
u16 seq_number;
Expand Down Expand Up @@ -587,8 +586,6 @@ void rtl92cu_tx_fill_desc(struct ieee80211_hw *hw,
ppsc->fwctrl_lps) {
set_tx_desc_hwseq_en(txdesc, 1);
set_tx_desc_pkt_id(txdesc, 8);
if (!defaultadapter)
set_tx_desc_qos(txdesc, 1);
}
if (ieee80211_has_morefrags(fc))
set_tx_desc_more_frag(txdesc, 1);
Expand Down
6 changes: 1 addition & 5 deletions drivers/net/wireless/realtek/rtlwifi/rtl8723ae/trx.c
Original file line number Diff line number Diff line change
Expand Up @@ -349,7 +349,6 @@ void rtl8723e_tx_fill_desc(struct ieee80211_hw *hw,
struct rtl_mac *mac = rtl_mac(rtl_priv(hw));
struct rtl_pci *rtlpci = rtl_pcidev(rtl_pcipriv(hw));
struct rtl_ps_ctl *ppsc = rtl_psc(rtl_priv(hw));
bool b_defaultadapter = true;
/* bool b_trigger_ac = false; */
u8 *pdesc8 = (u8 *)pdesc_tx;
__le32 *pdesc = (__le32 *)pdesc8;
Expand Down Expand Up @@ -503,10 +502,7 @@ void rtl8723e_tx_fill_desc(struct ieee80211_hw *hw,
set_tx_desc_hwseq_en_8723(pdesc, 1);
/* set_tx_desc_hwseq_en(pdesc, 1); */
/* set_tx_desc_pkt_id(pdesc, 8); */

if (!b_defaultadapter)
set_tx_desc_hwseq_sel_8723(pdesc, 1);
/* set_tx_desc_qos(pdesc, 1); */
/* set_tx_desc_qos(pdesc, 1); */
}

set_tx_desc_more_frag(pdesc, (lastseg ? 0 : 1));
Expand Down

0 comments on commit 0ac008b

Please sign in to comment.