All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] iw: print human readable radar events
@ 2015-01-30  9:42 Helmut Schaa
  2015-01-30 10:36 ` Joe Perches
  2015-03-03  8:37 ` Johannes Berg
  0 siblings, 2 replies; 4+ messages in thread
From: Helmut Schaa @ 2015-01-30  9:42 UTC (permalink / raw)
  To: linux-wireless; +Cc: Johannes Berg, Helmut Schaa

Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com>
---
 event.c | 25 +++++++++++++++++++++++++
 1 file changed, 25 insertions(+)

diff --git a/event.c b/event.c
index c175c66..71ab7f7 100644
--- a/event.c
+++ b/event.c
@@ -565,6 +565,31 @@ static int print_event(struct nl_msg *msg, void *arg)
 				   nla_data(tb[NL80211_ATTR_VENDOR_DATA]),
 				   nla_len(tb[NL80211_ATTR_VENDOR_DATA]));
 		break;
+	case NL80211_CMD_RADAR_DETECT:
+		printf("radar event ");
+		if (tb[NL80211_ATTR_RADAR_EVENT]) {
+			switch (nla_get_u32(tb[NL80211_ATTR_RADAR_EVENT])) {
+				case NL80211_RADAR_DETECTED:
+					printf("(radar detected)");
+					break;
+				case NL80211_RADAR_CAC_FINISHED:
+					printf("(cac finished)");
+					break;
+				case NL80211_RADAR_CAC_ABORTED:
+					printf("(cac aborted)");
+					break;
+				case NL80211_RADAR_NOP_FINISHED:
+					printf("(nop finished)");
+					break;
+				default:
+					printf("(unknown)");
+					break;
+			};
+		} else {
+			printf("(unknown)");
+		}
+		printf("\n");
+		break;
 	default:
 		printf("unknown event %d (%s)\n",
 		       gnlh->cmd, command_name(gnlh->cmd));
-- 
1.8.4.5


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2015-03-03  8:37 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-01-30  9:42 [PATCH] iw: print human readable radar events Helmut Schaa
2015-01-30 10:36 ` Joe Perches
2015-02-02 10:01   ` Helmut Schaa
2015-03-03  8:37 ` Johannes Berg

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.