iw: add regulatory events notification parsing
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
diff --git a/reg.c b/reg.c
index 74ae77f..625d695 100644
--- a/reg.c
+++ b/reg.c
@@ -41,6 +41,22 @@
return false;
}
+char *reg_initiator_to_string(__u8 initiator)
+{
+ switch (initiator) {
+ case NL80211_REGDOM_SET_BY_CORE:
+ return "the wireless core upon initialization";
+ case NL80211_REGDOM_SET_BY_USER:
+ return "a user";
+ case NL80211_REGDOM_SET_BY_DRIVER:
+ return "a driver";
+ case NL80211_REGDOM_SET_BY_COUNTRY_IE:
+ return "a country IE";
+ default:
+ return "BUG";
+ }
+}
+
static int handle_reg_set(struct nl_cb *cb,
struct nl_msg *msg,
int argc, char **argv)