Commit 8cea7f1c authored by Lee Jones's avatar Lee Jones Committed by Kalle Valo

hostap: Remove unused variable 'fc'

Fixes the following W=1 kernel build warning(s):

 In file included from drivers/net/wireless/intersil/hostap/hostap_cs.c:196:
 drivers/net/wireless/intersil/hostap/hostap_hw.c: In function ‘prism2_tx_80211’:
 drivers/net/wireless/intersil/hostap/hostap_hw.c:1806:18: warning: variable ‘fc’ set but not used [-Wunused-but-set-variable]
 1806 | u16 tx_control, fc;
 | ^~
 In file included from drivers/net/wireless/intersil/hostap/hostap_plx.c:264:
 drivers/net/wireless/intersil/hostap/hostap_hw.c: In function ‘prism2_tx_80211’:
 drivers/net/wireless/intersil/hostap/hostap_hw.c:1806:18: warning: variable ‘fc’ set but not used [-Wunused-but-set-variable]
 1806 | u16 tx_control, fc;
 | ^~
 In file included from drivers/net/wireless/intersil/hostap/hostap_pci.c:221:
 drivers/net/wireless/intersil/hostap/hostap_hw.c: In function ‘prism2_tx_80211’:
 drivers/net/wireless/intersil/hostap/hostap_hw.c:1806:18: warning: variable ‘fc’ set but not used [-Wunused-but-set-variable]
 1806 | u16 tx_control, fc;
 | ^~

Cc: Jouni Malinen <j@w1.fi>
Cc: Kalle Valo <kvalo@codeaurora.org>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Jakub Kicinski <kuba@kernel.org>
Cc: Cong Wang <xiyou.wangcong@gmail.com>
Cc: Taehee Yoo <ap420073@gmail.com>
Cc: linux-wireless@vger.kernel.org
Cc: netdev@vger.kernel.org
Signed-off-by: default avatarLee Jones <lee.jones@linaro.org>
Signed-off-by: default avatarKalle Valo <kvalo@codeaurora.org>
Link: https://lore.kernel.org/r/20200826093401.1458456-20-lee.jones@linaro.org
parent 64403dc3
...@@ -1803,7 +1803,7 @@ static int prism2_tx_80211(struct sk_buff *skb, struct net_device *dev) ...@@ -1803,7 +1803,7 @@ static int prism2_tx_80211(struct sk_buff *skb, struct net_device *dev)
struct hfa384x_tx_frame txdesc; struct hfa384x_tx_frame txdesc;
struct hostap_skb_tx_data *meta; struct hostap_skb_tx_data *meta;
int hdr_len, data_len, idx, res, ret = -1; int hdr_len, data_len, idx, res, ret = -1;
u16 tx_control, fc; u16 tx_control;
iface = netdev_priv(dev); iface = netdev_priv(dev);
local = iface->local; local = iface->local;
...@@ -1826,7 +1826,6 @@ static int prism2_tx_80211(struct sk_buff *skb, struct net_device *dev) ...@@ -1826,7 +1826,6 @@ static int prism2_tx_80211(struct sk_buff *skb, struct net_device *dev)
/* skb->data starts with txdesc->frame_control */ /* skb->data starts with txdesc->frame_control */
hdr_len = 24; hdr_len = 24;
skb_copy_from_linear_data(skb, &txdesc.frame_control, hdr_len); skb_copy_from_linear_data(skb, &txdesc.frame_control, hdr_len);
fc = le16_to_cpu(txdesc.frame_control);
if (ieee80211_is_data(txdesc.frame_control) && if (ieee80211_is_data(txdesc.frame_control) &&
ieee80211_has_a4(txdesc.frame_control) && ieee80211_has_a4(txdesc.frame_control) &&
skb->len >= 30) { skb->len >= 30) {
......
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