1 --- a/include/linux/rt2x00_platform.h
2 +++ b/include/linux/rt2x00_platform.h
5 struct rt2x00_platform_data {
6 char *eeprom_file_name;
12 #endif /* _RT2X00_PLATFORM_H */
13 --- a/drivers/net/wireless/rt2x00/rt2x00dev.c
14 +++ b/drivers/net/wireless/rt2x00/rt2x00dev.c
15 @@ -825,6 +825,22 @@ static int rt2x00lib_probe_hw_modes(stru
16 unsigned int num_rates;
19 + if (rt2x00dev->dev->platform_data) {
20 + struct rt2x00_platform_data *pdata;
22 + pdata = rt2x00dev->dev->platform_data;
23 + if (pdata->disable_2ghz)
24 + spec->supported_bands &= ~SUPPORT_BAND_2GHZ;
25 + if (pdata->disable_5ghz)
26 + spec->supported_bands &= ~SUPPORT_BAND_5GHZ;
29 + if ((spec->supported_bands & SUPPORT_BAND_BOTH) == 0) {
30 + ERROR(rt2x00dev, "No supported bands\n");
36 if (spec->supported_rates & SUPPORT_RATE_CCK)
38 --- a/drivers/net/wireless/rt2x00/rt2x00.h
39 +++ b/drivers/net/wireless/rt2x00/rt2x00.h
40 @@ -420,6 +420,7 @@ struct hw_mode_spec {
41 unsigned int supported_bands;
42 #define SUPPORT_BAND_2GHZ 0x00000001
43 #define SUPPORT_BAND_5GHZ 0x00000002
44 +#define SUPPORT_BAND_BOTH (SUPPORT_BAND_2GHZ | SUPPORT_BAND_5GHZ)
46 unsigned int supported_rates;
47 #define SUPPORT_RATE_CCK 0x00000001