Linux wireless drivers development
 help / color / mirror / Atom feed
From: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
To: Johannes Berg <johannes@sipsolutions.net>,
	Jouni Malinen <jouni@qca.qualcomm.com>
Cc: <linux-wireless@vger.kernel.org>,
	"Luis R . Rodriguez" <rodrigue@qca.qualcomm.com>,
	"John W . Linville" <linville@tuxdriver.com>,
	Arend van Spriel <arend@broadcom.com>,
	Ilan Peer <ilan.peer@intel.com>
Subject: Re: [PATCH v13 2/2] cfg80211: P2P find phase offload
Date: Tue, 9 Jul 2013 19:04:54 +0300	[thread overview]
Message-ID: <1798954.bErCmKeDh5@lx-vladimir> (raw)
In-Reply-To: <1373383341.8241.8.camel@jlt4.sipsolutions.net>

On Tuesday, July 09, 2013 05:22:21 PM Johannes Berg wrote:
> 
> A few nits, since you're going to have to resend anyway (this patch is
> also line-wrapped)
> 
> 
> > NL80211_FEATURE_P2P_PROBE_RESP_OFFLOAD
> 
> Is that actually needed at all? Now that we have the "replied" flag in
> the first patch, it seems like this wouldn't be used at all?

I was thinking about it; and argument to keep this flag is:
It is hint for wpa_s, indicating that it may be that frame was answered by
card and not reported. Imagine card that answer everything in firmware and
don't report any probes at all. Without this hint, wpa_s may mis-interpret
this as complete silence.

But, to be honest, I am not absolutely sure it is required. If Jouni say he
don't need this indication, I'll remove it.

Jouni: could you please comment?

> 
> >  			CMD(crit_proto_stop, CRIT_PROTOCOL_STOP);
> > +			CMD(start_p2p_find, START_P2P_FIND);
> > +			CMD(stop_p2p_find, STOP_P2P_FIND);
> 
> That'll probably have to be changed when mac80211 supports this, but we
> don't have to worry about it right now.
> 
> > +}
> > +static int nl80211_start_p2p_find(struct sk_buff *skb, struct genl_info 
> > *info)
> 
> There should be a blank line between the two functions

:) checkpatch was silent about it

> 
> > +	params.channels = kzalloc(n_channels * sizeof(*params.channels),
> > +				  GFP_KERNEL);
> 
> kcalloc? Probably doesn't matter much though.
Good point. Why not?

> 
> > +	attr = info->attrs[NL80211_ATTR_MIN_DISCOVERABLE_INTERVAL];
> > +	if (attr)
> > +		params.min_discoverable_interval = nla_get_u32(attr);
> > +
> > +	attr = info->attrs[NL80211_ATTR_MAX_DISCOVERABLE_INTERVAL];
> > +	if (attr)
> > +		params.max_discoverable_interval = nla_get_u32(attr);
> 
> No validation at all? What if I pass 7/3 for min/max (yes, in that
> order)?
Yes, need to validate all data from user space.
> 
> johannes
> 

      reply	other threads:[~2013-07-09 16:04 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-27 11:17 [PATCH v13 0/2] P2P find phase offload Vladimir Kondratiev
2013-06-27 11:17 ` [PATCH v13 1/2] cfg80211: add 'flags' to cfg80211_rx_mgmt() Vladimir Kondratiev
2013-06-27 11:17 ` [PATCH v13 2/2] cfg80211: P2P find phase offload Vladimir Kondratiev
2013-07-03 14:37 ` [PATCH v13 1/2] cfg80211: add 'flags' to cfg80211_rx_mgmt() Vladimir Kondratiev
2013-07-09 15:15   ` Johannes Berg
2013-07-09 15:41     ` Vladimir Kondratiev
2013-07-03 14:37 ` [PATCH v13 2/2] cfg80211: P2P find phase offload Vladimir Kondratiev
2013-07-09 15:22   ` Johannes Berg
2013-07-09 16:04     ` Vladimir Kondratiev [this message]

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=1798954.bErCmKeDh5@lx-vladimir \
    --to=qca_vkondrat@qca.qualcomm.com \
    --cc=arend@broadcom.com \
    --cc=ilan.peer@intel.com \
    --cc=johannes@sipsolutions.net \
    --cc=jouni@qca.qualcomm.com \
    --cc=linux-wireless@vger.kernel.org \
    --cc=linville@tuxdriver.com \
    --cc=rodrigue@qca.qualcomm.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox