From: Luciano Coelho Date: Tue, 13 Jan 2015 14:19:15 +0000 (+0200) Subject: Read number of supported net-detect matches X-Git-Tag: v4.0~5 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4888e6baeeecee786a81259e6ab327740215a7f0;p=thirdparty%2Fiw.git Read number of supported net-detect matches 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 Signed-off-by: Johannes Berg --- 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"); }