atheros: Fix WEXT SIOCGIWESSID use with WE-21 and newer

The "too long" buffer (32+1 octets) prevented AP from starting up with
32 octet SSID with WE-21 and newer. Fix this by reducing the
SIOCGIWESSID buffer length.
This commit is contained in:
Subrat Dash 2011-09-22 15:42:03 +03:00 committed by Jouni Malinen
parent 97a8cbb88d
commit 6a5200e699

View file

@ -1334,6 +1334,8 @@ atheros_get_ssid(void *priv, u8 *buf, int len)
os_strlcpy(iwr.ifr_name, drv->iface, IFNAMSIZ);
iwr.u.essid.pointer = (caddr_t) buf;
iwr.u.essid.length = len;
iwr.u.essid.length = (len > IW_ESSID_MAX_SIZE) ?
IW_ESSID_MAX_SIZE : len;
if (ioctl(drv->ioctl_sock, SIOCGIWESSID, &iwr) < 0) {
perror("ioctl[SIOCGIWESSID]");