Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5cdfed54 authored by Andrew Lutomirski's avatar Andrew Lutomirski Committed by David S. Miller
Browse files

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: default avatarAndy Lutomirski <luto@myrealbox.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent 87c4ac84
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -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,