aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/orinoco/wext.c
diff options
context:
space:
mode:
authorDavid Kilroy <kilroyd@googlemail.com>2009-06-18 18:21:26 -0400
committerJohn W. Linville <linville@tuxdriver.com>2009-07-10 15:01:44 -0400
commitea60a6aaf55984a13a7150568cc103d006e86ab2 (patch)
tree1c6b80d7d6a2129fe33591508ac125b65100fa09 /drivers/net/wireless/orinoco/wext.c
parent98e5f404485d5d11b15e8351535a0e064a37647c (diff)
orinoco: initiate cfg80211 conversion
Initialise and register a wiphy. Store the orinoco_private structure in the new wiphy, and use the net_device private area to store the wireless_dev. This results in a change to the way we navigate from a net_device to the driver private orinoco_private, which we encapsulate in the inline function ndev_priv. Most of the remaining calls to netdev_priv are thus replaced by ndev_priv. We can immediately rely on cfg80211 to handle SIOCGIWNAME, so orinoco_ioctl_getname is removed. Signed-off-by: David Kilroy <kilroyd@googlemail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/orinoco/wext.c')
-rw-r--r--drivers/net/wireless/orinoco/wext.c110
1 files changed, 46 insertions, 64 deletions
diff --git a/drivers/net/wireless/orinoco/wext.c b/drivers/net/wireless/orinoco/wext.c
index 74fdfcec9b2c..74892e1d34ae 100644
--- a/drivers/net/wireless/orinoco/wext.c
+++ b/drivers/net/wireless/orinoco/wext.c
@@ -7,6 +7,7 @@
7#include <linux/wireless.h> 7#include <linux/wireless.h>
8#include <linux/ieee80211.h> 8#include <linux/ieee80211.h>
9#include <net/iw_handler.h> 9#include <net/iw_handler.h>
10#include <net/cfg80211.h>
10 11
11#include "hermes.h" 12#include "hermes.h"
12#include "hermes_rid.h" 13#include "hermes_rid.h"
@@ -23,7 +24,7 @@
23 24
24static struct iw_statistics *orinoco_get_wireless_stats(struct net_device *dev) 25static struct iw_statistics *orinoco_get_wireless_stats(struct net_device *dev)
25{ 26{
26 struct orinoco_private *priv = netdev_priv(dev); 27 struct orinoco_private *priv = ndev_priv(dev);
27 hermes_t *hw = &priv->hw; 28 hermes_t *hw = &priv->hw;
28 struct iw_statistics *wstats = &priv->wstats; 29 struct iw_statistics *wstats = &priv->wstats;
29 int err; 30 int err;
@@ -87,31 +88,12 @@ static struct iw_statistics *orinoco_get_wireless_stats(struct net_device *dev)
87/* Wireless extensions */ 88/* Wireless extensions */
88/********************************************************************/ 89/********************************************************************/
89 90
90static int orinoco_ioctl_getname(struct net_device *dev,
91 struct iw_request_info *info,
92 char *name,
93 char *extra)
94{
95 struct orinoco_private *priv = netdev_priv(dev);
96 int numrates;
97 int err;
98
99 err = orinoco_hw_get_bitratelist(priv, &numrates, NULL, 0);
100
101 if (!err && (numrates > 2))
102 strcpy(name, "IEEE 802.11b");
103 else
104 strcpy(name, "IEEE 802.11-DS");
105
106 return 0;
107}
108
109static int orinoco_ioctl_setwap(struct net_device *dev, 91static int orinoco_ioctl_setwap(struct net_device *dev,
110 struct iw_request_info *info, 92 struct iw_request_info *info,
111 struct sockaddr *ap_addr, 93 struct sockaddr *ap_addr,
112 char *extra) 94 char *extra)
113{ 95{
114 struct orinoco_private *priv = netdev_priv(dev); 96 struct orinoco_private *priv = ndev_priv(dev);
115 int err = -EINPROGRESS; /* Call commit handler */ 97 int err = -EINPROGRESS; /* Call commit handler */
116 unsigned long flags; 98 unsigned long flags;
117 static const u8 off_addr[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; 99 static const u8 off_addr[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };
@@ -172,7 +154,7 @@ static int orinoco_ioctl_getwap(struct net_device *dev,
172 struct sockaddr *ap_addr, 154 struct sockaddr *ap_addr,
173 char *extra) 155 char *extra)
174{ 156{
175 struct orinoco_private *priv = netdev_priv(dev); 157 struct orinoco_private *priv = ndev_priv(dev);
176 158
177 hermes_t *hw = &priv->hw; 159 hermes_t *hw = &priv->hw;
178 int err = 0; 160 int err = 0;
@@ -195,7 +177,7 @@ static int orinoco_ioctl_setmode(struct net_device *dev,
195 u32 *mode, 177 u32 *mode,
196 char *extra) 178 char *extra)
197{ 179{
198 struct orinoco_private *priv = netdev_priv(dev); 180 struct orinoco_private *priv = ndev_priv(dev);
199 int err = -EINPROGRESS; /* Call commit handler */ 181 int err = -EINPROGRESS; /* Call commit handler */
200 unsigned long flags; 182 unsigned long flags;
201 183
@@ -243,7 +225,7 @@ static int orinoco_ioctl_getmode(struct net_device *dev,
243 u32 *mode, 225 u32 *mode,
244 char *extra) 226 char *extra)
245{ 227{
246 struct orinoco_private *priv = netdev_priv(dev); 228 struct orinoco_private *priv = ndev_priv(dev);
247 229
248 *mode = priv->iw_mode; 230 *mode = priv->iw_mode;
249 return 0; 231 return 0;
@@ -254,7 +236,7 @@ static int orinoco_ioctl_getiwrange(struct net_device *dev,
254 struct iw_point *rrq, 236 struct iw_point *rrq,
255 char *extra) 237 char *extra)
256{ 238{
257 struct orinoco_private *priv = netdev_priv(dev); 239 struct orinoco_private *priv = ndev_priv(dev);
258 int err = 0; 240 int err = 0;
259 struct iw_range *range = (struct iw_range *) extra; 241 struct iw_range *range = (struct iw_range *) extra;
260 int numrates; 242 int numrates;
@@ -367,7 +349,7 @@ static int orinoco_ioctl_setiwencode(struct net_device *dev,
367 struct iw_point *erq, 349 struct iw_point *erq,
368 char *keybuf) 350 char *keybuf)
369{ 351{
370 struct orinoco_private *priv = netdev_priv(dev); 352 struct orinoco_private *priv = ndev_priv(dev);
371 int index = (erq->flags & IW_ENCODE_INDEX) - 1; 353 int index = (erq->flags & IW_ENCODE_INDEX) - 1;
372 int setindex = priv->tx_key; 354 int setindex = priv->tx_key;
373 int encode_alg = priv->encode_alg; 355 int encode_alg = priv->encode_alg;
@@ -469,7 +451,7 @@ static int orinoco_ioctl_getiwencode(struct net_device *dev,
469 struct iw_point *erq, 451 struct iw_point *erq,
470 char *keybuf) 452 char *keybuf)
471{ 453{
472 struct orinoco_private *priv = netdev_priv(dev); 454 struct orinoco_private *priv = ndev_priv(dev);
473 int index = (erq->flags & IW_ENCODE_INDEX) - 1; 455 int index = (erq->flags & IW_ENCODE_INDEX) - 1;
474 u16 xlen = 0; 456 u16 xlen = 0;
475 unsigned long flags; 457 unsigned long flags;
@@ -508,7 +490,7 @@ static int orinoco_ioctl_setessid(struct net_device *dev,
508 struct iw_point *erq, 490 struct iw_point *erq,
509 char *essidbuf) 491 char *essidbuf)
510{ 492{
511 struct orinoco_private *priv = netdev_priv(dev); 493 struct orinoco_private *priv = ndev_priv(dev);
512 unsigned long flags; 494 unsigned long flags;
513 495
514 /* Note : ESSID is ignored in Ad-Hoc demo mode, but we can set it 496 /* Note : ESSID is ignored in Ad-Hoc demo mode, but we can set it
@@ -539,7 +521,7 @@ static int orinoco_ioctl_getessid(struct net_device *dev,
539 struct iw_point *erq, 521 struct iw_point *erq,
540 char *essidbuf) 522 char *essidbuf)
541{ 523{
542 struct orinoco_private *priv = netdev_priv(dev); 524 struct orinoco_private *priv = ndev_priv(dev);
543 int active; 525 int active;
544 int err = 0; 526 int err = 0;
545 unsigned long flags; 527 unsigned long flags;
@@ -567,7 +549,7 @@ static int orinoco_ioctl_setnick(struct net_device *dev,
567 struct iw_point *nrq, 549 struct iw_point *nrq,
568 char *nickbuf) 550 char *nickbuf)
569{ 551{
570 struct orinoco_private *priv = netdev_priv(dev); 552 struct orinoco_private *priv = ndev_priv(dev);
571 unsigned long flags; 553 unsigned long flags;
572 554
573 if (nrq->length > IW_ESSID_MAX_SIZE) 555 if (nrq->length > IW_ESSID_MAX_SIZE)
@@ -589,7 +571,7 @@ static int orinoco_ioctl_getnick(struct net_device *dev,
589 struct iw_point *nrq, 571 struct iw_point *nrq,
590 char *nickbuf) 572 char *nickbuf)
591{ 573{
592 struct orinoco_private *priv = netdev_priv(dev); 574 struct orinoco_private *priv = ndev_priv(dev);
593 unsigned long flags; 575 unsigned long flags;
594 576
595 if (orinoco_lock(priv, &flags) != 0) 577 if (orinoco_lock(priv, &flags) != 0)
@@ -608,7 +590,7 @@ static int orinoco_ioctl_setfreq(struct net_device *dev,
608 struct iw_freq *frq, 590 struct iw_freq *frq,
609 char *extra) 591 char *extra)
610{ 592{
611 struct orinoco_private *priv = netdev_priv(dev); 593 struct orinoco_private *priv = ndev_priv(dev);
612 int chan = -1; 594 int chan = -1;
613 unsigned long flags; 595 unsigned long flags;
614 int err = -EINPROGRESS; /* Call commit handler */ 596 int err = -EINPROGRESS; /* Call commit handler */
@@ -657,7 +639,7 @@ static int orinoco_ioctl_getfreq(struct net_device *dev,
657 struct iw_freq *frq, 639 struct iw_freq *frq,
658 char *extra) 640 char *extra)
659{ 641{
660 struct orinoco_private *priv = netdev_priv(dev); 642 struct orinoco_private *priv = ndev_priv(dev);
661 int tmp; 643 int tmp;
662 644
663 /* Locking done in there */ 645 /* Locking done in there */
@@ -676,7 +658,7 @@ static int orinoco_ioctl_getsens(struct net_device *dev,
676 struct iw_param *srq, 658 struct iw_param *srq,
677 char *extra) 659 char *extra)
678{ 660{
679 struct orinoco_private *priv = netdev_priv(dev); 661 struct orinoco_private *priv = ndev_priv(dev);
680 hermes_t *hw = &priv->hw; 662 hermes_t *hw = &priv->hw;
681 u16 val; 663 u16 val;
682 int err; 664 int err;
@@ -705,7 +687,7 @@ static int orinoco_ioctl_setsens(struct net_device *dev,
705 struct iw_param *srq, 687 struct iw_param *srq,
706 char *extra) 688 char *extra)
707{ 689{
708 struct orinoco_private *priv = netdev_priv(dev); 690 struct orinoco_private *priv = ndev_priv(dev);
709 int val = srq->value; 691 int val = srq->value;
710 unsigned long flags; 692 unsigned long flags;
711 693
@@ -728,7 +710,7 @@ static int orinoco_ioctl_setrts(struct net_device *dev,
728 struct iw_param *rrq, 710 struct iw_param *rrq,
729 char *extra) 711 char *extra)
730{ 712{
731 struct orinoco_private *priv = netdev_priv(dev); 713 struct orinoco_private *priv = ndev_priv(dev);
732 int val = rrq->value; 714 int val = rrq->value;
733 unsigned long flags; 715 unsigned long flags;
734 716
@@ -752,7 +734,7 @@ static int orinoco_ioctl_getrts(struct net_device *dev,
752 struct iw_param *rrq, 734 struct iw_param *rrq,
753 char *extra) 735 char *extra)
754{ 736{
755 struct orinoco_private *priv = netdev_priv(dev); 737 struct orinoco_private *priv = ndev_priv(dev);
756 738
757 rrq->value = priv->rts_thresh; 739 rrq->value = priv->rts_thresh;
758 rrq->disabled = (rrq->value == 2347); 740 rrq->disabled = (rrq->value == 2347);
@@ -766,7 +748,7 @@ static int orinoco_ioctl_setfrag(struct net_device *dev,
766 struct iw_param *frq, 748 struct iw_param *frq,
767 char *extra) 749 char *extra)
768{ 750{
769 struct orinoco_private *priv = netdev_priv(dev); 751 struct orinoco_private *priv = ndev_priv(dev);
770 int err = -EINPROGRESS; /* Call commit handler */ 752 int err = -EINPROGRESS; /* Call commit handler */
771 unsigned long flags; 753 unsigned long flags;
772 754
@@ -806,7 +788,7 @@ static int orinoco_ioctl_getfrag(struct net_device *dev,
806 struct iw_param *frq, 788 struct iw_param *frq,
807 char *extra) 789 char *extra)
808{ 790{
809 struct orinoco_private *priv = netdev_priv(dev); 791 struct orinoco_private *priv = ndev_priv(dev);
810 hermes_t *hw = &priv->hw; 792 hermes_t *hw = &priv->hw;
811 int err; 793 int err;
812 u16 val; 794 u16 val;
@@ -847,7 +829,7 @@ static int orinoco_ioctl_setrate(struct net_device *dev,
847 struct iw_param *rrq, 829 struct iw_param *rrq,
848 char *extra) 830 char *extra)
849{ 831{
850 struct orinoco_private *priv = netdev_priv(dev); 832 struct orinoco_private *priv = ndev_priv(dev);
851 int ratemode; 833 int ratemode;
852 int bitrate; /* 100s of kilobits */ 834 int bitrate; /* 100s of kilobits */
853 unsigned long flags; 835 unsigned long flags;
@@ -881,7 +863,7 @@ static int orinoco_ioctl_getrate(struct net_device *dev,
881 struct iw_param *rrq, 863 struct iw_param *rrq,
882 char *extra) 864 char *extra)
883{ 865{
884 struct orinoco_private *priv = netdev_priv(dev); 866 struct orinoco_private *priv = ndev_priv(dev);
885 int err = 0; 867 int err = 0;
886 int bitrate, automatic; 868 int bitrate, automatic;
887 unsigned long flags; 869 unsigned long flags;
@@ -910,7 +892,7 @@ static int orinoco_ioctl_setpower(struct net_device *dev,
910 struct iw_param *prq, 892 struct iw_param *prq,
911 char *extra) 893 char *extra)
912{ 894{
913 struct orinoco_private *priv = netdev_priv(dev); 895 struct orinoco_private *priv = ndev_priv(dev);
914 int err = -EINPROGRESS; /* Call commit handler */ 896 int err = -EINPROGRESS; /* Call commit handler */
915 unsigned long flags; 897 unsigned long flags;
916 898
@@ -964,7 +946,7 @@ static int orinoco_ioctl_getpower(struct net_device *dev,
964 struct iw_param *prq, 946 struct iw_param *prq,
965 char *extra) 947 char *extra)
966{ 948{
967 struct orinoco_private *priv = netdev_priv(dev); 949 struct orinoco_private *priv = ndev_priv(dev);
968 hermes_t *hw = &priv->hw; 950 hermes_t *hw = &priv->hw;
969 int err = 0; 951 int err = 0;
970 u16 enable, period, timeout, mcast; 952 u16 enable, period, timeout, mcast;
@@ -1018,7 +1000,7 @@ static int orinoco_ioctl_set_encodeext(struct net_device *dev,
1018 union iwreq_data *wrqu, 1000 union iwreq_data *wrqu,
1019 char *extra) 1001 char *extra)
1020{ 1002{
1021 struct orinoco_private *priv = netdev_priv(dev); 1003 struct orinoco_private *priv = ndev_priv(dev);
1022 struct iw_point *encoding = &wrqu->encoding; 1004 struct iw_point *encoding = &wrqu->encoding;
1023 struct iw_encode_ext *ext = (struct iw_encode_ext *)extra; 1005 struct iw_encode_ext *ext = (struct iw_encode_ext *)extra;
1024 int idx, alg = ext->alg, set_key = 1; 1006 int idx, alg = ext->alg, set_key = 1;
@@ -1119,7 +1101,7 @@ static int orinoco_ioctl_get_encodeext(struct net_device *dev,
1119 union iwreq_data *wrqu, 1101 union iwreq_data *wrqu,
1120 char *extra) 1102 char *extra)
1121{ 1103{
1122 struct orinoco_private *priv = netdev_priv(dev); 1104 struct orinoco_private *priv = ndev_priv(dev);
1123 struct iw_point *encoding = &wrqu->encoding; 1105 struct iw_point *encoding = &wrqu->encoding;
1124 struct iw_encode_ext *ext = (struct iw_encode_ext *)extra; 1106 struct iw_encode_ext *ext = (struct iw_encode_ext *)extra;
1125 int idx, max_key_len; 1107 int idx, max_key_len;
@@ -1176,7 +1158,7 @@ static int orinoco_ioctl_set_auth(struct net_device *dev,
1176 struct iw_request_info *info, 1158 struct iw_request_info *info,
1177 union iwreq_data *wrqu, char *extra) 1159 union iwreq_data *wrqu, char *extra)
1178{ 1160{
1179 struct orinoco_private *priv = netdev_priv(dev); 1161 struct orinoco_private *priv = ndev_priv(dev);
1180 hermes_t *hw = &priv->hw; 1162 hermes_t *hw = &priv->hw;
1181 struct iw_param *param = &wrqu->param; 1163 struct iw_param *param = &wrqu->param;
1182 unsigned long flags; 1164 unsigned long flags;
@@ -1254,7 +1236,7 @@ static int orinoco_ioctl_get_auth(struct net_device *dev,
1254 struct iw_request_info *info, 1236 struct iw_request_info *info,
1255 union iwreq_data *wrqu, char *extra) 1237 union iwreq_data *wrqu, char *extra)
1256{ 1238{
1257 struct orinoco_private *priv = netdev_priv(dev); 1239 struct orinoco_private *priv = ndev_priv(dev);
1258 struct iw_param *param = &wrqu->param; 1240 struct iw_param *param = &wrqu->param;
1259 unsigned long flags; 1241 unsigned long flags;
1260 int ret = 0; 1242 int ret = 0;
@@ -1294,7 +1276,7 @@ static int orinoco_ioctl_set_genie(struct net_device *dev,
1294 struct iw_request_info *info, 1276 struct iw_request_info *info,
1295 union iwreq_data *wrqu, char *extra) 1277 union iwreq_data *wrqu, char *extra)
1296{ 1278{
1297 struct orinoco_private *priv = netdev_priv(dev); 1279 struct orinoco_private *priv = ndev_priv(dev);
1298 u8 *buf; 1280 u8 *buf;
1299 unsigned long flags; 1281 unsigned long flags;
1300 1282
@@ -1337,7 +1319,7 @@ static int orinoco_ioctl_get_genie(struct net_device *dev,
1337 struct iw_request_info *info, 1319 struct iw_request_info *info,
1338 union iwreq_data *wrqu, char *extra) 1320 union iwreq_data *wrqu, char *extra)
1339{ 1321{
1340 struct orinoco_private *priv = netdev_priv(dev); 1322 struct orinoco_private *priv = ndev_priv(dev);
1341 unsigned long flags; 1323 unsigned long flags;
1342 int err = 0; 1324 int err = 0;
1343 1325
@@ -1366,7 +1348,7 @@ static int orinoco_ioctl_set_mlme(struct net_device *dev,
1366 struct iw_request_info *info, 1348 struct iw_request_info *info,
1367 union iwreq_data *wrqu, char *extra) 1349 union iwreq_data *wrqu, char *extra)
1368{ 1350{
1369 struct orinoco_private *priv = netdev_priv(dev); 1351 struct orinoco_private *priv = ndev_priv(dev);
1370 hermes_t *hw = &priv->hw; 1352 hermes_t *hw = &priv->hw;
1371 struct iw_mlme *mlme = (struct iw_mlme *)extra; 1353 struct iw_mlme *mlme = (struct iw_mlme *)extra;
1372 unsigned long flags; 1354 unsigned long flags;
@@ -1407,7 +1389,7 @@ static int orinoco_ioctl_getretry(struct net_device *dev,
1407 struct iw_param *rrq, 1389 struct iw_param *rrq,
1408 char *extra) 1390 char *extra)
1409{ 1391{
1410 struct orinoco_private *priv = netdev_priv(dev); 1392 struct orinoco_private *priv = ndev_priv(dev);
1411 hermes_t *hw = &priv->hw; 1393 hermes_t *hw = &priv->hw;
1412 int err = 0; 1394 int err = 0;
1413 u16 short_limit, long_limit, lifetime; 1395 u16 short_limit, long_limit, lifetime;
@@ -1461,7 +1443,7 @@ static int orinoco_ioctl_reset(struct net_device *dev,
1461 void *wrqu, 1443 void *wrqu,
1462 char *extra) 1444 char *extra)
1463{ 1445{
1464 struct orinoco_private *priv = netdev_priv(dev); 1446 struct orinoco_private *priv = ndev_priv(dev);
1465 1447
1466 if (!capable(CAP_NET_ADMIN)) 1448 if (!capable(CAP_NET_ADMIN))
1467 return -EPERM; 1449 return -EPERM;
@@ -1486,7 +1468,7 @@ static int orinoco_ioctl_setibssport(struct net_device *dev,
1486 char *extra) 1468 char *extra)
1487 1469
1488{ 1470{
1489 struct orinoco_private *priv = netdev_priv(dev); 1471 struct orinoco_private *priv = ndev_priv(dev);
1490 int val = *((int *) extra); 1472 int val = *((int *) extra);
1491 unsigned long flags; 1473 unsigned long flags;
1492 1474
@@ -1507,7 +1489,7 @@ static int orinoco_ioctl_getibssport(struct net_device *dev,
1507 void *wrqu, 1489 void *wrqu,
1508 char *extra) 1490 char *extra)
1509{ 1491{
1510 struct orinoco_private *priv = netdev_priv(dev); 1492 struct orinoco_private *priv = ndev_priv(dev);
1511 int *val = (int *) extra; 1493 int *val = (int *) extra;
1512 1494
1513 *val = priv->ibss_port; 1495 *val = priv->ibss_port;
@@ -1519,7 +1501,7 @@ static int orinoco_ioctl_setport3(struct net_device *dev,
1519 void *wrqu, 1501 void *wrqu,
1520 char *extra) 1502 char *extra)
1521{ 1503{
1522 struct orinoco_private *priv = netdev_priv(dev); 1504 struct orinoco_private *priv = ndev_priv(dev);
1523 int val = *((int *) extra); 1505 int val = *((int *) extra);
1524 int err = 0; 1506 int err = 0;
1525 unsigned long flags; 1507 unsigned long flags;
@@ -1565,7 +1547,7 @@ static int orinoco_ioctl_getport3(struct net_device *dev,
1565 void *wrqu, 1547 void *wrqu,
1566 char *extra) 1548 char *extra)
1567{ 1549{
1568 struct orinoco_private *priv = netdev_priv(dev); 1550 struct orinoco_private *priv = ndev_priv(dev);
1569 int *val = (int *) extra; 1551 int *val = (int *) extra;
1570 1552
1571 *val = priv->prefer_port3; 1553 *val = priv->prefer_port3;
@@ -1577,7 +1559,7 @@ static int orinoco_ioctl_setpreamble(struct net_device *dev,
1577 void *wrqu, 1559 void *wrqu,
1578 char *extra) 1560 char *extra)
1579{ 1561{
1580 struct orinoco_private *priv = netdev_priv(dev); 1562 struct orinoco_private *priv = ndev_priv(dev);
1581 unsigned long flags; 1563 unsigned long flags;
1582 int val; 1564 int val;
1583 1565
@@ -1609,7 +1591,7 @@ static int orinoco_ioctl_getpreamble(struct net_device *dev,
1609 void *wrqu, 1591 void *wrqu,
1610 char *extra) 1592 char *extra)
1611{ 1593{
1612 struct orinoco_private *priv = netdev_priv(dev); 1594 struct orinoco_private *priv = ndev_priv(dev);
1613 int *val = (int *) extra; 1595 int *val = (int *) extra;
1614 1596
1615 if (!priv->has_preamble) 1597 if (!priv->has_preamble)
@@ -1629,7 +1611,7 @@ static int orinoco_ioctl_getrid(struct net_device *dev,
1629 struct iw_point *data, 1611 struct iw_point *data,
1630 char *extra) 1612 char *extra)
1631{ 1613{
1632 struct orinoco_private *priv = netdev_priv(dev); 1614 struct orinoco_private *priv = ndev_priv(dev);
1633 hermes_t *hw = &priv->hw; 1615 hermes_t *hw = &priv->hw;
1634 int rid = data->flags; 1616 int rid = data->flags;
1635 u16 length; 1617 u16 length;
@@ -1666,7 +1648,7 @@ static int orinoco_ioctl_setscan(struct net_device *dev,
1666 struct iw_point *srq, 1648 struct iw_point *srq,
1667 char *extra) 1649 char *extra)
1668{ 1650{
1669 struct orinoco_private *priv = netdev_priv(dev); 1651 struct orinoco_private *priv = ndev_priv(dev);
1670 hermes_t *hw = &priv->hw; 1652 hermes_t *hw = &priv->hw;
1671 struct iw_scan_req *si = (struct iw_scan_req *) extra; 1653 struct iw_scan_req *si = (struct iw_scan_req *) extra;
1672 int err = 0; 1654 int err = 0;
@@ -1791,7 +1773,7 @@ static inline char *orinoco_translate_scan(struct net_device *dev,
1791 union hermes_scan_info *bss, 1773 union hermes_scan_info *bss,
1792 unsigned long last_scanned) 1774 unsigned long last_scanned)
1793{ 1775{
1794 struct orinoco_private *priv = netdev_priv(dev); 1776 struct orinoco_private *priv = ndev_priv(dev);
1795 u16 capabilities; 1777 u16 capabilities;
1796 u16 channel; 1778 u16 channel;
1797 struct iw_event iwe; /* Temporary buffer */ 1779 struct iw_event iwe; /* Temporary buffer */
@@ -2102,7 +2084,7 @@ static int orinoco_ioctl_getscan(struct net_device *dev,
2102 struct iw_point *srq, 2084 struct iw_point *srq,
2103 char *extra) 2085 char *extra)
2104{ 2086{
2105 struct orinoco_private *priv = netdev_priv(dev); 2087 struct orinoco_private *priv = ndev_priv(dev);
2106 int err = 0; 2088 int err = 0;
2107 unsigned long flags; 2089 unsigned long flags;
2108 char *current_ev = extra; 2090 char *current_ev = extra;
@@ -2180,7 +2162,7 @@ static int orinoco_ioctl_commit(struct net_device *dev,
2180 void *wrqu, 2162 void *wrqu,
2181 char *extra) 2163 char *extra)
2182{ 2164{
2183 struct orinoco_private *priv = netdev_priv(dev); 2165 struct orinoco_private *priv = ndev_priv(dev);
2184 struct hermes *hw = &priv->hw; 2166 struct hermes *hw = &priv->hw;
2185 unsigned long flags; 2167 unsigned long flags;
2186 int err = 0; 2168 int err = 0;
@@ -2257,7 +2239,7 @@ static const struct iw_priv_args orinoco_privtab[] = {
2257 [IW_IOCTL_IDX(id)] = (iw_handler) func 2239 [IW_IOCTL_IDX(id)] = (iw_handler) func
2258static const iw_handler orinoco_handler[] = { 2240static const iw_handler orinoco_handler[] = {
2259 STD_IW_HANDLER(SIOCSIWCOMMIT, orinoco_ioctl_commit), 2241 STD_IW_HANDLER(SIOCSIWCOMMIT, orinoco_ioctl_commit),
2260 STD_IW_HANDLER(SIOCGIWNAME, orinoco_ioctl_getname), 2242 STD_IW_HANDLER(SIOCGIWNAME, cfg80211_wext_giwname),
2261 STD_IW_HANDLER(SIOCSIWFREQ, orinoco_ioctl_setfreq), 2243 STD_IW_HANDLER(SIOCSIWFREQ, orinoco_ioctl_setfreq),
2262 STD_IW_HANDLER(SIOCGIWFREQ, orinoco_ioctl_getfreq), 2244 STD_IW_HANDLER(SIOCGIWFREQ, orinoco_ioctl_getfreq),
2263 STD_IW_HANDLER(SIOCSIWMODE, orinoco_ioctl_setmode), 2245 STD_IW_HANDLER(SIOCSIWMODE, orinoco_ioctl_setmode),