| 359 | | struct iwreq iwr; |
|---|
| 360 | | |
|---|
| 361 | | memset(&iwr, 0, sizeof(iwr)); |
|---|
| 362 | | strncpy(iwr.ifr_name, drv->ifname, IFNAMSIZ); |
|---|
| 363 | | |
|---|
| 364 | | /* set desired ssid before scan */ |
|---|
| 365 | | /* FIX: scan should not break the current association, so using |
|---|
| 366 | | * set_ssid may not be the best way of doing this.. */ |
|---|
| 367 | | if (wpa_driver_wext_set_ssid(drv->wext, ssid, ssid_len) < 0) |
|---|
| 368 | | return -1; |
|---|
| 369 | | |
|---|
| 370 | | if (ioctl(drv->sock, SIOCSIWSCAN, &iwr) < 0) { |
|---|
| 371 | | perror("ioctl[SIOCSIWSCAN]"); |
|---|
| 372 | | return -1; |
|---|
| 373 | | } |
|---|
| 374 | | /* NB: madwifi delivers a scan complete event so no need to poll */ |
|---|
| 375 | | return 0; |
|---|
| | 362 | return wpa_driver_wext_scan(drv->wext, ssid, ssid_len); |
|---|