All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dan Williams <dcbw@redhat.com>
To: "John W. Linville" <linville@tuxdriver.com>
Cc: linux-wireless@vger.kernel.org
Subject: [wt PATCH 1/5] libertas: get the right # of scanned BSSes
Date: Thu, 29 Jul 2010 23:11:30 -0700	[thread overview]
Message-ID: <1280470290.14523.7.camel@dcbw.foobar.com> (raw)
In-Reply-To: <1280470034.14523.4.camel@dcbw.foobar.com>

Let's actually check the right field in the command response; and
if there aren't any reported BSSes, exit early with success.

Signed-off-by: Dan Williams <dcbw@redhat.com>
---
 drivers/net/wireless/libertas/cfg.c |   10 +++++++++-
 1 files changed, 9 insertions(+), 1 deletions(-)

diff --git a/drivers/net/wireless/libertas/cfg.c b/drivers/net/wireless/libertas/cfg.c
index 25f9027..b60f661 100644
--- a/drivers/net/wireless/libertas/cfg.c
+++ b/drivers/net/wireless/libertas/cfg.c
@@ -465,7 +465,15 @@ static int lbs_ret_scan(struct lbs_private *priv, unsigned long dummy,
 	lbs_deb_enter(LBS_DEB_CFG80211);
 
 	bsssize = get_unaligned_le16(&scanresp->bssdescriptsize);
-	nr_sets = le16_to_cpu(resp->size);
+	nr_sets = le16_to_cpu(scanresp->nr_sets);
+
+	lbs_deb_scan("scan response: %d BSSs (%d bytes); resp size %d bytes\n",
+			nr_sets, bsssize, le16_to_cpu(resp->size));
+
+	if (nr_sets == 0) {
+		ret = 0;
+		goto done;
+	}
 
 	/*
 	 * The general layout of the scan response is described in chapter
-- 
1.7.2



  reply	other threads:[~2010-07-30  4:10 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-07-30  6:07 [wt PATCH 0/5] libertas: make association work again Dan Williams
2010-07-30  6:11 ` Dan Williams [this message]
2010-07-30  6:12 ` [wt PATCH 2/5] libertas: better scan response debugging Dan Williams
2010-07-30  6:14 ` [wt PATCH 3/5] libertas: better association request debugging Dan Williams
2010-07-30  6:16 ` [wt PATCH 4/5] libertas: fix association with some APs by using extended rates Dan Williams
2010-07-30  6:18 ` [wt PATCH 5/5] libertas: scan before assocation if no BSSID was given Dan Williams
2010-07-30  6:37   ` Johannes Berg
2010-08-04  5:43   ` [wt PATCH 5/5 v2] " Dan Williams
2010-07-30  6:35 ` [wt PATCH 0/5] libertas: make association work again Johannes Berg
2010-07-31 13:54   ` Holger Schurig
2010-08-04  5:41   ` Dan Williams
2010-08-04  7:46     ` Johannes Berg
2010-08-04 19:15       ` Dan Williams
2010-08-04 19:34         ` John W. Linville
2010-08-05 17:27           ` Dan Williams

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=1280470290.14523.7.camel@dcbw.foobar.com \
    --to=dcbw@redhat.com \
    --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 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.