Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=81e880064dd32b3efdc41ad4cc2416c4744693ee
Commit:     81e880064dd32b3efdc41ad4cc2416c4744693ee
Parent:     92b3e2e9253a9f4c9224071842fd263c334dece0
Author:     Larry Finger <[EMAIL PROTECTED]>
AuthorDate: Sat Apr 7 13:54:35 2007 -0500
Committer:  John W. Linville <[EMAIL PROTECTED]>
CommitDate: Tue Apr 10 14:35:57 2007 -0400

    [PATCH] bcm43xx: Fix 802.11b/g scan limits to match regulatory reqs
    
    In 802.11b/g mode, bcm43xx actively scans channels 1-14 no matter what
    locale has been set, either in the sprom or by the locale option. This
    behaviorviolates regulatory rules everywhere in the world except
    Japan. This patch changes the default range to the correct value if the
    locale has been set, and to channels 1-13 if no locale has been set.
    
    Signed-off-by: Larry Finger <[EMAIL PROTECTED]>
    Signed-off-by: John W. Linville <[EMAIL PROTECTED]>
---
 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 80cb88e..a38e7ee 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)
        u8 channel;
        struct bcm43xx_phyinfo *phy;
        const char *iso_country;
+       u8 max_bg_channel;
 
        geo = kzalloc(sizeof(*geo), GFP_KERNEL);
        if (!geo)
@@ -967,6 +968,23 @@ static int bcm43xx_geo_init(struct bcm43xx_private *bcm)
        }
        iso_country = bcm43xx_locale_iso(bcm->sprom.locale);
 
+/* set the maximum channel based on locale set in sprom or witle locale option 
*/
+       switch (bcm->sprom.locale) {
+       case BCM43xx_LOCALE_THAILAND:
+       case BCM43xx_LOCALE_ISRAEL:
+       case BCM43xx_LOCALE_JORDAN:
+       case BCM43xx_LOCALE_USA_CANADA_ANZ:
+       case BCM43xx_LOCALE_USA_LOW:
+               max_bg_channel = 11;
+               break;
+       case BCM43xx_LOCALE_JAPAN:
+       case BCM43xx_LOCALE_JAPAN_HIGH:
+               max_bg_channel = 14;
+               break;
+       default:
+               max_bg_channel = 13;
+       }
+
        if (have_a) {
                for (i = 0, channel = IEEE80211_52GHZ_MIN_CHANNEL;
                      channel <= IEEE80211_52GHZ_MAX_CHANNEL; channel++) {
@@ -978,7 +996,7 @@ static int bcm43xx_geo_init(struct bcm43xx_private *bcm)
        }
        if (have_bg) {
                for (i = 0, channel = IEEE80211_24GHZ_MIN_CHANNEL;
-                     channel <= IEEE80211_24GHZ_MAX_CHANNEL; channel++) {
+                     channel <= max_bg_channel; channel++) {
                        chan = &geo->bg[i++];
                        chan->freq = bcm43xx_channel_to_freq_bg(channel);
                        chan->channel = channel;
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to