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>
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;