Skip to content

Commit 316a28d

Browse files
jbrandebanguy11
authored andcommitted
ice: cleanup inconsistent code
It was found while doing further testing of the previous commit fbf32a9bab91 ("ice: field get conversion") that one of the FIELD_GET conversions should really be a FIELD_PREP. The previous code was styled as a match to the FIELD_GET conversion, which always worked because the shift value was 0. The code makes way more sense as a FIELD_PREP and was in fact the only FIELD_GET with two constant arguments in this series. Didn't squash this patch to make it easier to call out the (non-impactful) bug. Signed-off-by: Jesse Brandeburg <[email protected]> Tested-by: Pucha Himasekhar Reddy <[email protected]> (A Contingent worker at Intel) Signed-off-by: Tony Nguyen <[email protected]>
1 parent 5a259f8 commit 316a28d

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

drivers/net/ethernet/intel/ice/ice_dcb.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -967,7 +967,7 @@ void ice_get_dcb_cfg_from_mib_change(struct ice_port_info *pi,
967967

968968
mib = (struct ice_aqc_lldp_get_mib *)&event->desc.params.raw;
969969

970-
change_type = FIELD_GET(ICE_AQ_LLDP_MIB_TYPE_M, mib->type);
970+
change_type = FIELD_GET(ICE_AQ_LLDP_MIB_TYPE_M, mib->type);
971971
if (change_type == ICE_AQ_LLDP_MIB_REMOTE)
972972
dcbx_cfg = &pi->qos_cfg.remote_dcbx_cfg;
973973

drivers/net/ethernet/intel/ice/ice_lib.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -974,8 +974,8 @@ static void ice_set_dflt_vsi_ctx(struct ice_hw *hw, struct ice_vsi_ctx *ctxt)
974974
/* Traffic from VSI can be sent to LAN */
975975
ctxt->info.sw_flags2 = ICE_AQ_VSI_SW_FLAG_LAN_ENA;
976976
/* allow all untagged/tagged packets by default on Tx */
977-
ctxt->info.inner_vlan_flags = FIELD_GET(ICE_AQ_VSI_INNER_VLAN_TX_MODE_M,
978-
ICE_AQ_VSI_INNER_VLAN_TX_MODE_ALL);
977+
ctxt->info.inner_vlan_flags = FIELD_PREP(ICE_AQ_VSI_INNER_VLAN_TX_MODE_M,
978+
ICE_AQ_VSI_INNER_VLAN_TX_MODE_ALL);
979979
/* SVM - by default bits 3 and 4 in inner_vlan_flags are 0's which
980980
* results in legacy behavior (show VLAN, DEI, and UP) in descriptor.
981981
*

0 commit comments

Comments
 (0)