Commit 89daee6f authored by Malcolm Priestley's avatar Malcolm Priestley Committed by Greg Kroah-Hartman

staging: vt6656: vnt_rf_setpower rate <= RATE_11M check array bound

decrement channel by one and check array bound.
Signed-off-by: default avatarMalcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 72183c6b
......@@ -744,7 +744,10 @@ int vnt_rf_setpower(struct vnt_private *priv, u32 rate, u32 channel)
case RATE_2M:
case RATE_5M:
case RATE_11M:
power = priv->abyCCKPwrTbl[channel-1];
channel--;
if (channel < sizeof(priv->abyCCKPwrTbl))
power = priv->abyCCKPwrTbl[channel];
break;
case RATE_6M:
case RATE_9M:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment