diff options
author | Ivan Vecera <ivecera@redhat.com> | 2023-11-13 15:10:26 -0800 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2023-11-14 20:05:44 -0800 |
commit | d0b1314c8b338bc053b5d266579afb79490f5f9a (patch) | |
tree | b7296d5522a66d13c53003d3a86e871fcacfa803 /drivers/net/ethernet/intel/i40e/i40e_dcb.c | |
parent | 70756d0a4727fe8fa23afaee76028299af4062dd (diff) | |
download | linux-d0b1314c8b338bc053b5d266579afb79490f5f9a.tar.gz linux-d0b1314c8b338bc053b5d266579afb79490f5f9a.tar.bz2 linux-d0b1314c8b338bc053b5d266579afb79490f5f9a.zip |
i40e: Use DECLARE_BITMAP for flags field in i40e_hw
Convert flags field in i40e_hw from u64 to bitmap and its usage
to use bit access functions and rename the field to 'caps' as
this field describes capabilities that are set once on init and
read many times later.
Changes:
- Convert "hw_ptr->flags & FLAG" to "test_bit(FLAG, ...)"
- Convert "hw_ptr->flags |= FLAG" to "set_bit(FLAG, ...)"
- Convert "hw_ptr->flags &= ~FLAG" to "clear_bit(FLAG, ...)"
- Rename i40e_hw.flags to i40e_hw.caps
- Rename i40e_set_hw_flags() to i40e_set_hw_caps()
- Adjust caps names so they are prefixed by I40E_HW_CAP_ and existing
_CAPABLE suffixes are stripped
Signed-off-by: Ivan Vecera <ivecera@redhat.com>
Reviewed-by: Jacob Keller <jacob.e.keller@intel.com>
Tested-by: Pucha Himasekhar Reddy <himasekharx.reddy.pucha@intel.com> (A Contingent worker at Intel)
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
Link: https://lore.kernel.org/r/20231113231047.548659-8-anthony.l.nguyen@intel.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'drivers/net/ethernet/intel/i40e/i40e_dcb.c')
-rw-r--r-- | drivers/net/ethernet/intel/i40e/i40e_dcb.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ethernet/intel/i40e/i40e_dcb.c b/drivers/net/ethernet/intel/i40e/i40e_dcb.c index 68602fc375f6..39e44a2e0677 100644 --- a/drivers/net/ethernet/intel/i40e/i40e_dcb.c +++ b/drivers/net/ethernet/intel/i40e/i40e_dcb.c @@ -877,7 +877,7 @@ int i40e_init_dcb(struct i40e_hw *hw, bool enable_mib_change) return -EOPNOTSUPP; /* Read LLDP NVM area */ - if (hw->flags & I40E_HW_FLAG_FW_LLDP_PERSISTENT) { + if (test_bit(I40E_HW_CAP_FW_LLDP_PERSISTENT, hw->caps)) { u8 offset = 0; if (hw->mac.type == I40E_MAC_XL710) |