aboutsummaryrefslogtreecommitdiffstats
path: root/net/wireless/nl80211.c
diff options
context:
space:
mode:
authorLuis R. Rodriguez <lrodriguez@atheros.com>2009-02-21 00:04:30 -0500
committerJohn W. Linville <linville@tuxdriver.com>2009-02-27 14:52:57 -0500
commitfe33eb390854886e1fd5d4835d833b80d145aafb (patch)
tree5349c48092c9528b5640d5981425e161e0731ed3 /net/wireless/nl80211.c
parent0441d6ffc705de17d85923264a1b03b71ebfccb8 (diff)
cfg80211: move all regulatory hints to workqueue
All regulatory hints (core, driver, userspace and 11d) are now processed in a workqueue. Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/wireless/nl80211.c')
-rw-r--r--net/wireless/nl80211.c30
1 files changed, 10 insertions, 20 deletions
diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c
index e0d3879b8852..97f69bed3fe2 100644
--- a/net/wireless/nl80211.c
+++ b/net/wireless/nl80211.c
@@ -1915,34 +1915,24 @@ static int nl80211_req_set_reg(struct sk_buff *skb, struct genl_info *info)
1915 */ 1915 */
1916 mutex_lock(&cfg80211_mutex); 1916 mutex_lock(&cfg80211_mutex);
1917 if (unlikely(!cfg80211_regdomain)) { 1917 if (unlikely(!cfg80211_regdomain)) {
1918 r = -EINPROGRESS; 1918 mutex_unlock(&cfg80211_mutex);
1919 goto out; 1919 return -EINPROGRESS;
1920 } 1920 }
1921 mutex_unlock(&cfg80211_mutex);
1921 1922
1922 if (!info->attrs[NL80211_ATTR_REG_ALPHA2]) { 1923 if (!info->attrs[NL80211_ATTR_REG_ALPHA2])
1923 r = -EINVAL; 1924 return -EINVAL;
1924 goto out;
1925 }
1926 1925
1927 data = nla_data(info->attrs[NL80211_ATTR_REG_ALPHA2]); 1926 data = nla_data(info->attrs[NL80211_ATTR_REG_ALPHA2]);
1928 1927
1929#ifdef CONFIG_WIRELESS_OLD_REGULATORY 1928#ifdef CONFIG_WIRELESS_OLD_REGULATORY
1930 /* We ignore world regdom requests with the old regdom setup */ 1929 /* We ignore world regdom requests with the old regdom setup */
1931 if (is_world_regdom(data)) { 1930 if (is_world_regdom(data))
1932 r = -EINVAL; 1931 return -EINVAL;
1933 goto out;
1934 }
1935#endif 1932#endif
1936 r = __regulatory_hint(NULL, REGDOM_SET_BY_USER, data, 0, ENVIRON_ANY); 1933
1937 /* 1934 r = regulatory_hint_user(data);
1938 * This means the regulatory domain was already set, however 1935
1939 * we don't want to confuse userspace with a "successful error"
1940 * message so lets just treat it as a success
1941 */
1942 if (r == -EALREADY)
1943 r = 0;
1944out:
1945 mutex_unlock(&cfg80211_mutex);
1946 return r; 1936 return r;
1947} 1937}
1948 1938