const s8 hi[] = { -14, -12 };
const s8 fr[] = { -78, -80 };
#endif
- if (level < 0 || level > ARRAY_SIZE(sz)) {
+ if (level < 0 || level >= ARRAY_SIZE(sz)) {
ATH5K_DBG_UNLIMIT(ah->ah_sc, ATH5K_DEBUG_ANI,
"level out of range %d", level);
return;
{
const int val[] = { 2, 4, 6, 8, 10, 12, 14, 16 };
- if (level < 0 || level > ARRAY_SIZE(val) ||
+ if (level < 0 || level >= ARRAY_SIZE(val) ||
level > ah->ah_sc->ani_state.max_spur_level) {
ATH5K_DBG_UNLIMIT(ah->ah_sc, ATH5K_DEBUG_ANI,
"level out of range %d", level);
{
const int val[] = { 0, 4, 8 };
- if (level < 0 || level > ARRAY_SIZE(val)) {
+ if (level < 0 || level >= ARRAY_SIZE(val)) {
ATH5K_DBG_UNLIMIT(ah->ah_sc, ATH5K_DEBUG_ANI,
"level out of range %d", level);
return;