From d6a13a24b76236ade7fd70081ba41a51e8215578 Mon Sep 17 00:00:00 2001 From: Dan Williams Date: Thu, 12 Jan 2006 15:00:58 -0500 Subject: [PATCH] drivers/net/wireless: correct reported ssid lengths ESSIDs can technically include NULL characters. Drivers should not be adjusting the length of the ESSID before reporting it in their SIOCGIWESSID handlers. Breaks stuff like wpa_supplicant. Note that ipw drivers, which seem to currently be the "most correct", don't have this problem. Signed-off-by: Dan Williams Signed-off-by: John W. Linville --- drivers/net/wireless/atmel.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'drivers/net/wireless/atmel.c') diff --git a/drivers/net/wireless/atmel.c b/drivers/net/wireless/atmel.c index f0ccfef6644..98a76f10a0f 100644 --- a/drivers/net/wireless/atmel.c +++ b/drivers/net/wireless/atmel.c @@ -1718,11 +1718,11 @@ static int atmel_get_essid(struct net_device *dev, if (priv->new_SSID_size != 0) { memcpy(extra, priv->new_SSID, priv->new_SSID_size); extra[priv->new_SSID_size] = '\0'; - dwrq->length = priv->new_SSID_size + 1; + dwrq->length = priv->new_SSID_size; } else { memcpy(extra, priv->SSID, priv->SSID_size); extra[priv->SSID_size] = '\0'; - dwrq->length = priv->SSID_size + 1; + dwrq->length = priv->SSID_size; } dwrq->flags = !priv->connect_to_any_BSS; /* active */ -- cgit v1.2.3-70-g09d2