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>
This commit is contained in:
committed by
John W. Linville
parent
7db90f4a25
commit
73d54c9e74
@ -41,6 +41,7 @@
|
||||
#include <net/cfg80211.h>
|
||||
#include "core.h"
|
||||
#include "reg.h"
|
||||
#include "nl80211.h"
|
||||
|
||||
/* Receipt of information from last regulatory request */
|
||||
static struct regulatory_request *last_request;
|
||||
@ -1403,8 +1404,16 @@ new_request:
|
||||
pending_request = NULL;
|
||||
|
||||
/* When r == REG_INTERSECT we do need to call CRDA */
|
||||
if (r < 0)
|
||||
if (r < 0) {
|
||||
/*
|
||||
* Since CRDA will not be called in this case as we already
|
||||
* have applied the requested regulatory domain before we just
|
||||
* inform userspace we have processed the request
|
||||
*/
|
||||
if (r == -EALREADY)
|
||||
nl80211_send_reg_change_event(last_request);
|
||||
return r;
|
||||
}
|
||||
|
||||
/*
|
||||
* Note: When CONFIG_WIRELESS_OLD_REGULATORY is enabled
|
||||
@ -2084,6 +2093,8 @@ int set_regdom(const struct ieee80211_regdomain *rd)
|
||||
|
||||
print_regdomain(cfg80211_regdomain);
|
||||
|
||||
nl80211_send_reg_change_event(last_request);
|
||||
|
||||
return r;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user