aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorDavid Kilroy <kilroyd@googlemail.com>2008-09-13 07:22:05 -0400
committerJohn W. Linville <linville@tuxdriver.com>2008-09-24 16:17:58 -0400
commit9930ccee16addda9fa7d9af00cd03cd5a10c8965 (patch)
treefa1cd1150bbf489294cab82b206ba26d2db2d493 /drivers
parentd87798450a7635ab1bcc80271a13ce4a53b016a9 (diff)
wireless: Read scan flags correctly on x86-64
The SIOCSIWSCAN handler is passed data in an iw_point structure. Some drivers erronously use an iw_param instead. On 32 bit architectures the difference isn't noticed as the flags parameter tends to be the only one used by scan handlers and is at the same offset. On 64 bit architectures the pointer in the iw_point structure means the flag parameter is at different offsets in these structures. Thanks to Jean Tourrilhes for tracking this down for orinoco, and Pavel Roskin for confirming the fix and identifying other suspect handlers. Signed-off-by: David Kilroy <kilroyd@googlemail.com> Acked-by: Pavel Roskin <proski@gnu.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/wireless/airo.c2
-rw-r--r--drivers/net/wireless/atmel.c2
-rw-r--r--drivers/net/wireless/orinoco.c2
-rw-r--r--drivers/net/wireless/rndis_wlan.c3
4 files changed, 4 insertions, 5 deletions
diff --git a/drivers/net/wireless/airo.c b/drivers/net/wireless/airo.c
index ae58a12befd3..370133e492d2 100644
--- a/drivers/net/wireless/airo.c
+++ b/drivers/net/wireless/airo.c
@@ -7107,7 +7107,7 @@ static int airo_get_aplist(struct net_device *dev,
7107 */ 7107 */
7108static int airo_set_scan(struct net_device *dev, 7108static int airo_set_scan(struct net_device *dev,
7109 struct iw_request_info *info, 7109 struct iw_request_info *info,
7110 struct iw_param *vwrq, 7110 struct iw_point *dwrq,
7111 char *extra) 7111 char *extra)
7112{ 7112{
7113 struct airo_info *ai = dev->priv; 7113 struct airo_info *ai = dev->priv;
diff --git a/drivers/net/wireless/atmel.c b/drivers/net/wireless/atmel.c
index bd65c485098c..ecb02bdaab5b 100644
--- a/drivers/net/wireless/atmel.c
+++ b/drivers/net/wireless/atmel.c
@@ -2258,7 +2258,7 @@ static int atmel_get_freq(struct net_device *dev,
2258 2258
2259static int atmel_set_scan(struct net_device *dev, 2259static int atmel_set_scan(struct net_device *dev,
2260 struct iw_request_info *info, 2260 struct iw_request_info *info,
2261 struct iw_param *vwrq, 2261 struct iw_point *dwrq,
2262 char *extra) 2262 char *extra)
2263{ 2263{
2264 struct atmel_private *priv = netdev_priv(dev); 2264 struct atmel_private *priv = netdev_priv(dev);
diff --git a/drivers/net/wireless/orinoco.c b/drivers/net/wireless/orinoco.c
index 9a2fcc0163d6..50904771f291 100644
--- a/drivers/net/wireless/orinoco.c
+++ b/drivers/net/wireless/orinoco.c
@@ -5291,7 +5291,7 @@ static int orinoco_ioctl_getrid(struct net_device *dev,
5291/* Trigger a scan (look for other cells in the vicinity) */ 5291/* Trigger a scan (look for other cells in the vicinity) */
5292static int orinoco_ioctl_setscan(struct net_device *dev, 5292static int orinoco_ioctl_setscan(struct net_device *dev,
5293 struct iw_request_info *info, 5293 struct iw_request_info *info,
5294 struct iw_param *srq, 5294 struct iw_point *srq,
5295 char *extra) 5295 char *extra)
5296{ 5296{
5297 struct orinoco_private *priv = netdev_priv(dev); 5297 struct orinoco_private *priv = netdev_priv(dev);
diff --git a/drivers/net/wireless/rndis_wlan.c b/drivers/net/wireless/rndis_wlan.c
index 00e965b9da75..2b414899dfa0 100644
--- a/drivers/net/wireless/rndis_wlan.c
+++ b/drivers/net/wireless/rndis_wlan.c
@@ -1627,7 +1627,6 @@ static int rndis_iw_set_encode_ext(struct net_device *dev,
1627static int rndis_iw_set_scan(struct net_device *dev, 1627static int rndis_iw_set_scan(struct net_device *dev,
1628 struct iw_request_info *info, union iwreq_data *wrqu, char *extra) 1628 struct iw_request_info *info, union iwreq_data *wrqu, char *extra)
1629{ 1629{
1630 struct iw_param *param = &wrqu->param;
1631 struct usbnet *usbdev = dev->priv; 1630 struct usbnet *usbdev = dev->priv;
1632 union iwreq_data evt; 1631 union iwreq_data evt;
1633 int ret = -EINVAL; 1632 int ret = -EINVAL;
@@ -1635,7 +1634,7 @@ static int rndis_iw_set_scan(struct net_device *dev,
1635 1634
1636 devdbg(usbdev, "SIOCSIWSCAN"); 1635 devdbg(usbdev, "SIOCSIWSCAN");
1637 1636
1638 if (param->flags == 0) { 1637 if (wrqu->data.flags == 0) {
1639 tmp = ccpu2(1); 1638 tmp = ccpu2(1);
1640 ret = rndis_set_oid(usbdev, OID_802_11_BSSID_LIST_SCAN, &tmp, 1639 ret = rndis_set_oid(usbdev, OID_802_11_BSSID_LIST_SCAN, &tmp,
1641 sizeof(tmp)); 1640 sizeof(tmp));