> --- a/drivers/net/ethernet/aquantia/atlantic/aq_nic.c
> +++ b/drivers/net/ethernet/aquantia/atlantic/aq_nic.c
> @@ -889,11 +889,13 @@ void aq_nic_deinit(struct aq_nic_s *self)
> self->aq_vecs > i; ++i, aq_vec = self->aq_vec[i])
> aq_vec_deinit(aq_vec);
>
> - if (self->power_state == AQ_HW_POWER_STATE_D0) {
> - (void)self->aq_fw_ops->deinit(self->aq_hw);
> - } else {
> - (void)self->aq_hw_ops->hw_set_power(self->aq_hw,
> - self->power_state);
> + (void)self->aq_fw_ops->deinit(self->aq_hw);
These void casts look a bit ugly. Are they needed? Is the compiler
complaining? If it is complaining, it suggests you should not be
casting anyway...
> + if (wol_enabled) {
> + rpc_size = sizeof(prpc->msg_id) + sizeof(prpc->msg_wol);
> +
> + prpc->msg_id = HAL_ATLANTIC_UTILS_FW_MSG_WOL_ADD;
> + prpc->msg_wol.priority = 0x10000000; /* normal priority */
> + prpc->msg_wol.pattern_id = 1U;
> + prpc->msg_wol.wol_packet_type = 2U; /* Magic Packet */
Maybe add #defines for these magic numbers?
> +
> + ether_addr_copy((u8 *)&prpc->msg_wol.wol_pattern, mac);
> + } else {
> + rpc_size = sizeof(prpc->msg_id) + sizeof(prpc->msg_del_id);
> +
> + prpc->msg_id = HAL_ATLANTIC_UTILS_FW_MSG_WOL_DEL;
> + prpc->msg_wol.pattern_id = 1U;
> + }
> +
> + err = hw_atl_utils_fw_rpc_call(self, rpc_size);
> +
> +err_exit:
> + return err;
> +}
Andrew