diff options
author | Dan Williams <dcbw@redhat.com> | 2010-07-30 02:11:30 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2010-08-05 16:03:40 -0400 |
commit | aebb628f39ccf67fe9ed888c7f80926fc1070ce5 (patch) | |
tree | 7857d5b2c207acf31064f61e498279615120e618 /drivers | |
parent | c0068c85897f06205d4c35cf4bf9161be90690e9 (diff) |
libertas: get the right # of scanned BSSes
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>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | 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 25f902760980..b60f66115061 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, | |||
465 | lbs_deb_enter(LBS_DEB_CFG80211); | 465 | lbs_deb_enter(LBS_DEB_CFG80211); |
466 | 466 | ||
467 | bsssize = get_unaligned_le16(&scanresp->bssdescriptsize); | 467 | bsssize = get_unaligned_le16(&scanresp->bssdescriptsize); |
468 | nr_sets = le16_to_cpu(resp->size); | 468 | nr_sets = le16_to_cpu(scanresp->nr_sets); |
469 | |||
470 | lbs_deb_scan("scan response: %d BSSs (%d bytes); resp size %d bytes\n", | ||
471 | nr_sets, bsssize, le16_to_cpu(resp->size)); | ||
472 | |||
473 | if (nr_sets == 0) { | ||
474 | ret = 0; | ||
475 | goto done; | ||
476 | } | ||
469 | 477 | ||
470 | /* | 478 | /* |
471 | * The general layout of the scan response is described in chapter | 479 | * The general layout of the scan response is described in chapter |