kernel: add missing config symbols for 4.9
[openwrt/openwrt.git] / package / kernel / mac80211 / patches / 356-0001-brcmfmac-avoid-maybe-uninitialized-warning-in-brcmf_.patch
1 From d3532ea6ce4ea501e421d130555e59edc2945f99 Mon Sep 17 00:00:00 2001
2 From: Arnd Bergmann <arnd@arndb.de>
3 Date: Tue, 18 Oct 2016 00:13:40 +0200
4 Subject: [PATCH] brcmfmac: avoid maybe-uninitialized warning in
5 brcmf_cfg80211_start_ap
6 MIME-Version: 1.0
7 Content-Type: text/plain; charset=UTF-8
8 Content-Transfer-Encoding: 8bit
9
10 A bugfix added a sanity check around the assignment and use of the
11 'is_11d' variable, which looks correct to me, but as the function is
12 rather complex already, this confuses the compiler to the point where
13 it can no longer figure out if the variable is always initialized
14 correctly:
15
16 brcm80211/brcmfmac/cfg80211.c: In function ‘brcmf_cfg80211_start_ap’:
17 brcm80211/brcmfmac/cfg80211.c:4586:10: error: ‘is_11d’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
18
19 This adds an initialization for the newly introduced case in which
20 the variable should not really be used, in order to make the warning
21 go away.
22
23 Fixes: b3589dfe0212 ("brcmfmac: ignore 11d configuration errors")
24 Cc: Hante Meuleman <hante.meuleman@broadcom.com>
25 Cc: Arend van Spriel <arend.vanspriel@broadcom.com>
26 Cc: Kalle Valo <kvalo@codeaurora.org>
27 Signed-off-by: Arnd Bergmann <arnd@arndb.de>
28 Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
29 ---
30 drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c | 2 +-
31 1 file changed, 1 insertion(+), 1 deletion(-)
32
33 --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c
34 +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c
35 @@ -4516,7 +4516,7 @@ brcmf_cfg80211_start_ap(struct wiphy *wi
36 /* store current 11d setting */
37 if (brcmf_fil_cmd_int_get(ifp, BRCMF_C_GET_REGULATORY,
38 &ifp->vif->is_11d)) {
39 - supports_11d = false;
40 + is_11d = supports_11d = false;
41 } else {
42 country_ie = brcmf_parse_tlvs((u8 *)settings->beacon.tail,
43 settings->beacon.tail_len,