diff options
author | Daniel Drake <dsd@laptop.org> | 2012-07-15 23:44:58 +0100 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2012-07-17 15:11:36 -0400 |
commit | 20d2ebe512b9ad0f8fdd867a02d7a309344e8a6a (patch) | |
tree | 76e653b348d665145c37bd5e6943396b28f6aa25 /drivers/net/wireless/libertas/cfg.c | |
parent | 08a4a1ab0725d89ca1df80f2ebe8443da82cd34f (diff) | |
download | op-kernel-dev-20d2ebe512b9ad0f8fdd867a02d7a309344e8a6a.zip op-kernel-dev-20d2ebe512b9ad0f8fdd867a02d7a309344e8a6a.tar.gz |
libertas: Update 11d info only when interface is active
reg_notifier can be called before the interface is up.
Handle this correctly by storing the requested country code, then
apply the relevant configuration when the interface is brought up.
Signed-off-by: Daniel Drake <dsd@laptop.org>
Acked-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/libertas/cfg.c')
-rw-r--r-- | drivers/net/wireless/libertas/cfg.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/net/wireless/libertas/cfg.c b/drivers/net/wireless/libertas/cfg.c index 7067813..eb5de80 100644 --- a/drivers/net/wireless/libertas/cfg.c +++ b/drivers/net/wireless/libertas/cfg.c @@ -2180,13 +2180,15 @@ int lbs_reg_notifier(struct wiphy *wiphy, struct regulatory_request *request) { struct lbs_private *priv = wiphy_priv(wiphy); - int ret; + int ret = 0; lbs_deb_enter_args(LBS_DEB_CFG80211, "cfg80211 regulatory domain " "callback for domain %c%c\n", request->alpha2[0], request->alpha2[1]); - ret = lbs_set_11d_domain_info(priv, request, wiphy->bands); + memcpy(priv->country_code, request->alpha2, sizeof(request->alpha2)); + if (lbs_iface_active(priv)) + ret = lbs_set_11d_domain_info(priv); lbs_deb_leave(LBS_DEB_CFG80211); return ret; |