|
@@ -2275,7 +2275,7 @@ static int atmel_set_freq(struct net_device *dev,
|
|
fwrq->m = ieee80211_frequency_to_channel(f);
|
|
fwrq->m = ieee80211_frequency_to_channel(f);
|
|
}
|
|
}
|
|
/* Setting by channel number */
|
|
/* Setting by channel number */
|
|
- if ((fwrq->m > 1000) || (fwrq->e > 0))
|
|
|
|
|
|
+ if (fwrq->m < 0 || fwrq->m > 1000 || fwrq->e > 0)
|
|
rc = -EOPNOTSUPP;
|
|
rc = -EOPNOTSUPP;
|
|
else {
|
|
else {
|
|
int channel = fwrq->m;
|
|
int channel = fwrq->m;
|