diff options
author | Zhu Yi <yi.zhu@intel.com> | 2006-04-13 05:19:25 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2006-04-24 16:15:54 -0400 |
commit | 07f02e4625e6d7ca5d4f3835aea9807fe1e0f9c5 (patch) | |
tree | 99ab4f99a0025155ff3a62410c40ba38aeaf8b91 /drivers/net/wireless | |
parent | a5cf4fe65144ff2f35de37c7b58e7ab8ffd84d19 (diff) |
[PATCH] ipw2200: generates a scan event after a scan has completed
The patch make ipw2200 generate the scan event every time a scan has
completed, so that user space know when to get fresh results.
Dan Williams would like to go towards this model in Network Manager
rather than having to poll.
Signed-off-by: Jean Tourrilhes <jt@hpl.hp.com>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless')
-rw-r--r-- | drivers/net/wireless/ipw2200.c | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/drivers/net/wireless/ipw2200.c b/drivers/net/wireless/ipw2200.c index 0500e8006a14..61cbf2ec0ab4 100644 --- a/drivers/net/wireless/ipw2200.c +++ b/drivers/net/wireless/ipw2200.c | |||
@@ -4489,6 +4489,24 @@ static void ipw_rx_notification(struct ipw_priv *priv, | |||
4489 | && priv->status & STATUS_ASSOCIATED) | 4489 | && priv->status & STATUS_ASSOCIATED) |
4490 | queue_delayed_work(priv->workqueue, | 4490 | queue_delayed_work(priv->workqueue, |
4491 | &priv->request_scan, HZ); | 4491 | &priv->request_scan, HZ); |
4492 | |||
4493 | /* Send an empty event to user space. | ||
4494 | * We don't send the received data on the event because | ||
4495 | * it would require us to do complex transcoding, and | ||
4496 | * we want to minimise the work done in the irq handler | ||
4497 | * Use a request to extract the data. | ||
4498 | * Also, we generate this even for any scan, regardless | ||
4499 | * on how the scan was initiated. User space can just | ||
4500 | * sync on periodic scan to get fresh data... | ||
4501 | * Jean II */ | ||
4502 | if (x->status == SCAN_COMPLETED_STATUS_COMPLETE) { | ||
4503 | union iwreq_data wrqu; | ||
4504 | |||
4505 | wrqu.data.length = 0; | ||
4506 | wrqu.data.flags = 0; | ||
4507 | wireless_send_event(priv->net_dev, SIOCGIWSCAN, | ||
4508 | &wrqu, NULL); | ||
4509 | } | ||
4492 | break; | 4510 | break; |
4493 | } | 4511 | } |
4494 | 4512 | ||
@@ -8379,7 +8397,8 @@ static int ipw_wx_get_range(struct net_device *dev, | |||
8379 | /* Event capability (kernel + driver) */ | 8397 | /* Event capability (kernel + driver) */ |
8380 | range->event_capa[0] = (IW_EVENT_CAPA_K_0 | | 8398 | range->event_capa[0] = (IW_EVENT_CAPA_K_0 | |
8381 | IW_EVENT_CAPA_MASK(SIOCGIWTHRSPY) | | 8399 | IW_EVENT_CAPA_MASK(SIOCGIWTHRSPY) | |
8382 | IW_EVENT_CAPA_MASK(SIOCGIWAP)); | 8400 | IW_EVENT_CAPA_MASK(SIOCGIWAP) | |
8401 | IW_EVENT_CAPA_MASK(SIOCGIWSCAN)); | ||
8383 | range->event_capa[1] = IW_EVENT_CAPA_K_1; | 8402 | range->event_capa[1] = IW_EVENT_CAPA_K_1; |
8384 | 8403 | ||
8385 | range->enc_capa = IW_ENC_CAPA_WPA | IW_ENC_CAPA_WPA2 | | 8404 | range->enc_capa = IW_ENC_CAPA_WPA | IW_ENC_CAPA_WPA2 | |