Commit 3b61764f authored by Muhammad Husaini Zulkifli's avatar Muhammad Husaini Zulkifli Committed by Tony Nguyen

igc: Add checking for basetime less than zero

Using the tc qdisc command, the user can set basetime to any value.
Checking should be done on the driver's side to prevent registering
basetime values that are less than zero.

Fixes: ec50a9d4 ("igc: Add support for taprio offloading")
Signed-off-by: default avatarMuhammad Husaini Zulkifli <muhammad.husaini.zulkifli@intel.com>
Tested-by: default avatarNaama Meir <naamax.meir@linux.intel.com>
Signed-off-by: default avatarTony Nguyen <anthony.l.nguyen@intel.com>
parent d8f45be0
......@@ -6047,6 +6047,9 @@ static int igc_save_qbv_schedule(struct igc_adapter *adapter,
if (!qopt->enable)
return igc_tsn_clear_schedule(adapter);
if (qopt->base_time < 0)
return -ERANGE;
if (adapter->base_time)
return -EALREADY;
......
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