• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
Keine Tags

Frequently used words (click to add to your profile)

javaandroidc++linuxc#objective-ccocoa誰得qtrubypythonwindowsphpgamebathyscaphegui翻訳comegattwitterframeworkbtronvb.net計画中(planning stage)testdomarduinodirectxpreviewerゲームエンジン

external/wpa_supplicant_6


Commit MetaInfo

Revision3a3bb4e12d8659161a8b25c8919c02abb589ed10 (tree)
Zeit2011-02-23 06:28:07
AutorDmitry Shmidt <dimitrysh@goog...>
CommiterIrfan Sheriff

Log Message

WEXT: Suppress scan errors during background scan

Change-Id: Iab7138e1408afe409b27657d599a159d0fcb8ed8
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>

Ändern Zusammenfassung

Diff

--- a/wpa_supplicant/src/drivers/driver_wext.c
+++ b/wpa_supplicant/src/drivers/driver_wext.c
@@ -969,6 +969,7 @@ void * wpa_driver_wext_init(void *ctx, const char *ifname)
969969 drv->errors = 0;
970970 drv->driver_is_started = TRUE;
971971 drv->skip_disconnect = 0;
972+ drv->bgscan_enabled = 0;
972973 #endif
973974 wpa_driver_wext_finish_drv_init(drv);
974975
@@ -1254,7 +1255,10 @@ int wpa_driver_wext_combo_scan(void *priv, struct wpa_ssid **ssid_ptr,
12541255 iwr.u.data.length = bp;
12551256
12561257 if ((ret = ioctl(drv->ioctl_sock, SIOCSIWPRIV, &iwr)) < 0) {
1257- wpa_printf(MSG_ERROR, "ioctl[SIOCSIWPRIV] (cscan): %d", ret);
1258+ if (!drv->bgscan_enabled)
1259+ wpa_printf(MSG_ERROR, "ioctl[SIOCSIWPRIV] (cscan): %d", ret);
1260+ else
1261+ ret = 0; /* Hide error in case of bg scan */
12581262 *ssid_ptr = ssid_orig;
12591263 /* goto old_scan; */
12601264 }
@@ -2704,8 +2708,10 @@ static int wpa_driver_priv_driver_cmd( void *priv, char *cmd, char *buf, size_t
27042708 return ret;
27052709 }
27062710 os_strncpy(cmd, "PNOFORCE 1", MAX_DRV_CMD_SIZE);
2711+ drv->bgscan_enabled = 1;
27072712 } else if( os_strcasecmp(cmd, "BGSCAN-STOP") == 0 ) {
27082713 os_strncpy(cmd, "PNOFORCE 0", MAX_DRV_CMD_SIZE);
2714+ drv->bgscan_enabled = 0;
27092715 }
27102716
27112717 os_memset(&iwr, 0, sizeof(iwr));
--- a/wpa_supplicant/src/drivers/driver_wext.h
+++ b/wpa_supplicant/src/drivers/driver_wext.h
@@ -47,6 +47,7 @@ struct wpa_driver_wext_data {
4747 int errors;
4848 int driver_is_started;
4949 int skip_disconnect;
50+ int bgscan_enabled;
5051 #endif
5152 };
5253