diff options
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl-agn.c')
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-agn.c | 63 |
1 files changed, 0 insertions, 63 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn.c b/drivers/net/wireless/iwlwifi/iwl-agn.c index 40905d2dc231..e8368b69d8cd 100644 --- a/drivers/net/wireless/iwlwifi/iwl-agn.c +++ b/drivers/net/wireless/iwlwifi/iwl-agn.c | |||
@@ -3580,68 +3580,6 @@ static ssize_t show_power_level(struct device *d, | |||
3580 | static DEVICE_ATTR(power_level, S_IWUSR | S_IRUSR, show_power_level, | 3580 | static DEVICE_ATTR(power_level, S_IWUSR | S_IRUSR, show_power_level, |
3581 | store_power_level); | 3581 | store_power_level); |
3582 | 3582 | ||
3583 | static ssize_t show_channels(struct device *d, | ||
3584 | struct device_attribute *attr, char *buf) | ||
3585 | { | ||
3586 | |||
3587 | struct iwl_priv *priv = dev_get_drvdata(d); | ||
3588 | struct ieee80211_channel *channels = NULL; | ||
3589 | const struct ieee80211_supported_band *supp_band = NULL; | ||
3590 | int len = 0, i; | ||
3591 | int count = 0; | ||
3592 | |||
3593 | if (!test_bit(STATUS_GEO_CONFIGURED, &priv->status)) | ||
3594 | return -EAGAIN; | ||
3595 | |||
3596 | supp_band = iwl_get_hw_mode(priv, IEEE80211_BAND_2GHZ); | ||
3597 | channels = supp_band->channels; | ||
3598 | count = supp_band->n_channels; | ||
3599 | |||
3600 | len += sprintf(&buf[len], | ||
3601 | "Displaying %d channels in 2.4GHz band " | ||
3602 | "(802.11bg):\n", count); | ||
3603 | |||
3604 | for (i = 0; i < count; i++) | ||
3605 | len += sprintf(&buf[len], "%d: %ddBm: BSS%s%s, %s.\n", | ||
3606 | ieee80211_frequency_to_channel( | ||
3607 | channels[i].center_freq), | ||
3608 | channels[i].max_power, | ||
3609 | channels[i].flags & IEEE80211_CHAN_RADAR ? | ||
3610 | " (IEEE 802.11h required)" : "", | ||
3611 | (!(channels[i].flags & IEEE80211_CHAN_NO_IBSS) | ||
3612 | || (channels[i].flags & | ||
3613 | IEEE80211_CHAN_RADAR)) ? "" : | ||
3614 | ", IBSS", | ||
3615 | channels[i].flags & | ||
3616 | IEEE80211_CHAN_PASSIVE_SCAN ? | ||
3617 | "passive only" : "active/passive"); | ||
3618 | |||
3619 | supp_band = iwl_get_hw_mode(priv, IEEE80211_BAND_5GHZ); | ||
3620 | channels = supp_band->channels; | ||
3621 | count = supp_band->n_channels; | ||
3622 | |||
3623 | len += sprintf(&buf[len], "Displaying %d channels in 5.2GHz band " | ||
3624 | "(802.11a):\n", count); | ||
3625 | |||
3626 | for (i = 0; i < count; i++) | ||
3627 | len += sprintf(&buf[len], "%d: %ddBm: BSS%s%s, %s.\n", | ||
3628 | ieee80211_frequency_to_channel( | ||
3629 | channels[i].center_freq), | ||
3630 | channels[i].max_power, | ||
3631 | channels[i].flags & IEEE80211_CHAN_RADAR ? | ||
3632 | " (IEEE 802.11h required)" : "", | ||
3633 | ((channels[i].flags & IEEE80211_CHAN_NO_IBSS) | ||
3634 | || (channels[i].flags & | ||
3635 | IEEE80211_CHAN_RADAR)) ? "" : | ||
3636 | ", IBSS", | ||
3637 | channels[i].flags & | ||
3638 | IEEE80211_CHAN_PASSIVE_SCAN ? | ||
3639 | "passive only" : "active/passive"); | ||
3640 | |||
3641 | return len; | ||
3642 | } | ||
3643 | |||
3644 | static DEVICE_ATTR(channels, S_IRUSR, show_channels, NULL); | ||
3645 | 3583 | ||
3646 | static ssize_t show_statistics(struct device *d, | 3584 | static ssize_t show_statistics(struct device *d, |
3647 | struct device_attribute *attr, char *buf) | 3585 | struct device_attribute *attr, char *buf) |
@@ -3741,7 +3679,6 @@ static void iwl_cancel_deferred_work(struct iwl_priv *priv) | |||
3741 | } | 3679 | } |
3742 | 3680 | ||
3743 | static struct attribute *iwl_sysfs_entries[] = { | 3681 | static struct attribute *iwl_sysfs_entries[] = { |
3744 | &dev_attr_channels.attr, | ||
3745 | &dev_attr_flags.attr, | 3682 | &dev_attr_flags.attr, |
3746 | &dev_attr_filter_flags.attr, | 3683 | &dev_attr_filter_flags.attr, |
3747 | &dev_attr_power_level.attr, | 3684 | &dev_attr_power_level.attr, |