Merge branch 'timers-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
[pandora-kernel.git] / drivers / staging / rtl8192su / ieee80211 / ieee80211_softmac_wx.c
1 /* IEEE 802.11 SoftMAC layer
2  * Copyright (c) 2005 Andrea Merello <andreamrl@tiscali.it>
3  *
4  * Mostly extracted from the rtl8180-sa2400 driver for the
5  * in-kernel generic ieee802.11 stack.
6  *
7  * Some pieces of code might be stolen from ipw2100 driver
8  * copyright of who own it's copyright ;-)
9  *
10  * PS wx handler mostly stolen from hostap, copyright who
11  * own it's copyright ;-)
12  *
13  * released under the GPL
14  */
15
16
17 #include "ieee80211.h"
18 #ifdef ENABLE_DOT11D
19 #include "dot11d.h"
20 #endif
21 /* FIXME: add A freqs */
22
23 const long ieee80211_wlan_frequencies[] = {
24         2412, 2417, 2422, 2427,
25         2432, 2437, 2442, 2447,
26         2452, 2457, 2462, 2467,
27         2472, 2484
28 };
29
30
31 int ieee80211_wx_set_freq(struct ieee80211_device *ieee, struct iw_request_info *a,
32                              union iwreq_data *wrqu, char *b)
33 {
34         int ret;
35         struct iw_freq *fwrq = & wrqu->freq;
36
37         down(&ieee->wx_sem);
38
39         if(ieee->iw_mode == IW_MODE_INFRA){
40                 ret = -EOPNOTSUPP;
41                 goto out;
42         }
43
44         /* if setting by freq convert to channel */
45         if (fwrq->e == 1) {
46                 if ((fwrq->m >= (int) 2.412e8 &&
47                      fwrq->m <= (int) 2.487e8)) {
48                         int f = fwrq->m / 100000;
49                         int c = 0;
50
51                         while ((c < 14) && (f != ieee80211_wlan_frequencies[c]))
52                                 c++;
53
54                         /* hack to fall through */
55                         fwrq->e = 0;
56                         fwrq->m = c + 1;
57                 }
58         }
59
60         if (fwrq->e > 0 || fwrq->m > 14 || fwrq->m < 1 ){
61                 ret = -EOPNOTSUPP;
62                 goto out;
63
64         }else { /* Set the channel */
65
66 #ifdef ENABLE_DOT11D
67                 if (!(GET_DOT11D_INFO(ieee)->channel_map)[fwrq->m]) {
68                         ret = -EINVAL;
69                         goto out;
70                 }
71 #endif
72                 ieee->current_network.channel = fwrq->m;
73                 ieee->set_chan(ieee->dev, ieee->current_network.channel);
74
75                 if(ieee->iw_mode == IW_MODE_ADHOC || ieee->iw_mode == IW_MODE_MASTER)
76                         if(ieee->state == IEEE80211_LINKED){
77
78                         ieee80211_stop_send_beacons(ieee);
79                         ieee80211_start_send_beacons(ieee);
80                         }
81         }
82
83         ret = 0;
84 out:
85         up(&ieee->wx_sem);
86         return ret;
87 }
88
89
90 int ieee80211_wx_get_freq(struct ieee80211_device *ieee,
91                              struct iw_request_info *a,
92                              union iwreq_data *wrqu, char *b)
93 {
94         struct iw_freq *fwrq = & wrqu->freq;
95
96         if (ieee->current_network.channel == 0)
97                 return -1;
98         //NM 0.7.0 will not accept channel any more.
99         fwrq->m = ieee80211_wlan_frequencies[ieee->current_network.channel-1] * 100000;
100         fwrq->e = 1;
101 //      fwrq->m = ieee->current_network.channel;
102 //      fwrq->e = 0;
103
104         return 0;
105 }
106
107 int ieee80211_wx_get_wap(struct ieee80211_device *ieee,
108                             struct iw_request_info *info,
109                             union iwreq_data *wrqu, char *extra)
110 {
111         unsigned long flags;
112
113         wrqu->ap_addr.sa_family = ARPHRD_ETHER;
114
115         if (ieee->iw_mode == IW_MODE_MONITOR)
116                 return -1;
117
118         /* We want avoid to give to the user inconsistent infos*/
119         spin_lock_irqsave(&ieee->lock, flags);
120
121         if (ieee->state != IEEE80211_LINKED &&
122                 ieee->state != IEEE80211_LINKED_SCANNING &&
123                 ieee->wap_set == 0)
124
125                 memset(wrqu->ap_addr.sa_data, 0, ETH_ALEN);
126         else
127                 memcpy(wrqu->ap_addr.sa_data,
128                        ieee->current_network.bssid, ETH_ALEN);
129
130         spin_unlock_irqrestore(&ieee->lock, flags);
131
132         return 0;
133 }
134
135
136 int ieee80211_wx_set_wap(struct ieee80211_device *ieee,
137                          struct iw_request_info *info,
138                          union iwreq_data *awrq,
139                          char *extra)
140 {
141
142         int ret = 0;
143         u8 zero[] = {0,0,0,0,0,0};
144         unsigned long flags;
145
146         short ifup = ieee->proto_started;//dev->flags & IFF_UP;
147         struct sockaddr *temp = (struct sockaddr *)awrq;
148
149         ieee->sync_scan_hurryup = 1;
150
151         down(&ieee->wx_sem);
152         /* use ifconfig hw ether */
153         if (ieee->iw_mode == IW_MODE_MASTER){
154                 ret = -1;
155                 goto out;
156         }
157
158         if (temp->sa_family != ARPHRD_ETHER){
159                 ret = -EINVAL;
160                 goto out;
161         }
162
163         if (ifup)
164                 ieee80211_stop_protocol(ieee);
165
166         /* just to avoid to give inconsistent infos in the
167          * get wx method. not really needed otherwise
168          */
169         spin_lock_irqsave(&ieee->lock, flags);
170
171         memcpy(ieee->current_network.bssid, temp->sa_data, ETH_ALEN);
172         ieee->wap_set = memcmp(temp->sa_data, zero,ETH_ALEN)!=0;
173
174         spin_unlock_irqrestore(&ieee->lock, flags);
175
176         if (ifup)
177                 ieee80211_start_protocol(ieee);
178 out:
179         up(&ieee->wx_sem);
180         return ret;
181 }
182
183  int ieee80211_wx_get_essid(struct ieee80211_device *ieee, struct iw_request_info *a,union iwreq_data *wrqu,char *b)
184 {
185         int len,ret = 0;
186         unsigned long flags;
187
188         if (ieee->iw_mode == IW_MODE_MONITOR)
189                 return -1;
190
191         /* We want avoid to give to the user inconsistent infos*/
192         spin_lock_irqsave(&ieee->lock, flags);
193
194         if (ieee->current_network.ssid[0] == '\0' ||
195                 ieee->current_network.ssid_len == 0){
196                 ret = -1;
197                 goto out;
198         }
199
200         if (ieee->state != IEEE80211_LINKED &&
201                 ieee->state != IEEE80211_LINKED_SCANNING &&
202                 ieee->ssid_set == 0){
203                 ret = -1;
204                 goto out;
205         }
206         len = ieee->current_network.ssid_len;
207         wrqu->essid.length = len;
208         strncpy(b,ieee->current_network.ssid,len);
209         wrqu->essid.flags = 1;
210
211 out:
212         spin_unlock_irqrestore(&ieee->lock, flags);
213
214         return ret;
215
216 }
217
218 int ieee80211_wx_set_rate(struct ieee80211_device *ieee,
219                              struct iw_request_info *info,
220                              union iwreq_data *wrqu, char *extra)
221 {
222
223         u32 target_rate = wrqu->bitrate.value;
224
225         ieee->rate = target_rate/100000;
226         //FIXME: we might want to limit rate also in management protocols.
227         return 0;
228 }
229
230
231
232 int ieee80211_wx_get_rate(struct ieee80211_device *ieee,
233                              struct iw_request_info *info,
234                              union iwreq_data *wrqu, char *extra)
235 {
236         u32 tmp_rate = 0;
237 #ifdef RTL8192SU
238         //printk("===>mode:%d, halfNmode:%d\n", ieee->mode, ieee->bHalfWirelessN24GMode);
239         if (ieee->mode & (IEEE_A | IEEE_B | IEEE_G))
240                 tmp_rate = ieee->rate;
241         else if (ieee->mode & IEEE_N_5G)
242                 tmp_rate = 580;
243         else if (ieee->mode & IEEE_N_24G)
244         {
245                 if (ieee->GetHalfNmodeSupportByAPsHandler(ieee->dev))
246                         tmp_rate = HTHalfMcsToDataRate(ieee, 15);
247                 else
248                         tmp_rate = HTMcsToDataRate(ieee, 15);
249         }
250 #else
251         tmp_rate = TxCountToDataRate(ieee, ieee->softmac_stats.CurrentShowTxate);
252
253 #endif
254         wrqu->bitrate.value = tmp_rate * 500000;
255
256         return 0;
257 }
258
259
260 int ieee80211_wx_set_rts(struct ieee80211_device *ieee,
261                              struct iw_request_info *info,
262                              union iwreq_data *wrqu, char *extra)
263 {
264         if (wrqu->rts.disabled || !wrqu->rts.fixed)
265                 ieee->rts = DEFAULT_RTS_THRESHOLD;
266         else
267         {
268                 if (wrqu->rts.value < MIN_RTS_THRESHOLD ||
269                                 wrqu->rts.value > MAX_RTS_THRESHOLD)
270                         return -EINVAL;
271                 ieee->rts = wrqu->rts.value;
272         }
273         return 0;
274 }
275
276 int ieee80211_wx_get_rts(struct ieee80211_device *ieee,
277                              struct iw_request_info *info,
278                              union iwreq_data *wrqu, char *extra)
279 {
280         wrqu->rts.value = ieee->rts;
281         wrqu->rts.fixed = 0;    /* no auto select */
282         wrqu->rts.disabled = (wrqu->rts.value == DEFAULT_RTS_THRESHOLD);
283         return 0;
284 }
285 int ieee80211_wx_set_mode(struct ieee80211_device *ieee, struct iw_request_info *a,
286                              union iwreq_data *wrqu, char *b)
287 {
288
289         ieee->sync_scan_hurryup = 1;
290
291         down(&ieee->wx_sem);
292
293         if (wrqu->mode == ieee->iw_mode)
294                 goto out;
295
296         if (wrqu->mode == IW_MODE_MONITOR){
297
298                 ieee->dev->type = ARPHRD_IEEE80211;
299         }else{
300                 ieee->dev->type = ARPHRD_ETHER;
301         }
302
303         if (!ieee->proto_started){
304                 ieee->iw_mode = wrqu->mode;
305         }else{
306                 ieee80211_stop_protocol(ieee);
307                 ieee->iw_mode = wrqu->mode;
308                 ieee80211_start_protocol(ieee);
309         }
310
311 out:
312         up(&ieee->wx_sem);
313         return 0;
314 }
315
316 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,20)
317 void ieee80211_wx_sync_scan_wq(struct work_struct *work)
318 {
319         struct ieee80211_device *ieee = container_of(work, struct ieee80211_device, wx_sync_scan_wq);
320 #else
321 void ieee80211_wx_sync_scan_wq(struct ieee80211_device *ieee)
322 {
323 #endif
324         short chan;
325         HT_EXTCHNL_OFFSET chan_offset=0;
326         HT_CHANNEL_WIDTH bandwidth=0;
327         int b40M = 0;
328         static int count = 0;
329         chan = ieee->current_network.channel;
330         netif_carrier_off(ieee->dev);
331
332         if (ieee->data_hard_stop)
333                 ieee->data_hard_stop(ieee->dev);
334
335         ieee80211_stop_send_beacons(ieee);
336
337         ieee->state = IEEE80211_LINKED_SCANNING;
338         ieee->link_change(ieee->dev);
339 #ifndef RTL8192SE
340         ieee->InitialGainHandler(ieee->dev,IG_Backup);
341 #endif
342 #if(RTL8192S_DISABLE_FW_DM == 0)
343         if (ieee->SetFwCmdHandler)
344         {
345                 ieee->SetFwCmdHandler(ieee->dev, FW_CMD_DIG_HALT);
346                 ieee->SetFwCmdHandler(ieee->dev, FW_CMD_HIGH_PWR_DISABLE);
347         }
348 #endif
349         if (ieee->pHTInfo->bCurrentHTSupport && ieee->pHTInfo->bEnableHT && ieee->pHTInfo->bCurBW40MHz) {
350                 b40M = 1;
351                 chan_offset = ieee->pHTInfo->CurSTAExtChnlOffset;
352                 bandwidth = (HT_CHANNEL_WIDTH)ieee->pHTInfo->bCurBW40MHz;
353                 printk("Scan in 40M, force to 20M first:%d, %d\n", chan_offset, bandwidth);
354                 ieee->SetBWModeHandler(ieee->dev, HT_CHANNEL_WIDTH_20, HT_EXTCHNL_OFFSET_NO_EXT);
355                 }
356         ieee80211_start_scan_syncro(ieee);
357         if (b40M) {
358                 printk("Scan in 20M, back to 40M\n");
359                 if (chan_offset == HT_EXTCHNL_OFFSET_UPPER)
360                         ieee->set_chan(ieee->dev, chan + 2);
361                 else if (chan_offset == HT_EXTCHNL_OFFSET_LOWER)
362                         ieee->set_chan(ieee->dev, chan - 2);
363                 else
364                         ieee->set_chan(ieee->dev, chan);
365                 ieee->SetBWModeHandler(ieee->dev, bandwidth, chan_offset);
366         } else {
367                 ieee->set_chan(ieee->dev, chan);
368         }
369
370 #ifndef RTL8192SE
371         ieee->InitialGainHandler(ieee->dev,IG_Restore);
372 #endif
373 #if(RTL8192S_DISABLE_FW_DM == 0)
374         if (ieee->SetFwCmdHandler)
375         {
376                 ieee->SetFwCmdHandler(ieee->dev, FW_CMD_DIG_RESUME);
377                 ieee->SetFwCmdHandler(ieee->dev, FW_CMD_HIGH_PWR_ENABLE);
378         }
379 #endif
380         ieee->state = IEEE80211_LINKED;
381         ieee->link_change(ieee->dev);
382         // To prevent the immediately calling watch_dog after scan.
383         if(ieee->LinkDetectInfo.NumRecvBcnInPeriod==0||ieee->LinkDetectInfo.NumRecvDataInPeriod==0 )
384         {
385                 ieee->LinkDetectInfo.NumRecvBcnInPeriod = 1;
386                 ieee->LinkDetectInfo.NumRecvDataInPeriod= 1;
387         }
388         if (ieee->data_hard_resume)
389                 ieee->data_hard_resume(ieee->dev);
390
391         if(ieee->iw_mode == IW_MODE_ADHOC || ieee->iw_mode == IW_MODE_MASTER)
392                 ieee80211_start_send_beacons(ieee);
393
394         netif_carrier_on(ieee->dev);
395         count = 0;
396         up(&ieee->wx_sem);
397
398 }
399
400 int ieee80211_wx_set_scan(struct ieee80211_device *ieee, struct iw_request_info *a,
401                              union iwreq_data *wrqu, char *b)
402 {
403         int ret = 0;
404
405         down(&ieee->wx_sem);
406
407         if (ieee->iw_mode == IW_MODE_MONITOR || !(ieee->proto_started)){
408                 ret = -1;
409                 goto out;
410         }
411
412         if ( ieee->state == IEEE80211_LINKED){
413 #if LINUX_VERSION_CODE > KERNEL_VERSION(2,5,0)
414                 queue_work(ieee->wq, &ieee->wx_sync_scan_wq);
415 #else
416                 schedule_task(&ieee->wx_sync_scan_wq);
417 #endif
418                 /* intentionally forget to up sem */
419                 return 0;
420         }
421
422 out:
423         up(&ieee->wx_sem);
424         return ret;
425 }
426
427 int ieee80211_wx_set_essid(struct ieee80211_device *ieee,
428                               struct iw_request_info *a,
429                               union iwreq_data *wrqu, char *extra)
430 {
431
432         int ret=0,len;
433         short proto_started;
434         unsigned long flags;
435
436         ieee->sync_scan_hurryup = 1;
437         down(&ieee->wx_sem);
438
439         proto_started = ieee->proto_started;
440
441         if (wrqu->essid.length > IW_ESSID_MAX_SIZE){
442                 ret= -E2BIG;
443                 goto out;
444         }
445
446         if (ieee->iw_mode == IW_MODE_MONITOR){
447                 ret= -1;
448                 goto out;
449         }
450
451         if(proto_started)
452                 ieee80211_stop_protocol(ieee);
453
454
455         /* this is just to be sure that the GET wx callback
456          * has consisten infos. not needed otherwise
457          */
458         spin_lock_irqsave(&ieee->lock, flags);
459
460         if (wrqu->essid.flags && wrqu->essid.length) {
461                 //first flush current network.ssid
462                 len = ((wrqu->essid.length-1) < IW_ESSID_MAX_SIZE) ? (wrqu->essid.length-1) : IW_ESSID_MAX_SIZE;
463 #if LINUX_VERSION_CODE <  KERNEL_VERSION(2,6,20)
464                 strncpy(ieee->current_network.ssid, extra, len);
465                 ieee->current_network.ssid_len = len;
466 #if 0
467                 {
468                         int i;
469                         for (i=0; i<len; i++)
470                                 printk("%c ", extra[i]);
471                         printk("\n");
472                 }
473 #endif
474 #else
475                 strncpy(ieee->current_network.ssid, extra, len+1);
476                 ieee->current_network.ssid_len = len+1;
477 #if 0
478                 {
479                         int i;
480                         for (i=0; i<len + 1; i++)
481                                 printk("%c ", extra[i]);
482                         printk("\n");
483                 }
484 #endif
485 #endif
486                 ieee->ssid_set = 1;
487         }
488         else{
489                 ieee->ssid_set = 0;
490                 ieee->current_network.ssid[0] = '\0';
491                 ieee->current_network.ssid_len = 0;
492         }
493         spin_unlock_irqrestore(&ieee->lock, flags);
494
495         if (proto_started)
496                 ieee80211_start_protocol(ieee);
497 out:
498         up(&ieee->wx_sem);
499         return ret;
500 }
501
502  int ieee80211_wx_get_mode(struct ieee80211_device *ieee, struct iw_request_info *a,
503                              union iwreq_data *wrqu, char *b)
504 {
505
506         wrqu->mode = ieee->iw_mode;
507         return 0;
508 }
509
510  int ieee80211_wx_set_rawtx(struct ieee80211_device *ieee,
511                                struct iw_request_info *info,
512                                union iwreq_data *wrqu, char *extra)
513 {
514
515         int *parms = (int *)extra;
516         int enable = (parms[0] > 0);
517         short prev = ieee->raw_tx;
518
519         down(&ieee->wx_sem);
520
521         if(enable)
522                 ieee->raw_tx = 1;
523         else
524                 ieee->raw_tx = 0;
525
526         printk(KERN_INFO"raw TX is %s\n",
527               ieee->raw_tx ? "enabled" : "disabled");
528
529         if(ieee->iw_mode == IW_MODE_MONITOR)
530         {
531                 if(prev == 0 && ieee->raw_tx){
532                         if (ieee->data_hard_resume)
533                                 ieee->data_hard_resume(ieee->dev);
534
535                         netif_carrier_on(ieee->dev);
536                 }
537
538                 if(prev && ieee->raw_tx == 1)
539                         netif_carrier_off(ieee->dev);
540         }
541
542         up(&ieee->wx_sem);
543
544         return 0;
545 }
546
547 int ieee80211_wx_get_name(struct ieee80211_device *ieee,
548                              struct iw_request_info *info,
549                              union iwreq_data *wrqu, char *extra)
550 {
551         strlcpy(wrqu->name, "802.11", IFNAMSIZ);
552         if(ieee->modulation & IEEE80211_CCK_MODULATION){
553                 strlcat(wrqu->name, "b", IFNAMSIZ);
554                 if(ieee->modulation & IEEE80211_OFDM_MODULATION)
555                         strlcat(wrqu->name, "/g", IFNAMSIZ);
556         }else if(ieee->modulation & IEEE80211_OFDM_MODULATION)
557                 strlcat(wrqu->name, "g", IFNAMSIZ);
558         if (ieee->mode & (IEEE_N_24G | IEEE_N_5G))
559                 strlcat(wrqu->name, "/n", IFNAMSIZ);
560
561         if((ieee->state == IEEE80211_LINKED) ||
562                 (ieee->state == IEEE80211_LINKED_SCANNING))
563                 strlcat(wrqu->name, "  link", IFNAMSIZ);
564         else if(ieee->state != IEEE80211_NOLINK)
565                 strlcat(wrqu->name, " .....", IFNAMSIZ);
566
567
568         return 0;
569 }
570
571
572 /* this is mostly stolen from hostap */
573 int ieee80211_wx_set_power(struct ieee80211_device *ieee,
574                                  struct iw_request_info *info,
575                                  union iwreq_data *wrqu, char *extra)
576 {
577         int ret = 0;
578 #if 1
579         if(
580                 (!ieee->sta_wake_up) ||
581         //      (!ieee->ps_request_tx_ack) ||
582                 (!ieee->enter_sleep_state) ||
583                 (!ieee->ps_is_queue_empty)){
584
585         //      printk("ERROR. PS mode is tryied to be use but driver missed a callback\n\n");
586
587                 return -1;
588         }
589 #endif
590         down(&ieee->wx_sem);
591
592         if (wrqu->power.disabled){
593                 ieee->ps = IEEE80211_PS_DISABLED;
594                 goto exit;
595         }
596         if (wrqu->power.flags & IW_POWER_TIMEOUT) {
597                 //ieee->ps_period = wrqu->power.value / 1000;
598                 ieee->ps_timeout = wrqu->power.value / 1000;
599         }
600
601         if (wrqu->power.flags & IW_POWER_PERIOD) {
602
603                 //ieee->ps_timeout = wrqu->power.value / 1000;
604                 ieee->ps_period = wrqu->power.value / 1000;
605                 //wrq->value / 1024;
606
607         }
608         switch (wrqu->power.flags & IW_POWER_MODE) {
609         case IW_POWER_UNICAST_R:
610                 ieee->ps = IEEE80211_PS_UNICAST;
611                 break;
612         case IW_POWER_MULTICAST_R:
613                 ieee->ps = IEEE80211_PS_MBCAST;
614                 break;
615         case IW_POWER_ALL_R:
616                 ieee->ps = IEEE80211_PS_UNICAST | IEEE80211_PS_MBCAST;
617                 break;
618
619         case IW_POWER_ON:
620         //      ieee->ps = IEEE80211_PS_DISABLED;
621                 break;
622
623         default:
624                 ret = -EINVAL;
625                 goto exit;
626
627         }
628 exit:
629         up(&ieee->wx_sem);
630         return ret;
631
632 }
633
634 /* this is stolen from hostap */
635 int ieee80211_wx_get_power(struct ieee80211_device *ieee,
636                                  struct iw_request_info *info,
637                                  union iwreq_data *wrqu, char *extra)
638 {
639         int ret =0;
640
641         down(&ieee->wx_sem);
642
643         if(ieee->ps == IEEE80211_PS_DISABLED){
644                 wrqu->power.disabled = 1;
645                 goto exit;
646         }
647
648         wrqu->power.disabled = 0;
649
650         if ((wrqu->power.flags & IW_POWER_TYPE) == IW_POWER_TIMEOUT) {
651                 wrqu->power.flags = IW_POWER_TIMEOUT;
652                 wrqu->power.value = ieee->ps_timeout * 1000;
653         } else {
654 //              ret = -EOPNOTSUPP;
655 //              goto exit;
656                 wrqu->power.flags = IW_POWER_PERIOD;
657                 wrqu->power.value = ieee->ps_period * 1000;
658 //ieee->current_network.dtim_period * ieee->current_network.beacon_interval * 1024;
659         }
660
661        if ((ieee->ps & (IEEE80211_PS_MBCAST | IEEE80211_PS_UNICAST)) == (IEEE80211_PS_MBCAST | IEEE80211_PS_UNICAST))
662                 wrqu->power.flags |= IW_POWER_ALL_R;
663         else if (ieee->ps & IEEE80211_PS_MBCAST)
664                 wrqu->power.flags |= IW_POWER_MULTICAST_R;
665         else
666                 wrqu->power.flags |= IW_POWER_UNICAST_R;
667
668 exit:
669         up(&ieee->wx_sem);
670         return ret;
671
672 }
673 #if (LINUX_VERSION_CODE > KERNEL_VERSION(2,5,0))
674 EXPORT_SYMBOL(ieee80211_wx_get_essid);
675 EXPORT_SYMBOL(ieee80211_wx_set_essid);
676 EXPORT_SYMBOL(ieee80211_wx_set_rate);
677 EXPORT_SYMBOL(ieee80211_wx_get_rate);
678 EXPORT_SYMBOL(ieee80211_wx_set_wap);
679 EXPORT_SYMBOL(ieee80211_wx_get_wap);
680 EXPORT_SYMBOL(ieee80211_wx_set_mode);
681 EXPORT_SYMBOL(ieee80211_wx_get_mode);
682 EXPORT_SYMBOL(ieee80211_wx_set_scan);
683 EXPORT_SYMBOL(ieee80211_wx_get_freq);
684 EXPORT_SYMBOL(ieee80211_wx_set_freq);
685 EXPORT_SYMBOL(ieee80211_wx_set_rawtx);
686 EXPORT_SYMBOL(ieee80211_wx_get_name);
687 EXPORT_SYMBOL(ieee80211_wx_set_power);
688 EXPORT_SYMBOL(ieee80211_wx_get_power);
689 EXPORT_SYMBOL(ieee80211_wlan_frequencies);
690 EXPORT_SYMBOL(ieee80211_wx_set_rts);
691 EXPORT_SYMBOL(ieee80211_wx_get_rts);
692 #else
693 EXPORT_SYMBOL_NOVERS(ieee80211_wx_get_essid);
694 EXPORT_SYMBOL_NOVERS(ieee80211_wx_set_essid);
695 EXPORT_SYMBOL_NOVERS(ieee80211_wx_set_rate);
696 EXPORT_SYMBOL_NOVERS(ieee80211_wx_get_rate);
697 EXPORT_SYMBOL_NOVERS(ieee80211_wx_set_wap);
698 EXPORT_SYMBOL_NOVERS(ieee80211_wx_get_wap);
699 EXPORT_SYMBOL_NOVERS(ieee80211_wx_set_mode);
700 EXPORT_SYMBOL_NOVERS(ieee80211_wx_get_mode);
701 EXPORT_SYMBOL_NOVERS(ieee80211_wx_set_scan);
702 EXPORT_SYMBOL_NOVERS(ieee80211_wx_get_freq);
703 EXPORT_SYMBOL_NOVERS(ieee80211_wx_set_freq);
704 EXPORT_SYMBOL_NOVERS(ieee80211_wx_set_rawtx);
705 EXPORT_SYMBOL_NOVERS(ieee80211_wx_get_name);
706 EXPORT_SYMBOL_NOVERS(ieee80211_wx_set_power);
707 EXPORT_SYMBOL_NOVERS(ieee80211_wx_get_power);
708 EXPORT_SYMBOL_NOVERS(ieee80211_wlan_frequencies);
709 EXPORT_SYMBOL_NOVERS(ieee80211_wx_set_rts);
710 EXPORT_SYMBOL_NOVERS(ieee80211_wx_get_rts);
711 #endif