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>
diff --git a/drivers/net/wireless/rt2x00/rt2x00lib.h b/drivers/net/wireless/rt2x00/rt2x00lib.h
index a15227d..e4b4dd2 100644
--- a/drivers/net/wireless/rt2x00/rt2x00lib.h
+++ b/drivers/net/wireless/rt2x00/rt2x00lib.h
@@ -41,22 +41,10 @@
 #define DEV_RATE_CCK			0x0001
 #define DEV_RATE_OFDM			0x0002
 #define DEV_RATE_SHORT_PREAMBLE		0x0004
+#define DEV_RATE_BASIC			0x0008
 
 	unsigned short bitrate; /* In 100kbit/s */
-
 	unsigned short ratemask;
-#define DEV_RATEMASK_1MB	( (1 << 1) - 1 )
-#define DEV_RATEMASK_2MB	( (1 << 2) - 1 )
-#define DEV_RATEMASK_5_5MB	( (1 << 3) - 1 )
-#define DEV_RATEMASK_11MB	( (1 << 4) - 1 )
-#define DEV_RATEMASK_6MB	( (1 << 5) - 1 )
-#define DEV_RATEMASK_9MB	( (1 << 6) - 1 )
-#define DEV_RATEMASK_12MB	( (1 << 7) - 1 )
-#define DEV_RATEMASK_18MB	( (1 << 8) - 1 )
-#define DEV_RATEMASK_24MB	( (1 << 9) - 1 )
-#define DEV_RATEMASK_36MB	( (1 << 10) - 1 )
-#define DEV_RATEMASK_48MB	( (1 << 11) - 1 )
-#define DEV_RATEMASK_54MB	( (1 << 12) - 1 )
 
 	unsigned short plcp;
 };