diff options
author | Ivo van Doorn <ivdoorn@gmail.com> | 2008-03-09 17:48:08 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2008-03-13 19:31:42 -0400 |
commit | aa776721b472e343a8db7f3c0673b1fa24e6c7f7 (patch) | |
tree | b3bb79f05cdd729696877783bb25da7c3a7dd3c0 /drivers/net/wireless/rt2x00/rt2x00dev.c | |
parent | fd3c91c5e57eef8db71cf52e2473832c330bf5db (diff) |
rt2x00: Fix basic rate initialization
The basic rate which is configured in the register
should not match all supported rates, but only the _basic_ rates.
Fix this by adding a new flag to the rt2x00_rate structure
and whenever the mode is changed, loop over all available rates
for that band to get the basic rate mask.
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/rt2x00/rt2x00dev.c')
-rw-r--r-- | drivers/net/wireless/rt2x00/rt2x00dev.c | 38 |
1 files changed, 19 insertions, 19 deletions
diff --git a/drivers/net/wireless/rt2x00/rt2x00dev.c b/drivers/net/wireless/rt2x00/rt2x00dev.c index d6b12789ba77..eb2d21c4e8e9 100644 --- a/drivers/net/wireless/rt2x00/rt2x00dev.c +++ b/drivers/net/wireless/rt2x00/rt2x00dev.c | |||
@@ -766,75 +766,75 @@ EXPORT_SYMBOL_GPL(rt2x00lib_write_tx_desc); | |||
766 | */ | 766 | */ |
767 | const struct rt2x00_rate rt2x00_supported_rates[12] = { | 767 | const struct rt2x00_rate rt2x00_supported_rates[12] = { |
768 | { | 768 | { |
769 | .flags = DEV_RATE_CCK, | 769 | .flags = DEV_RATE_CCK | DEV_RATE_BASIC, |
770 | .bitrate = 10, | 770 | .bitrate = 10, |
771 | .ratemask = DEV_RATEMASK_1MB, | 771 | .ratemask = BIT(0), |
772 | .plcp = 0x00, | 772 | .plcp = 0x00, |
773 | }, | 773 | }, |
774 | { | 774 | { |
775 | .flags = DEV_RATE_CCK | DEV_RATE_SHORT_PREAMBLE, | 775 | .flags = DEV_RATE_CCK | DEV_RATE_SHORT_PREAMBLE | DEV_RATE_BASIC, |
776 | .bitrate = 20, | 776 | .bitrate = 20, |
777 | .ratemask = DEV_RATEMASK_2MB, | 777 | .ratemask = BIT(1), |
778 | .plcp = 0x01, | 778 | .plcp = 0x01, |
779 | }, | 779 | }, |
780 | { | 780 | { |
781 | .flags = DEV_RATE_CCK | DEV_RATE_SHORT_PREAMBLE, | 781 | .flags = DEV_RATE_CCK | DEV_RATE_SHORT_PREAMBLE | DEV_RATE_BASIC, |
782 | .bitrate = 55, | 782 | .bitrate = 55, |
783 | .ratemask = DEV_RATEMASK_5_5MB, | 783 | .ratemask = BIT(2), |
784 | .plcp = 0x02, | 784 | .plcp = 0x02, |
785 | }, | 785 | }, |
786 | { | 786 | { |
787 | .flags = DEV_RATE_CCK | DEV_RATE_SHORT_PREAMBLE, | 787 | .flags = DEV_RATE_CCK | DEV_RATE_SHORT_PREAMBLE | DEV_RATE_BASIC, |
788 | .bitrate = 110, | 788 | .bitrate = 110, |
789 | .ratemask = DEV_RATEMASK_11MB, | 789 | .ratemask = BIT(3), |
790 | .plcp = 0x03, | 790 | .plcp = 0x03, |
791 | }, | 791 | }, |
792 | { | 792 | { |
793 | .flags = DEV_RATE_OFDM, | 793 | .flags = DEV_RATE_OFDM | DEV_RATE_BASIC, |
794 | .bitrate = 60, | 794 | .bitrate = 60, |
795 | .ratemask = DEV_RATEMASK_6MB, | 795 | .ratemask = BIT(4), |
796 | .plcp = 0x0b, | 796 | .plcp = 0x0b, |
797 | }, | 797 | }, |
798 | { | 798 | { |
799 | .flags = DEV_RATE_OFDM, | 799 | .flags = DEV_RATE_OFDM, |
800 | .bitrate = 90, | 800 | .bitrate = 90, |
801 | .ratemask = DEV_RATEMASK_9MB, | 801 | .ratemask = BIT(5), |
802 | .plcp = 0x0f, | 802 | .plcp = 0x0f, |
803 | }, | 803 | }, |
804 | { | 804 | { |
805 | .flags = DEV_RATE_OFDM, | 805 | .flags = DEV_RATE_OFDM | DEV_RATE_BASIC, |
806 | .bitrate = 120, | 806 | .bitrate = 120, |
807 | .ratemask = DEV_RATEMASK_12MB, | 807 | .ratemask = BIT(6), |
808 | .plcp = 0x0a, | 808 | .plcp = 0x0a, |
809 | }, | 809 | }, |
810 | { | 810 | { |
811 | .flags = DEV_RATE_OFDM, | 811 | .flags = DEV_RATE_OFDM, |
812 | .bitrate = 180, | 812 | .bitrate = 180, |
813 | .ratemask = DEV_RATEMASK_18MB, | 813 | .ratemask = BIT(7), |
814 | .plcp = 0x0e, | 814 | .plcp = 0x0e, |
815 | }, | 815 | }, |
816 | { | 816 | { |
817 | .flags = DEV_RATE_OFDM, | 817 | .flags = DEV_RATE_OFDM | DEV_RATE_BASIC, |
818 | .bitrate = 240, | 818 | .bitrate = 240, |
819 | .ratemask = DEV_RATEMASK_24MB, | 819 | .ratemask = BIT(8), |
820 | .plcp = 0x09, | 820 | .plcp = 0x09, |
821 | }, | 821 | }, |
822 | { | 822 | { |
823 | .flags = DEV_RATE_OFDM, | 823 | .flags = DEV_RATE_OFDM, |
824 | .bitrate = 360, | 824 | .bitrate = 360, |
825 | .ratemask = DEV_RATEMASK_36MB, | 825 | .ratemask = BIT(9), |
826 | .plcp = 0x0d, | 826 | .plcp = 0x0d, |
827 | }, | 827 | }, |
828 | { | 828 | { |
829 | .flags = DEV_RATE_OFDM, | 829 | .flags = DEV_RATE_OFDM, |
830 | .bitrate = 480, | 830 | .bitrate = 480, |
831 | .ratemask = DEV_RATEMASK_48MB, | 831 | .ratemask = BIT(10), |
832 | .plcp = 0x08, | 832 | .plcp = 0x08, |
833 | }, | 833 | }, |
834 | { | 834 | { |
835 | .flags = DEV_RATE_OFDM, | 835 | .flags = DEV_RATE_OFDM, |
836 | .bitrate = 540, | 836 | .bitrate = 540, |
837 | .ratemask = DEV_RATEMASK_54MB, | 837 | .ratemask = BIT(11), |
838 | .plcp = 0x0c, | 838 | .plcp = 0x0c, |
839 | }, | 839 | }, |
840 | }; | 840 | }; |