4ba87ed093376d74f11944aee7d979ffa1538cd8
[openwrt/staging/pepe2k.git] /
1 From cddecd92d1ec2fd05ed1123455e7c6cf6906b5a5 Mon Sep 17 00:00:00 2001
2 From: YueHaibing <yuehaibing@huawei.com>
3 Date: Wed, 24 Jul 2019 22:12:01 +0800
4 Subject: [PATCH] brcmfmac: remove set but not used variable 'dtim_period'
5
6 Fixes gcc '-Wunused-but-set-variable' warning:
7
8 drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c: In function brcmf_update_bss_info:
9 drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c:2962:5: warning: variable dtim_period set but not used [-Wunused-but-set-variable]
10 drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c: In function brcmf_update_bss_info:
11 drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c:2961:6: warning: variable beacon_interval set but not used [-Wunused-but-set-variable]
12
13 They are never used so can be removed.
14
15 Reported-by: Hulk Robot <hulkci@huawei.com>
16 Signed-off-by: YueHaibing <yuehaibing@huawei.com>
17 Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
18 ---
19 .../net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c | 8 +-------
20 1 file changed, 1 insertion(+), 7 deletions(-)
21
22 --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c
23 +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c
24 @@ -2974,8 +2974,6 @@ static s32 brcmf_update_bss_info(struct
25 struct brcmf_pub *drvr = cfg->pub;
26 struct brcmf_bss_info_le *bi;
27 const struct brcmf_tlv *tim;
28 - u16 beacon_interval;
29 - u8 dtim_period;
30 size_t ie_len;
31 u8 *ie;
32 s32 err = 0;
33 @@ -2999,12 +2997,9 @@ static s32 brcmf_update_bss_info(struct
34
35 ie = ((u8 *)bi) + le16_to_cpu(bi->ie_offset);
36 ie_len = le32_to_cpu(bi->ie_length);
37 - beacon_interval = le16_to_cpu(bi->beacon_period);
38
39 tim = brcmf_parse_tlvs(ie, ie_len, WLAN_EID_TIM);
40 - if (tim)
41 - dtim_period = tim->data[1];
42 - else {
43 + if (!tim) {
44 /*
45 * active scan was done so we could not get dtim
46 * information out of probe response.
47 @@ -3016,7 +3011,6 @@ static s32 brcmf_update_bss_info(struct
48 bphy_err(drvr, "wl dtim_assoc failed (%d)\n", err);
49 goto update_bss_info_out;
50 }
51 - dtim_period = (u8)var;
52 }
53
54 update_bss_info_out: