aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/orinoco/cfg.c
diff options
context:
space:
mode:
authorDavid Kilroy <kilroyd@googlemail.com>2009-06-18 18:21:33 -0400
committerJohn W. Linville <linville@tuxdriver.com>2009-07-10 15:01:46 -0400
commitc63cdbe8f80487c372fe0dfe460ed30467029f01 (patch)
treea981d5b052fc74b5f894775353a3e6e96591a1c7 /drivers/net/wireless/orinoco/cfg.c
parent5217c571c898371c540e49671600d54346b2e123 (diff)
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,
137 return err; 137 return err;
138} 138}
139 139
140static int orinoco_scan(struct wiphy *wiphy, struct net_device *dev,
141 struct cfg80211_scan_request *request)
142{
143 struct orinoco_private *priv = wiphy_priv(wiphy);
144 int err;
145
146 if (!request)
147 return -EINVAL;
148
149 if (priv->scan_request && priv->scan_request != request)
150 return -EBUSY;
151
152 priv->scan_request = request;
153
154 err = orinoco_hw_trigger_scan(priv, request->ssids);
155
156 return err;
157}
158
140const struct cfg80211_ops orinoco_cfg_ops = { 159const struct cfg80211_ops orinoco_cfg_ops = {
141 .change_virtual_intf = orinoco_change_vif, 160 .change_virtual_intf = orinoco_change_vif,
161 .scan = orinoco_scan,
142}; 162};