linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH iw] Read number of supported net-detect matches
@ 2015-01-13 14:19 Luca Coelho
  2015-01-14  8:56 ` Johannes Berg
  0 siblings, 1 reply; 2+ messages in thread
From: Luca Coelho @ 2015-01-13 14:19 UTC (permalink / raw)
  To: johannes; +Cc: linux-wireless

From: Luciano Coelho <luciano.coelho@intel.com>

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 <luciano.coelho@intel.com>
---
 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");
 		}
-- 
2.1.4


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

* Re: [PATCH iw] Read number of supported net-detect matches
  2015-01-13 14:19 [PATCH iw] Read number of supported net-detect matches Luca Coelho
@ 2015-01-14  8:56 ` Johannes Berg
  0 siblings, 0 replies; 2+ messages in thread
From: Johannes Berg @ 2015-01-14  8:56 UTC (permalink / raw)
  To: Luca Coelho; +Cc: linux-wireless

On Tue, 2015-01-13 at 16:19 +0200, Luca Coelho wrote:
> From: Luciano Coelho <luciano.coelho@intel.com>
> 
> Instead of just printing whether netdetect is supported, parse the
> attribute and report the maximum number of matchsets the driver
> supports.

Applied, thanks.

johannes


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

end of thread, other threads:[~2015-01-14  8:56 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-01-13 14:19 [PATCH iw] Read number of supported net-detect matches Luca Coelho
2015-01-14  8:56 ` Johannes Berg

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).