igc: Add checking for basetime less than zero
authorMuhammad Husaini Zulkifli <muhammad.husaini.zulkifli@intel.com>
Fri, 9 Dec 2022 04:15:19 +0000 (12:15 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 31 Dec 2022 12:32:54 +0000 (13:32 +0100)
commit3770bdee96402e1a94df55f8b1d6d34b4dac03ba
tree7d1397c9d00e891e7eb7b27408924212b0c4d832
parent94a033ae7d77fdec09106aac7018a20a8cb80354
igc: Add checking for basetime less than zero

[ Upstream commit 3b61764fb49a6e147ac90d71dccdddc9d5508ba1 ]

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: ec50a9d437f0 ("igc: Add support for taprio offloading")
Signed-off-by: Muhammad Husaini Zulkifli <muhammad.husaini.zulkifli@intel.com>
Tested-by: Naama Meir <naamax.meir@linux.intel.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/ethernet/intel/igc/igc_main.c