Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit aebb628f authored by Dan Williams's avatar Dan Williams Committed by John W. Linville
Browse files

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: default avatarDan Williams <dcbw@redhat.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent c0068c85
Loading
Loading
Loading
Loading
+9 −1
Original line number Diff line number Diff line
@@ -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