Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

[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>

authored by

Dan Williams and committed by
John W. Linville
3a1af6ff 6fcdf565

+11
+11
drivers/net/wireless/atmel.c
··· 3463 3463 u8 status = atmel_rmem8(priv, atmel_co(priv, CMD_BLOCK_STATUS_OFFSET)); 3464 3464 u8 command = atmel_rmem8(priv, atmel_co(priv, CMD_BLOCK_COMMAND_OFFSET)); 3465 3465 int fast_scan; 3466 + union iwreq_data wrqu; 3466 3467 3467 3468 if (status == CMD_STATUS_IDLE || 3468 3469 status == CMD_STATUS_IN_PROGRESS) ··· 3488 3487 atmel_scan(priv, 1); 3489 3488 } else { 3490 3489 int bss_index = retrieve_bss(priv); 3490 + int notify_scan_complete = 1; 3491 3491 if (bss_index != -1) { 3492 3492 atmel_join_bss(priv, bss_index); 3493 3493 } else if (priv->operating_mode == IW_MODE_ADHOC && ··· 3497 3495 } else { 3498 3496 priv->fast_scan = !fast_scan; 3499 3497 atmel_scan(priv, 1); 3498 + notify_scan_complete = 0; 3500 3499 } 3501 3500 priv->site_survey_state = SITE_SURVEY_COMPLETED; 3501 + if (notify_scan_complete) { 3502 + wrqu.data.length = 0; 3503 + wrqu.data.flags = 0; 3504 + wireless_send_event(priv->dev, SIOCGIWSCAN, &wrqu, NULL); 3505 + } 3502 3506 } 3503 3507 break; 3504 3508 ··· 3517 3509 priv->site_survey_state = SITE_SURVEY_COMPLETED; 3518 3510 if (priv->station_is_associated) { 3519 3511 atmel_enter_state(priv, STATION_STATE_READY); 3512 + wrqu.data.length = 0; 3513 + wrqu.data.flags = 0; 3514 + wireless_send_event(priv->dev, SIOCGIWSCAN, &wrqu, NULL); 3520 3515 } else { 3521 3516 atmel_scan(priv, 1); 3522 3517 }