]> git.ipfire.org Git - thirdparty/iw.git/commitdiff
iw: event: also handle reg change on wiphy
authorMarkus Theil <markus.theil@tu-ilmenau.de>
Tue, 24 Mar 2020 16:21:49 +0000 (17:21 +0100)
committerJohannes Berg <johannes.berg@intel.com>
Wed, 25 Mar 2020 09:05:59 +0000 (10:05 +0100)
Signed-off-by: Markus Theil <markus.theil@tu-ilmenau.de>
Link: https://lore.kernel.org/r/20200324162149.3178-1-markus.theil@tu-ilmenau.de
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
event.c

diff --git a/event.c b/event.c
index 51aff97deb0d2287e6b5308472b512dae52159ae..b132b17f2efd122cedbc33b944fc6c67f9a17da9 100644 (file)
--- a/event.c
+++ b/event.c
@@ -931,8 +931,12 @@ static int print_event(struct nl_msg *msg, void *arg)
        case NL80211_CMD_SCHED_SCAN_RESULTS:
                printf("got scheduled scan results\n");
                break;
+       case NL80211_CMD_WIPHY_REG_CHANGE:
        case NL80211_CMD_REG_CHANGE:
-               printf("regulatory domain change: ");
+               if(gnlh->cmd == NL80211_CMD_WIPHY_REG_CHANGE)
+                       printf("regulatory domain change (phy): ");
+               else
+                       printf("regulatory domain change: ");
 
                reg_type = nla_get_u8(tb[NL80211_ATTR_REG_TYPE]);