aboutsummaryrefslogtreecommitdiffstats
path: root/net/wireless/reg.c
diff options
context:
space:
mode:
authorLuis R. Rodriguez <lrodriguez@atheros.com>2009-03-09 22:07:42 -0400
committerJohn W. Linville <linville@tuxdriver.com>2009-03-16 18:09:40 -0400
commit73d54c9e74c4d8ee8a41bc516f481f0f754eca32 (patch)
treece190210e3a0cd00008b7aa88af6c1ebccee2193 /net/wireless/reg.c
parent7db90f4a25bd4184f3d36dfa4f512f53b0448da7 (diff)
cfg80211: add regulatory netlink multicast group
This allows us to send to userspace "regulatory" events. For now we just send an event when we change regulatory domains. We also notify userspace when devices are using their own custom world roaming regulatory domains. Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.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 68fde6d33dc3..eb8b8ed16155 100644
--- a/net/wireless/reg.c
+++ b/net/wireless/reg.c
@@ -41,6 +41,7 @@
41#include <net/cfg80211.h> 41#include <net/cfg80211.h>
42#include "core.h" 42#include "core.h"
43#include "reg.h" 43#include "reg.h"
44#include "nl80211.h"
44 45
45/* Receipt of information from last regulatory request */ 46/* Receipt of information from last regulatory request */
46static struct regulatory_request *last_request; 47static struct regulatory_request *last_request;
@@ -1403,8 +1404,16 @@ new_request:
1403 pending_request = NULL; 1404 pending_request = NULL;
1404 1405
1405 /* When r == REG_INTERSECT we do need to call CRDA */ 1406 /* When r == REG_INTERSECT we do need to call CRDA */
1406 if (r < 0) 1407 if (r < 0) {
1408 /*
1409 * Since CRDA will not be called in this case as we already
1410 * have applied the requested regulatory domain before we just
1411 * inform userspace we have processed the request
1412 */
1413 if (r == -EALREADY)
1414 nl80211_send_reg_change_event(last_request);
1407 return r; 1415 return r;
1416 }
1408 1417
1409 /* 1418 /*
1410 * Note: When CONFIG_WIRELESS_OLD_REGULATORY is enabled 1419 * Note: When CONFIG_WIRELESS_OLD_REGULATORY is enabled
@@ -2084,6 +2093,8 @@ int set_regdom(const struct ieee80211_regdomain *rd)
2084 2093
2085 print_regdomain(cfg80211_regdomain); 2094 print_regdomain(cfg80211_regdomain);
2086 2095
2096 nl80211_send_reg_change_event(last_request);
2097
2087 return r; 2098 return r;
2088} 2099}
2089 2100