mirror of https://github.com/hak5/openwrt-owl.git
30 lines
1.1 KiB
Diff
30 lines
1.1 KiB
Diff
From: Arend van Spriel <arend@broadcom.com>
|
|
Date: Tue, 14 Apr 2015 20:10:25 +0200
|
|
Subject: [PATCH] brcmfmac: update wiphy band information upon updating
|
|
regulatory domain
|
|
|
|
When change the country code the available channels may change. So
|
|
the wiphy bands should be updated accordingly.
|
|
|
|
Reviewed-by: Daniel (Deognyoun) Kim <dekim@broadcom.com>
|
|
Reviewed-by: Hante Meuleman <meuleman@broadcom.com>
|
|
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
|
|
Signed-off-by: Arend van Spriel <arend@broadcom.com>
|
|
---
|
|
|
|
--- a/drivers/net/wireless/brcm80211/brcmfmac/cfg80211.c
|
|
+++ b/drivers/net/wireless/brcm80211/brcmfmac/cfg80211.c
|
|
@@ -6022,7 +6022,11 @@ static void brcmf_cfg80211_reg_notifier(
|
|
memset(&ccreq, 0, sizeof(ccreq));
|
|
ccreq.rev = cpu_to_le32(-1);
|
|
memcpy(ccreq.ccode, req->alpha2, sizeof(req->alpha2));
|
|
- brcmf_fil_iovar_data_set(ifp, "country", &ccreq, sizeof(ccreq));
|
|
+ if (brcmf_fil_iovar_data_set(ifp, "country", &ccreq, sizeof(ccreq))) {
|
|
+ brcmf_err("firmware rejected country setting\n");
|
|
+ return;
|
|
+ }
|
|
+ brcmf_setup_wiphybands(wiphy);
|
|
}
|
|
|
|
static void brcmf_free_wiphy(struct wiphy *wiphy)
|