igc: use FIELD_PREP and GENMASK for existing TX packet buffer size
authorFaizal Rahim <faizal.abdul.rahim@linux.intel.com>
Tue, 18 Mar 2025 03:07:34 +0000 (23:07 -0400)
committerTony Nguyen <anthony.l.nguyen@intel.com>
Fri, 18 Apr 2025 15:43:10 +0000 (08:43 -0700)
commit425d8d9cb092fdd38e139dc6c104cade85896ba4
tree5cff61c0073f79421b10c8411e5ff0bdf7e6eec8
parent67287d67bebdd6de3ba7e60f20b08fb62a360a01
igc: use FIELD_PREP and GENMASK for existing TX packet buffer size

In preparation for an upcoming patch that will modify the TX buffer size
in  TSN mode, replace IGC_TXPBSIZE_TSN and IGC_TXPBSIZE_DEFAULT
implementation with new macros that utilizes FIELD_PREP and GENMASK for
clarity.

The newly introduced macros follow the naming from the i226 SW User Manual
for easy reference.

I've tested IGC_TXPBSIZE_TSN and IGC_TXPBSIZE_DEFAULT before and after the
refactoring, and their values remain unchanged.

Reviewed-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Signed-off-by: Faizal Rahim <faizal.abdul.rahim@linux.intel.com>
Tested-by: Mor Bar-Gabay <morx.bar.gabay@intel.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
drivers/net/ethernet/intel/igc/igc_defines.h