Commit 03ce6f8a authored by YueHaibing's avatar YueHaibing Committed by Kalle Valo

rtl8xxxu: Remove set but not used variables 'usedesc40' and 'seq_number'

Fixes gcc '-Wunused-but-set-variable' warning:

drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c: In function 'rtl8xxxu_tx':
drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c:4925:7: warning:
 variable 'usedesc40' set but not used [-Wunused-but-set-variable]

drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c:4921:6: warning:
 variable 'seq_number' set but not used [-Wunused-but-set-variable]

'usedesc40' and 'seq_number' are not used any more after
commit b59415c2 ("rtl8xxxu: Split filling of TX descriptors into separate functions")
Signed-off-by: default avatarYueHaibing <yuehaibing@huawei.com>
Signed-off-by: default avatarKalle Valo <kvalo@codeaurora.org>
parent 4cb50549
...@@ -4918,11 +4918,10 @@ static void rtl8xxxu_tx(struct ieee80211_hw *hw, ...@@ -4918,11 +4918,10 @@ static void rtl8xxxu_tx(struct ieee80211_hw *hw,
struct device *dev = &priv->udev->dev; struct device *dev = &priv->udev->dev;
u32 queue, rts_rate; u32 queue, rts_rate;
u16 pktlen = skb->len; u16 pktlen = skb->len;
u16 seq_number;
u16 rate_flag = tx_info->control.rates[0].flags; u16 rate_flag = tx_info->control.rates[0].flags;
int tx_desc_size = priv->fops->tx_desc_size; int tx_desc_size = priv->fops->tx_desc_size;
int ret; int ret;
bool usedesc40, ampdu_enable, sgi = false, short_preamble = false; bool ampdu_enable, sgi = false, short_preamble = false;
if (skb_headroom(skb) < tx_desc_size) { if (skb_headroom(skb) < tx_desc_size) {
dev_warn(dev, dev_warn(dev,
...@@ -4946,7 +4945,6 @@ static void rtl8xxxu_tx(struct ieee80211_hw *hw, ...@@ -4946,7 +4945,6 @@ static void rtl8xxxu_tx(struct ieee80211_hw *hw,
if (ieee80211_is_action(hdr->frame_control)) if (ieee80211_is_action(hdr->frame_control))
rtl8xxxu_dump_action(dev, hdr); rtl8xxxu_dump_action(dev, hdr);
usedesc40 = (tx_desc_size == 40);
tx_info->rate_driver_data[0] = hw; tx_info->rate_driver_data[0] = hw;
if (control && control->sta) if (control && control->sta)
...@@ -5013,7 +5011,6 @@ static void rtl8xxxu_tx(struct ieee80211_hw *hw, ...@@ -5013,7 +5011,6 @@ static void rtl8xxxu_tx(struct ieee80211_hw *hw,
else else
rts_rate = 0; rts_rate = 0;
seq_number = IEEE80211_SEQ_TO_SN(le16_to_cpu(hdr->seq_ctrl));
priv->fops->fill_txdesc(hw, hdr, tx_info, tx_desc, sgi, short_preamble, priv->fops->fill_txdesc(hw, hdr, tx_info, tx_desc, sgi, short_preamble,
ampdu_enable, rts_rate); ampdu_enable, rts_rate);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment