diff options
author | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2009-11-08 08:39:16 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2009-11-11 17:09:14 -0500 |
commit | 726984b61e744c1fef72d20e56eadd0864ecb240 (patch) | |
tree | 3977c8c405b34eeed7b2a8cd0bc9640f3cc18935 /drivers | |
parent | 4d685e550b5ace42fdf6d72506bab6e7ae93e669 (diff) |
rt2800usb: reorganize code in rt2800usb_probe_hw_mode()
Move hw_mode information initialization code block before
HT information initialization one to match the ordering used
by rt2800pci's rt2800pci_probe_hw_mode().
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Acked-by: Ivo van Doorn <IvDoorn@gmail.com>
Acked-by: Gertjan van Wingerde <gwingerde@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/wireless/rt2x00/rt2800usb.c | 42 |
1 files changed, 21 insertions, 21 deletions
diff --git a/drivers/net/wireless/rt2x00/rt2800usb.c b/drivers/net/wireless/rt2x00/rt2800usb.c index 347c14df63c8..36acb384f328 100644 --- a/drivers/net/wireless/rt2x00/rt2800usb.c +++ b/drivers/net/wireless/rt2x00/rt2800usb.c | |||
@@ -795,6 +795,27 @@ static int rt2800usb_probe_hw_mode(struct rt2x00_dev *rt2x00dev) | |||
795 | rt2x00_eeprom_read(rt2x00dev, EEPROM_ANTENNA, &eeprom); | 795 | rt2x00_eeprom_read(rt2x00dev, EEPROM_ANTENNA, &eeprom); |
796 | 796 | ||
797 | /* | 797 | /* |
798 | * Initialize hw_mode information. | ||
799 | */ | ||
800 | spec->supported_bands = SUPPORT_BAND_2GHZ; | ||
801 | spec->supported_rates = SUPPORT_RATE_CCK | SUPPORT_RATE_OFDM; | ||
802 | |||
803 | if (rt2x00_rf(&rt2x00dev->chip, RF2820) || | ||
804 | rt2x00_rf(&rt2x00dev->chip, RF2720)) { | ||
805 | spec->num_channels = 14; | ||
806 | spec->channels = rf_vals; | ||
807 | } else if (rt2x00_rf(&rt2x00dev->chip, RF2850) || | ||
808 | rt2x00_rf(&rt2x00dev->chip, RF2750)) { | ||
809 | spec->supported_bands |= SUPPORT_BAND_5GHZ; | ||
810 | spec->num_channels = ARRAY_SIZE(rf_vals); | ||
811 | spec->channels = rf_vals; | ||
812 | } else if (rt2x00_rf(&rt2x00dev->chip, RF3020) || | ||
813 | rt2x00_rf(&rt2x00dev->chip, RF2020)) { | ||
814 | spec->num_channels = ARRAY_SIZE(rf_vals_3070); | ||
815 | spec->channels = rf_vals_3070; | ||
816 | } | ||
817 | |||
818 | /* | ||
798 | * Initialize HT information. | 819 | * Initialize HT information. |
799 | */ | 820 | */ |
800 | spec->ht.ht_supported = true; | 821 | spec->ht.ht_supported = true; |
@@ -826,27 +847,6 @@ static int rt2800usb_probe_hw_mode(struct rt2x00_dev *rt2x00dev) | |||
826 | } | 847 | } |
827 | 848 | ||
828 | /* | 849 | /* |
829 | * Initialize hw_mode information. | ||
830 | */ | ||
831 | spec->supported_bands = SUPPORT_BAND_2GHZ; | ||
832 | spec->supported_rates = SUPPORT_RATE_CCK | SUPPORT_RATE_OFDM; | ||
833 | |||
834 | if (rt2x00_rf(&rt2x00dev->chip, RF2820) || | ||
835 | rt2x00_rf(&rt2x00dev->chip, RF2720)) { | ||
836 | spec->num_channels = 14; | ||
837 | spec->channels = rf_vals; | ||
838 | } else if (rt2x00_rf(&rt2x00dev->chip, RF2850) || | ||
839 | rt2x00_rf(&rt2x00dev->chip, RF2750)) { | ||
840 | spec->supported_bands |= SUPPORT_BAND_5GHZ; | ||
841 | spec->num_channels = ARRAY_SIZE(rf_vals); | ||
842 | spec->channels = rf_vals; | ||
843 | } else if (rt2x00_rf(&rt2x00dev->chip, RF3020) || | ||
844 | rt2x00_rf(&rt2x00dev->chip, RF2020)) { | ||
845 | spec->num_channels = ARRAY_SIZE(rf_vals_3070); | ||
846 | spec->channels = rf_vals_3070; | ||
847 | } | ||
848 | |||
849 | /* | ||
850 | * Create channel information array | 850 | * Create channel information array |
851 | */ | 851 | */ |
852 | info = kzalloc(spec->num_channels * sizeof(*info), GFP_KERNEL); | 852 | info = kzalloc(spec->num_channels * sizeof(*info), GFP_KERNEL); |