diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/wireless/bcm43xx/bcm43xx_wx.c | 68 |
1 files changed, 0 insertions, 68 deletions
diff --git a/drivers/net/wireless/bcm43xx/bcm43xx_wx.c b/drivers/net/wireless/bcm43xx/bcm43xx_wx.c index d383337db998..4c972cdc0a24 100644 --- a/drivers/net/wireless/bcm43xx/bcm43xx_wx.c +++ b/drivers/net/wireless/bcm43xx/bcm43xx_wx.c | |||
@@ -46,18 +46,6 @@ | |||
46 | /* The WIRELESS_EXT version, which is implemented by this driver. */ | 46 | /* The WIRELESS_EXT version, which is implemented by this driver. */ |
47 | #define BCM43xx_WX_VERSION 18 | 47 | #define BCM43xx_WX_VERSION 18 |
48 | 48 | ||
49 | |||
50 | /* Define to enable a printk on each wx handler function invocation */ | ||
51 | //#define BCM43xx_WX_DEBUG | ||
52 | |||
53 | |||
54 | #ifdef BCM43xx_WX_DEBUG | ||
55 | # define printk_wx printk | ||
56 | #else | ||
57 | # define printk_wx(x...) do { /* nothing */ } while (0) | ||
58 | #endif | ||
59 | #define wx_enter() printk_wx(KERN_INFO PFX "WX handler called: %s\n", __FUNCTION__); | ||
60 | |||
61 | #define MAX_WX_STRING 80 | 49 | #define MAX_WX_STRING 80 |
62 | 50 | ||
63 | 51 | ||
@@ -73,8 +61,6 @@ static int bcm43xx_wx_get_name(struct net_device *net_dev, | |||
73 | char suffix[7] = { 0 }; | 61 | char suffix[7] = { 0 }; |
74 | int have_a = 0, have_b = 0, have_g = 0; | 62 | int have_a = 0, have_b = 0, have_g = 0; |
75 | 63 | ||
76 | wx_enter(); | ||
77 | |||
78 | spin_lock_irqsave(&bcm->lock, flags); | 64 | spin_lock_irqsave(&bcm->lock, flags); |
79 | nr_80211 = bcm43xx_num_80211_cores(bcm); | 65 | nr_80211 = bcm43xx_num_80211_cores(bcm); |
80 | for (i = 0; i < nr_80211; i++) { | 66 | for (i = 0; i < nr_80211; i++) { |
@@ -127,8 +113,6 @@ static int bcm43xx_wx_set_channelfreq(struct net_device *net_dev, | |||
127 | int freq; | 113 | int freq; |
128 | int err = 0; | 114 | int err = 0; |
129 | 115 | ||
130 | wx_enter(); | ||
131 | |||
132 | if ((data->freq.m >= 0) && (data->freq.m <= 1000)) { | 116 | if ((data->freq.m >= 0) && (data->freq.m <= 1000)) { |
133 | channel = data->freq.m; | 117 | channel = data->freq.m; |
134 | freq = bcm43xx_channel_to_freq(bcm, channel); | 118 | freq = bcm43xx_channel_to_freq(bcm, channel); |
@@ -148,8 +132,6 @@ static int bcm43xx_wx_set_channelfreq(struct net_device *net_dev, | |||
148 | } else | 132 | } else |
149 | bcm->current_core->radio->initial_channel = channel; | 133 | bcm->current_core->radio->initial_channel = channel; |
150 | spin_unlock_irqrestore(&bcm->lock, flags); | 134 | spin_unlock_irqrestore(&bcm->lock, flags); |
151 | if (!err) | ||
152 | printk_wx(KERN_INFO PFX "Selected channel: %d\n", channel); | ||
153 | 135 | ||
154 | return err; | 136 | return err; |
155 | } | 137 | } |
@@ -164,8 +146,6 @@ static int bcm43xx_wx_get_channelfreq(struct net_device *net_dev, | |||
164 | int err = -ENODEV; | 146 | int err = -ENODEV; |
165 | u16 channel; | 147 | u16 channel; |
166 | 148 | ||
167 | wx_enter(); | ||
168 | |||
169 | spin_lock_irqsave(&bcm->lock, flags); | 149 | spin_lock_irqsave(&bcm->lock, flags); |
170 | channel = bcm->current_core->radio->channel; | 150 | channel = bcm->current_core->radio->channel; |
171 | if (channel == 0xFF) { | 151 | if (channel == 0xFF) { |
@@ -195,8 +175,6 @@ static int bcm43xx_wx_set_mode(struct net_device *net_dev, | |||
195 | unsigned long flags; | 175 | unsigned long flags; |
196 | int mode; | 176 | int mode; |
197 | 177 | ||
198 | wx_enter(); | ||
199 | |||
200 | mode = data->mode; | 178 | mode = data->mode; |
201 | if (mode == IW_MODE_AUTO) | 179 | if (mode == IW_MODE_AUTO) |
202 | mode = BCM43xx_INITIAL_IWMODE; | 180 | mode = BCM43xx_INITIAL_IWMODE; |
@@ -217,8 +195,6 @@ static int bcm43xx_wx_get_mode(struct net_device *net_dev, | |||
217 | struct bcm43xx_private *bcm = bcm43xx_priv(net_dev); | 195 | struct bcm43xx_private *bcm = bcm43xx_priv(net_dev); |
218 | unsigned long flags; | 196 | unsigned long flags; |
219 | 197 | ||
220 | wx_enter(); | ||
221 | |||
222 | spin_lock_irqsave(&bcm->lock, flags); | 198 | spin_lock_irqsave(&bcm->lock, flags); |
223 | data->mode = bcm->ieee->iw_mode; | 199 | data->mode = bcm->ieee->iw_mode; |
224 | spin_unlock_irqrestore(&bcm->lock, flags); | 200 | spin_unlock_irqrestore(&bcm->lock, flags); |
@@ -231,7 +207,6 @@ static int bcm43xx_wx_set_sensitivity(struct net_device *net_dev, | |||
231 | union iwreq_data *data, | 207 | union iwreq_data *data, |
232 | char *extra) | 208 | char *extra) |
233 | { | 209 | { |
234 | wx_enter(); | ||
235 | /*TODO*/ | 210 | /*TODO*/ |
236 | return 0; | 211 | return 0; |
237 | } | 212 | } |
@@ -241,7 +216,6 @@ static int bcm43xx_wx_get_sensitivity(struct net_device *net_dev, | |||
241 | union iwreq_data *data, | 216 | union iwreq_data *data, |
242 | char *extra) | 217 | char *extra) |
243 | { | 218 | { |
244 | wx_enter(); | ||
245 | /*TODO*/ | 219 | /*TODO*/ |
246 | return 0; | 220 | return 0; |
247 | } | 221 | } |
@@ -257,8 +231,6 @@ static int bcm43xx_wx_get_rangeparams(struct net_device *net_dev, | |||
257 | unsigned long flags; | 231 | unsigned long flags; |
258 | int i, j; | 232 | int i, j; |
259 | 233 | ||
260 | wx_enter(); | ||
261 | |||
262 | data->data.length = sizeof(*range); | 234 | data->data.length = sizeof(*range); |
263 | memset(range, 0, sizeof(*range)); | 235 | memset(range, 0, sizeof(*range)); |
264 | 236 | ||
@@ -355,8 +327,6 @@ static int bcm43xx_wx_set_nick(struct net_device *net_dev, | |||
355 | unsigned long flags; | 327 | unsigned long flags; |
356 | size_t len; | 328 | size_t len; |
357 | 329 | ||
358 | wx_enter(); | ||
359 | |||
360 | spin_lock_irqsave(&bcm->lock, flags); | 330 | spin_lock_irqsave(&bcm->lock, flags); |
361 | len = min((size_t)data->data.length, (size_t)IW_ESSID_MAX_SIZE); | 331 | len = min((size_t)data->data.length, (size_t)IW_ESSID_MAX_SIZE); |
362 | memcpy(bcm->nick, extra, len); | 332 | memcpy(bcm->nick, extra, len); |
@@ -375,8 +345,6 @@ static int bcm43xx_wx_get_nick(struct net_device *net_dev, | |||
375 | unsigned long flags; | 345 | unsigned long flags; |
376 | size_t len; | 346 | size_t len; |
377 | 347 | ||
378 | wx_enter(); | ||
379 | |||
380 | spin_lock_irqsave(&bcm->lock, flags); | 348 | spin_lock_irqsave(&bcm->lock, flags); |
381 | len = strlen(bcm->nick) + 1; | 349 | len = strlen(bcm->nick) + 1; |
382 | memcpy(extra, bcm->nick, len); | 350 | memcpy(extra, bcm->nick, len); |
@@ -396,8 +364,6 @@ static int bcm43xx_wx_set_rts(struct net_device *net_dev, | |||
396 | unsigned long flags; | 364 | unsigned long flags; |
397 | int err = -EINVAL; | 365 | int err = -EINVAL; |
398 | 366 | ||
399 | wx_enter(); | ||
400 | |||
401 | spin_lock_irqsave(&bcm->lock, flags); | 367 | spin_lock_irqsave(&bcm->lock, flags); |
402 | if (data->rts.disabled) { | 368 | if (data->rts.disabled) { |
403 | bcm->rts_threshold = BCM43xx_MAX_RTS_THRESHOLD; | 369 | bcm->rts_threshold = BCM43xx_MAX_RTS_THRESHOLD; |
@@ -422,8 +388,6 @@ static int bcm43xx_wx_get_rts(struct net_device *net_dev, | |||
422 | struct bcm43xx_private *bcm = bcm43xx_priv(net_dev); | 388 | struct bcm43xx_private *bcm = bcm43xx_priv(net_dev); |
423 | unsigned long flags; | 389 | unsigned long flags; |
424 | 390 | ||
425 | wx_enter(); | ||
426 | |||
427 | spin_lock_irqsave(&bcm->lock, flags); | 391 | spin_lock_irqsave(&bcm->lock, flags); |
428 | data->rts.value = bcm->rts_threshold; | 392 | data->rts.value = bcm->rts_threshold; |
429 | data->rts.fixed = 0; | 393 | data->rts.fixed = 0; |
@@ -442,8 +406,6 @@ static int bcm43xx_wx_set_frag(struct net_device *net_dev, | |||
442 | unsigned long flags; | 406 | unsigned long flags; |
443 | int err = -EINVAL; | 407 | int err = -EINVAL; |
444 | 408 | ||
445 | wx_enter(); | ||
446 | |||
447 | spin_lock_irqsave(&bcm->lock, flags); | 409 | spin_lock_irqsave(&bcm->lock, flags); |
448 | if (data->frag.disabled) { | 410 | if (data->frag.disabled) { |
449 | bcm->ieee->fts = MAX_FRAG_THRESHOLD; | 411 | bcm->ieee->fts = MAX_FRAG_THRESHOLD; |
@@ -468,8 +430,6 @@ static int bcm43xx_wx_get_frag(struct net_device *net_dev, | |||
468 | struct bcm43xx_private *bcm = bcm43xx_priv(net_dev); | 430 | struct bcm43xx_private *bcm = bcm43xx_priv(net_dev); |
469 | unsigned long flags; | 431 | unsigned long flags; |
470 | 432 | ||
471 | wx_enter(); | ||
472 | |||
473 | spin_lock_irqsave(&bcm->lock, flags); | 433 | spin_lock_irqsave(&bcm->lock, flags); |
474 | data->frag.value = bcm->ieee->fts; | 434 | data->frag.value = bcm->ieee->fts; |
475 | data->frag.fixed = 0; | 435 | data->frag.fixed = 0; |
@@ -491,8 +451,6 @@ static int bcm43xx_wx_set_xmitpower(struct net_device *net_dev, | |||
491 | int err = -ENODEV; | 451 | int err = -ENODEV; |
492 | u16 maxpower; | 452 | u16 maxpower; |
493 | 453 | ||
494 | wx_enter(); | ||
495 | |||
496 | if ((data->txpower.flags & IW_TXPOW_TYPE) != IW_TXPOW_DBM) { | 454 | if ((data->txpower.flags & IW_TXPOW_TYPE) != IW_TXPOW_DBM) { |
497 | printk(PFX KERN_ERR "TX power not in dBm.\n"); | 455 | printk(PFX KERN_ERR "TX power not in dBm.\n"); |
498 | return -EOPNOTSUPP; | 456 | return -EOPNOTSUPP; |
@@ -537,8 +495,6 @@ static int bcm43xx_wx_get_xmitpower(struct net_device *net_dev, | |||
537 | unsigned long flags; | 495 | unsigned long flags; |
538 | int err = -ENODEV; | 496 | int err = -ENODEV; |
539 | 497 | ||
540 | wx_enter(); | ||
541 | |||
542 | spin_lock_irqsave(&bcm->lock, flags); | 498 | spin_lock_irqsave(&bcm->lock, flags); |
543 | if (!bcm->initialized) | 499 | if (!bcm->initialized) |
544 | goto out_unlock; | 500 | goto out_unlock; |
@@ -561,7 +517,6 @@ static int bcm43xx_wx_set_retry(struct net_device *net_dev, | |||
561 | union iwreq_data *data, | 517 | union iwreq_data *data, |
562 | char *extra) | 518 | char *extra) |
563 | { | 519 | { |
564 | wx_enter(); | ||
565 | /*TODO*/ | 520 | /*TODO*/ |
566 | return 0; | 521 | return 0; |
567 | } | 522 | } |
@@ -571,7 +526,6 @@ static int bcm43xx_wx_get_retry(struct net_device *net_dev, | |||
571 | union iwreq_data *data, | 526 | union iwreq_data *data, |
572 | char *extra) | 527 | char *extra) |
573 | { | 528 | { |
574 | wx_enter(); | ||
575 | /*TODO*/ | 529 | /*TODO*/ |
576 | return 0; | 530 | return 0; |
577 | } | 531 | } |
@@ -584,8 +538,6 @@ static int bcm43xx_wx_set_encoding(struct net_device *net_dev, | |||
584 | struct bcm43xx_private *bcm = bcm43xx_priv(net_dev); | 538 | struct bcm43xx_private *bcm = bcm43xx_priv(net_dev); |
585 | int err; | 539 | int err; |
586 | 540 | ||
587 | wx_enter(); | ||
588 | |||
589 | err = ieee80211_wx_set_encode(bcm->ieee, info, data, extra); | 541 | err = ieee80211_wx_set_encode(bcm->ieee, info, data, extra); |
590 | 542 | ||
591 | return err; | 543 | return err; |
@@ -599,8 +551,6 @@ static int bcm43xx_wx_set_encodingext(struct net_device *net_dev, | |||
599 | struct bcm43xx_private *bcm = bcm43xx_priv(net_dev); | 551 | struct bcm43xx_private *bcm = bcm43xx_priv(net_dev); |
600 | int err; | 552 | int err; |
601 | 553 | ||
602 | wx_enter(); | ||
603 | |||
604 | err = ieee80211_wx_set_encodeext(bcm->ieee, info, data, extra); | 554 | err = ieee80211_wx_set_encodeext(bcm->ieee, info, data, extra); |
605 | 555 | ||
606 | return err; | 556 | return err; |
@@ -614,8 +564,6 @@ static int bcm43xx_wx_get_encoding(struct net_device *net_dev, | |||
614 | struct bcm43xx_private *bcm = bcm43xx_priv(net_dev); | 564 | struct bcm43xx_private *bcm = bcm43xx_priv(net_dev); |
615 | int err; | 565 | int err; |
616 | 566 | ||
617 | wx_enter(); | ||
618 | |||
619 | err = ieee80211_wx_get_encode(bcm->ieee, info, data, extra); | 567 | err = ieee80211_wx_get_encode(bcm->ieee, info, data, extra); |
620 | 568 | ||
621 | return err; | 569 | return err; |
@@ -629,8 +577,6 @@ static int bcm43xx_wx_get_encodingext(struct net_device *net_dev, | |||
629 | struct bcm43xx_private *bcm = bcm43xx_priv(net_dev); | 577 | struct bcm43xx_private *bcm = bcm43xx_priv(net_dev); |
630 | int err; | 578 | int err; |
631 | 579 | ||
632 | wx_enter(); | ||
633 | |||
634 | err = ieee80211_wx_get_encodeext(bcm->ieee, info, data, extra); | 580 | err = ieee80211_wx_get_encodeext(bcm->ieee, info, data, extra); |
635 | 581 | ||
636 | return err; | 582 | return err; |
@@ -641,7 +587,6 @@ static int bcm43xx_wx_set_power(struct net_device *net_dev, | |||
641 | union iwreq_data *data, | 587 | union iwreq_data *data, |
642 | char *extra) | 588 | char *extra) |
643 | { | 589 | { |
644 | wx_enter(); | ||
645 | /*TODO*/ | 590 | /*TODO*/ |
646 | return 0; | 591 | return 0; |
647 | } | 592 | } |
@@ -651,7 +596,6 @@ static int bcm43xx_wx_get_power(struct net_device *net_dev, | |||
651 | union iwreq_data *data, | 596 | union iwreq_data *data, |
652 | char *extra) | 597 | char *extra) |
653 | { | 598 | { |
654 | wx_enter(); | ||
655 | /*TODO*/ | 599 | /*TODO*/ |
656 | return 0; | 600 | return 0; |
657 | } | 601 | } |
@@ -665,8 +609,6 @@ static int bcm43xx_wx_set_interfmode(struct net_device *net_dev, | |||
665 | unsigned long flags; | 609 | unsigned long flags; |
666 | int mode, err = 0; | 610 | int mode, err = 0; |
667 | 611 | ||
668 | wx_enter(); | ||
669 | |||
670 | mode = *((int *)extra); | 612 | mode = *((int *)extra); |
671 | switch (mode) { | 613 | switch (mode) { |
672 | case 0: | 614 | case 0: |
@@ -717,8 +659,6 @@ static int bcm43xx_wx_get_interfmode(struct net_device *net_dev, | |||
717 | unsigned long flags; | 659 | unsigned long flags; |
718 | int mode; | 660 | int mode; |
719 | 661 | ||
720 | wx_enter(); | ||
721 | |||
722 | spin_lock_irqsave(&bcm->lock, flags); | 662 | spin_lock_irqsave(&bcm->lock, flags); |
723 | mode = bcm->current_core->radio->interfmode; | 663 | mode = bcm->current_core->radio->interfmode; |
724 | spin_unlock_irqrestore(&bcm->lock, flags); | 664 | spin_unlock_irqrestore(&bcm->lock, flags); |
@@ -750,8 +690,6 @@ static int bcm43xx_wx_set_shortpreamble(struct net_device *net_dev, | |||
750 | unsigned long flags; | 690 | unsigned long flags; |
751 | int on; | 691 | int on; |
752 | 692 | ||
753 | wx_enter(); | ||
754 | |||
755 | on = *((int *)extra); | 693 | on = *((int *)extra); |
756 | spin_lock_irqsave(&bcm->lock, flags); | 694 | spin_lock_irqsave(&bcm->lock, flags); |
757 | bcm->short_preamble = !!on; | 695 | bcm->short_preamble = !!on; |
@@ -769,8 +707,6 @@ static int bcm43xx_wx_get_shortpreamble(struct net_device *net_dev, | |||
769 | unsigned long flags; | 707 | unsigned long flags; |
770 | int on; | 708 | int on; |
771 | 709 | ||
772 | wx_enter(); | ||
773 | |||
774 | spin_lock_irqsave(&bcm->lock, flags); | 710 | spin_lock_irqsave(&bcm->lock, flags); |
775 | on = bcm->short_preamble; | 711 | on = bcm->short_preamble; |
776 | spin_unlock_irqrestore(&bcm->lock, flags); | 712 | spin_unlock_irqrestore(&bcm->lock, flags); |
@@ -793,8 +729,6 @@ static int bcm43xx_wx_set_swencryption(struct net_device *net_dev, | |||
793 | unsigned long flags; | 729 | unsigned long flags; |
794 | int on; | 730 | int on; |
795 | 731 | ||
796 | wx_enter(); | ||
797 | |||
798 | on = *((int *)extra); | 732 | on = *((int *)extra); |
799 | spin_lock_irqsave(&bcm->lock, flags); | 733 | spin_lock_irqsave(&bcm->lock, flags); |
800 | bcm->ieee->host_encrypt = !!on; | 734 | bcm->ieee->host_encrypt = !!on; |
@@ -815,8 +749,6 @@ static int bcm43xx_wx_get_swencryption(struct net_device *net_dev, | |||
815 | unsigned long flags; | 749 | unsigned long flags; |
816 | int on; | 750 | int on; |
817 | 751 | ||
818 | wx_enter(); | ||
819 | |||
820 | spin_lock_irqsave(&bcm->lock, flags); | 752 | spin_lock_irqsave(&bcm->lock, flags); |
821 | on = bcm->ieee->host_encrypt; | 753 | on = bcm->ieee->host_encrypt; |
822 | spin_unlock_irqrestore(&bcm->lock, flags); | 754 | spin_unlock_irqrestore(&bcm->lock, flags); |