diff options
author | Dan Carpenter <dan.carpenter@oracle.com> | 2013-02-12 13:23:14 +0100 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2013-02-14 20:24:06 +0100 |
commit | 68eed6ee4c70fdf71cbacf9af43a861cd7a237fb (patch) | |
tree | 5cbb3e3074d31ef65d5ec07bc1d7b85cb1fd50b0 /drivers/net/wireless/brcm80211/brcmsmac/channel.c | |
parent | Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linvil... (diff) | |
download | linux-68eed6ee4c70fdf71cbacf9af43a861cd7a237fb.tar.xz linux-68eed6ee4c70fdf71cbacf9af43a861cd7a237fb.zip |
brcmsmac: fix brcms_c_country_valid()
ccode is not NUL terminated. Presumably insisting on a terminator makes
brcms_c_country_valid() return false when it's not intended. ccode[2]
is sprom->leddc_on_time.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/brcm80211/brcmsmac/channel.c')
-rw-r--r-- | drivers/net/wireless/brcm80211/brcmsmac/channel.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/net/wireless/brcm80211/brcmsmac/channel.c b/drivers/net/wireless/brcm80211/brcmsmac/channel.c index cdb62b8ccc79..10ee314c4229 100644 --- a/drivers/net/wireless/brcm80211/brcmsmac/channel.c +++ b/drivers/net/wireless/brcm80211/brcmsmac/channel.c @@ -183,8 +183,7 @@ static bool brcms_c_country_valid(const char *ccode) * chars. */ if (!((0x80 & ccode[0]) == 0 && ccode[0] >= 0x41 && ccode[0] <= 0x5A && - (0x80 & ccode[1]) == 0 && ccode[1] >= 0x41 && ccode[1] <= 0x5A && - ccode[2] == '\0')) + (0x80 & ccode[1]) == 0 && ccode[1] >= 0x41 && ccode[1] <= 0x5A)) return false; /* |