|
@@ -542,19 +542,26 @@ static void mwifiex_reg_notifier(struct wiphy *wiphy,
|
|
|
wiphy_dbg(wiphy, "info: cfg80211 regulatory domain callback for %c%c\n",
|
|
|
request->alpha2[0], request->alpha2[1]);
|
|
|
|
|
|
- memcpy(adapter->country_code, request->alpha2, sizeof(request->alpha2));
|
|
|
-
|
|
|
switch (request->initiator) {
|
|
|
case NL80211_REGDOM_SET_BY_DRIVER:
|
|
|
case NL80211_REGDOM_SET_BY_CORE:
|
|
|
case NL80211_REGDOM_SET_BY_USER:
|
|
|
- break;
|
|
|
- /* Todo: apply driver specific changes in channel flags based
|
|
|
- on the request initiator if necessary. */
|
|
|
case NL80211_REGDOM_SET_BY_COUNTRY_IE:
|
|
|
break;
|
|
|
+ default:
|
|
|
+ wiphy_err(wiphy, "unknown regdom initiator: %d\n",
|
|
|
+ request->initiator);
|
|
|
+ return;
|
|
|
+ }
|
|
|
+
|
|
|
+ /* Don't send world or same regdom info to firmware */
|
|
|
+ if (strncmp(request->alpha2, "00", 2) &&
|
|
|
+ strncmp(request->alpha2, adapter->country_code,
|
|
|
+ sizeof(request->alpha2))) {
|
|
|
+ memcpy(adapter->country_code, request->alpha2,
|
|
|
+ sizeof(request->alpha2));
|
|
|
+ mwifiex_send_domain_info_cmd_fw(wiphy);
|
|
|
}
|
|
|
- mwifiex_send_domain_info_cmd_fw(wiphy);
|
|
|
}
|
|
|
|
|
|
/*
|