From: Bob Copeland <me@bobcopeland.com>
To: Johannes Berg <johannes@sipsolutions.net>
Cc: kalle.valo@nokia.com, linux-wireless@vger.kernel.org
Subject: [PATCH v2] wl12xx: update to 2.6.29 mac80211 hw scan API
Date: Tue, 21 Apr 2009 23:38:45 -0400 [thread overview]
Message-ID: <20090422033845.GA8849@hash.localnet> (raw)
In-Reply-To: <20090405143357.GA21913@hash.localnet>
The ops->hw_scan callback now takes a struct *cfg80211_scan_request,
and the scan_completed notifier takes a parameter to indicate whether
the scan was aborted.
Signed-off-by: Bob Copeland <me@bobcopeland.com>
---
Kalle, this is just an update to 1/6, the others in the series are
probably ok as-is.
v2: just added the max_scan_ssids.
drivers/net/wireless/wl12xx/event.c | 2 +-
drivers/net/wireless/wl12xx/main.c | 15 ++++++++++++---
2 files changed, 13 insertions(+), 4 deletions(-)
diff --git a/drivers/net/wireless/wl12xx/event.c b/drivers/net/wireless/wl12xx/event.c
index 5c3b22b..7095772 100644
--- a/drivers/net/wireless/wl12xx/event.c
+++ b/drivers/net/wireless/wl12xx/event.c
@@ -37,7 +37,7 @@ static int wl12xx_event_scan_complete(struct wl12xx *wl,
if (wl->scanning) {
mutex_unlock(&wl->mutex);
- ieee80211_scan_completed(wl->hw);
+ ieee80211_scan_completed(wl->hw, false);
mutex_lock(&wl->mutex);
wl->scanning = false;
}
diff --git a/drivers/net/wireless/wl12xx/main.c b/drivers/net/wireless/wl12xx/main.c
index 7c4e538..e4d1e12 100644
--- a/drivers/net/wireless/wl12xx/main.c
+++ b/drivers/net/wireless/wl12xx/main.c
@@ -511,7 +511,7 @@ static void wl12xx_op_stop(struct ieee80211_hw *hw)
if (wl->scanning) {
mutex_unlock(&wl->mutex);
- ieee80211_scan_completed(wl->hw);
+ ieee80211_scan_completed(wl->hw, true);
mutex_lock(&wl->mutex);
wl->scanning = false;
}
@@ -1092,15 +1092,23 @@ out:
}
-static int wl12xx_op_hw_scan(struct ieee80211_hw *hw, u8 *ssid, size_t len)
+static int wl12xx_op_hw_scan(struct ieee80211_hw *hw,
+ struct cfg80211_scan_request *req)
{
struct wl12xx *wl = hw->priv;
int ret;
+ u8 *ssid = NULL;
+ size_t ssid_len = 0;
wl12xx_debug(DEBUG_MAC80211, "mac80211 hw scan");
+ if (req->n_ssids) {
+ ssid = req->ssids[0].ssid;
+ ssid_len = req->ssids[0].ssid_len;
+ }
+
mutex_lock(&wl->mutex);
- ret = wl12xx_hw_scan(hw->priv, ssid, len, 1, 0, 13, 3);
+ ret = wl12xx_hw_scan(hw->priv, ssid, ssid_len, 1, 0, 13, 3);
mutex_unlock(&wl->mutex);
return ret;
@@ -1237,6 +1245,7 @@ static int wl12xx_init_ieee80211(struct wl12xx *wl)
wl->hw->flags = IEEE80211_HW_SIGNAL_DBM |
IEEE80211_HW_NOISE_DBM;
+ wl->hw->wiphy->max_scan_ssids = 1;
wl->hw->wiphy->bands[IEEE80211_BAND_2GHZ] = &wl12xx_band_2ghz;
SET_IEEE80211_DEV(wl->hw, &wl->spi->dev);
--
1.6.0.6
next prev parent reply other threads:[~2009-04-22 3:41 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-04-05 2:10 [PATCH 0/6] wl12xx updates Bob Copeland
2009-04-05 2:10 ` [PATCH 1/6] wl12xx: update to 2.6.29 mac80211 hw scan API Bob Copeland
2009-04-05 8:58 ` Johannes Berg
2009-04-05 14:33 ` Bob Copeland
2009-04-22 3:38 ` Bob Copeland [this message]
2009-04-22 19:57 ` [PATCH v2] " Kalle Valo
2009-04-22 19:45 ` [PATCH 1/6] " Kalle Valo
2009-04-05 2:10 ` [PATCH 2/6] wl12xx: remove ssid parameters from driver private struct Bob Copeland
2009-04-22 19:46 ` Kalle Valo
2009-04-05 2:10 ` [PATCH 3/6] wl12xx: separate platform data into arch-independent code Bob Copeland
2009-04-22 19:51 ` Kalle Valo
2009-04-05 2:10 ` [PATCH 4/6] wl12xx: update tx API usage Bob Copeland
2009-04-22 19:52 ` Kalle Valo
2009-04-05 2:10 ` [PATCH 5/6] wl12xx: update config callback parameters Bob Copeland
2009-04-22 19:53 ` Kalle Valo
2009-04-05 2:10 ` [PATCH 6/6] wl12xx: update set_key callback to match current API Bob Copeland
2009-04-22 19:53 ` Kalle Valo
2009-04-22 19:45 ` [PATCH 0/6] wl12xx updates Kalle Valo
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=20090422033845.GA8849@hash.localnet \
--to=me@bobcopeland.com \
--cc=johannes@sipsolutions.net \
--cc=kalle.valo@nokia.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).