Search Linux Wireless

Re: [PATCH iw v2 2/2] add WoWLAN net-detect trigger

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, 2014-11-28 at 10:19 +0200, Luca Coelho wrote:
> From: Luciano Coelho <luciano.coelho@xxxxxxxxx>
> 
> Adds a netdetect option to the wowlan triggers that allows the user to
> request network detection to be started when the device goes to
> suspend mode.
> 
> Signed-off-by: Luciano Coelho <luciano.coelho@xxxxxxxxx>
> ---
> 
> In v2:
> 
>    * renamed the option in the code from "match" to "matches" (the
>      help already used the plural form).
> ---
>  event.c  |  30 ++++++++++-
>  info.c   |   3 ++
>  wowlan.c | 177 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++-
>  3 files changed, 207 insertions(+), 3 deletions(-)
> 
> diff --git a/event.c b/event.c
> index 25f8099..99f9f15 100644
> --- a/event.c
> +++ b/event.c
> @@ -200,7 +200,8 @@ static void parse_mic_failure(struct nlattr **attrs)
>  
>  static void parse_wowlan_wake_event(struct nlattr **attrs)
>  {
> -	struct nlattr *tb[NUM_NL80211_WOWLAN_TRIG];
> +	struct nlattr *tb[NUM_NL80211_WOWLAN_TRIG],
> +		*tb_match[NUM_NL80211_ATTR];
>  
>  	printf("WoWLAN wakeup\n");
>  	if (!attrs[NL80211_ATTR_WOWLAN_TRIGGERS]) {
> @@ -227,6 +228,33 @@ static void parse_wowlan_wake_event(struct nlattr **attrs)
>  		printf("\t* 4-way handshake\n");
>  	if (tb[NL80211_WOWLAN_TRIG_RFKILL_RELEASE])
>  		printf("\t* RF-kill released\n");
> +	if (tb[NL80211_WOWLAN_TRIG_NET_DETECT_RESULTS]) {
> +		struct nlattr *match, *freq;
> +		int rem_nst, rem_nst2;
> +
> +		printf("\t* network detected\n");
> +		nla_for_each_nested(match,
> +				    tb[NL80211_WOWLAN_TRIG_NET_DETECT_RESULTS],
> +				    rem_nst) {
> +			nla_parse(tb_match, NUM_NL80211_ATTR, nla_data(match),
> +				  nla_len(match),
> +				  NULL);
> +			printf("\t\tSSID: \"");
> +			/* printf("len %d %p\n", nla_len(tb_match[NL80211_ATTR_SSID]), */
> +			/*        nla_data(tb_match[NL80211_ATTR_SSID])); */

Argh, this shouldn't be here... I'll respin.

--
Luca.

--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Wireless Personal Area Network]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux