Commit 6d534ee0 authored by Michael Sit Wei Hong's avatar Michael Sit Wei Hong Committed by David S. Miller

net: stmmac: Add check for taprio basetime configuration

Adds a boundary check to prevent negative basetime input from user
while configuring taprio.
Signed-off-by: default avatarMichael Sit Wei Hong <michael.wei.hong.sit@intel.com>
Signed-off-by: default avatarLai Peter Jun Ann <jun.ann.lai@intel.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 93c60b59
......@@ -926,6 +926,9 @@ static int tc_setup_taprio(struct stmmac_priv *priv,
int i, ret = 0;
u64 ctr;
if (qopt->base_time < 0)
return -ERANGE;
if (!priv->dma_cap.estsel)
return -EOPNOTSUPP;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment