linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Kalle Valo <kvalo@qca.qualcomm.com>
To: Aarthi Thiruvengadam <athiruve@qca.qualcomm.com>
Cc: <ath6kl-devel@qualcomm.com>, <linux-wireless@vger.kernel.org>
Subject: Re: [PATCH v2] ath6kl: handle probe response from P2P device in P2P GO mode
Date: Tue, 20 Mar 2012 10:39:35 +0200	[thread overview]
Message-ID: <4F684247.6070800@qca.qualcomm.com> (raw)
In-Reply-To: <1331847296-2086-1-git-send-email-aarthi.thiruvengadam@qca.qualcomm.com>

On 03/15/2012 11:34 PM, Aarthi Thiruvengadam wrote:
> When the device is in P2P GO mode and in listen state, the correct behavior is
> to see two different probe response frames - one from P2P device and the other
> from GO. wpa_supplicant uses the same mechanism to send the frame in both cases
> (ath6kl_mgmt_tx). For GO probe response, ath6kl needs to call
> ath6kl_send_go_probe_resp (this will add only WSC/P2P IEs and the rest of the
> IEs are filled in by the firmware). That was done based on the nw_type ==
> AP_NETWORK which would work if P2P Device role were in a separate netdev. When
> P2P Device and GO use the same netdev, ath6kl needs to use the special GO probe
> response case only if SSID is longer than P2P wildcard SSID.
> 
> Signed-off-by: Aarthi Thiruvengadam <athiruve@qca.qualcomm.com>
> Reviewed-by: Jouni Malinen <jouni@qca.qualcomm.com>

Thanks, applied.

But I still have one question:

> +/* Check if SSID length is greater than DIRECT- */
> +static bool ath6kl_is_p2p_go_ssid(const u8 *buf, size_t len)
> +{
> +	const struct ieee80211_mgmt *mgmt;
> +	mgmt = (const struct ieee80211_mgmt *) buf;
> +
> +	/* variable[1] contains the SSID tag length */
> +	if (buf + len >= &mgmt->u.probe_resp.variable[1] &&
> +	    (mgmt->u.probe_resp.variable[1] > P2P_WILDCARD_SSID_LEN)) {
> +		return true;

How do you know that it's SSID without checking the IE id from
variable[0]? Is that guaranteed or something?

Kalle

  reply	other threads:[~2012-03-20  8:39 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-15 21:34 [PATCH v2] ath6kl: handle probe response from P2P device in P2P GO mode Aarthi Thiruvengadam
2012-03-20  8:39 ` Kalle Valo [this message]
2012-03-20 15:12   ` Malinen, Jouni
2012-03-20 15:54   ` Thiruvengadam, Aarthi
2012-03-20 15:56     ` Kalle Valo

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=4F684247.6070800@qca.qualcomm.com \
    --to=kvalo@qca.qualcomm.com \
    --cc=ath6kl-devel@qualcomm.com \
    --cc=athiruve@qca.qualcomm.com \
    --cc=linux-wireless@vger.kernel.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 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).