From patchwork Fri Jan 30 09:42:44 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Helmut Schaa X-Patchwork-Id: 5748261 X-Patchwork-Delegate: johannes@sipsolutions.net Return-Path: X-Original-To: patchwork-linux-wireless@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 743329F38B for ; Fri, 30 Jan 2015 09:42:59 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id B18162024D for ; Fri, 30 Jan 2015 09:42:58 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id B26EF20218 for ; Fri, 30 Jan 2015 09:42:57 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754973AbbA3Jmz (ORCPT ); Fri, 30 Jan 2015 04:42:55 -0500 Received: from mail-qc0-f175.google.com ([209.85.216.175]:55260 "EHLO mail-qc0-f175.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752394AbbA3Jmy (ORCPT ); Fri, 30 Jan 2015 04:42:54 -0500 Received: by mail-qc0-f175.google.com with SMTP id c9so19629009qcz.6 for ; Fri, 30 Jan 2015 01:42:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20120113; h=from:to:cc:subject:date:message-id; bh=ZBhPGEK+V/oDjcYztFlctyHhus5Jn1wABKc/r+HW9Es=; b=lVXuEcjtlNLTLFLNnrQ7TYMN10PawgTR4ivahoKIsV5QidVxuWBEMptB1C4Qmhsllj nZOFDbyS6sZp06zjXrtkq/7Fub90tQXgmAJNI9ih3IlK17poZjYtrbviCq8/irRyjEzb 63plVwOCckbzIKI6CID3+nVzgaGZ6I6xEDXK/MAeXJfExFlYa228YASuIXY6NlFlXPpB WiAy7DbgsonlkYlsnosuBmnHo55n69psHf6IetLrinrkJjN5tfWyJMByQKrE9ICcUj2f bneiJk6CPm5wsoE78tmG2fdxT+lnKlP7Poi2eO4076okpdE03zW4dV7PulwY53wS04sv jQ3Q== X-Received: by 10.229.50.135 with SMTP id z7mr10484480qcf.21.1422610973358; Fri, 30 Jan 2015 01:42:53 -0800 (PST) Received: from hschaa-desktop.site (HSI-KBW-217-008-059-040.hsi.kabelbw.de. [217.8.59.40]) by mx.google.com with ESMTPSA id l7sm9565786qaz.15.2015.01.30.01.42.51 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 30 Jan 2015 01:42:52 -0800 (PST) From: Helmut Schaa To: linux-wireless@vger.kernel.org Cc: Johannes Berg , Helmut Schaa Subject: [PATCH] iw: print human readable radar events Date: Fri, 30 Jan 2015 10:42:44 +0100 Message-Id: <1422610964-23252-1-git-send-email-helmut.schaa@googlemail.com> X-Mailer: git-send-email 1.8.4.5 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, T_DKIM_INVALID, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Signed-off-by: Helmut Schaa --- 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));