]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
atheros: Send correct SSID length to the driver
authorAshok Ponnaiah <aponnaia@codeaurora.org>
Tue, 30 Jan 2018 10:13:57 +0000 (15:43 +0530)
committerJouni Malinen <j@w1.fi>
Thu, 1 Feb 2018 21:45:12 +0000 (23:45 +0200)
Send the exact SSID length to the driver by removing the legacy +1
padding.

Signed-off-by: Ashok Ponnaiah <aponnaia@codeaurora.org>
src/drivers/driver_atheros.c

index d4812461f41a2e67186f4e4cb3658b0bc92cdf79..fff23f0a38c0f29017d5a563d0408a3403c6b4f3 100644 (file)
@@ -1861,7 +1861,7 @@ atheros_set_ssid(void *priv, const u8 *buf, int len)
        os_strlcpy(iwr.ifr_name, drv->iface, IFNAMSIZ);
        iwr.u.essid.flags = 1; /* SSID active */
        iwr.u.essid.pointer = (caddr_t) buf;
-       iwr.u.essid.length = len + 1;
+       iwr.u.essid.length = len;
 
        if (ioctl(drv->ioctl_sock, SIOCSIWESSID, &iwr) < 0) {
                wpa_printf(MSG_ERROR, "ioctl[SIOCSIWESSID,len=%d]: %s",