i40e: Move the saving of old link info from handle_link_event to link_event
[deliverable/linux.git] / drivers / net / ethernet / intel / i40e / i40e_main.c
index 0e6abc2ec16dfd5051d82830f75c4bdfe89919a3..9c0a381cf4200659aface3c796f850fea9d60dd3 100644 (file)
@@ -6016,6 +6016,9 @@ static void i40e_link_event(struct i40e_pf *pf)
        i40e_status status;
        bool new_link, old_link;
 
+       /* save off old link status information */
+       pf->hw.phy.link_info_old = pf->hw.phy.link_info;
+
        /* set this to force the get_link_status call to refresh state */
        pf->hw.phy.get_link_info = true;
 
@@ -6150,13 +6153,9 @@ unlock:
 static void i40e_handle_link_event(struct i40e_pf *pf,
                                   struct i40e_arq_event_info *e)
 {
-       struct i40e_hw *hw = &pf->hw;
        struct i40e_aqc_get_link_status *status =
                (struct i40e_aqc_get_link_status *)&e->desc.params.raw;
 
-       /* save off old link status information */
-       hw->phy.link_info_old = hw->phy.link_info;
-
        /* Do a new status request to re-enable LSE reporting
         * and load new status information into the hw struct
         * This completely ignores any state information
This page took 0.027236 seconds and 5 git commands to generate.