diff options
author | Dan Carpenter <dan.carpenter@oracle.com> | 2011-09-21 10:17:04 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2011-09-26 17:26:03 -0700 |
commit | 8f019bfe0a23167d49aa5c364d229ae416f7e675 (patch) | |
tree | 10c2d341d6a61dc96bdaeaaca5a21aa229774b22 | |
parent | 06bc69691bbdcc9a61c1fefceba081636b80435c (diff) | |
download | talos-obmc-linux-8f019bfe0a23167d49aa5c364d229ae416f7e675.tar.gz talos-obmc-linux-8f019bfe0a23167d49aa5c364d229ae416f7e675.zip |
Staging: rtl8192e: off by one in rtl8192_get_channel_map()
COUNTRY_CODE_MAX is not a valid country code. We're off by one here.
This gets passed to Dot11d_Channelmap() where it's used as an offset
into the ChannelPlan[] array.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-rw-r--r-- | drivers/staging/rtl8192e/rtl_core.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/staging/rtl8192e/rtl_core.c b/drivers/staging/rtl8192e/rtl_core.c index 4c5d7abd9be0..5ad96649f407 100644 --- a/drivers/staging/rtl8192e/rtl_core.c +++ b/drivers/staging/rtl8192e/rtl_core.c @@ -1283,7 +1283,7 @@ static short rtl8192_get_channel_map(struct net_device *dev) return -1; } - if (priv->ChannelPlan > COUNTRY_CODE_MAX) { + if (priv->ChannelPlan >= COUNTRY_CODE_MAX) { printk(KERN_INFO "rtl819x_init:Error channel plan! Set to " "default.\n"); priv->ChannelPlan = COUNTRY_CODE_FCC; |