linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Fabio Rossi <rossi.f@inwind.it>
To: Holger Schurig <hs4233@mail.mn-solutions.de>
Cc: "Bob Copeland" <me@bobcopeland.com>,
	linux-wireless@vger.kernel.org,
	Johannes Berg <johannes@sipsolutions.net>
Subject: Re: ath5k: problems during the connection to a sitecom AP
Date: Tue, 25 Nov 2008 01:08:50 +0100	[thread overview]
Message-ID: <200811250108.50527.rossi.f@inwind.it> (raw)
In-Reply-To: <200811240931.24447.hs4233@mail.mn-solutions.de>

On Monday 24 November 2008, Holger Schurig wrote:

> > When I do a scan after having loaded the driver, the iwlist
> > can't report the SSID because it's hidden. I don't know if
> > this is a problem but I have noticed that the reported SSIDs
> > of the two APs are a little bit different. With the 3com AP
> > (the working one) I get ESSID:" " (1 char blank string) while
> > with the Sitecom AP ESSID:"" (0 chars empty string).
>
> Okay, that could very well be the problem.

Ok, I think I have found because the association request doesn't take place. 
In mlme.c there is the function ieee80211_sta_match_ssid(). My AP is 
broadcasting a fake SSID string '\0' with length 0. The function returns 0 
instead of 1.

I don't understand the meaning of the following code:

    hidden_ssid = 1;
    tmp = ssid_len;
    while (tmp--) {
        if (ssid[tmp] != '\0') {
            hidden_ssid = 0;
            break;
        }
    }

    if (hidden_ssid && ifsta->ssid_len == ssid_len)
        return 1;

    if (ssid_len == 1 && ssid[0] == ' ')
        return 1;

Of course hidden_ssid stays 1: why do I have to verify that the two lengths 
are equal? Conversely hidden_ssid goes 0 also when it's really hidden (e.g.
SSID ' ').

The code treats the strings ' ' as a jolly (independently of hidden_sid), why 
isn't the same for the empty string ''?

I have applied the following patch, now I'm able to associate.

--- mlme.c.orig 2008-11-25 00:39:00.000000000 +0100
+++ mlme.c      2008-11-25 00:40:03.000000000 +0100
@@ -2029,6 +2029,9 @@ static int ieee80211_sta_match_ssid(stru
        if (ssid_len == 1 && ssid[0] == ' ')
                return 1;

+       if (ssid_len == 0 && ssid[0] == '\0')
+               return 1;
+
        return 0;
 }

Regards,
Fabio

  reply	other threads:[~2008-11-25  0:18 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-11-15  1:07 ath5k: problems during the connection to a sitecom AP Fabio Rossi
2008-11-17 20:20 ` Fabio Rossi
2008-11-17 20:23   ` Johannes Berg
2008-11-19 21:00     ` Fabio Rossi
2008-11-20  6:40       ` Johannes Berg
2008-11-18 15:48   ` Bob Copeland
2008-11-19 22:15     ` Fabio Rossi
2008-11-21 20:22       ` Bob Copeland
2008-11-22 16:33         ` Fabio Rossi
2008-11-24  8:31           ` Holger Schurig
2008-11-25  0:08             ` Fabio Rossi [this message]
2008-11-24  8:25         ` Holger Schurig
  -- strict thread matches above, loose matches on Subject: below --
2008-11-24  9:35 rossi.f

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=200811250108.50527.rossi.f@inwind.it \
    --to=rossi.f@inwind.it \
    --cc=hs4233@mail.mn-solutions.de \
    --cc=johannes@sipsolutions.net \
    --cc=linux-wireless@vger.kernel.org \
    --cc=me@bobcopeland.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).