diff options
-rw-r--r-- | drivers/net/wireless/rt2x00/rt2400pci.c | 4 | ||||
-rw-r--r-- | drivers/net/wireless/rt2x00/rt2500pci.c | 6 | ||||
-rw-r--r-- | drivers/net/wireless/rt2x00/rt2500usb.c | 6 | ||||
-rw-r--r-- | drivers/net/wireless/rt2x00/rt2x00.h | 38 | ||||
-rw-r--r-- | drivers/net/wireless/rt2x00/rt2x00dev.c | 80 | ||||
-rw-r--r-- | drivers/net/wireless/rt2x00/rt2x00lib.h | 5 | ||||
-rw-r--r-- | drivers/net/wireless/rt2x00/rt61pci.c | 6 | ||||
-rw-r--r-- | drivers/net/wireless/rt2x00/rt73usb.c | 8 |
8 files changed, 81 insertions, 72 deletions
diff --git a/drivers/net/wireless/rt2x00/rt2400pci.c b/drivers/net/wireless/rt2x00/rt2400pci.c index 6c025cf32423..460ef2fb5104 100644 --- a/drivers/net/wireless/rt2x00/rt2400pci.c +++ b/drivers/net/wireless/rt2x00/rt2400pci.c | |||
@@ -1352,8 +1352,8 @@ static void rt2400pci_probe_hw_mode(struct rt2x00_dev *rt2x00dev) | |||
1352 | /* | 1352 | /* |
1353 | * Initialize hw_mode information. | 1353 | * Initialize hw_mode information. |
1354 | */ | 1354 | */ |
1355 | spec->num_modes = 1; | 1355 | spec->supported_bands = SUPPORT_BAND_2GHZ; |
1356 | spec->num_rates = 4; | 1356 | spec->supported_rates = SUPPORT_RATE_CCK; |
1357 | spec->tx_power_a = NULL; | 1357 | spec->tx_power_a = NULL; |
1358 | spec->tx_power_bg = txpower; | 1358 | spec->tx_power_bg = txpower; |
1359 | spec->tx_power_default = DEFAULT_TXPOWER; | 1359 | spec->tx_power_default = DEFAULT_TXPOWER; |
diff --git a/drivers/net/wireless/rt2x00/rt2500pci.c b/drivers/net/wireless/rt2x00/rt2500pci.c index 93eaba852e5d..ffcd996df064 100644 --- a/drivers/net/wireless/rt2x00/rt2500pci.c +++ b/drivers/net/wireless/rt2x00/rt2500pci.c | |||
@@ -1666,8 +1666,8 @@ static void rt2500pci_probe_hw_mode(struct rt2x00_dev *rt2x00dev) | |||
1666 | /* | 1666 | /* |
1667 | * Initialize hw_mode information. | 1667 | * Initialize hw_mode information. |
1668 | */ | 1668 | */ |
1669 | spec->num_modes = 2; | 1669 | spec->supported_bands = SUPPORT_BAND_2GHZ; |
1670 | spec->num_rates = 12; | 1670 | spec->supported_rates = SUPPORT_RATE_CCK | SUPPORT_RATE_OFDM; |
1671 | spec->tx_power_a = NULL; | 1671 | spec->tx_power_a = NULL; |
1672 | spec->tx_power_bg = txpower; | 1672 | spec->tx_power_bg = txpower; |
1673 | spec->tx_power_default = DEFAULT_TXPOWER; | 1673 | spec->tx_power_default = DEFAULT_TXPOWER; |
@@ -1688,9 +1688,9 @@ static void rt2500pci_probe_hw_mode(struct rt2x00_dev *rt2x00dev) | |||
1688 | spec->num_channels = ARRAY_SIZE(rf_vals_bg_2525e); | 1688 | spec->num_channels = ARRAY_SIZE(rf_vals_bg_2525e); |
1689 | spec->channels = rf_vals_bg_2525e; | 1689 | spec->channels = rf_vals_bg_2525e; |
1690 | } else if (rt2x00_rf(&rt2x00dev->chip, RF5222)) { | 1690 | } else if (rt2x00_rf(&rt2x00dev->chip, RF5222)) { |
1691 | spec->supported_bands |= SUPPORT_BAND_5GHZ; | ||
1691 | spec->num_channels = ARRAY_SIZE(rf_vals_5222); | 1692 | spec->num_channels = ARRAY_SIZE(rf_vals_5222); |
1692 | spec->channels = rf_vals_5222; | 1693 | spec->channels = rf_vals_5222; |
1693 | spec->num_modes = 3; | ||
1694 | } | 1694 | } |
1695 | } | 1695 | } |
1696 | 1696 | ||
diff --git a/drivers/net/wireless/rt2x00/rt2500usb.c b/drivers/net/wireless/rt2x00/rt2500usb.c index f7dc06a74d1a..826ed692878c 100644 --- a/drivers/net/wireless/rt2x00/rt2500usb.c +++ b/drivers/net/wireless/rt2x00/rt2500usb.c | |||
@@ -1586,8 +1586,8 @@ static void rt2500usb_probe_hw_mode(struct rt2x00_dev *rt2x00dev) | |||
1586 | /* | 1586 | /* |
1587 | * Initialize hw_mode information. | 1587 | * Initialize hw_mode information. |
1588 | */ | 1588 | */ |
1589 | spec->num_modes = 2; | 1589 | spec->supported_bands = SUPPORT_BAND_2GHZ; |
1590 | spec->num_rates = 12; | 1590 | spec->supported_rates = SUPPORT_RATE_CCK | SUPPORT_RATE_OFDM; |
1591 | spec->tx_power_a = NULL; | 1591 | spec->tx_power_a = NULL; |
1592 | spec->tx_power_bg = txpower; | 1592 | spec->tx_power_bg = txpower; |
1593 | spec->tx_power_default = DEFAULT_TXPOWER; | 1593 | spec->tx_power_default = DEFAULT_TXPOWER; |
@@ -1608,9 +1608,9 @@ static void rt2500usb_probe_hw_mode(struct rt2x00_dev *rt2x00dev) | |||
1608 | spec->num_channels = ARRAY_SIZE(rf_vals_bg_2525e); | 1608 | spec->num_channels = ARRAY_SIZE(rf_vals_bg_2525e); |
1609 | spec->channels = rf_vals_bg_2525e; | 1609 | spec->channels = rf_vals_bg_2525e; |
1610 | } else if (rt2x00_rf(&rt2x00dev->chip, RF5222)) { | 1610 | } else if (rt2x00_rf(&rt2x00dev->chip, RF5222)) { |
1611 | spec->supported_bands |= SUPPORT_BAND_5GHZ; | ||
1611 | spec->num_channels = ARRAY_SIZE(rf_vals_5222); | 1612 | spec->num_channels = ARRAY_SIZE(rf_vals_5222); |
1612 | spec->channels = rf_vals_5222; | 1613 | spec->channels = rf_vals_5222; |
1613 | spec->num_modes = 3; | ||
1614 | } | 1614 | } |
1615 | } | 1615 | } |
1616 | 1616 | ||
diff --git a/drivers/net/wireless/rt2x00/rt2x00.h b/drivers/net/wireless/rt2x00/rt2x00.h index 7a83e0a7dd05..e315d79b2aec 100644 --- a/drivers/net/wireless/rt2x00/rt2x00.h +++ b/drivers/net/wireless/rt2x00/rt2x00.h | |||
@@ -392,30 +392,38 @@ static inline struct rt2x00_intf* vif_to_intf(struct ieee80211_vif *vif) | |||
392 | return (struct rt2x00_intf *)vif->drv_priv; | 392 | return (struct rt2x00_intf *)vif->drv_priv; |
393 | } | 393 | } |
394 | 394 | ||
395 | /* | 395 | /** |
396 | * struct hw_mode_spec: Hardware specifications structure | ||
397 | * | ||
396 | * Details about the supported modes, rates and channels | 398 | * Details about the supported modes, rates and channels |
397 | * of a particular chipset. This is used by rt2x00lib | 399 | * of a particular chipset. This is used by rt2x00lib |
398 | * to build the ieee80211_hw_mode array for mac80211. | 400 | * to build the ieee80211_hw_mode array for mac80211. |
401 | * | ||
402 | * @supported_bands: Bitmask contained the supported bands (2.4GHz, 5.2GHz). | ||
403 | * @supported_rates: Rate types which are supported (CCK, OFDM). | ||
404 | * @num_channels: Number of supported channels. This is used as array size | ||
405 | * for @tx_power_a, @tx_power_bg and @channels. | ||
406 | * channels: Device/chipset specific channel values (See &struct rf_channel). | ||
407 | * @tx_power_a: TX power values for all 5.2GHz channels (may be NULL). | ||
408 | * @tx_power_bg: TX power values for all 2.4GHz channels (may be NULL). | ||
409 | * @tx_power_default: Default TX power value to use when either | ||
410 | * @tx_power_a or @tx_power_bg is missing. | ||
399 | */ | 411 | */ |
400 | struct hw_mode_spec { | 412 | struct hw_mode_spec { |
401 | /* | 413 | unsigned int supported_bands; |
402 | * Number of modes, rates and channels. | 414 | #define SUPPORT_BAND_2GHZ 0x00000001 |
403 | */ | 415 | #define SUPPORT_BAND_5GHZ 0x00000002 |
404 | int num_modes; | 416 | |
405 | int num_rates; | 417 | unsigned int supported_rates; |
406 | int num_channels; | 418 | #define SUPPORT_RATE_CCK 0x00000001 |
419 | #define SUPPORT_RATE_OFDM 0x00000002 | ||
420 | |||
421 | unsigned int num_channels; | ||
422 | const struct rf_channel *channels; | ||
407 | 423 | ||
408 | /* | ||
409 | * txpower values. | ||
410 | */ | ||
411 | const u8 *tx_power_a; | 424 | const u8 *tx_power_a; |
412 | const u8 *tx_power_bg; | 425 | const u8 *tx_power_bg; |
413 | u8 tx_power_default; | 426 | u8 tx_power_default; |
414 | |||
415 | /* | ||
416 | * Device/chipset specific value. | ||
417 | */ | ||
418 | const struct rf_channel *channels; | ||
419 | }; | 427 | }; |
420 | 428 | ||
421 | /* | 429 | /* |
diff --git a/drivers/net/wireless/rt2x00/rt2x00dev.c b/drivers/net/wireless/rt2x00/rt2x00dev.c index 6ccbfc7cbf91..a644b9a7ca8f 100644 --- a/drivers/net/wireless/rt2x00/rt2x00dev.c +++ b/drivers/net/wireless/rt2x00/rt2x00dev.c | |||
@@ -767,25 +767,25 @@ EXPORT_SYMBOL_GPL(rt2x00lib_write_tx_desc); | |||
767 | */ | 767 | */ |
768 | const struct rt2x00_rate rt2x00_supported_rates[12] = { | 768 | const struct rt2x00_rate rt2x00_supported_rates[12] = { |
769 | { | 769 | { |
770 | .flags = 0, | 770 | .flags = DEV_RATE_CCK, |
771 | .bitrate = 10, | 771 | .bitrate = 10, |
772 | .ratemask = DEV_RATEMASK_1MB, | 772 | .ratemask = DEV_RATEMASK_1MB, |
773 | .plcp = 0x00, | 773 | .plcp = 0x00, |
774 | }, | 774 | }, |
775 | { | 775 | { |
776 | .flags = DEV_RATE_SHORT_PREAMBLE, | 776 | .flags = DEV_RATE_CCK | DEV_RATE_SHORT_PREAMBLE, |
777 | .bitrate = 20, | 777 | .bitrate = 20, |
778 | .ratemask = DEV_RATEMASK_2MB, | 778 | .ratemask = DEV_RATEMASK_2MB, |
779 | .plcp = 0x01, | 779 | .plcp = 0x01, |
780 | }, | 780 | }, |
781 | { | 781 | { |
782 | .flags = DEV_RATE_SHORT_PREAMBLE, | 782 | .flags = DEV_RATE_CCK | DEV_RATE_SHORT_PREAMBLE, |
783 | .bitrate = 55, | 783 | .bitrate = 55, |
784 | .ratemask = DEV_RATEMASK_5_5MB, | 784 | .ratemask = DEV_RATEMASK_5_5MB, |
785 | .plcp = 0x02, | 785 | .plcp = 0x02, |
786 | }, | 786 | }, |
787 | { | 787 | { |
788 | .flags = DEV_RATE_SHORT_PREAMBLE, | 788 | .flags = DEV_RATE_CCK | DEV_RATE_SHORT_PREAMBLE, |
789 | .bitrate = 110, | 789 | .bitrate = 110, |
790 | .ratemask = DEV_RATEMASK_11MB, | 790 | .ratemask = DEV_RATEMASK_11MB, |
791 | .plcp = 0x03, | 791 | .plcp = 0x03, |
@@ -868,67 +868,64 @@ static int rt2x00lib_probe_hw_modes(struct rt2x00_dev *rt2x00dev, | |||
868 | struct hw_mode_spec *spec) | 868 | struct hw_mode_spec *spec) |
869 | { | 869 | { |
870 | struct ieee80211_hw *hw = rt2x00dev->hw; | 870 | struct ieee80211_hw *hw = rt2x00dev->hw; |
871 | struct ieee80211_supported_band *sbands; | ||
872 | struct ieee80211_channel *channels; | 871 | struct ieee80211_channel *channels; |
873 | struct ieee80211_rate *rates; | 872 | struct ieee80211_rate *rates; |
873 | unsigned int num_rates; | ||
874 | unsigned int i; | 874 | unsigned int i; |
875 | unsigned char tx_power; | 875 | unsigned char tx_power; |
876 | 876 | ||
877 | sbands = &rt2x00dev->bands[0]; | 877 | num_rates = 0; |
878 | if (spec->supported_rates & SUPPORT_RATE_CCK) | ||
879 | num_rates += 4; | ||
880 | if (spec->supported_rates & SUPPORT_RATE_OFDM) | ||
881 | num_rates += 8; | ||
878 | 882 | ||
879 | channels = kzalloc(sizeof(*channels) * spec->num_channels, GFP_KERNEL); | 883 | channels = kzalloc(sizeof(*channels) * spec->num_channels, GFP_KERNEL); |
880 | if (!channels) | 884 | if (!channels) |
881 | return -ENOMEM; | 885 | return -ENOMEM; |
882 | 886 | ||
883 | rates = kzalloc(sizeof(*rates) * spec->num_rates, GFP_KERNEL); | 887 | rates = kzalloc(sizeof(*rates) * num_rates, GFP_KERNEL); |
884 | if (!rates) | 888 | if (!rates) |
885 | goto exit_free_channels; | 889 | goto exit_free_channels; |
886 | 890 | ||
887 | /* | 891 | /* |
888 | * Initialize Rate list. | 892 | * Initialize Rate list. |
889 | */ | 893 | */ |
890 | for (i = 0; i < spec->num_rates; i++) | 894 | for (i = 0; i < num_rates; i++) |
891 | rt2x00lib_rate(&rates[i], i, rt2x00_get_rate(i)); | 895 | rt2x00lib_rate(&rates[i], i, rt2x00_get_rate(i)); |
892 | 896 | ||
893 | /* | 897 | /* |
894 | * Initialize Channel list. | 898 | * Initialize Channel list. |
895 | */ | 899 | */ |
896 | for (i = 0; i < spec->num_channels; i++) { | 900 | for (i = 0; i < spec->num_channels; i++) { |
897 | if (spec->channels[i].channel <= 14) | 901 | if (spec->channels[i].channel <= 14) { |
898 | tx_power = spec->tx_power_bg[i]; | 902 | if (spec->tx_power_bg) |
899 | else if (spec->tx_power_a) | 903 | tx_power = spec->tx_power_bg[i]; |
900 | tx_power = spec->tx_power_a[i]; | 904 | else |
901 | else | 905 | tx_power = spec->tx_power_default; |
902 | tx_power = spec->tx_power_default; | 906 | } else { |
907 | if (spec->tx_power_a) | ||
908 | tx_power = spec->tx_power_a[i]; | ||
909 | else | ||
910 | tx_power = spec->tx_power_default; | ||
911 | } | ||
903 | 912 | ||
904 | rt2x00lib_channel(&channels[i], | 913 | rt2x00lib_channel(&channels[i], |
905 | spec->channels[i].channel, tx_power, i); | 914 | spec->channels[i].channel, tx_power, i); |
906 | } | 915 | } |
907 | 916 | ||
908 | /* | 917 | /* |
909 | * Intitialize 802.11b | 918 | * Intitialize 802.11b, 802.11g |
910 | * Rates: CCK. | ||
911 | * Channels: 2.4 GHz | ||
912 | */ | ||
913 | if (spec->num_modes > 0) { | ||
914 | sbands[IEEE80211_BAND_2GHZ].n_channels = 14; | ||
915 | sbands[IEEE80211_BAND_2GHZ].n_bitrates = 4; | ||
916 | sbands[IEEE80211_BAND_2GHZ].channels = channels; | ||
917 | sbands[IEEE80211_BAND_2GHZ].bitrates = rates; | ||
918 | hw->wiphy->bands[IEEE80211_BAND_2GHZ] = &rt2x00dev->bands[IEEE80211_BAND_2GHZ]; | ||
919 | } | ||
920 | |||
921 | /* | ||
922 | * Intitialize 802.11g | ||
923 | * Rates: CCK, OFDM. | 919 | * Rates: CCK, OFDM. |
924 | * Channels: 2.4 GHz | 920 | * Channels: 2.4 GHz |
925 | */ | 921 | */ |
926 | if (spec->num_modes > 1) { | 922 | if (spec->supported_bands > SUPPORT_BAND_2GHZ) { |
927 | sbands[IEEE80211_BAND_2GHZ].n_channels = 14; | 923 | rt2x00dev->bands[IEEE80211_BAND_2GHZ].n_channels = 14; |
928 | sbands[IEEE80211_BAND_2GHZ].n_bitrates = spec->num_rates; | 924 | rt2x00dev->bands[IEEE80211_BAND_2GHZ].n_bitrates = num_rates; |
929 | sbands[IEEE80211_BAND_2GHZ].channels = channels; | 925 | rt2x00dev->bands[IEEE80211_BAND_2GHZ].channels = channels; |
930 | sbands[IEEE80211_BAND_2GHZ].bitrates = rates; | 926 | rt2x00dev->bands[IEEE80211_BAND_2GHZ].bitrates = rates; |
931 | hw->wiphy->bands[IEEE80211_BAND_2GHZ] = &rt2x00dev->bands[IEEE80211_BAND_2GHZ]; | 927 | hw->wiphy->bands[IEEE80211_BAND_2GHZ] = |
928 | &rt2x00dev->bands[IEEE80211_BAND_2GHZ]; | ||
932 | } | 929 | } |
933 | 930 | ||
934 | /* | 931 | /* |
@@ -936,12 +933,15 @@ static int rt2x00lib_probe_hw_modes(struct rt2x00_dev *rt2x00dev, | |||
936 | * Rates: OFDM. | 933 | * Rates: OFDM. |
937 | * Channels: OFDM, UNII, HiperLAN2. | 934 | * Channels: OFDM, UNII, HiperLAN2. |
938 | */ | 935 | */ |
939 | if (spec->num_modes > 2) { | 936 | if (spec->supported_bands > SUPPORT_BAND_5GHZ) { |
940 | sbands[IEEE80211_BAND_5GHZ].n_channels = spec->num_channels - 14; | 937 | rt2x00dev->bands[IEEE80211_BAND_5GHZ].n_channels = |
941 | sbands[IEEE80211_BAND_5GHZ].n_bitrates = spec->num_rates - 4; | 938 | spec->num_channels - 14; |
942 | sbands[IEEE80211_BAND_5GHZ].channels = &channels[14]; | 939 | rt2x00dev->bands[IEEE80211_BAND_5GHZ].n_bitrates = |
943 | sbands[IEEE80211_BAND_5GHZ].bitrates = &rates[4]; | 940 | num_rates - 4; |
944 | hw->wiphy->bands[IEEE80211_BAND_5GHZ] = &rt2x00dev->bands[IEEE80211_BAND_5GHZ]; | 941 | rt2x00dev->bands[IEEE80211_BAND_5GHZ].channels = &channels[14]; |
942 | rt2x00dev->bands[IEEE80211_BAND_5GHZ].bitrates = &rates[4]; | ||
943 | hw->wiphy->bands[IEEE80211_BAND_5GHZ] = | ||
944 | &rt2x00dev->bands[IEEE80211_BAND_5GHZ]; | ||
945 | } | 945 | } |
946 | 946 | ||
947 | return 0; | 947 | return 0; |
diff --git a/drivers/net/wireless/rt2x00/rt2x00lib.h b/drivers/net/wireless/rt2x00/rt2x00lib.h index 2a611e4366b5..34ccb3de687e 100644 --- a/drivers/net/wireless/rt2x00/rt2x00lib.h +++ b/drivers/net/wireless/rt2x00/rt2x00lib.h | |||
@@ -38,8 +38,9 @@ | |||
38 | */ | 38 | */ |
39 | struct rt2x00_rate { | 39 | struct rt2x00_rate { |
40 | unsigned short flags; | 40 | unsigned short flags; |
41 | #define DEV_RATE_OFDM 0x0001 | 41 | #define DEV_RATE_CCK 0x0001 |
42 | #define DEV_RATE_SHORT_PREAMBLE 0x0002 | 42 | #define DEV_RATE_OFDM 0x0002 |
43 | #define DEV_RATE_SHORT_PREAMBLE 0x0004 | ||
43 | 44 | ||
44 | unsigned short bitrate; /* In 100kbit/s */ | 45 | unsigned short bitrate; /* In 100kbit/s */ |
45 | 46 | ||
diff --git a/drivers/net/wireless/rt2x00/rt61pci.c b/drivers/net/wireless/rt2x00/rt61pci.c index 62d49376c9af..d08349bed050 100644 --- a/drivers/net/wireless/rt2x00/rt61pci.c +++ b/drivers/net/wireless/rt2x00/rt61pci.c | |||
@@ -2209,8 +2209,8 @@ static void rt61pci_probe_hw_mode(struct rt2x00_dev *rt2x00dev) | |||
2209 | /* | 2209 | /* |
2210 | * Initialize hw_mode information. | 2210 | * Initialize hw_mode information. |
2211 | */ | 2211 | */ |
2212 | spec->num_modes = 2; | 2212 | spec->supported_bands = SUPPORT_BAND_2GHZ; |
2213 | spec->num_rates = 12; | 2213 | spec->supported_rates = SUPPORT_RATE_CCK | SUPPORT_RATE_OFDM; |
2214 | spec->tx_power_a = NULL; | 2214 | spec->tx_power_a = NULL; |
2215 | spec->tx_power_bg = txpower; | 2215 | spec->tx_power_bg = txpower; |
2216 | spec->tx_power_default = DEFAULT_TXPOWER; | 2216 | spec->tx_power_default = DEFAULT_TXPOWER; |
@@ -2225,7 +2225,7 @@ static void rt61pci_probe_hw_mode(struct rt2x00_dev *rt2x00dev) | |||
2225 | 2225 | ||
2226 | if (rt2x00_rf(&rt2x00dev->chip, RF5225) || | 2226 | if (rt2x00_rf(&rt2x00dev->chip, RF5225) || |
2227 | rt2x00_rf(&rt2x00dev->chip, RF5325)) { | 2227 | rt2x00_rf(&rt2x00dev->chip, RF5325)) { |
2228 | spec->num_modes = 3; | 2228 | spec->supported_bands |= SUPPORT_BAND_5GHZ; |
2229 | spec->num_channels = ARRAY_SIZE(rf_vals_seq); | 2229 | spec->num_channels = ARRAY_SIZE(rf_vals_seq); |
2230 | 2230 | ||
2231 | txpower = rt2x00_eeprom_addr(rt2x00dev, EEPROM_TXPOWER_A_START); | 2231 | txpower = rt2x00_eeprom_addr(rt2x00dev, EEPROM_TXPOWER_A_START); |
diff --git a/drivers/net/wireless/rt2x00/rt73usb.c b/drivers/net/wireless/rt2x00/rt73usb.c index c56540602ad6..bf2391b89571 100644 --- a/drivers/net/wireless/rt2x00/rt73usb.c +++ b/drivers/net/wireless/rt2x00/rt73usb.c | |||
@@ -1791,8 +1791,8 @@ static void rt73usb_probe_hw_mode(struct rt2x00_dev *rt2x00dev) | |||
1791 | /* | 1791 | /* |
1792 | * Initialize hw_mode information. | 1792 | * Initialize hw_mode information. |
1793 | */ | 1793 | */ |
1794 | spec->num_modes = 2; | 1794 | spec->supported_bands = SUPPORT_BAND_2GHZ; |
1795 | spec->num_rates = 12; | 1795 | spec->supported_rates = SUPPORT_RATE_CCK | SUPPORT_RATE_OFDM; |
1796 | spec->tx_power_a = NULL; | 1796 | spec->tx_power_a = NULL; |
1797 | spec->tx_power_bg = txpower; | 1797 | spec->tx_power_bg = txpower; |
1798 | spec->tx_power_default = DEFAULT_TXPOWER; | 1798 | spec->tx_power_default = DEFAULT_TXPOWER; |
@@ -1801,20 +1801,20 @@ static void rt73usb_probe_hw_mode(struct rt2x00_dev *rt2x00dev) | |||
1801 | spec->num_channels = ARRAY_SIZE(rf_vals_bg_2528); | 1801 | spec->num_channels = ARRAY_SIZE(rf_vals_bg_2528); |
1802 | spec->channels = rf_vals_bg_2528; | 1802 | spec->channels = rf_vals_bg_2528; |
1803 | } else if (rt2x00_rf(&rt2x00dev->chip, RF5226)) { | 1803 | } else if (rt2x00_rf(&rt2x00dev->chip, RF5226)) { |
1804 | spec->supported_bands |= SUPPORT_BAND_5GHZ; | ||
1804 | spec->num_channels = ARRAY_SIZE(rf_vals_5226); | 1805 | spec->num_channels = ARRAY_SIZE(rf_vals_5226); |
1805 | spec->channels = rf_vals_5226; | 1806 | spec->channels = rf_vals_5226; |
1806 | } else if (rt2x00_rf(&rt2x00dev->chip, RF2527)) { | 1807 | } else if (rt2x00_rf(&rt2x00dev->chip, RF2527)) { |
1807 | spec->num_channels = 14; | 1808 | spec->num_channels = 14; |
1808 | spec->channels = rf_vals_5225_2527; | 1809 | spec->channels = rf_vals_5225_2527; |
1809 | } else if (rt2x00_rf(&rt2x00dev->chip, RF5225)) { | 1810 | } else if (rt2x00_rf(&rt2x00dev->chip, RF5225)) { |
1811 | spec->supported_bands |= SUPPORT_BAND_5GHZ; | ||
1810 | spec->num_channels = ARRAY_SIZE(rf_vals_5225_2527); | 1812 | spec->num_channels = ARRAY_SIZE(rf_vals_5225_2527); |
1811 | spec->channels = rf_vals_5225_2527; | 1813 | spec->channels = rf_vals_5225_2527; |
1812 | } | 1814 | } |
1813 | 1815 | ||
1814 | if (rt2x00_rf(&rt2x00dev->chip, RF5225) || | 1816 | if (rt2x00_rf(&rt2x00dev->chip, RF5225) || |
1815 | rt2x00_rf(&rt2x00dev->chip, RF5226)) { | 1817 | rt2x00_rf(&rt2x00dev->chip, RF5226)) { |
1816 | spec->num_modes = 3; | ||
1817 | |||
1818 | txpower = rt2x00_eeprom_addr(rt2x00dev, EEPROM_TXPOWER_A_START); | 1818 | txpower = rt2x00_eeprom_addr(rt2x00dev, EEPROM_TXPOWER_A_START); |
1819 | for (i = 0; i < 14; i++) | 1819 | for (i = 0; i < 14; i++) |
1820 | txpower[i] = TXPOWER_FROM_DEV(txpower[i]); | 1820 | txpower[i] = TXPOWER_FROM_DEV(txpower[i]); |