task-pandora-*: Commit latest Xfce and Core tasks to build PAM correctly and package...
[openpandora.oe.git] / recipes / pandora-system / pandora-wifi / 0008-Update-Wireless-EXT-with-test-code.patch
1 From 582a6ffea61c1f87b1d42f2db631470ca6876095 Mon Sep 17 00:00:00 2001
2 From: David-John Willis <John.Willis@Distant-earth.com>
3 Date: Fri, 28 Aug 2009 21:06:21 +0100
4 Subject: [PATCH 8/8] Update Wireless EXT with test code.
5
6 ---
7  sta_dk_4_0_4_32/pform/linux/inc/iw_ioctl.h |    2 +-
8  sta_dk_4_0_4_32/pform/linux/src/iw_ioctl.c |  178 +++++++++++++---------------
9  2 files changed, 82 insertions(+), 98 deletions(-)
10
11 diff --git a/sta_dk_4_0_4_32/pform/linux/inc/iw_ioctl.h b/sta_dk_4_0_4_32/pform/linux/inc/iw_ioctl.h
12 index ff64523..4b4eb9d 100755
13 --- a/sta_dk_4_0_4_32/pform/linux/inc/iw_ioctl.h
14 +++ b/sta_dk_4_0_4_32/pform/linux/inc/iw_ioctl.h
15 @@ -26,6 +26,6 @@ extern ULONG UtilGetParam(
16                         PUCHAR pData,
17                         ULONG Length
18                         );
19 -extern void tiwlan_iwhandler_init(struct net_device *dev);
20 +//extern void tiwlan_iwhandler_init(struct net_device *dev);
21  
22  #endif /* _IW_IOCTL_H_ */
23 diff --git a/sta_dk_4_0_4_32/pform/linux/src/iw_ioctl.c b/sta_dk_4_0_4_32/pform/linux/src/iw_ioctl.c
24 index a975afa..7245635 100755
25 --- a/sta_dk_4_0_4_32/pform/linux/src/iw_ioctl.c
26 +++ b/sta_dk_4_0_4_32/pform/linux/src/iw_ioctl.c
27 @@ -1,32 +1,9 @@
28 -/*
29 - *  Copyright (C) 2009 John Willis
30 - *  Copyright (C) 2008 Texas Instruments/Jorjin Technologies inc.
31 - *
32 - *  This program is free software; you can redistribute it and/or modify
33 - *  it under the terms of the GNU General Public License as published by
34 - *  the Free Software Foundation; either version 2 of the License, or
35 - *  (at your option) any later version.
36 - *
37 - *  This program is distributed in the hope that it will be useful,
38 - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
39 - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
40 - *  GNU General Public License for more details.
41 - *
42 - *
43 - * This file implements support for Linux Wireless Extensions for TI 1251 driver.
44 - *
45 - */
46 -
47 -#include <linux/ctype.h>
48 -#include <linux/delay.h>
49 -#include <linux/if.h>
50 +/* ioctl() (mostly Linux Wireless Extensions) routines for TI 1251 driver */
51 +
52  #include <linux/if_arp.h>
53  #include <linux/wireless.h>
54 -#include <linux/bitops.h>
55 -
56  #include <net/iw_handler.h>
57  #include <net/ieee80211.h>
58 -
59  #include "osAdapter.h"
60  #include "tiioctl.h"
61  #include "paramOut.h"
62 @@ -39,7 +16,7 @@
63  #include "scanMngrTypes.h"
64  #include "iw_ioctl.h"
65  
66 -#define IOCTL_DBG 1
67 +#define IOCTL_DBG 0
68  
69  static const long freq_list[] = { 2412, 2417, 2422, 2427, 2432, 2437, 2442,
70                                   2447, 2452, 2457, 2462, 2467, 2472, 2484 };
71 @@ -119,11 +96,6 @@ void init_scan_params(void)
72      iw_scanPolicy.bandScanPolicy[ 0 ].immediateScanMethod.method.basicMethodParams.probReqParams.txPowerDbm = 1;
73  }
74  
75 -static int iw_ioctl_commit(struct net_device *dev, struct iw_request_info *info, char *name, char *extra)
76 -{
77 -       return (OK);
78 -}
79 -
80  static int iw_get_name(struct net_device *dev,
81                            struct iw_request_info *info,
82                            char *name, char *extra)
83 @@ -131,7 +103,7 @@ static int iw_get_name(struct net_device *dev,
84  #if IOCTL_DBG
85         printk("%s Call\n", __FUNCTION__);
86  #endif
87 -/*
88 +/*     
89         u8 rates[10];
90         int len, i, over2 = 0;
91  
92 @@ -156,7 +128,7 @@ static int iw_ioctl_siwencode(struct net_device *dev,
93         PTIWLN_ADAPTER_T pAdapter = &(((tiwlan_net_dev_t *)(dev->priv))->adapter);
94         cipherSuite_e   cipher;
95         int i;
96 -       ULONG len;
97 +       ULONG len; 
98  
99  #if IOCTL_DBG
100         printk("%s Call\n", __FUNCTION__);
101 @@ -175,7 +147,7 @@ static int iw_ioctl_siwencode(struct net_device *dev,
102                 return -EINVAL;
103  
104         UtilWepStatusGet(pAdapter, (UINT8 *)&cipher, &len);
105 -
106 +       
107         if (erq->flags & IW_ENCODE_DISABLED) {
108                 cipherSuite_e val=RSN_CIPHER_NONE;
109                 UtilWepStatusSet(pAdapter, (UINT8 *)&val, sizeof(val));
110 @@ -186,10 +158,10 @@ static int iw_ioctl_siwencode(struct net_device *dev,
111                 if (erq->length > 0) {
112                         OS_802_11_WEP wep;
113                         int len = erq->length <= 5 ? 5 : 13;
114 -
115 +                       
116                         cipherSuite_e val=RSN_CIPHER_WEP;
117                         UtilWepStatusSet(pAdapter, (UINT8 *)&val, sizeof(val));
118 -
119 +                       
120                         if (len > erq->length)
121                                 memset(keybuf + erq->length, 0, len - erq->length);
122                         memcpy(wep.KeyMaterial, keybuf, len);
123 @@ -201,7 +173,7 @@ static int iw_ioctl_siwencode(struct net_device *dev,
124                         /* No key data - just set the default TX key index */
125                         securityKeys_t key;
126                         UINT8 data[5];
127 -
128 +                       
129                         memset(&key, 0, sizeof(securityKeys_t));
130                         key.keyIndex = i;
131                         if (!UtilWepKeyGet(pAdapter, (UINT8 *)&key, sizeof(securityKeys_t)))
132 @@ -218,13 +190,13 @@ static int iw_ioctl_siwencode(struct net_device *dev,
133                                         }
134                                 }
135                                 else
136 -                                       return -EINVAL;
137 +                                       return -EINVAL;                         
138                         }
139                         else
140                                 return -EINVAL;
141                 }
142         }
143 -done:
144 +done:  
145         if (erq->flags & IW_ENCODE_OPEN)
146         {
147                 UINT8 MixedMode = true;
148 @@ -284,7 +256,7 @@ static int iw_ioctl_giwencode(struct net_device *dev,
149                 wkey.keyIndex = i;
150                 if (!UtilWepKeyGet(pAdapter, (PUCHAR)&wkey, sizeof(securityKeys_t)))
151                 {
152 -               printk("iw_ioctl_giwencode KeyIndex  %x , keyLength=%d\n",
153 +               printk("iw_ioctl_giwencode KeyIndex  %x , keyLength=%d\n", 
154                        wkey.keyIndex, wkey.encLen);
155                         if (wkey.encLen > 0)
156                         {
157 @@ -315,8 +287,8 @@ static int iw_ioctl_giwencode(struct net_device *dev,
158                 erq->flags |= IW_ENCODE_OPEN;
159         else
160                 erq->flags |= IW_ENCODE_RESTRICTED;
161 -
162 -
163 +               
164 +       
165         return 0;
166  }
167  
168 @@ -326,7 +298,7 @@ static int iw_ioctl_siwrate(struct net_device *dev,
169  {
170         PTIWLN_ADAPTER_T pAdapter = &(((tiwlan_net_dev_t *)(dev->priv))->adapter);
171         u32 val;
172 -
173 +       
174  #if IOCTL_DBG
175         printk("%s Call\n", __FUNCTION__);
176  #endif
177 @@ -334,7 +306,7 @@ static int iw_ioctl_siwrate(struct net_device *dev,
178                 val = 0;
179         else
180                 val = (rrq->value*2/1000000);
181 -
182 +       
183         return UtilDesiredRatesSet(pAdapter, (UINT8 *)&val, 4);
184  }
185  
186 @@ -372,7 +344,7 @@ static int iw_ioctl_giwaplist(struct net_device *dev,
187                                   struct iw_request_info *info,
188                                   struct iw_point *data, char *extra)
189  {
190 -
191 +       
192  #if 1
193         PTIWLN_ADAPTER_T pAdapter = &(((tiwlan_net_dev_t *)(dev->priv))->adapter);
194         struct sockaddr addr[IW_MAX_AP];
195 @@ -382,7 +354,7 @@ static int iw_ioctl_giwaplist(struct net_device *dev,
196         OS_802_11_BSSID_EX *bssid;
197         OS_802_11_BSSID_LIST_EX *list;
198         int i;
199 -
200 +       
201  #if IOCTL_DBG
202         printk("%s Call\n", __FUNCTION__);
203  #endif
204 @@ -395,9 +367,9 @@ static int iw_ioctl_giwaplist(struct net_device *dev,
205      printk("bssid 0x%x\n",bssid);
206      number_items = list->NumberOfItems;
207      printk("number_items 0x%x\n",number_items);
208 -
209 +    
210         data->length = number_items;
211 -
212 +       
213         for (i=0;i<number_items;i++)
214         {
215                 addr[i].sa_family = ARPHRD_ETHER;
216 @@ -409,7 +381,7 @@ static int iw_ioctl_giwaplist(struct net_device *dev,
217                 qual[i].updated = 7;
218          bssid = (OS_802_11_BSSID_EX *) (((char *) bssid) + bssid->Length);
219         }
220 -
221 +       
222         memcpy(extra, &addr, sizeof(addr[0]) * data->length);
223         data->flags = 1; /* has quality information */
224         memcpy(extra + sizeof(addr[0]) * data->length, &qual,
225 @@ -438,7 +410,7 @@ static int iw_ioctl_siwrts(struct net_device *dev,
226                 val = rts->value;
227  
228         UtilRtsThresholdSet(pAdapter, (UINT8 *)&val, 4);
229 -
230 +       
231         return 0;
232  }
233  
234 @@ -559,7 +531,7 @@ static int iw_ioctl_siwfreq(struct net_device *dev,
235  #endif
236         if (freq->m == -1)
237                 return -EOPNOTSUPP;
238 -
239 +               
240         /* freq => chan. */
241         if (freq->e == 1 &&
242             freq->m / 100000 >= freq_list[0] &&
243 @@ -607,7 +579,7 @@ static int iw_ioctl_giwfreq(struct net_device *dev,
244  static int iw_ioctl_siwessid(struct net_device *dev,
245                                  struct iw_request_info *info,
246                                  struct iw_point *data, char *ssid)
247 -{
248 +{      
249         PTIWLN_ADAPTER_T pAdapter = &(((tiwlan_net_dev_t *)(dev->priv))->adapter);
250         OS_802_11_SSID essid;
251         OS_802_11_MAC_ADDRESS bssid = { 0xff,0xff,0xff,0xff,0xff,0xff };
252 @@ -645,7 +617,7 @@ static int iw_ioctl_giwessid(struct net_device *dev,
253         UtilGetSSID(pAdapter, (UINT8 *)&ssid, &len);
254         data->length = ssid.SsidLength;
255         memcpy(essid, ssid.Ssid, ssid.SsidLength);
256 -
257 +       
258         return 0;
259  }
260  
261 @@ -676,9 +648,9 @@ static int iw_ioctl_siwmode(struct net_device *dev,
262         default:
263                 val = 1;
264         }
265 -
266 +       
267      UtilInfrastructureModeSet(pAdapter, (UINT8 *)&val, 4);
268 -
269 +    
270         return 0;
271  }
272  
273 @@ -845,7 +817,7 @@ static int iw_ioctl_siwpower(struct net_device *dev,
274  {
275         PTIWLN_ADAPTER_T pAdapter = &(((tiwlan_net_dev_t *)(dev->priv))->adapter);
276         UINT32 val=POWER_MODE_ACTIVE;
277 -
278 +       
279  #if IOCTL_DBG
280         printk("%s Call\n", __FUNCTION__);
281  #endif
282 @@ -884,12 +856,12 @@ static int iw_ioctl_giwpower(struct net_device *dev,
283  {
284         PTIWLN_ADAPTER_T pAdapter = &(((tiwlan_net_dev_t *)(dev->priv))->adapter);
285         UINT32 val=POWER_MODE_ACTIVE, len;
286 -
287 +       
288  #if IOCTL_DBG
289         printk("%s Call\n", __FUNCTION__);
290  #endif
291         UtilPowerModeGet(pAdapter, (UINT8 *)&val, &len);
292 -
293 +       
294         if (val==POWER_MODE_ACTIVE) {
295                 rrq->disabled = 1;
296                 return 0;
297 @@ -906,7 +878,7 @@ static int iw_ioctl_siwretry(struct net_device *dev,
298                                  struct iw_param *rrq, char *extra)
299  {
300         PTIWLN_ADAPTER_T pAdapter = &(((tiwlan_net_dev_t *)(dev->priv))->adapter);
301 -
302 +       
303  #if IOCTL_DBG
304         printk("%s Call\n", __FUNCTION__);
305  #endif
306 @@ -935,11 +907,11 @@ static int iw_ioctl_giwretry(struct net_device *dev,
307         PTIWLN_ADAPTER_T pAdapter = &(((tiwlan_net_dev_t *)(dev->priv))->adapter);
308         u16 shortretry, longretry;
309         ULONG len;
310 -
311 +       
312  #if IOCTL_DBG
313         printk("%s Call\n", __FUNCTION__);
314  #endif
315 -       if (UtilShortRetryGet(pAdapter, (UINT8 *)&shortretry, &len)!=0 ||
316 +       if (UtilShortRetryGet(pAdapter, (UINT8 *)&shortretry, &len)!=0 || 
317                 UtilLongRetryGet(pAdapter, (UINT8 *)&longretry, &len)!=0)
318                 return -EINVAL;
319  
320 @@ -1001,12 +973,12 @@ static int iw_ioctl_siwscan(struct net_device *dev,
321  #endif
322         PTIWLN_ADAPTER_T pAdapter = &(((tiwlan_net_dev_t *)(dev->priv))->adapter);
323         int ret;
324 -
325 +       
326         scan_TimeStamp = jiffies;
327         init_scan_params();
328 -
329 +       
330         ret = UtilStartAppScanSet(pAdapter, (PCHAR)&iw_appScanParams, sizeof(iw_appScanParams));
331 -
332 +       
333         return ret;
334  }
335  
336 @@ -1031,7 +1003,7 @@ static inline int iw_scan_list(struct net_device *dev,
337         int chan;
338         u8 *pos;
339         spinlock_t lock;
340 -
341 +       
342  #if IOCTL_DBG
343         printk("%s Call\n", __FUNCTION__);
344  #endif
345 @@ -1041,7 +1013,7 @@ static inline int iw_scan_list(struct net_device *dev,
346      list = (OS_802_11_BSSID_LIST_EX *) list_buf;
347      bssid = &list->Bssid[0];
348      number_items = list->NumberOfItems;
349 -
350 +    
351         spin_lock_bh(&lock);
352         for (i=0;i<number_items;i++)
353         {
354 @@ -1052,7 +1024,7 @@ static inline int iw_scan_list(struct net_device *dev,
355                 iwe.len = IW_EV_ADDR_LEN;
356                 current_ev = iwe_stream_add_event(info, current_ev, end_buf, &iwe,
357                                                   IW_EV_ADDR_LEN);
358 -
359 +                                                 
360                 memset(&iwe, 0, sizeof(iwe));
361                 iwe.cmd = SIOCGIWESSID;
362                 iwe.u.data.length = bssid->Ssid.SsidLength;
363 @@ -1060,7 +1032,7 @@ static inline int iw_scan_list(struct net_device *dev,
364                 iwe.len = IW_EV_POINT_LEN + iwe.u.data.length;
365  //             printk("essid=%s len=%d\n", bssid->Ssid.Ssid, bssid->Ssid.SsidLength);
366                 current_ev = iwe_stream_add_point(info, current_ev, end_buf, &iwe, (char *)bssid->Ssid.Ssid);
367 -
368 +                                                         
369                 memset(&iwe, 0, sizeof(iwe));
370                 iwe.cmd = SIOCGIWMODE;
371                 capabilities = bssid->Union.Capabilities;
372 @@ -1074,7 +1046,7 @@ static inline int iw_scan_list(struct net_device *dev,
373                         current_ev = iwe_stream_add_event(info, current_ev, end_buf, &iwe,
374                                                           IW_EV_UINT_LEN);
375                 }
376 -
377 +               
378                 memset(&iwe, 0, sizeof(iwe));
379                 iwe.cmd = SIOCGIWFREQ;
380                 chan = bssid->Configuration.Union.channel;
381 @@ -1085,7 +1057,7 @@ static inline int iw_scan_list(struct net_device *dev,
382                         current_ev = iwe_stream_add_event(info, current_ev, end_buf, &iwe,
383                                                           IW_EV_FREQ_LEN);
384                 }
385 -
386 +               
387                 memset(&iwe, 0, sizeof(iwe));
388                 iwe.cmd = IWEVQUAL;
389                 iwe.u.qual.qual = bssid->Rssi;
390 @@ -1107,7 +1079,7 @@ static inline int iw_scan_list(struct net_device *dev,
391                 iwe.u.data.length = 0;
392                 iwe.len = IW_EV_POINT_LEN + iwe.u.data.length;
393                 current_ev = iwe_stream_add_point(info, current_ev, end_buf, &iwe, "");
394 -
395 +               
396                 /* TODO: add SuppRates into BSS table */
397                 memset(&iwe, 0, sizeof(iwe));
398                 iwe.cmd = SIOCGIWRATE;
399 @@ -1125,7 +1097,7 @@ static inline int iw_scan_list(struct net_device *dev,
400                 /* Check if we added any event */
401                 if ((current_val - current_ev) > IW_EV_LCP_LEN)
402                         current_ev = current_val;
403 -
404 +       
405                 /* TODO: add BeaconInt,resp_rate,atim into BSS table */
406                 memset(&iwe, 0, sizeof(iwe));
407                 iwe.cmd = IWEVCUSTOM;
408 @@ -1143,14 +1115,14 @@ static inline int iw_scan_list(struct net_device *dev,
409                         current_ev = iwe_stream_add_point(info, current_ev, end_buf,
410                                                           &iwe, buf);
411                 }
412 -
413 +               
414  #if 1
415                 IELen = 0;
416          IELen += sizeof(OS_802_11_FIXED_IEs);
417          pVarIes = (OS_802_11_VARIABLE_IEs*)&bssid->IEs[IELen];
418                 while (IELen < bssid->IELength)
419                 {
420 -//                     printk("IELen=%d pVarIes->ElementID=%d\n", IELen, pVarIes->ElementID);
421 +//                     printk("IELen=%d pVarIes->ElementID=%d\n", IELen, pVarIes->ElementID);                
422                         if (pVarIes->ElementID == MFIE_TYPE_RSN || pVarIes->ElementID == MFIE_TYPE_GENERIC) {
423                                 memset(&iwe, 0, sizeof(iwe));
424                                 iwe.cmd = IWEVGENIE;
425 @@ -1158,11 +1130,11 @@ static inline int iw_scan_list(struct net_device *dev,
426                                 current_ev = iwe_stream_add_point(
427                                         info, current_ev, end_buf, &iwe, (char *)pVarIes);
428                         }
429 -
430 -            IELen += (pVarIes->Length + 2);
431 +               
432 +            IELen += (pVarIes->Length + 2);            
433                 pVarIes = (OS_802_11_VARIABLE_IEs*)&bssid->IEs[IELen];
434                 }
435 -#endif
436 +#endif        
437                 if ((end_buf - current_ev) <= IW_EV_ADDR_LEN) {
438                         /* Ask user space to try again with a bigger buffer */
439                         spin_unlock_bh(&lock);
440 @@ -1171,7 +1143,7 @@ static inline int iw_scan_list(struct net_device *dev,
441  //             printk("current_ev=%x\n", current_ev);
442          bssid = (OS_802_11_BSSID_EX *) (((char *) bssid) + bssid->Length);
443         }
444 -
445 +       
446         spin_unlock_bh(&lock);
447         return current_ev - extra;
448  }
449 @@ -1491,7 +1463,7 @@ static int iw_ioctl_siwauth(struct net_device *dev,
450         }
451         return 0;
452  #endif
453 -       return -EOPNOTSUPP;
454 +       return -EOPNOTSUPP;     
455  }
456  
457  
458 @@ -1534,7 +1506,7 @@ static int iw_ioctl_giwauth(struct net_device *dev,
459         }
460         return 0;
461  #endif
462 -       return -EOPNOTSUPP;
463 +       return -EOPNOTSUPP;     
464  }
465  
466  
467 @@ -1546,7 +1518,7 @@ static int iw_ioctl_siwencodeext(struct net_device *dev,
468  #if IOCTL_DBG
469         printk("%s Call\n", __FUNCTION__);
470  #endif
471 -#if 0
472 +#if 0  
473         struct hostap_interface *iface = dev->priv;
474         local_info_t *local = iface->local;
475         struct iw_encode_ext *ext = (struct iw_encode_ext *) extra;
476 @@ -1712,7 +1684,7 @@ static int iw_ioctl_siwencodeext(struct net_device *dev,
477  
478         return ret;
479  #endif
480 -       return -EOPNOTSUPP;
481 +       return -EOPNOTSUPP;     
482  }
483  
484  
485 @@ -1723,7 +1695,7 @@ static int iw_ioctl_giwencodeext(struct net_device *dev,
486  #if IOCTL_DBG
487         printk("%s Call\n", __FUNCTION__);
488  #endif
489 -#if 0
490 +#if 0  
491         struct hostap_interface *iface = dev->priv;
492         local_info_t *local = iface->local;
493         struct prism2_crypt_data **crypt;
494 @@ -1788,7 +1760,7 @@ static int iw_ioctl_giwencodeext(struct net_device *dev,
495  
496         return 0;
497  #endif
498 -       return -EOPNOTSUPP;
499 +       return -EOPNOTSUPP;             
500  }
501  #endif /* WIRELESS_EXT > 17 */
502  
503 @@ -1832,7 +1804,7 @@ static int iw_ioctl_siwmlme(struct net_device *dev,
504  
505  static const iw_handler ti_handler[] =
506  {
507 -       (iw_handler) iw_ioctl_commit,                   /* SIOCSIWCOMMIT */
508 +       (iw_handler) NULL,                                              /* SIOCSIWCOMMIT */
509         (iw_handler) iw_get_name,                               /* SIOCGIWNAME */
510         (iw_handler) NULL,                                              /* SIOCSIWNWID */
511         (iw_handler) NULL,                                              /* SIOCGIWNWID */
512 @@ -1842,20 +1814,31 @@ static const iw_handler ti_handler[] =
513         (iw_handler) iw_ioctl_giwmode,                  /* SIOCGIWMODE */
514         (iw_handler) iw_ioctl_siwsens,                  /* SIOCSIWSENS */
515         (iw_handler) iw_ioctl_giwsens,                  /* SIOCGIWSENS */
516 -       (iw_handler) NULL,                                              /* SIOCSIWRANGE */
517 +       (iw_handler) NULL /* not used */,               /* SIOCSIWRANGE */
518         (iw_handler) iw_ioctl_giwrange,                 /* SIOCGIWRANGE */
519 -       (iw_handler) NULL,                                              /* SIOCSIWPRIV */
520 -       (iw_handler) NULL,                                              /* SIOCGIWPRIV */
521 -       (iw_handler) NULL,                                              /* SIOCSIWSTATS */
522 -       (iw_handler) NULL,                                              /* SIOCGIWSTATS */
523 -       iw_handler_set_spy,                                             /* SIOCSIWSPY */
524 -       iw_handler_get_spy,                                             /* SIOCGIWSPY */
525 -       iw_handler_set_thrspy,                                  /* SIOCSIWTHRSPY */
526 -       iw_handler_get_thrspy,                                  /* SIOCGIWTHRSPY */
527 +       (iw_handler) NULL /* not used */,               /* SIOCSIWPRIV */
528 +       (iw_handler) NULL /* kernel code */,    /* SIOCGIWPRIV */
529 +       (iw_handler) NULL /* not used */,               /* SIOCSIWSTATS */
530 +       (iw_handler) NULL /* kernel code */,    /* SIOCGIWSTATS */
531 +#if WIRELESS_EXT > 15
532 +       (iw_handler) NULL,                                              /* SIOCSIWSPY */
533 +       (iw_handler) NULL,                                              /* SIOCGIWSPY */
534 +       (iw_handler) NULL,                                              /* SIOCSIWTHRSPY */
535 +       (iw_handler) NULL,                                              /* SIOCGIWTHRSPY */
536 +#else /* WIRELESS_EXT > 15 */
537 +       (iw_handler) NULL,                                              /* SIOCSIWSPY */
538 +       (iw_handler) NULL,                                              /* SIOCGIWSPY */
539 +       (iw_handler) NULL,                                              /* -- hole -- */
540 +       (iw_handler) NULL,                                              /* -- hole -- */
541 +#endif /* WIRELESS_EXT > 15 */
542         (iw_handler) iw_ioctl_siwap,                    /* SIOCSIWAP */
543         (iw_handler) iw_ioctl_giwap,                    /* SIOCGIWAP */
544 +#if WIRELESS_EXT > 17
545         (iw_handler) iw_ioctl_siwmlme,                  /* SIOCSIWMLME */
546 -       (iw_handler) iw_ioctl_giwaplist,                /* SIOCGIWAPLIST - Deprecated */
547 +#else /* WIRELESS_EXT > 17 */
548 +       (iw_handler) NULL,                              /* -- hole -- */
549 +#endif /* WIRELESS_EXT > 17 */
550 +       (iw_handler) iw_ioctl_giwaplist,                /* SIOCGIWAPLIST */
551         (iw_handler) iw_ioctl_siwscan,                  /* SIOCSIWSCAN */
552         (iw_handler) iw_ioctl_giwscan,                  /* SIOCGIWSCAN */
553         (iw_handler) iw_ioctl_siwessid,                 /* SIOCSIWESSID */
554 @@ -1878,6 +1861,7 @@ static const iw_handler ti_handler[] =
555         (iw_handler) iw_ioctl_giwencode,                /* SIOCGIWENCODE */
556         (iw_handler) iw_ioctl_siwpower,                 /* SIOCSIWPOWER */
557         (iw_handler) iw_ioctl_giwpower,                 /* SIOCGIWPOWER */
558 +#if WIRELESS_EXT > 17
559         (iw_handler) NULL,                                              /* -- hole -- */
560         (iw_handler) NULL,                                              /* -- hole -- */
561         (iw_handler) iw_ioctl_siwgenie,                 /* SIOCSIWGENIE */
562 @@ -1888,6 +1872,7 @@ static const iw_handler ti_handler[] =
563         (iw_handler) iw_ioctl_giwencodeext,             /* SIOCGIWENCODEEXT */
564         (iw_handler) NULL,                                              /* SIOCSIWPMKSA */
565         (iw_handler) NULL,                                              /* -- hole -- */
566 +#endif /* WIRELESS_EXT > 17 */
567  };
568  
569  #if 0
570 @@ -1918,6 +1903,5 @@ static const struct iw_handler_def ti_iw_handler_def =
571  
572  void tiwlan_iwhandler_init(struct net_device *dev)
573  {
574 -   dev->wireless_handlers = (struct iw_handler_def *) &ti_iw_handler_def;
575 -   printk("TIWLAN :: Wireless Extentions Active");
576 +   dev->wireless_handlers = (struct iw_handler_def *) &ti_iw_handler_def;      
577  }
578 -- 
579 1.6.3.1
580