mac80211: return an error when SIWRATE doesn't match any rate

Currently mac80211 fails silently when trying to set a nonexistent
rate.  Return an error instead.

Signed-Off-By: Andy Lutomirski <luto@myrealbox.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
This commit is contained in:
Andrew Lutomirski 2008-01-03 21:03:19 -08:00 committed by David S. Miller
parent 87c4ac841c
commit 5cdfed54e7

View file

@ -599,11 +599,11 @@ static int ieee80211_ioctl_siwrate(struct net_device *dev,
sdata->bss->max_ratectrl_rateidx = i;
if (rate->fixed)
sdata->bss->force_unicast_rateidx = i;
break;
}
}
return 0;
}
}
return -EINVAL;
}
static int ieee80211_ioctl_giwrate(struct net_device *dev,
struct iw_request_info *info,