aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/rt2x00/rt2800usb.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/wireless/rt2x00/rt2800usb.c')
-rw-r--r--drivers/net/wireless/rt2x00/rt2800usb.c42
1 files changed, 21 insertions, 21 deletions
diff --git a/drivers/net/wireless/rt2x00/rt2800usb.c b/drivers/net/wireless/rt2x00/rt2800usb.c
index 347c14df63c..36acb384f32 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);