diff options
author | David Kilroy <kilroyd@gmail.com> | 2008-08-21 18:28:00 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2008-08-22 19:28:06 -0400 |
commit | 6cd90b1cac290c64a93b7e992bb1ef495988465f (patch) | |
tree | cba5f4c4ba36da9120263abe0bf92d25e9c5602f /drivers | |
parent | 4ae6ee2d72e4904909d63c6ebb0240b254b72e85 (diff) |
orinoco: Split wevent work thread from wevent sending
This allows us to send more wevents from the work thread. We will need
to do this to support WPA.
Signed-off-by: David Kilroy <kilroyd@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/wireless/orinoco.c | 24 |
1 files changed, 14 insertions, 10 deletions
diff --git a/drivers/net/wireless/orinoco.c b/drivers/net/wireless/orinoco.c index b853ba0cd4e8..21bed6c28ad4 100644 --- a/drivers/net/wireless/orinoco.c +++ b/drivers/net/wireless/orinoco.c | |||
@@ -1424,34 +1424,38 @@ static void orinoco_join_ap(struct work_struct *work) | |||
1424 | } | 1424 | } |
1425 | 1425 | ||
1426 | /* Send new BSSID to userspace */ | 1426 | /* Send new BSSID to userspace */ |
1427 | static void orinoco_send_wevents(struct work_struct *work) | 1427 | static void orinoco_send_bssid_wevent(struct orinoco_private *priv) |
1428 | { | 1428 | { |
1429 | struct orinoco_private *priv = | ||
1430 | container_of(work, struct orinoco_private, wevent_work); | ||
1431 | struct net_device *dev = priv->ndev; | 1429 | struct net_device *dev = priv->ndev; |
1432 | struct hermes *hw = &priv->hw; | 1430 | struct hermes *hw = &priv->hw; |
1433 | union iwreq_data wrqu; | 1431 | union iwreq_data wrqu; |
1434 | int err; | 1432 | int err; |
1435 | unsigned long flags; | ||
1436 | |||
1437 | if (orinoco_lock(priv, &flags) != 0) | ||
1438 | return; | ||
1439 | 1433 | ||
1440 | err = hermes_read_ltv(hw, IRQ_BAP, HERMES_RID_CURRENTBSSID, | 1434 | err = hermes_read_ltv(hw, IRQ_BAP, HERMES_RID_CURRENTBSSID, |
1441 | ETH_ALEN, NULL, wrqu.ap_addr.sa_data); | 1435 | ETH_ALEN, NULL, wrqu.ap_addr.sa_data); |
1442 | if (err != 0) | 1436 | if (err != 0) |
1443 | goto out; | 1437 | return; |
1444 | 1438 | ||
1445 | wrqu.ap_addr.sa_family = ARPHRD_ETHER; | 1439 | wrqu.ap_addr.sa_family = ARPHRD_ETHER; |
1446 | 1440 | ||
1447 | /* Send event to user space */ | 1441 | /* Send event to user space */ |
1448 | wireless_send_event(dev, SIOCGIWAP, &wrqu, NULL); | 1442 | wireless_send_event(dev, SIOCGIWAP, &wrqu, NULL); |
1443 | } | ||
1444 | |||
1445 | static void orinoco_send_wevents(struct work_struct *work) | ||
1446 | { | ||
1447 | struct orinoco_private *priv = | ||
1448 | container_of(work, struct orinoco_private, wevent_work); | ||
1449 | unsigned long flags; | ||
1450 | |||
1451 | if (orinoco_lock(priv, &flags) != 0) | ||
1452 | return; | ||
1453 | |||
1454 | orinoco_send_bssid_wevent(priv); | ||
1449 | 1455 | ||
1450 | out: | ||
1451 | orinoco_unlock(priv, &flags); | 1456 | orinoco_unlock(priv, &flags); |
1452 | } | 1457 | } |
1453 | 1458 | ||
1454 | |||
1455 | static inline void orinoco_clear_scan_results(struct orinoco_private *priv, | 1459 | static inline void orinoco_clear_scan_results(struct orinoco_private *priv, |
1456 | unsigned long scan_age) | 1460 | unsigned long scan_age) |
1457 | { | 1461 | { |