Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=5cdfed54e7200dde2e846e2ef153d1694ce44875 Commit: 5cdfed54e7200dde2e846e2ef153d1694ce44875 Parent: 87c4ac841c1d524416ab36c19689550bf302dab1 Author: Andrew Lutomirski <[EMAIL PROTECTED]> AuthorDate: Thu Jan 3 21:03:19 2008 -0800 Committer: David S. Miller <[EMAIL PROTECTED]> CommitDate: Tue Jan 8 23:30:10 2008 -0800
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 <[EMAIL PROTECTED]> Signed-off-by: John W. Linville <[EMAIL PROTECTED]> --- net/mac80211/ieee80211_ioctl.c | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/net/mac80211/ieee80211_ioctl.c b/net/mac80211/ieee80211_ioctl.c index 7027eed..308bbe4 100644 --- a/net/mac80211/ieee80211_ioctl.c +++ b/net/mac80211/ieee80211_ioctl.c @@ -591,7 +591,7 @@ static int ieee80211_ioctl_siwrate(struct net_device *dev, sdata->bss->force_unicast_rateidx = -1; if (rate->value < 0) return 0; - for (i=0; i< mode->num_rates; i++) { + for (i=0; i < mode->num_rates; i++) { struct ieee80211_rate *rates = &mode->rates[i]; int this_rate = rates->rate; @@ -599,10 +599,10 @@ 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 0; + return -EINVAL; } static int ieee80211_ioctl_giwrate(struct net_device *dev, - To unsubscribe from this list: send the line "unsubscribe git-commits-head" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html