summaryrefslogtreecommitdiffstats
path: root/net/wireless/reg.c
diff options
context:
space:
mode:
authorLuis R. Rodriguez2008-11-12 23:22:03 +0100
committerJohn W. Linville2008-11-25 22:41:27 +0100
commit14b9815af3f4fe0e171ee0c4325c31d2a2c1570b (patch)
tree4666e3bac9367e0b3cd07d6237de44bcc27274df /net/wireless/reg.c
parentcfg80211/mac80211: Add 802.11d support (diff)
downloadkernel-qcow2-linux-14b9815af3f4fe0e171ee0c4325c31d2a2c1570b.tar.gz
kernel-qcow2-linux-14b9815af3f4fe0e171ee0c4325c31d2a2c1570b.tar.xz
kernel-qcow2-linux-14b9815af3f4fe0e171ee0c4325c31d2a2c1570b.zip
cfg80211: add support for custom firmware regulatory solutions
This adds API to cfg80211 to allow wireless drivers to inform us if their firmware can handle regulatory considerations *and* they cannot map these regulatory domains to an ISO / IEC 3166 alpha2. In these cases we skip the first regulatory hint instead of expecting the driver to build their own regulatory structure, providing us with an alpha2, or using the reg_notifier(). Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com> Acked-by: Zhu Yi <yi.zhu@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/wireless/reg.c')
-rw-r--r--net/wireless/reg.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/net/wireless/reg.c b/net/wireless/reg.c
index 4dab993ea488..0990059f7e48 100644
--- a/net/wireless/reg.c
+++ b/net/wireless/reg.c
@@ -816,12 +816,23 @@ static void handle_band(struct ieee80211_supported_band *sband)
handle_channel(&sband->channels[i]);
}
+static bool ignore_reg_update(struct wiphy *wiphy, enum reg_set_by setby)
+{
+ if (!last_request)
+ return true;
+ if (setby == REGDOM_SET_BY_CORE &&
+ wiphy->fw_handles_regulatory)
+ return true;
+ return false;
+}
+
static void update_all_wiphy_regulatory(enum reg_set_by setby)
{
struct cfg80211_registered_device *drv;
list_for_each_entry(drv, &cfg80211_drv_list, list)
- wiphy_update_regulatory(&drv->wiphy, setby);
+ if (!ignore_reg_update(&drv->wiphy, setby))
+ wiphy_update_regulatory(&drv->wiphy, setby);
}
void wiphy_update_regulatory(struct wiphy *wiphy, enum reg_set_by setby)