linux/drivers/staging/rtl8192e/ieee80211/ieee80211_softmac_wx.c
<<
>>
Prefs
   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
  23const 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
  31int 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;
  84out:
  85        up(&ieee->wx_sem);
  86        return ret;
  87}
  88
  89
  90int 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
 107int 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        wrqu->ap_addr.sa_family = ARPHRD_ETHER;
 113
 114        if (ieee->iw_mode == IW_MODE_MONITOR)
 115                return -1;
 116
 117        /* We want avoid to give to the user inconsistent infos*/
 118        spin_lock_irqsave(&ieee->lock, flags);
 119
 120        if (ieee->state != IEEE80211_LINKED &&
 121                ieee->state != IEEE80211_LINKED_SCANNING &&
 122                ieee->wap_set == 0)
 123
 124                memset(wrqu->ap_addr.sa_data, 0, ETH_ALEN);
 125        else
 126                memcpy(wrqu->ap_addr.sa_data,
 127                       ieee->current_network.bssid, ETH_ALEN);
 128
 129        spin_unlock_irqrestore(&ieee->lock, flags);
 130
 131        return 0;
 132}
 133
 134
 135int ieee80211_wx_set_wap(struct ieee80211_device *ieee,
 136                         struct iw_request_info *info,
 137                         union iwreq_data *awrq,
 138                         char *extra)
 139{
 140
 141        int ret = 0;
 142        u8 zero[] = {0,0,0,0,0,0};
 143        unsigned long flags;
 144
 145        short ifup = ieee->proto_started;//dev->flags & IFF_UP;
 146        struct sockaddr *temp = (struct sockaddr *)awrq;
 147
 148        ieee->sync_scan_hurryup = 1;
 149
 150        down(&ieee->wx_sem);
 151        /* use ifconfig hw ether */
 152        if (ieee->iw_mode == IW_MODE_MASTER){
 153                ret = -1;
 154                goto out;
 155        }
 156
 157        if (temp->sa_family != ARPHRD_ETHER){
 158                ret = -EINVAL;
 159                goto out;
 160        }
 161
 162        if (ifup)
 163                ieee80211_stop_protocol(ieee);
 164
 165        /* just to avoid to give inconsistent infos in the
 166         * get wx method. not really needed otherwise
 167         */
 168        spin_lock_irqsave(&ieee->lock, flags);
 169
 170        memcpy(ieee->current_network.bssid, temp->sa_data, ETH_ALEN);
 171        ieee->wap_set = memcmp(temp->sa_data, zero,ETH_ALEN)!=0;
 172
 173        spin_unlock_irqrestore(&ieee->lock, flags);
 174
 175        if (ifup)
 176                ieee80211_start_protocol(ieee);
 177out:
 178        up(&ieee->wx_sem);
 179        return ret;
 180}
 181
 182 int ieee80211_wx_get_essid(struct ieee80211_device *ieee, struct iw_request_info *a,union iwreq_data *wrqu,char *b)
 183{
 184        int len,ret = 0;
 185        unsigned long flags;
 186
 187        if (ieee->iw_mode == IW_MODE_MONITOR)
 188                return -1;
 189
 190        /* We want avoid to give to the user inconsistent infos*/
 191        spin_lock_irqsave(&ieee->lock, flags);
 192
 193        if (ieee->current_network.ssid[0] == '\0' ||
 194                ieee->current_network.ssid_len == 0){
 195                ret = -1;
 196                goto out;
 197        }
 198
 199        if (ieee->state != IEEE80211_LINKED &&
 200                ieee->state != IEEE80211_LINKED_SCANNING &&
 201                ieee->ssid_set == 0){
 202                ret = -1;
 203                goto out;
 204        }
 205        len = ieee->current_network.ssid_len;
 206        wrqu->essid.length = len;
 207        strncpy(b,ieee->current_network.ssid,len);
 208        wrqu->essid.flags = 1;
 209
 210out:
 211        spin_unlock_irqrestore(&ieee->lock, flags);
 212
 213        return ret;
 214
 215}
 216
 217int ieee80211_wx_set_rate(struct ieee80211_device *ieee,
 218                             struct iw_request_info *info,
 219                             union iwreq_data *wrqu, char *extra)
 220{
 221
 222        u32 target_rate = wrqu->bitrate.value;
 223
 224        ieee->rate = target_rate/100000;
 225        //FIXME: we might want to limit rate also in management protocols.
 226        return 0;
 227}
 228
 229
 230
 231int ieee80211_wx_get_rate(struct ieee80211_device *ieee,
 232                             struct iw_request_info *info,
 233                             union iwreq_data *wrqu, char *extra)
 234{
 235        u32 tmp_rate;
 236#if 0
 237        printk("===>mode:%d, halfNmode:%d\n", ieee->mode, ieee->bHalfWirelessN24GMode);
 238        if (ieee->mode & (IEEE_A | IEEE_B | IEEE_G))
 239                tmp_rate = ieee->rate;
 240        else if (ieee->mode & IEEE_N_5G)
 241                tmp_rate = 580;
 242        else if (ieee->mode & IEEE_N_24G)
 243        {
 244                if (ieee->GetHalfNmodeSupportByAPsHandler(ieee->dev))
 245                        tmp_rate = HTHalfMcsToDataRate(ieee, 15);
 246                else
 247                        tmp_rate = HTMcsToDataRate(ieee, 15);
 248        }
 249#else
 250        tmp_rate = TxCountToDataRate(ieee, ieee->softmac_stats.CurrentShowTxate);
 251
 252#endif
 253        wrqu->bitrate.value = tmp_rate * 500000;
 254
 255        return 0;
 256}
 257
 258
 259int ieee80211_wx_set_rts(struct ieee80211_device *ieee,
 260                             struct iw_request_info *info,
 261                             union iwreq_data *wrqu, char *extra)
 262{
 263        if (wrqu->rts.disabled || !wrqu->rts.fixed)
 264                ieee->rts = DEFAULT_RTS_THRESHOLD;
 265        else
 266        {
 267                if (wrqu->rts.value < MIN_RTS_THRESHOLD ||
 268                                wrqu->rts.value > MAX_RTS_THRESHOLD)
 269                        return -EINVAL;
 270                ieee->rts = wrqu->rts.value;
 271        }
 272        return 0;
 273}
 274
 275int ieee80211_wx_get_rts(struct ieee80211_device *ieee,
 276                             struct iw_request_info *info,
 277                             union iwreq_data *wrqu, char *extra)
 278{
 279        wrqu->rts.value = ieee->rts;
 280        wrqu->rts.fixed = 0;    /* no auto select */
 281        wrqu->rts.disabled = (wrqu->rts.value == DEFAULT_RTS_THRESHOLD);
 282        return 0;
 283}
 284int ieee80211_wx_set_mode(struct ieee80211_device *ieee, struct iw_request_info *a,
 285                             union iwreq_data *wrqu, char *b)
 286{
 287
 288        ieee->sync_scan_hurryup = 1;
 289
 290        down(&ieee->wx_sem);
 291
 292        if (wrqu->mode == ieee->iw_mode)
 293                goto out;
 294
 295        if (wrqu->mode == IW_MODE_MONITOR){
 296
 297                ieee->dev->type = ARPHRD_IEEE80211;
 298        }else{
 299                ieee->dev->type = ARPHRD_ETHER;
 300        }
 301
 302        if (!ieee->proto_started){
 303                ieee->iw_mode = wrqu->mode;
 304        }else{
 305                ieee80211_stop_protocol(ieee);
 306                ieee->iw_mode = wrqu->mode;
 307                ieee80211_start_protocol(ieee);
 308        }
 309
 310out:
 311        up(&ieee->wx_sem);
 312        return 0;
 313}
 314
 315#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,20)
 316void ieee80211_wx_sync_scan_wq(struct work_struct *work)
 317{
 318        struct ieee80211_device *ieee = container_of(work, struct ieee80211_device, wx_sync_scan_wq);
 319#else
 320void ieee80211_wx_sync_scan_wq(struct ieee80211_device *ieee)
 321{
 322#endif
 323        short chan;
 324        HT_EXTCHNL_OFFSET chan_offset=0;
 325        HT_CHANNEL_WIDTH bandwidth=0;
 326        int b40M = 0;
 327        static int count = 0;
 328        chan = ieee->current_network.channel;
 329        netif_carrier_off(ieee->dev);
 330
 331        if (ieee->data_hard_stop)
 332                ieee->data_hard_stop(ieee->dev);
 333
 334        ieee80211_stop_send_beacons(ieee);
 335
 336        ieee->state = IEEE80211_LINKED_SCANNING;
 337        ieee->link_change(ieee->dev);
 338        ieee->InitialGainHandler(ieee->dev,IG_Backup);
 339        if (ieee->pHTInfo->bCurrentHTSupport && ieee->pHTInfo->bEnableHT && ieee->pHTInfo->bCurBW40MHz) {
 340                b40M = 1;
 341                chan_offset = ieee->pHTInfo->CurSTAExtChnlOffset;
 342                bandwidth = (HT_CHANNEL_WIDTH)ieee->pHTInfo->bCurBW40MHz;
 343                printk("Scan in 40M, force to 20M first:%d, %d\n", chan_offset, bandwidth);
 344                ieee->SetBWModeHandler(ieee->dev, HT_CHANNEL_WIDTH_20, HT_EXTCHNL_OFFSET_NO_EXT);
 345                }
 346        ieee80211_start_scan_syncro(ieee);
 347        if (b40M) {
 348                printk("Scan in 20M, back to 40M\n");
 349                if (chan_offset == HT_EXTCHNL_OFFSET_UPPER)
 350                        ieee->set_chan(ieee->dev, chan + 2);
 351                else if (chan_offset == HT_EXTCHNL_OFFSET_LOWER)
 352                        ieee->set_chan(ieee->dev, chan - 2);
 353                else
 354                        ieee->set_chan(ieee->dev, chan);
 355                ieee->SetBWModeHandler(ieee->dev, bandwidth, chan_offset);
 356        } else {
 357                ieee->set_chan(ieee->dev, chan);
 358        }
 359
 360        ieee->InitialGainHandler(ieee->dev,IG_Restore);
 361        ieee->state = IEEE80211_LINKED;
 362        ieee->link_change(ieee->dev);
 363        // To prevent the immediately calling watch_dog after scan.
 364        if(ieee->LinkDetectInfo.NumRecvBcnInPeriod==0||ieee->LinkDetectInfo.NumRecvDataInPeriod==0 )
 365        {
 366                ieee->LinkDetectInfo.NumRecvBcnInPeriod = 1;
 367                ieee->LinkDetectInfo.NumRecvDataInPeriod= 1;
 368        }
 369        if (ieee->data_hard_resume)
 370                ieee->data_hard_resume(ieee->dev);
 371
 372        if(ieee->iw_mode == IW_MODE_ADHOC || ieee->iw_mode == IW_MODE_MASTER)
 373                ieee80211_start_send_beacons(ieee);
 374
 375        netif_carrier_on(ieee->dev);
 376        count = 0;
 377        up(&ieee->wx_sem);
 378
 379}
 380
 381int ieee80211_wx_set_scan(struct ieee80211_device *ieee, struct iw_request_info *a,
 382                             union iwreq_data *wrqu, char *b)
 383{
 384        int ret = 0;
 385
 386        down(&ieee->wx_sem);
 387
 388        if (ieee->iw_mode == IW_MODE_MONITOR || !(ieee->proto_started)){
 389                ret = -1;
 390                goto out;
 391        }
 392
 393        if ( ieee->state == IEEE80211_LINKED){
 394#if LINUX_VERSION_CODE > KERNEL_VERSION(2,5,0)
 395                queue_work(ieee->wq, &ieee->wx_sync_scan_wq);
 396#else
 397                schedule_task(&ieee->wx_sync_scan_wq);
 398#endif
 399                /* intentionally forget to up sem */
 400                return 0;
 401        }
 402
 403out:
 404        up(&ieee->wx_sem);
 405        return ret;
 406}
 407
 408int ieee80211_wx_set_essid(struct ieee80211_device *ieee,
 409                              struct iw_request_info *a,
 410                              union iwreq_data *wrqu, char *extra)
 411{
 412
 413        int ret=0,len;
 414        short proto_started;
 415        unsigned long flags;
 416
 417        ieee->sync_scan_hurryup = 1;
 418        down(&ieee->wx_sem);
 419
 420        proto_started = ieee->proto_started;
 421
 422        if (wrqu->essid.length > IW_ESSID_MAX_SIZE){
 423                ret= -E2BIG;
 424                goto out;
 425        }
 426
 427        if (ieee->iw_mode == IW_MODE_MONITOR){
 428                ret= -1;
 429                goto out;
 430        }
 431
 432        if(proto_started)
 433                ieee80211_stop_protocol(ieee);
 434
 435
 436        /* this is just to be sure that the GET wx callback
 437         * has consisten infos. not needed otherwise
 438         */
 439        spin_lock_irqsave(&ieee->lock, flags);
 440
 441        if (wrqu->essid.flags && wrqu->essid.length) {
 442                //first flush current network.ssid
 443                len = ((wrqu->essid.length-1) < IW_ESSID_MAX_SIZE) ? (wrqu->essid.length-1) : IW_ESSID_MAX_SIZE;
 444#if LINUX_VERSION_CODE <  KERNEL_VERSION(2,6,20)
 445                strncpy(ieee->current_network.ssid, extra, len);
 446                ieee->current_network.ssid_len = len;
 447#if 0
 448                {
 449                        int i;
 450                        for (i=0; i<len; i++)
 451                                printk("%c ", extra[i]);
 452                        printk("\n");
 453                }
 454#endif
 455#else
 456                strncpy(ieee->current_network.ssid, extra, len+1);
 457                ieee->current_network.ssid_len = len+1;
 458#if 0
 459                {
 460                        int i;
 461                        for (i=0; i<len + 1; i++)
 462                                printk("%c ", extra[i]);
 463                        printk("\n");
 464                }
 465#endif
 466#endif
 467                ieee->ssid_set = 1;
 468        }
 469        else{
 470                ieee->ssid_set = 0;
 471                ieee->current_network.ssid[0] = '\0';
 472                ieee->current_network.ssid_len = 0;
 473        }
 474        spin_unlock_irqrestore(&ieee->lock, flags);
 475
 476        if (proto_started)
 477                ieee80211_start_protocol(ieee);
 478out:
 479        up(&ieee->wx_sem);
 480        return ret;
 481}
 482
 483 int ieee80211_wx_get_mode(struct ieee80211_device *ieee, struct iw_request_info *a,
 484                             union iwreq_data *wrqu, char *b)
 485{
 486
 487        wrqu->mode = ieee->iw_mode;
 488        return 0;
 489}
 490
 491 int ieee80211_wx_set_rawtx(struct ieee80211_device *ieee,
 492                               struct iw_request_info *info,
 493                               union iwreq_data *wrqu, char *extra)
 494{
 495
 496        int *parms = (int *)extra;
 497        int enable = (parms[0] > 0);
 498        short prev = ieee->raw_tx;
 499
 500        down(&ieee->wx_sem);
 501
 502        if(enable)
 503                ieee->raw_tx = 1;
 504        else
 505                ieee->raw_tx = 0;
 506
 507        printk(KERN_INFO"raw TX is %s\n",
 508              ieee->raw_tx ? "enabled" : "disabled");
 509
 510        if(ieee->iw_mode == IW_MODE_MONITOR)
 511        {
 512                if(prev == 0 && ieee->raw_tx){
 513                        if (ieee->data_hard_resume)
 514                                ieee->data_hard_resume(ieee->dev);
 515
 516                        netif_carrier_on(ieee->dev);
 517                }
 518
 519                if(prev && ieee->raw_tx == 1)
 520                        netif_carrier_off(ieee->dev);
 521        }
 522
 523        up(&ieee->wx_sem);
 524
 525        return 0;
 526}
 527
 528int ieee80211_wx_get_name(struct ieee80211_device *ieee,
 529                             struct iw_request_info *info,
 530                             union iwreq_data *wrqu, char *extra)
 531{
 532        strcpy(wrqu->name, "802.11");
 533        if(ieee->modulation & IEEE80211_CCK_MODULATION)
 534                strcat(wrqu->name, "b");
 535        if(ieee->modulation & IEEE80211_OFDM_MODULATION)
 536                strcat(wrqu->name, "g");
 537        if (ieee->mode & (IEEE_N_24G | IEEE_N_5G))
 538                strcat(wrqu->name, "n");
 539        return 0;
 540}
 541
 542
 543/* this is mostly stolen from hostap */
 544int ieee80211_wx_set_power(struct ieee80211_device *ieee,
 545                                 struct iw_request_info *info,
 546                                 union iwreq_data *wrqu, char *extra)
 547{
 548        int ret = 0;
 549#if 1
 550        if(
 551                (!ieee->sta_wake_up) ||
 552        //      (!ieee->ps_request_tx_ack) ||
 553                (!ieee->enter_sleep_state) ||
 554                (!ieee->ps_is_queue_empty)){
 555
 556        //      printk("ERROR. PS mode is tryied to be use but driver missed a callback\n\n");
 557
 558                return -1;
 559        }
 560#endif
 561        down(&ieee->wx_sem);
 562
 563        if (wrqu->power.disabled){
 564                ieee->ps = IEEE80211_PS_DISABLED;
 565                goto exit;
 566        }
 567        if (wrqu->power.flags & IW_POWER_TIMEOUT) {
 568                //ieee->ps_period = wrqu->power.value / 1000;
 569                ieee->ps_timeout = wrqu->power.value / 1000;
 570        }
 571
 572        if (wrqu->power.flags & IW_POWER_PERIOD) {
 573
 574                //ieee->ps_timeout = wrqu->power.value / 1000;
 575                ieee->ps_period = wrqu->power.value / 1000;
 576                //wrq->value / 1024;
 577
 578        }
 579        switch (wrqu->power.flags & IW_POWER_MODE) {
 580        case IW_POWER_UNICAST_R:
 581                ieee->ps = IEEE80211_PS_UNICAST;
 582                break;
 583        case IW_POWER_MULTICAST_R:
 584                ieee->ps = IEEE80211_PS_MBCAST;
 585                break;
 586        case IW_POWER_ALL_R:
 587                ieee->ps = IEEE80211_PS_UNICAST | IEEE80211_PS_MBCAST;
 588                break;
 589
 590        case IW_POWER_ON:
 591        //      ieee->ps = IEEE80211_PS_DISABLED;
 592                break;
 593
 594        default:
 595                ret = -EINVAL;
 596                goto exit;
 597
 598        }
 599exit:
 600        up(&ieee->wx_sem);
 601        return ret;
 602
 603}
 604
 605/* this is stolen from hostap */
 606int ieee80211_wx_get_power(struct ieee80211_device *ieee,
 607                                 struct iw_request_info *info,
 608                                 union iwreq_data *wrqu, char *extra)
 609{
 610        int ret =0;
 611
 612        down(&ieee->wx_sem);
 613
 614        if(ieee->ps == IEEE80211_PS_DISABLED){
 615                wrqu->power.disabled = 1;
 616                goto exit;
 617        }
 618
 619        wrqu->power.disabled = 0;
 620
 621        if ((wrqu->power.flags & IW_POWER_TYPE) == IW_POWER_TIMEOUT) {
 622                wrqu->power.flags = IW_POWER_TIMEOUT;
 623                wrqu->power.value = ieee->ps_timeout * 1000;
 624        } else {
 625//              ret = -EOPNOTSUPP;
 626//              goto exit;
 627                wrqu->power.flags = IW_POWER_PERIOD;
 628                wrqu->power.value = ieee->ps_period * 1000;
 629//ieee->current_network.dtim_period * ieee->current_network.beacon_interval * 1024;
 630        }
 631
 632       if ((ieee->ps & (IEEE80211_PS_MBCAST | IEEE80211_PS_UNICAST)) == (IEEE80211_PS_MBCAST | IEEE80211_PS_UNICAST))
 633                wrqu->power.flags |= IW_POWER_ALL_R;
 634        else if (ieee->ps & IEEE80211_PS_MBCAST)
 635                wrqu->power.flags |= IW_POWER_MULTICAST_R;
 636        else
 637                wrqu->power.flags |= IW_POWER_UNICAST_R;
 638
 639exit:
 640        up(&ieee->wx_sem);
 641        return ret;
 642
 643}
 644#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,5,0))
 645//EXPORT_SYMBOL(ieee80211_wx_get_essid);
 646//EXPORT_SYMBOL(ieee80211_wx_set_essid);
 647//EXPORT_SYMBOL(ieee80211_wx_set_rate);
 648//EXPORT_SYMBOL(ieee80211_wx_get_rate);
 649//EXPORT_SYMBOL(ieee80211_wx_set_wap);
 650//EXPORT_SYMBOL(ieee80211_wx_get_wap);
 651//EXPORT_SYMBOL(ieee80211_wx_set_mode);
 652//EXPORT_SYMBOL(ieee80211_wx_get_mode);
 653//EXPORT_SYMBOL(ieee80211_wx_set_scan);
 654//EXPORT_SYMBOL(ieee80211_wx_get_freq);
 655//EXPORT_SYMBOL(ieee80211_wx_set_freq);
 656//EXPORT_SYMBOL(ieee80211_wx_set_rawtx);
 657//EXPORT_SYMBOL(ieee80211_wx_get_name);
 658//EXPORT_SYMBOL(ieee80211_wx_set_power);
 659//EXPORT_SYMBOL(ieee80211_wx_get_power);
 660//EXPORT_SYMBOL(ieee80211_wlan_frequencies);
 661//EXPORT_SYMBOL(ieee80211_wx_set_rts);
 662//EXPORT_SYMBOL(ieee80211_wx_get_rts);
 663#else
 664EXPORT_SYMBOL_NOVERS(ieee80211_wx_get_essid);
 665EXPORT_SYMBOL_NOVERS(ieee80211_wx_set_essid);
 666EXPORT_SYMBOL_NOVERS(ieee80211_wx_set_rate);
 667EXPORT_SYMBOL_NOVERS(ieee80211_wx_get_rate);
 668EXPORT_SYMBOL_NOVERS(ieee80211_wx_set_wap);
 669EXPORT_SYMBOL_NOVERS(ieee80211_wx_get_wap);
 670EXPORT_SYMBOL_NOVERS(ieee80211_wx_set_mode);
 671EXPORT_SYMBOL_NOVERS(ieee80211_wx_get_mode);
 672EXPORT_SYMBOL_NOVERS(ieee80211_wx_set_scan);
 673EXPORT_SYMBOL_NOVERS(ieee80211_wx_get_freq);
 674EXPORT_SYMBOL_NOVERS(ieee80211_wx_set_freq);
 675EXPORT_SYMBOL_NOVERS(ieee80211_wx_set_rawtx);
 676EXPORT_SYMBOL_NOVERS(ieee80211_wx_get_name);
 677EXPORT_SYMBOL_NOVERS(ieee80211_wx_set_power);
 678EXPORT_SYMBOL_NOVERS(ieee80211_wx_get_power);
 679EXPORT_SYMBOL_NOVERS(ieee80211_wlan_frequencies);
 680EXPORT_SYMBOL_NOVERS(ieee80211_wx_set_rts);
 681EXPORT_SYMBOL_NOVERS(ieee80211_wx_get_rts);
 682#endif
 683