linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Helmut Schaa <hschaa@suse.de>
To: "John W. Linville" <linville@tuxdriver.com>
Cc: linux-wireless@vger.kernel.org, dana.r.ferguson@intel.com,
	dcbw@redhat.com, ipw3945-devel@lists.sourceforge.net,
	Bill Moss <bmoss@clemson.edu>,
	Abhijeet Kolekar <abhijeet.kolekar@intel.com>
Subject: Re: [PATCH] [PATCH] mac80211: honor IW_SCAN_THIS_ESSID in siwscan ioctl
Date: Fri, 12 Oct 2007 15:25:24 +0200	[thread overview]
Message-ID: <200710121525.25574.hschaa@suse.de> (raw)
In-Reply-To: <1192048496718-git-send-email-linville@tuxdriver.com>

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

Hi,

Am Mittwoch, 10. Oktober 2007 22:34:56 schrieb John W. Linville:
> This patch fixes the problem of associating with wpa_secured hidden
> AP.  Please try out.

The patch did not fix the issue for _some_ APs I have here but it is 
apparently correct.

I was able to track the issue further down to the probe-request iwlwifi sends 
to connect to a hidden AP (hw_scan is enabled). Attached is a quick hack 
against iwlwifi-1.1.0 which made hidden AP working for me (using hw_scan).

The patch is only ment as a hint, not as a real fix!

The problem seemed to be in the info element "supported rates". The 
probe-request mac80211 would generate does only attach eight supported rates 
to this info element, the rest goes to "extended supported rates".

Instead iwlwifi puts _all_ (more then eight) rates into "supported rates" and 
omits "extended supported rates". As "supported rates" is specified in 
802.11b there should only be 802.11b rates (this is an assumption as I do not 
have the 802.11 specs here). This is exactly what my patch does: limit the 
number of supported rates to eight.

Can somebody please verify if I'm right?

Btw iwlwifi generates the probe-request itself _only_ if hw_scan is enabled. 
If hw_scan is disabled mac80211 generates the probe-request (which then 
should be correct) but the request gets somehow corrupted.

Thanks,
Helmut

[-- Attachment #2: fix_probe_request.diff --]
[-- Type: text/x-diff, Size: 930 bytes --]

diff -ur iwlwifi-1.1.0/origin/iwl-base.c iwlwifi-1.1.0_1/origin/iwl-base.c
--- origin/iwl-base.c	2007-09-19 11:11:16.000000000 +0200
+++ origin/iwl-base.c	2007-10-12 13:46:23.000000000 +0200
@@ -1877,6 +1877,7 @@
 	int len = 0;
 	u8 *pos = NULL;
 	u16 ret_rates;
+	int rate_count = 0;
 
 	/* Make sure there is enough space for the probe request,
 	 * two mandatory IEs and the data */
@@ -1924,11 +1925,16 @@
 	/* ... fill it in... */
 	*pos++ = WLAN_EID_SUPP_RATES;
 	*pos = 0;
+
+	rate_count = 8;
+	if (left < 8)
+		rate_count = left;
+
 	ret_rates = priv->active_rate = priv->rates_mask;
 	priv->active_rate_basic = priv->rates_mask & IWL_BASIC_RATES_MASK;
 
 	iwl_supported_rate_to_ie(pos, priv->active_rate,
-				 priv->active_rate_basic, left);
+				 priv->active_rate_basic, rate_count);
 	len += 2 + *pos;
 	pos += (*pos) + 1;
 	ret_rates = ~ret_rates & priv->active_rate;
Nur in iwlwifi-1.1.0_1/origin: iwl-base.c.orig.

  reply	other threads:[~2007-10-12 13:23 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-10-10 20:34 [PATCH] [PATCH] mac80211: honor IW_SCAN_THIS_ESSID in siwscan ioctl John W. Linville
2007-10-12 13:25 ` Helmut Schaa [this message]
2007-10-15  9:20   ` [ipw3945-devel] [PATCH] [PATCH] mac80211: honorIW_SCAN_THIS_ESSID " Winkler, Tomas

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=200710121525.25574.hschaa@suse.de \
    --to=hschaa@suse.de \
    --cc=abhijeet.kolekar@intel.com \
    --cc=bmoss@clemson.edu \
    --cc=dana.r.ferguson@intel.com \
    --cc=dcbw@redhat.com \
    --cc=ipw3945-devel@lists.sourceforge.net \
    --cc=linux-wireless@vger.kernel.org \
    --cc=linville@tuxdriver.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;
as well as URLs for NNTP newsgroup(s).