diff options
author | Holger Schurig <hs4233@mail.mn-solutions.de> | 2009-10-22 09:30:45 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2009-10-27 16:48:35 -0400 |
commit | d37b4fdd43f7e5686c40181f33a50a7ee03ddbd8 (patch) | |
tree | dad775055633e1c7b2fca0912a056834a11515e9 /drivers/net/wireless/libertas/wext.c | |
parent | 7f4013f09654216653121f216bd0257f460f5dcc (diff) |
libertas: remove unused 11d code
Most of the 11d code was protected with an "if (priv->enable11d)" clause.
But there was no code that anywhere that was able to set this
variable to true. So all 11d code was dead for almost a year and no one
complained. That's enought incentive to remove this code.
Besides removing old cruft, we gain back the 11d capability in a common way
when we merge the cfg80211 functionality.
Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de>
Acked-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/libertas/wext.c')
-rw-r--r-- | drivers/net/wireless/libertas/wext.c | 58 |
1 files changed, 10 insertions, 48 deletions
diff --git a/drivers/net/wireless/libertas/wext.c b/drivers/net/wireless/libertas/wext.c index 4594841cd4af..82a932aef6f9 100644 --- a/drivers/net/wireless/libertas/wext.c +++ b/drivers/net/wireless/libertas/wext.c | |||
@@ -65,8 +65,6 @@ struct chan_freq_power *lbs_find_cfp_by_band_and_channel( | |||
65 | for (j = 0; !cfp && (j < ARRAY_SIZE(priv->region_channel)); j++) { | 65 | for (j = 0; !cfp && (j < ARRAY_SIZE(priv->region_channel)); j++) { |
66 | rc = &priv->region_channel[j]; | 66 | rc = &priv->region_channel[j]; |
67 | 67 | ||
68 | if (priv->enable11d) | ||
69 | rc = &priv->universal_channel[j]; | ||
70 | if (!rc->valid || !rc->CFP) | 68 | if (!rc->valid || !rc->CFP) |
71 | continue; | 69 | continue; |
72 | if (rc->band != band) | 70 | if (rc->band != band) |
@@ -106,8 +104,6 @@ static struct chan_freq_power *find_cfp_by_band_and_freq( | |||
106 | for (j = 0; !cfp && (j < ARRAY_SIZE(priv->region_channel)); j++) { | 104 | for (j = 0; !cfp && (j < ARRAY_SIZE(priv->region_channel)); j++) { |
107 | rc = &priv->region_channel[j]; | 105 | rc = &priv->region_channel[j]; |
108 | 106 | ||
109 | if (priv->enable11d) | ||
110 | rc = &priv->universal_channel[j]; | ||
111 | if (!rc->valid || !rc->CFP) | 107 | if (!rc->valid || !rc->CFP) |
112 | continue; | 108 | continue; |
113 | if (rc->band != band) | 109 | if (rc->band != band) |
@@ -546,8 +542,6 @@ static int lbs_get_range(struct net_device *dev, struct iw_request_info *info, | |||
546 | struct chan_freq_power *cfp; | 542 | struct chan_freq_power *cfp; |
547 | u8 rates[MAX_RATES + 1]; | 543 | u8 rates[MAX_RATES + 1]; |
548 | 544 | ||
549 | u8 flag = 0; | ||
550 | |||
551 | lbs_deb_enter(LBS_DEB_WEXT); | 545 | lbs_deb_enter(LBS_DEB_WEXT); |
552 | 546 | ||
553 | dwrq->length = sizeof(struct iw_range); | 547 | dwrq->length = sizeof(struct iw_range); |
@@ -569,52 +563,21 @@ static int lbs_get_range(struct net_device *dev, struct iw_request_info *info, | |||
569 | 563 | ||
570 | range->scan_capa = IW_SCAN_CAPA_ESSID; | 564 | range->scan_capa = IW_SCAN_CAPA_ESSID; |
571 | 565 | ||
572 | if (priv->enable11d && | 566 | for (j = 0; (range->num_frequency < IW_MAX_FREQUENCIES) |
573 | (priv->connect_status == LBS_CONNECTED || | 567 | && (j < ARRAY_SIZE(priv->region_channel)); j++) { |
574 | priv->mesh_connect_status == LBS_CONNECTED)) { | 568 | cfp = priv->region_channel[j].CFP; |
575 | u8 chan_no; | ||
576 | u8 band; | ||
577 | |||
578 | struct parsed_region_chan_11d *parsed_region_chan = | ||
579 | &priv->parsed_region_chan; | ||
580 | |||
581 | if (parsed_region_chan == NULL) { | ||
582 | lbs_deb_wext("11d: parsed_region_chan is NULL\n"); | ||
583 | goto out; | ||
584 | } | ||
585 | band = parsed_region_chan->band; | ||
586 | lbs_deb_wext("band %d, nr_char %d\n", band, | ||
587 | parsed_region_chan->nr_chan); | ||
588 | |||
589 | for (i = 0; (range->num_frequency < IW_MAX_FREQUENCIES) | 569 | for (i = 0; (range->num_frequency < IW_MAX_FREQUENCIES) |
590 | && (i < parsed_region_chan->nr_chan); i++) { | 570 | && priv->region_channel[j].valid |
591 | chan_no = parsed_region_chan->chanpwr[i].chan; | 571 | && cfp |
592 | lbs_deb_wext("chan_no %d\n", chan_no); | 572 | && (i < priv->region_channel[j].nrcfp); i++) { |
593 | range->freq[range->num_frequency].i = (long)chan_no; | 573 | range->freq[range->num_frequency].i = |
574 | (long)cfp->channel; | ||
594 | range->freq[range->num_frequency].m = | 575 | range->freq[range->num_frequency].m = |
595 | (long)lbs_chan_2_freq(chan_no) * 100000; | 576 | (long)cfp->freq * 100000; |
596 | range->freq[range->num_frequency].e = 1; | 577 | range->freq[range->num_frequency].e = 1; |
578 | cfp++; | ||
597 | range->num_frequency++; | 579 | range->num_frequency++; |
598 | } | 580 | } |
599 | flag = 1; | ||
600 | } | ||
601 | if (!flag) { | ||
602 | for (j = 0; (range->num_frequency < IW_MAX_FREQUENCIES) | ||
603 | && (j < ARRAY_SIZE(priv->region_channel)); j++) { | ||
604 | cfp = priv->region_channel[j].CFP; | ||
605 | for (i = 0; (range->num_frequency < IW_MAX_FREQUENCIES) | ||
606 | && priv->region_channel[j].valid | ||
607 | && cfp | ||
608 | && (i < priv->region_channel[j].nrcfp); i++) { | ||
609 | range->freq[range->num_frequency].i = | ||
610 | (long)cfp->channel; | ||
611 | range->freq[range->num_frequency].m = | ||
612 | (long)cfp->freq * 100000; | ||
613 | range->freq[range->num_frequency].e = 1; | ||
614 | cfp++; | ||
615 | range->num_frequency++; | ||
616 | } | ||
617 | } | ||
618 | } | 581 | } |
619 | 582 | ||
620 | lbs_deb_wext("IW_MAX_FREQUENCIES %d, num_frequency %d\n", | 583 | lbs_deb_wext("IW_MAX_FREQUENCIES %d, num_frequency %d\n", |
@@ -699,7 +662,6 @@ static int lbs_get_range(struct net_device *dev, struct iw_request_info *info, | |||
699 | | IW_ENC_CAPA_CIPHER_CCMP; | 662 | | IW_ENC_CAPA_CIPHER_CCMP; |
700 | } | 663 | } |
701 | 664 | ||
702 | out: | ||
703 | lbs_deb_leave(LBS_DEB_WEXT); | 665 | lbs_deb_leave(LBS_DEB_WEXT); |
704 | return 0; | 666 | return 0; |
705 | } | 667 | } |