diff options
author | Dan Williams <dcbw@redhat.com> | 2006-03-31 15:13:31 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2006-04-19 17:25:38 -0400 |
commit | 3a1af6ffe4941497071125d3a8bb3e1feee45df1 (patch) | |
tree | 7112414cf849c2fe80700ad766428369ff0cb95a /drivers/net/wireless/atmel.c | |
parent | 6fcdf565ffb8c661749372115d28efdbe525aeba (diff) |
[PATCH] wireless/atmel: send WEXT scan completion events
Send scan completion events to user space when a scan completes.
Signed-off-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/atmel.c')
-rw-r--r-- | drivers/net/wireless/atmel.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/drivers/net/wireless/atmel.c b/drivers/net/wireless/atmel.c index 87afa6878f26..8606c88886fc 100644 --- a/drivers/net/wireless/atmel.c +++ b/drivers/net/wireless/atmel.c | |||
@@ -3463,6 +3463,7 @@ static void atmel_command_irq(struct atmel_private *priv) | |||
3463 | u8 status = atmel_rmem8(priv, atmel_co(priv, CMD_BLOCK_STATUS_OFFSET)); | 3463 | u8 status = atmel_rmem8(priv, atmel_co(priv, CMD_BLOCK_STATUS_OFFSET)); |
3464 | u8 command = atmel_rmem8(priv, atmel_co(priv, CMD_BLOCK_COMMAND_OFFSET)); | 3464 | u8 command = atmel_rmem8(priv, atmel_co(priv, CMD_BLOCK_COMMAND_OFFSET)); |
3465 | int fast_scan; | 3465 | int fast_scan; |
3466 | union iwreq_data wrqu; | ||
3466 | 3467 | ||
3467 | if (status == CMD_STATUS_IDLE || | 3468 | if (status == CMD_STATUS_IDLE || |
3468 | status == CMD_STATUS_IN_PROGRESS) | 3469 | status == CMD_STATUS_IN_PROGRESS) |
@@ -3487,6 +3488,7 @@ static void atmel_command_irq(struct atmel_private *priv) | |||
3487 | atmel_scan(priv, 1); | 3488 | atmel_scan(priv, 1); |
3488 | } else { | 3489 | } else { |
3489 | int bss_index = retrieve_bss(priv); | 3490 | int bss_index = retrieve_bss(priv); |
3491 | int notify_scan_complete = 1; | ||
3490 | if (bss_index != -1) { | 3492 | if (bss_index != -1) { |
3491 | atmel_join_bss(priv, bss_index); | 3493 | atmel_join_bss(priv, bss_index); |
3492 | } else if (priv->operating_mode == IW_MODE_ADHOC && | 3494 | } else if (priv->operating_mode == IW_MODE_ADHOC && |
@@ -3495,8 +3497,14 @@ static void atmel_command_irq(struct atmel_private *priv) | |||
3495 | } else { | 3497 | } else { |
3496 | priv->fast_scan = !fast_scan; | 3498 | priv->fast_scan = !fast_scan; |
3497 | atmel_scan(priv, 1); | 3499 | atmel_scan(priv, 1); |
3500 | notify_scan_complete = 0; | ||
3498 | } | 3501 | } |
3499 | priv->site_survey_state = SITE_SURVEY_COMPLETED; | 3502 | priv->site_survey_state = SITE_SURVEY_COMPLETED; |
3503 | if (notify_scan_complete) { | ||
3504 | wrqu.data.length = 0; | ||
3505 | wrqu.data.flags = 0; | ||
3506 | wireless_send_event(priv->dev, SIOCGIWSCAN, &wrqu, NULL); | ||
3507 | } | ||
3500 | } | 3508 | } |
3501 | break; | 3509 | break; |
3502 | 3510 | ||
@@ -3509,6 +3517,9 @@ static void atmel_command_irq(struct atmel_private *priv) | |||
3509 | priv->site_survey_state = SITE_SURVEY_COMPLETED; | 3517 | priv->site_survey_state = SITE_SURVEY_COMPLETED; |
3510 | if (priv->station_is_associated) { | 3518 | if (priv->station_is_associated) { |
3511 | atmel_enter_state(priv, STATION_STATE_READY); | 3519 | atmel_enter_state(priv, STATION_STATE_READY); |
3520 | wrqu.data.length = 0; | ||
3521 | wrqu.data.flags = 0; | ||
3522 | wireless_send_event(priv->dev, SIOCGIWSCAN, &wrqu, NULL); | ||
3512 | } else { | 3523 | } else { |
3513 | atmel_scan(priv, 1); | 3524 | atmel_scan(priv, 1); |
3514 | } | 3525 | } |