[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>
This commit is contained in:
Dan Williams
2006-01-12 15:00:58 -05:00
committed by John W. Linville
parent a485cde662
commit d6a13a24b7
5 changed files with 6 additions and 6 deletions

View File

@@ -748,7 +748,7 @@ prism54_get_essid(struct net_device *ndev, struct iw_request_info *info,
if (essid->length) {
dwrq->flags = 1; /* set ESSID to ON for Wireless Extensions */
/* if it is to big, trunk it */
dwrq->length = min(IW_ESSID_MAX_SIZE, essid->length + 1);
dwrq->length = min(IW_ESSID_MAX_SIZE, essid->length);
} else {
dwrq->flags = 0;
dwrq->length = 0;