summaryrefslogtreecommitdiff
path: root/drivers/net/wireless/orinoco/cfg.c
diff options
context:
space:
mode:
authorDavid Kilroy <kilroyd@googlemail.com>2009-06-18 23:21:33 +0100
committerJohn W. Linville <linville@tuxdriver.com>2009-07-10 15:01:46 -0400
commitc63cdbe8f80487c372fe0dfe460ed30467029f01 (patch)
treea981d5b052fc74b5f894775353a3e6e96591a1c7 /drivers/net/wireless/orinoco/cfg.c
parent5217c571c898371c540e49671600d54346b2e123 (diff)
downloadlinux-c63cdbe8f80487c372fe0dfe460ed30467029f01.tar.gz
orinoco: convert scanning to cfg80211
This removes the custom scan cache used by orinoco. We also have to avoid calling cfg80211_scan_done from the hard interrupt, so we offload the entirety of scan processing to a workqueue. This may behave strangely if you start scanning just prior to suspending... Signed-off-by: David Kilroy <kilroyd@googlemail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/orinoco/cfg.c')
-rw-r--r--drivers/net/wireless/orinoco/cfg.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/drivers/net/wireless/orinoco/cfg.c b/drivers/net/wireless/orinoco/cfg.c
index 9e59d90b32e4..1a87d3a0967c 100644
--- a/drivers/net/wireless/orinoco/cfg.c
+++ b/drivers/net/wireless/orinoco/cfg.c
@@ -137,6 +137,26 @@ static int orinoco_change_vif(struct wiphy *wiphy, struct net_device *dev,
return err;
}
+static int orinoco_scan(struct wiphy *wiphy, struct net_device *dev,
+ struct cfg80211_scan_request *request)
+{
+ struct orinoco_private *priv = wiphy_priv(wiphy);
+ int err;
+
+ if (!request)
+ return -EINVAL;
+
+ if (priv->scan_request && priv->scan_request != request)
+ return -EBUSY;
+
+ priv->scan_request = request;
+
+ err = orinoco_hw_trigger_scan(priv, request->ssids);
+
+ return err;
+}
+
const struct cfg80211_ops orinoco_cfg_ops = {
.change_virtual_intf = orinoco_change_vif,
+ .scan = orinoco_scan,
};