aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/libertas/cfg.c
diff options
context:
space:
mode:
authorDaniel Drake <dsd@laptop.org>2012-07-15 18:44:58 -0400
committerJohn W. Linville <linville@tuxdriver.com>2012-07-17 15:11:36 -0400
commit20d2ebe512b9ad0f8fdd867a02d7a309344e8a6a (patch)
tree76e653b348d665145c37bd5e6943396b28f6aa25 /drivers/net/wireless/libertas/cfg.c
parent08a4a1ab0725d89ca1df80f2ebe8443da82cd34f (diff)
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.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/net/wireless/libertas/cfg.c b/drivers/net/wireless/libertas/cfg.c
index 706781316195..eb5de800ed90 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,
2180 struct regulatory_request *request) 2180 struct regulatory_request *request)
2181{ 2181{
2182 struct lbs_private *priv = wiphy_priv(wiphy); 2182 struct lbs_private *priv = wiphy_priv(wiphy);
2183 int ret; 2183 int ret = 0;
2184 2184
2185 lbs_deb_enter_args(LBS_DEB_CFG80211, "cfg80211 regulatory domain " 2185 lbs_deb_enter_args(LBS_DEB_CFG80211, "cfg80211 regulatory domain "
2186 "callback for domain %c%c\n", request->alpha2[0], 2186 "callback for domain %c%c\n", request->alpha2[0],
2187 request->alpha2[1]); 2187 request->alpha2[1]);
2188 2188
2189 ret = lbs_set_11d_domain_info(priv, request, wiphy->bands); 2189 memcpy(priv->country_code, request->alpha2, sizeof(request->alpha2));
2190 if (lbs_iface_active(priv))
2191 ret = lbs_set_11d_domain_info(priv);
2190 2192
2191 lbs_deb_leave(LBS_DEB_CFG80211); 2193 lbs_deb_leave(LBS_DEB_CFG80211);
2192 return ret; 2194 return ret;