ether_addr_copy(self->ndev->dev_addr, mac_addr_permanent);
}
#endif
- err = register_netdev(self->ndev);
- if (err < 0)
- goto err_exit;
- self->is_ndev_registered = true;
netif_carrier_off(self->ndev);
for (i = AQ_CFG_VECS_MAX; i--;)
aq_nic_ndev_queue_stop(self, i);
+ err = register_netdev(self->ndev);
+ if (err < 0)
+ goto err_exit;
+
err_exit:
return err;
}
if (!self->ndev)
goto err_exit;
- if (self->is_ndev_registered)
+ if (self->ndev->reg_state == NETREG_REGISTERED)
unregister_netdev(self->ndev);
if (self->aq_hw)
unsigned int aq_vecs;
unsigned int packet_filter;
unsigned int power_state;
- bool is_ndev_registered;
u8 port;
struct aq_hw_ops aq_hw_ops;
struct aq_hw_caps_s aq_hw_caps;