intel: legacy: Partial revert of field get conversion
authorSasha Neftin <sasha.neftin@intel.com>
Sun, 18 Feb 2024 07:42:21 +0000 (09:42 +0200)
committerTony Nguyen <anthony.l.nguyen@intel.com>
Tue, 5 Mar 2024 18:07:04 +0000 (10:07 -0800)
Refactoring of the field get conversion introduced a regression in the
legacy Wake On Lan from a magic packet with i219 devices. Rx address
copied not correctly from MAC to PHY with FIELD_GET macro.

Fixes: b9a452545075 ("intel: legacy: field get conversion")
Suggested-by: Vitaly Lifshits <vitaly.lifshits@intel.com>
Signed-off-by: Sasha Neftin <sasha.neftin@intel.com>
Tested-by: Naama Meir <naamax.meir@linux.intel.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
drivers/net/ethernet/intel/e1000e/ich8lan.c

index a2788fd5f8bb857510e6c4b4af362188be996e68..19e450a5bd314ff67676843a767ec1c5c2bd84d4 100644 (file)
@@ -2559,7 +2559,7 @@ void e1000_copy_rx_addrs_to_phy_ich8lan(struct e1000_hw *hw)
                hw->phy.ops.write_reg_page(hw, BM_RAR_H(i),
                                           (u16)(mac_reg & 0xFFFF));
                hw->phy.ops.write_reg_page(hw, BM_RAR_CTRL(i),
-                                          FIELD_GET(E1000_RAH_AV, mac_reg));
+                                          (u16)((mac_reg & E1000_RAH_AV) >> 16));
        }
 
        e1000_disable_phy_wakeup_reg_access_bm(hw, &phy_reg);