On 04/13/2012 04:48 PM, Seth Forshee wrote:
On Wed, Apr 11, 2012 at 11:52:49AM +0200, Arend van Spriel wrote:
The brcmsmac driver provides the country code from sprom as a regulatory
hint to cfg80211. When brcmsmac does not find a country code entry in
the sprom it passes 'US' as regulatory hint. Better approach is to rely
on the world regulatory domain in cfg80211/crda.
Reviewed-by: Pieter-Paul Giesberts<pieterpg@xxxxxxxxxxxx>
Reviewed-by: Brett Rudley<brudley@xxxxxxxxxxxx>
Signed-off-by: Arend van Spriel<arend@xxxxxxxxxxxx>
---
.../net/wireless/brcm80211/brcmsmac/mac80211_if.c | 6 +-----
1 files changed, 1 insertions(+), 5 deletions(-)
diff --git a/drivers/net/wireless/brcm80211/brcmsmac/mac80211_if.c b/drivers/net/wireless/brcm80211/brcmsmac/mac80211_if.c
index 569ab8a..aa15558 100644
--- a/drivers/net/wireless/brcm80211/brcmsmac/mac80211_if.c
+++ b/drivers/net/wireless/brcm80211/brcmsmac/mac80211_if.c
@@ -1069,11 +1069,7 @@ static struct brcms_info *brcms_attach(struct bcma_device *pdev)
wiphy_err(wl->wiphy, "%s: ieee80211_register_hw failed, status"
"%d\n", __func__, err);
- if (wl->pub->srom_ccode[0])
- err = brcms_set_hint(wl, wl->pub->srom_ccode);
- else
- err = brcms_set_hint(wl, "US");
- if (err)
+ if (wl->pub->srom_ccode[0]&& brcms_set_hint(wl, wl->pub->srom_ccode))
wiphy_err(wl->wiphy, "%s: regulatory_hint failed, status %d\n",
__func__, err);
err no longer holds the return value from brcms_set_hint(), so it
doesn't make sense to print it in the error message. The value will
always be 0.
Seth
Thanks, Seth
John already applied this patch so I will fix it in a separate one.
Gr. AvS
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html