diff options
| -rw-r--r-- | drivers/net/wireless/bcm43xx/bcm43xx_main.c | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/drivers/net/wireless/bcm43xx/bcm43xx_main.c b/drivers/net/wireless/bcm43xx/bcm43xx_main.c index 80cb88eb98c6..a38e7eec0e62 100644 --- a/drivers/net/wireless/bcm43xx/bcm43xx_main.c +++ b/drivers/net/wireless/bcm43xx/bcm43xx_main.c | |||
| @@ -946,6 +946,7 @@ static int bcm43xx_geo_init(struct bcm43xx_private *bcm) | |||
| 946 | u8 channel; | 946 | u8 channel; |
| 947 | struct bcm43xx_phyinfo *phy; | 947 | struct bcm43xx_phyinfo *phy; |
| 948 | const char *iso_country; | 948 | const char *iso_country; |
| 949 | u8 max_bg_channel; | ||
| 949 | 950 | ||
| 950 | geo = kzalloc(sizeof(*geo), GFP_KERNEL); | 951 | geo = kzalloc(sizeof(*geo), GFP_KERNEL); |
| 951 | if (!geo) | 952 | if (!geo) |
| @@ -967,6 +968,23 @@ static int bcm43xx_geo_init(struct bcm43xx_private *bcm) | |||
| 967 | } | 968 | } |
| 968 | iso_country = bcm43xx_locale_iso(bcm->sprom.locale); | 969 | iso_country = bcm43xx_locale_iso(bcm->sprom.locale); |
| 969 | 970 | ||
| 971 | /* set the maximum channel based on locale set in sprom or witle locale option */ | ||
| 972 | switch (bcm->sprom.locale) { | ||
| 973 | case BCM43xx_LOCALE_THAILAND: | ||
| 974 | case BCM43xx_LOCALE_ISRAEL: | ||
| 975 | case BCM43xx_LOCALE_JORDAN: | ||
| 976 | case BCM43xx_LOCALE_USA_CANADA_ANZ: | ||
| 977 | case BCM43xx_LOCALE_USA_LOW: | ||
| 978 | max_bg_channel = 11; | ||
| 979 | break; | ||
| 980 | case BCM43xx_LOCALE_JAPAN: | ||
| 981 | case BCM43xx_LOCALE_JAPAN_HIGH: | ||
| 982 | max_bg_channel = 14; | ||
| 983 | break; | ||
| 984 | default: | ||
| 985 | max_bg_channel = 13; | ||
| 986 | } | ||
| 987 | |||
| 970 | if (have_a) { | 988 | if (have_a) { |
| 971 | for (i = 0, channel = IEEE80211_52GHZ_MIN_CHANNEL; | 989 | for (i = 0, channel = IEEE80211_52GHZ_MIN_CHANNEL; |
| 972 | channel <= IEEE80211_52GHZ_MAX_CHANNEL; channel++) { | 990 | channel <= IEEE80211_52GHZ_MAX_CHANNEL; channel++) { |
| @@ -978,7 +996,7 @@ static int bcm43xx_geo_init(struct bcm43xx_private *bcm) | |||
| 978 | } | 996 | } |
| 979 | if (have_bg) { | 997 | if (have_bg) { |
| 980 | for (i = 0, channel = IEEE80211_24GHZ_MIN_CHANNEL; | 998 | for (i = 0, channel = IEEE80211_24GHZ_MIN_CHANNEL; |
| 981 | channel <= IEEE80211_24GHZ_MAX_CHANNEL; channel++) { | 999 | channel <= max_bg_channel; channel++) { |
| 982 | chan = &geo->bg[i++]; | 1000 | chan = &geo->bg[i++]; |
| 983 | chan->freq = bcm43xx_channel_to_freq_bg(channel); | 1001 | chan->freq = bcm43xx_channel_to_freq_bg(channel); |
| 984 | chan->channel = channel; | 1002 | chan->channel = channel; |
