From patchwork Tue Jan 13 14:19:15 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Luca Coelho X-Patchwork-Id: 5620761 X-Patchwork-Delegate: johannes@sipsolutions.net Return-Path: X-Original-To: patchwork-linux-wireless@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 3FC93C058D for ; Tue, 13 Jan 2015 14:19:36 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 7E31520480 for ; Tue, 13 Jan 2015 14:19:35 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 4B29F2047D for ; Tue, 13 Jan 2015 14:19:34 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751570AbbAMOTc (ORCPT ); Tue, 13 Jan 2015 09:19:32 -0500 Received: from dedo.coelho.fi ([88.198.205.34]:47170 "EHLO dedo.coelho.fi" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1751004AbbAMOTc (ORCPT ); Tue, 13 Jan 2015 09:19:32 -0500 Received: from a88-113-225-236.elisa-laajakaista.fi ([88.113.225.236] helo=dubbel.ger.corp.intel.com) by dedo.coelho.fi with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA256:128) (Exim 4.80) (envelope-from ) id 1YB2Je-00064n-Bl; Tue, 13 Jan 2015 16:19:30 +0200 From: Luca Coelho To: johannes@sipsolutions.net Cc: linux-wireless@vger.kernel.org Date: Tue, 13 Jan 2015 16:19:15 +0200 Message-Id: <1421158755-23411-1-git-send-email-luca@coelho.fi> X-Mailer: git-send-email 2.1.4 X-SA-Exim-Connect-IP: 88.113.225.236 X-SA-Exim-Mail-From: luca@coelho.fi X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 Subject: [PATCH iw] Read number of supported net-detect matches X-SA-Exim-Version: 4.2.1 (built Mon, 26 Dec 2011 16:24:06 +0000) X-SA-Exim-Scanned: Yes (on dedo.coelho.fi) Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Luciano Coelho Instead of just printing whether netdetect is supported, parse the attribute and report the maximum number of matchsets the driver supports. Signed-off-by: Luciano Coelho --- info.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/info.c b/info.c index 6e21e45..1df503f 100644 --- a/info.c +++ b/info.c @@ -455,7 +455,7 @@ broken_combination: [NL80211_WOWLAN_TRIG_EAP_IDENT_REQUEST] = { .type = NLA_FLAG }, [NL80211_WOWLAN_TRIG_4WAY_HANDSHAKE] = { .type = NLA_FLAG }, [NL80211_WOWLAN_TRIG_RFKILL_RELEASE] = { .type = NLA_FLAG }, - [NL80211_WOWLAN_TRIG_NET_DETECT] = { .type = NLA_FLAG }, + [NL80211_WOWLAN_TRIG_NET_DETECT] = { .type = NLA_U32 }, [NL80211_WOWLAN_TRIG_TCP_CONNECTION] = { .type = NLA_NESTED }, }; struct nl80211_pattern_support *pat; @@ -494,7 +494,8 @@ broken_combination: if (tb_wowlan[NL80211_WOWLAN_TRIG_RFKILL_RELEASE]) printf("\t\t * wake up on rfkill release\n"); if (tb_wowlan[NL80211_WOWLAN_TRIG_NET_DETECT]) - printf("\t\t * wake up on network detection\n"); + printf("\t\t * wake up on network detection, up to %d match sets\n", + nla_get_u32(tb_wowlan[NL80211_WOWLAN_TRIG_NET_DETECT])); if (tb_wowlan[NL80211_WOWLAN_TRIG_TCP_CONNECTION]) printf("\t\t * wake up on TCP connection\n"); }