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

Commit db3cd7af authored by Haiyang Zhang's avatar Haiyang Zhang Committed by David S. Miller
Browse files

hv_netvsc: Fix the channel limit in netvsc_set_rxfh()



The limit of setting receive indirection table value should be
the current number of channels, not the VRSS_CHANNEL_MAX.

Signed-off-by: default avatarHaiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 06be580a
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1407,7 +1407,7 @@ static int netvsc_set_rxfh(struct net_device *dev, const u32 *indir,
	rndis_dev = ndev->extension;
	if (indir) {
		for (i = 0; i < ITAB_NUM; i++)
			if (indir[i] >= VRSS_CHANNEL_MAX)
			if (indir[i] >= ndev->num_chn)
				return -EINVAL;

		for (i = 0; i < ITAB_NUM; i++)