aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/atmel.c
diff options
context:
space:
mode:
authorDan Williams <dcbw@redhat.com>2006-01-12 15:00:58 -0500
committerJohn W. Linville <linville@tuxdriver.com>2006-01-16 16:51:53 -0500
commitd6a13a24b76236ade7fd70081ba41a51e8215578 (patch)
tree85c495d422a6e152789108b8623245886afcd554 /drivers/net/wireless/atmel.c
parenta485cde662f5b6b2299ee01a7e9e2c11683f807b (diff)
[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 <dcbw@redhat.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/atmel.c')
-rw-r--r--drivers/net/wireless/atmel.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/wireless/atmel.c b/drivers/net/wireless/atmel.c
index f0ccfef66445..98a76f10a0f7 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,
1718 if (priv->new_SSID_size != 0) { 1718 if (priv->new_SSID_size != 0) {
1719 memcpy(extra, priv->new_SSID, priv->new_SSID_size); 1719 memcpy(extra, priv->new_SSID, priv->new_SSID_size);
1720 extra[priv->new_SSID_size] = '\0'; 1720 extra[priv->new_SSID_size] = '\0';
1721 dwrq->length = priv->new_SSID_size + 1; 1721 dwrq->length = priv->new_SSID_size;
1722 } else { 1722 } else {
1723 memcpy(extra, priv->SSID, priv->SSID_size); 1723 memcpy(extra, priv->SSID, priv->SSID_size);
1724 extra[priv->SSID_size] = '\0'; 1724 extra[priv->SSID_size] = '\0';
1725 dwrq->length = priv->SSID_size + 1; 1725 dwrq->length = priv->SSID_size;
1726 } 1726 }
1727 1727
1728 dwrq->flags = !priv->connect_to_any_BSS; /* active */ 1728 dwrq->flags = !priv->connect_to_any_BSS; /* active */