From: Eliad Peller <eliad@wizery.com>
To: Luciano Coelho <coelho@ti.com>
Cc: <linux-wireless@vger.kernel.org>
Subject: [PATCH 1/4] wl12xx: don't fail on AP scan
Date: Thu, 2 Feb 2012 13:54:26 +0200 [thread overview]
Message-ID: <1328183669-21059-2-git-send-email-eliad@wizery.com> (raw)
In-Reply-To: <1328183669-21059-1-git-send-email-eliad@wizery.com>
AP role uses its own role_id for scans, so there's
no reason to fail the scan if dev_role_id is invalid.
Signed-off-by: Eliad Peller <eliad@wizery.com>
---
drivers/net/wireless/wl12xx/scan.c | 13 +++++++------
1 files changed, 7 insertions(+), 6 deletions(-)
diff --git a/drivers/net/wireless/wl12xx/scan.c b/drivers/net/wireless/wl12xx/scan.c
index 848a165..e3566ca 100644
--- a/drivers/net/wireless/wl12xx/scan.c
+++ b/drivers/net/wireless/wl12xx/scan.c
@@ -175,16 +175,17 @@ static int wl1271_scan_send(struct wl1271 *wl, struct ieee80211_vif *vif,
if (passive)
scan_options |= WL1271_SCAN_OPT_PASSIVE;
- if (WARN_ON(wlvif->role_id == WL12XX_INVALID_ROLE_ID ||
- wlvif->dev_role_id == WL12XX_INVALID_ROLE_ID)) {
- ret = -EINVAL;
- goto out;
- }
- if (test_bit(WLVIF_FLAG_STA_ASSOCIATED, &wlvif->flags))
+ if (wlvif->bss_type == BSS_TYPE_AP_BSS ||
+ test_bit(WLVIF_FLAG_STA_ASSOCIATED, &wlvif->flags))
cmd->params.role_id = wlvif->role_id;
else
cmd->params.role_id = wlvif->dev_role_id;
+ if (WARN_ON(cmd->params.role_id == WL12XX_INVALID_ROLE_ID)) {
+ ret = -EINVAL;
+ goto out;
+ }
+
cmd->params.scan_options = cpu_to_le16(scan_options);
cmd->params.n_ch = wl1271_get_scan_channels(wl, wl->scan.req,
--
1.7.6.401.g6a319
next prev parent reply other threads:[~2012-02-02 11:51 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-02-02 11:54 [PATCH 0/4] wl12xx: some scan patches Eliad Peller
2012-02-02 11:54 ` Eliad Peller [this message]
2012-02-02 11:54 ` [PATCH 2/4] wl12xx: increase max probe-req template size to WL1271_CMD_TEMPL_MAX_SIZE Eliad Peller
2012-02-02 11:54 ` [PATCH 3/4] wl12xx: use split scan for normal scan Eliad Peller
2012-02-02 11:54 ` [PATCH 4/4] wl12xx: add split_scan_timeout debugfs file Eliad Peller
2012-02-15 10:21 ` [PATCH 0/4] wl12xx: some scan patches Luciano Coelho
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=1328183669-21059-2-git-send-email-eliad@wizery.com \
--to=eliad@wizery.com \
--cc=coelho@ti.com \
--cc=linux-wireless@vger.kernel.org \
/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).