diff options
author | Hamish Guthrie <hamish.guthrie@sonycom.com> | 2010-01-28 06:54:10 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2010-01-28 15:21:57 -0500 |
commit | f276586a8af410d2b79733daf52471605b6559e9 (patch) | |
tree | 0ae0f3bc21b273040ffa4891f85c4805ba6839e5 /drivers/net/ps3_gelic_wireless.c | |
parent | c1596b75c29eb5b32c65ef1e186c8b08c289bf05 (diff) |
ps3_gelic_wireless: fix directed ssid scan
If the association worker requests a directed ssid scan and a bss list
already exists, the directed scan is not done. This patch corrects this
and cleans up a few typos and debug messages.
Signed-off-by: Hamish Guthrie <hamish.guthrie@sonycom.com>
Acked-by: Geoff Levand <geoffrey.levand@am.sony.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/ps3_gelic_wireless.c')
-rw-r--r-- | drivers/net/ps3_gelic_wireless.c | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/drivers/net/ps3_gelic_wireless.c b/drivers/net/ps3_gelic_wireless.c index 7571dbba6a0a..d520e9e8cdb2 100644 --- a/drivers/net/ps3_gelic_wireless.c +++ b/drivers/net/ps3_gelic_wireless.c | |||
@@ -1449,7 +1449,8 @@ static int gelic_wl_start_scan(struct gelic_wl_info *wl, int always_scan, | |||
1449 | void *buf = NULL; | 1449 | void *buf = NULL; |
1450 | size_t len; | 1450 | size_t len; |
1451 | 1451 | ||
1452 | pr_debug("%s: <- always=%d\n", __func__, always_scan); | 1452 | pr_debug("%s: <- always=%d essid_len=%d\n", __func__, |
1453 | always_scan, essid_len); | ||
1453 | if (mutex_lock_interruptible(&wl->scan_lock)) | 1454 | if (mutex_lock_interruptible(&wl->scan_lock)) |
1454 | return -ERESTARTSYS; | 1455 | return -ERESTARTSYS; |
1455 | 1456 | ||
@@ -1464,8 +1465,10 @@ static int gelic_wl_start_scan(struct gelic_wl_info *wl, int always_scan, | |||
1464 | init_completion(&wl->scan_done); | 1465 | init_completion(&wl->scan_done); |
1465 | /* | 1466 | /* |
1466 | * If we have already a bss list, don't try to get new | 1467 | * If we have already a bss list, don't try to get new |
1468 | * unless we are doing an ESSID scan | ||
1467 | */ | 1469 | */ |
1468 | if (!always_scan && wl->scan_stat == GELIC_WL_SCAN_STAT_GOT_LIST) { | 1470 | if ((!essid_len && !always_scan) |
1471 | && wl->scan_stat == GELIC_WL_SCAN_STAT_GOT_LIST) { | ||
1469 | pr_debug("%s: already has the list\n", __func__); | 1472 | pr_debug("%s: already has the list\n", __func__); |
1470 | complete(&wl->scan_done); | 1473 | complete(&wl->scan_done); |
1471 | goto out; | 1474 | goto out; |
@@ -1566,7 +1569,7 @@ static void gelic_wl_scan_complete_event(struct gelic_wl_info *wl) | |||
1566 | } | 1569 | } |
1567 | } | 1570 | } |
1568 | 1571 | ||
1569 | /* put them in the newtork_list */ | 1572 | /* put them in the network_list */ |
1570 | for (i = 0, scan_info_size = 0, scan_info = buf; | 1573 | for (i = 0, scan_info_size = 0, scan_info = buf; |
1571 | scan_info_size < data_len; | 1574 | scan_info_size < data_len; |
1572 | i++, scan_info_size += be16_to_cpu(scan_info->size), | 1575 | i++, scan_info_size += be16_to_cpu(scan_info->size), |
@@ -1902,7 +1905,7 @@ static int gelic_wl_do_wpa_setup(struct gelic_wl_info *wl) | |||
1902 | /* PSK type */ | 1905 | /* PSK type */ |
1903 | wpa->psk_type = cpu_to_be16(wl->psk_type); | 1906 | wpa->psk_type = cpu_to_be16(wl->psk_type); |
1904 | #ifdef DEBUG | 1907 | #ifdef DEBUG |
1905 | pr_debug("%s: sec=%s psktype=%s\nn", __func__, | 1908 | pr_debug("%s: sec=%s psktype=%s\n", __func__, |
1906 | wpasecstr(wpa->security), | 1909 | wpasecstr(wpa->security), |
1907 | (wpa->psk_type == GELIC_EURUS_WPA_PSK_BIN) ? | 1910 | (wpa->psk_type == GELIC_EURUS_WPA_PSK_BIN) ? |
1908 | "BIN" : "passphrase"); | 1911 | "BIN" : "passphrase"); |
@@ -1912,9 +1915,9 @@ static int gelic_wl_do_wpa_setup(struct gelic_wl_info *wl) | |||
1912 | * the debug log because this dumps your precious | 1915 | * the debug log because this dumps your precious |
1913 | * passphrase/key. | 1916 | * passphrase/key. |
1914 | */ | 1917 | */ |
1915 | pr_debug("%s: psk=%s\n", | 1918 | pr_debug("%s: psk=%s\n", __func__, |
1916 | (wpa->psk_type == GELIC_EURUS_WPA_PSK_BIN) ? | 1919 | (wpa->psk_type == GELIC_EURUS_WPA_PSK_BIN) ? |
1917 | (char *)"N/A" : (char *)wpa->psk); | 1920 | "N/A" : wpa->psk); |
1918 | #endif | 1921 | #endif |
1919 | #endif | 1922 | #endif |
1920 | /* issue wpa setup */ | 1923 | /* issue wpa setup */ |