All of lore.kernel.org
 help / color / mirror / Atom feed
From: Denis Kenzior <denkenz@gmail.com>
To: iwd@lists.01.org
Subject: Re: [PATCH 2/2] wsc: Check capability before adding .SimpleConfiguration interface
Date: Wed, 06 Nov 2019 17:03:10 -0600	[thread overview]
Message-ID: <15d8091a-82ef-d926-3325-760666b0a04e@gmail.com> (raw)
In-Reply-To: <20191106221624.12072-2-tim.a.kourt@linux.intel.com>

[-- Attachment #1: Type: text/plain, Size: 1003 bytes --]

Hi Tim,

> +bool wiphy_is_scan_ie_supported(struct wiphy *wiphy)
> +{
> +	return wiphy->max_scan_ie_len ? true : false;
> +}
> +

Lets not go overboard adding APIs to wiphy.c now..  You already have 
something that can accomplish the job, so just use that.

<snip>

> diff --git a/src/wsc.c b/src/wsc.c
> index bac6e0cc..ed211834 100644
> --- a/src/wsc.c
> +++ b/src/wsc.c
> @@ -1108,6 +1108,13 @@ static void wsc_add_interface(struct netdev *netdev)
>   	struct l_dbus *dbus = dbus_get_bus();
>   	struct wsc *wsc;
>   
> +	if (!wiphy_is_scan_ie_supported(netdev_get_wiphy(netdev))) {
> +		l_info("Simple Configuration isn't supported by ifindex %u",
> +						netdev_get_ifindex(netdev));
> +
> +		return;
> +	}

I don't like the l_info here.  This will get printed way too many times 
due to ifup/ifdown.  Perhaps we need to add an L_WARN_ONCE or do this 
statically here.

> +
>   	wsc = l_new(struct wsc, 1);
>   	wsc->netdev = netdev;
>   
> 

Regards,
-Denis

  reply	other threads:[~2019-11-06 23:03 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-06 22:16 [PATCH 1/2] wiphy: Add parser and getter for max ie len attr Tim Kourt
2019-11-06 22:16 ` [PATCH 2/2] wsc: Check capability before adding .SimpleConfiguration interface Tim Kourt
2019-11-06 23:03   ` Denis Kenzior [this message]
2019-11-06 23:00 ` [PATCH 1/2] wiphy: Add parser and getter for max ie len attr Denis Kenzior

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=15d8091a-82ef-d926-3325-760666b0a04e@gmail.com \
    --to=denkenz@gmail.com \
    --cc=iwd@lists.01.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.