ath10k: remove support for the obsolete STA firmware
[openwrt/openwrt.git] / package / kernel / mac80211 / patches / 355-brcmfmac-update-wiphy-band-information-upon-updating.patch
1 From: Arend van Spriel <arend@broadcom.com>
2 Date: Tue, 14 Apr 2015 20:10:25 +0200
3 Subject: [PATCH] brcmfmac: update wiphy band information upon updating
4 regulatory domain
5
6 When change the country code the available channels may change. So
7 the wiphy bands should be updated accordingly.
8
9 Reviewed-by: Daniel (Deognyoun) Kim <dekim@broadcom.com>
10 Reviewed-by: Hante Meuleman <meuleman@broadcom.com>
11 Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
12 Signed-off-by: Arend van Spriel <arend@broadcom.com>
13 ---
14
15 --- a/drivers/net/wireless/brcm80211/brcmfmac/cfg80211.c
16 +++ b/drivers/net/wireless/brcm80211/brcmfmac/cfg80211.c
17 @@ -6022,7 +6022,11 @@ static void brcmf_cfg80211_reg_notifier(
18 memset(&ccreq, 0, sizeof(ccreq));
19 ccreq.rev = cpu_to_le32(-1);
20 memcpy(ccreq.ccode, req->alpha2, sizeof(req->alpha2));
21 - brcmf_fil_iovar_data_set(ifp, "country", &ccreq, sizeof(ccreq));
22 + if (brcmf_fil_iovar_data_set(ifp, "country", &ccreq, sizeof(ccreq))) {
23 + brcmf_err("firmware rejected country setting\n");
24 + return;
25 + }
26 + brcmf_setup_wiphybands(wiphy);
27 }
28
29 static void brcmf_free_wiphy(struct wiphy *wiphy)