aq_fw_ops
if (!aq_nic->aq_fw_ops->get_phy_temp)
err = aq_nic->aq_fw_ops->get_phy_temp(aq_nic->aq_hw, &temp);
if (!aq_nic->aq_fw_ops->get_mac_temp &&
if (aq_nic->aq_fw_ops->get_mac_temp)
err = aq_nic->aq_fw_ops->get_mac_temp(aq_nic->aq_hw, &temp);
if (channel == 0 && !nic->aq_fw_ops->get_phy_temp)
else if (channel == 1 && !nic->aq_fw_ops->get_mac_temp &&
if (!aq_nic->aq_fw_ops->led_control)
ret = aq_nic->aq_fw_ops->led_control(hw, AQ_HW_LED_BLINK |
ret = aq_nic->aq_fw_ops->led_control(hw, AQ_HW_LED_DEFAULT);
if (!aq_nic->aq_fw_ops->get_eee_rate)
err = aq_nic->aq_fw_ops->get_eee_rate(aq_nic->aq_hw, &rate,
if (unlikely(!aq_nic->aq_fw_ops->get_eee_rate ||
!aq_nic->aq_fw_ops->set_eee_rate))
err = aq_nic->aq_fw_ops->get_eee_rate(aq_nic->aq_hw, &rate,
err = aq_nic->aq_fw_ops->set_eee_rate(aq_nic->aq_hw, rate);
if (unlikely(!aq_nic->aq_fw_ops->renegotiate))
err = aq_nic->aq_fw_ops->renegotiate(aq_nic->aq_hw);
if (!aq_nic->aq_fw_ops->set_flow_control)
err = aq_nic->aq_fw_ops->set_flow_control(aq_nic->aq_hw);
const struct aq_fw_ops *aq_fw_ops;
const struct aq_fw_ops **fw_ops);
if (!nic->aq_fw_ops->get_link_capabilities)
caps_lo = nic->aq_fw_ops->get_link_capabilities(nic->aq_hw);
if (nic->aq_fw_ops->send_macsec_req) {
ret = nic->aq_fw_ops->send_macsec_req(hw, &msg, &resp);
if (self->aq_fw_ops->update_stats) {
self->aq_fw_ops->update_stats(self->aq_hw);
err = self->aq_fw_ops->set_link_speed(self->aq_hw, rate);
!self->aq_fw_ops->set_phyloopback)
self->aq_fw_ops->set_phyloopback(self->aq_hw,
self->aq_fw_ops->set_phyloopback(self->aq_hw,
if (likely(self->aq_fw_ops->set_power)) {
self->aq_fw_ops->set_power(self->aq_hw,
likely(self->aq_fw_ops->deinit) && link_down) {
self->aq_fw_ops->deinit(self->aq_hw);
if (!self->aq_fw_ops->set_downshift)
err = self->aq_fw_ops->set_downshift(self->aq_hw, cfg->downshift_counter);
if (!self->aq_fw_ops->set_media_detect)
int err = self->aq_fw_ops->update_link_status(self->aq_hw);
err = self->aq_fw_ops->set_media_detect(self->aq_hw, !!val);
if (self->aq_fw_ops->get_flow_control)
self->aq_fw_ops->get_flow_control(self->aq_hw, &fc);
if (self->aq_fw_ops->update_stats)
self->aq_fw_ops->update_stats(self->aq_hw);
err = self->aq_hw_ops->hw_prepare(self->aq_hw, &self->aq_fw_ops);
err = self->aq_fw_ops->get_mac_permanent(self->aq_hw, addr);
const struct aq_fw_ops *aq_fw_ops;
if (!aq_nic->aq_fw_ops->enable_ptp) {
aq_nic->aq_fw_ops->enable_ptp(aq_nic->aq_hw, 1);
aq_nic->aq_fw_ops->enable_ptp(aq_nic->aq_hw, 0);
self->aq_fw_ops->set_state(self, MPI_RESET);
self->aq_fw_ops->set_link_speed(self, aq_nic_cfg->link_speed_msk);
self->aq_fw_ops->set_state(self, MPI_INIT);
self->aq_fw_ops->update_stats(self);
self->aq_fw_ops->set_state(self, MPI_RESET);
self->aq_fw_ops->adjust_ptp(self, self->ptp_clk_offset);
return self->aq_fw_ops->send_fw_request(self, &fwreq, size);
return self->aq_fw_ops->send_fw_request(self, &fwreq, size);
self->aq_fw_ops->set_link_speed(self, aq_nic_cfg->link_speed_msk);
self->aq_fw_ops->set_state(self, MPI_INIT);
self->aq_fw_ops->update_stats(self);
const struct aq_fw_ops aq_fw_1x_ops = {
int hw_atl_utils_initfw(struct aq_hw_s *self, const struct aq_fw_ops **fw_ops)
self->aq_fw_ops = *fw_ops;
err = self->aq_fw_ops->init(self);
struct aq_fw_ops;
int hw_atl_utils_initfw(struct aq_hw_s *self, const struct aq_fw_ops **fw_ops);
extern const struct aq_fw_ops aq_fw_1x_ops;
extern const struct aq_fw_ops aq_fw_2x_ops;
const struct aq_fw_ops aq_fw_2x_ops = {
self->aq_fw_ops->set_state(self, MPI_RESET);
self->aq_fw_ops->set_link_speed(self, aq_nic_cfg->link_speed_msk);
self->aq_fw_ops->set_state(self, MPI_INIT);
self->aq_fw_ops->update_stats(self);
if (self->aq_fw_ops) {
err = self->aq_fw_ops->init(self);
int hw_atl2_utils_initfw(struct aq_hw_s *self, const struct aq_fw_ops **fw_ops)
self->aq_fw_ops = *fw_ops;
err = self->aq_fw_ops->init(self);
int hw_atl2_utils_initfw(struct aq_hw_s *self, const struct aq_fw_ops **fw_ops);
extern const struct aq_fw_ops aq_a2_fw_ops;
const struct aq_fw_ops aq_a2_fw_ops = {