Lines Matching refs:aq_nic
23 struct aq_nic_s *aq_nic = netdev_priv(ndev); in aq_ethtool_get_regs() local
26 regs_count = aq_nic_get_regs_count(aq_nic); in aq_ethtool_get_regs()
29 aq_nic_get_regs(aq_nic, regs, p); in aq_ethtool_get_regs()
34 struct aq_nic_s *aq_nic = netdev_priv(ndev); in aq_ethtool_get_regs_len() local
37 regs_count = aq_nic_get_regs_count(aq_nic); in aq_ethtool_get_regs_len()
50 struct aq_nic_s *aq_nic = netdev_priv(ndev); in aq_ethtool_get_link_ksettings() local
52 aq_nic_get_link_ksettings(aq_nic, cmd); in aq_ethtool_get_link_ksettings()
54 aq_nic_get_link_speed(aq_nic) : 0U; in aq_ethtool_get_link_ksettings()
63 struct aq_nic_s *aq_nic = netdev_priv(ndev); in aq_ethtool_set_link_ksettings() local
65 return aq_nic_set_link_ksettings(aq_nic, cmd); in aq_ethtool_set_link_ksettings()
213 struct aq_nic_s *aq_nic = netdev_priv(ndev); in aq_ethtool_stats() local
216 data = aq_nic_get_stats(aq_nic, data); in aq_ethtool_stats()
218 data = aq_ptp_get_stats(aq_nic, data); in aq_ethtool_stats()
221 data = aq_macsec_get_stats(aq_nic, data); in aq_ethtool_stats()
229 struct aq_nic_s *aq_nic = netdev_priv(ndev); in aq_ethtool_get_drvinfo() local
233 firmware_version = aq_nic_get_fw_version(aq_nic); in aq_ethtool_get_drvinfo()
234 regs_count = aq_nic_get_regs_count(aq_nic); in aq_ethtool_get_drvinfo()
391 struct aq_nic_s *aq_nic = netdev_priv(ndev); in aq_ethtool_set_phys_id() local
392 struct aq_hw_s *hw = aq_nic->aq_hw; in aq_ethtool_set_phys_id()
395 if (!aq_nic->aq_fw_ops->led_control) in aq_ethtool_set_phys_id()
398 mutex_lock(&aq_nic->fwreq_mutex); in aq_ethtool_set_phys_id()
402 ret = aq_nic->aq_fw_ops->led_control(hw, AQ_HW_LED_BLINK | in aq_ethtool_set_phys_id()
406 ret = aq_nic->aq_fw_ops->led_control(hw, AQ_HW_LED_DEFAULT); in aq_ethtool_set_phys_id()
412 mutex_unlock(&aq_nic->fwreq_mutex); in aq_ethtool_set_phys_id()
442 struct aq_nic_s *aq_nic = netdev_priv(ndev); in aq_ethtool_get_rss_key_size() local
445 cfg = aq_nic_get_cfg(aq_nic); in aq_ethtool_get_rss_key_size()
453 struct aq_nic_s *aq_nic = netdev_priv(ndev); in aq_ethtool_get_rss() local
457 cfg = aq_nic_get_cfg(aq_nic); in aq_ethtool_get_rss()
475 struct aq_nic_s *aq_nic = netdev_priv(netdev); in aq_ethtool_set_rss() local
481 cfg = aq_nic_get_cfg(aq_nic); in aq_ethtool_set_rss()
496 err = aq_nic->aq_hw_ops->hw_rss_hash_set(aq_nic->aq_hw, in aq_ethtool_set_rss()
502 err = aq_nic->aq_hw_ops->hw_rss_set(aq_nic->aq_hw, &cfg->aq_rss); in aq_ethtool_set_rss()
511 struct aq_nic_s *aq_nic = netdev_priv(ndev); in aq_ethtool_get_rxnfc() local
515 cfg = aq_nic_get_cfg(aq_nic); in aq_ethtool_get_rxnfc()
522 cmd->rule_cnt = aq_get_rxnfc_count_all_rules(aq_nic); in aq_ethtool_get_rxnfc()
525 err = aq_get_rxnfc_rule(aq_nic, cmd); in aq_ethtool_get_rxnfc()
528 err = aq_get_rxnfc_all_rules(aq_nic, cmd, rule_locs); in aq_ethtool_get_rxnfc()
541 struct aq_nic_s *aq_nic = netdev_priv(ndev); in aq_ethtool_set_rxnfc() local
546 err = aq_add_rxnfc_rule(aq_nic, cmd); in aq_ethtool_set_rxnfc()
549 err = aq_del_rxnfc_rule(aq_nic, cmd); in aq_ethtool_set_rxnfc()
564 struct aq_nic_s *aq_nic = netdev_priv(ndev); in aq_ethtool_get_coalesce() local
567 cfg = aq_nic_get_cfg(aq_nic); in aq_ethtool_get_coalesce()
590 struct aq_nic_s *aq_nic = netdev_priv(ndev); in aq_ethtool_set_coalesce() local
593 cfg = aq_nic_get_cfg(aq_nic); in aq_ethtool_set_coalesce()
617 return aq_nic_update_interrupt_moderation_settings(aq_nic); in aq_ethtool_set_coalesce()
623 struct aq_nic_s *aq_nic = netdev_priv(ndev); in aq_ethtool_get_wol() local
626 cfg = aq_nic_get_cfg(aq_nic); in aq_ethtool_get_wol()
636 struct aq_nic_s *aq_nic = netdev_priv(ndev); in aq_ethtool_set_wol() local
640 cfg = aq_nic_get_cfg(aq_nic); in aq_ethtool_set_wol()
655 struct aq_nic_s *aq_nic = netdev_priv(ndev); in aq_ethtool_get_ts_info() local
659 if (!aq_nic->aq_ptp) in aq_ethtool_get_ts_info()
677 info->phc_index = ptp_clock_index(aq_ptp_get_ptp_clock(aq_nic->aq_ptp)); in aq_ethtool_get_ts_info()
701 struct aq_nic_s *aq_nic = netdev_priv(ndev); in aq_ethtool_get_eee() local
705 if (!aq_nic->aq_fw_ops->get_eee_rate) in aq_ethtool_get_eee()
708 mutex_lock(&aq_nic->fwreq_mutex); in aq_ethtool_get_eee()
709 err = aq_nic->aq_fw_ops->get_eee_rate(aq_nic->aq_hw, &rate, in aq_ethtool_get_eee()
711 mutex_unlock(&aq_nic->fwreq_mutex); in aq_ethtool_get_eee()
717 if (aq_nic->aq_nic_cfg.eee_speeds) in aq_ethtool_get_eee()
733 struct aq_nic_s *aq_nic = netdev_priv(ndev); in aq_ethtool_set_eee() local
738 cfg = aq_nic_get_cfg(aq_nic); in aq_ethtool_set_eee()
740 if (unlikely(!aq_nic->aq_fw_ops->get_eee_rate || in aq_ethtool_set_eee()
741 !aq_nic->aq_fw_ops->set_eee_rate)) in aq_ethtool_set_eee()
744 mutex_lock(&aq_nic->fwreq_mutex); in aq_ethtool_set_eee()
745 err = aq_nic->aq_fw_ops->get_eee_rate(aq_nic->aq_hw, &rate, in aq_ethtool_set_eee()
747 mutex_unlock(&aq_nic->fwreq_mutex); in aq_ethtool_set_eee()
759 mutex_lock(&aq_nic->fwreq_mutex); in aq_ethtool_set_eee()
760 err = aq_nic->aq_fw_ops->set_eee_rate(aq_nic->aq_hw, rate); in aq_ethtool_set_eee()
761 mutex_unlock(&aq_nic->fwreq_mutex); in aq_ethtool_set_eee()
768 struct aq_nic_s *aq_nic = netdev_priv(ndev); in aq_ethtool_nway_reset() local
771 if (unlikely(!aq_nic->aq_fw_ops->renegotiate)) in aq_ethtool_nway_reset()
775 mutex_lock(&aq_nic->fwreq_mutex); in aq_ethtool_nway_reset()
776 err = aq_nic->aq_fw_ops->renegotiate(aq_nic->aq_hw); in aq_ethtool_nway_reset()
777 mutex_unlock(&aq_nic->fwreq_mutex); in aq_ethtool_nway_reset()
786 struct aq_nic_s *aq_nic = netdev_priv(ndev); in aq_ethtool_get_pauseparam() local
787 int fc = aq_nic->aq_nic_cfg.fc.req; in aq_ethtool_get_pauseparam()
798 struct aq_nic_s *aq_nic = netdev_priv(ndev); in aq_ethtool_set_pauseparam() local
801 if (!aq_nic->aq_fw_ops->set_flow_control) in aq_ethtool_set_pauseparam()
808 aq_nic->aq_hw->aq_nic_cfg->fc.req |= AQ_NIC_FC_RX; in aq_ethtool_set_pauseparam()
810 aq_nic->aq_hw->aq_nic_cfg->fc.req &= ~AQ_NIC_FC_RX; in aq_ethtool_set_pauseparam()
813 aq_nic->aq_hw->aq_nic_cfg->fc.req |= AQ_NIC_FC_TX; in aq_ethtool_set_pauseparam()
815 aq_nic->aq_hw->aq_nic_cfg->fc.req &= ~AQ_NIC_FC_TX; in aq_ethtool_set_pauseparam()
817 mutex_lock(&aq_nic->fwreq_mutex); in aq_ethtool_set_pauseparam()
818 err = aq_nic->aq_fw_ops->set_flow_control(aq_nic->aq_hw); in aq_ethtool_set_pauseparam()
819 mutex_unlock(&aq_nic->fwreq_mutex); in aq_ethtool_set_pauseparam()
829 struct aq_nic_s *aq_nic = netdev_priv(ndev); in aq_get_ringparam() local
832 cfg = aq_nic_get_cfg(aq_nic); in aq_get_ringparam()
846 struct aq_nic_s *aq_nic = netdev_priv(ndev); in aq_set_ringparam() local
852 cfg = aq_nic_get_cfg(aq_nic); in aq_set_ringparam()
873 err = aq_nic_realloc_vectors(aq_nic); in aq_set_ringparam()
886 struct aq_nic_s *aq_nic = netdev_priv(ndev); in aq_get_msg_level() local
888 return aq_nic->msg_enable; in aq_get_msg_level()
893 struct aq_nic_s *aq_nic = netdev_priv(ndev); in aq_set_msg_level() local
895 aq_nic->msg_enable = data; in aq_set_msg_level()
900 struct aq_nic_s *aq_nic = netdev_priv(ndev); in aq_ethtool_get_priv_flags() local
902 return aq_nic->aq_nic_cfg.priv_flags; in aq_ethtool_get_priv_flags()
907 struct aq_nic_s *aq_nic = netdev_priv(ndev); in aq_ethtool_set_priv_flags() local
912 cfg = aq_nic_get_cfg(aq_nic); in aq_ethtool_set_priv_flags()
932 ret = aq_nic_set_loopback(aq_nic); in aq_ethtool_set_priv_flags()
941 struct aq_nic_s *aq_nic = netdev_priv(ndev); in aq_ethtool_get_phy_tunable() local
947 *val = aq_nic->aq_nic_cfg.is_media_detect ? AQ_HW_MEDIA_DETECT_CNT : 0; in aq_ethtool_get_phy_tunable()
953 *val = (u8)aq_nic->aq_nic_cfg.downshift_counter; in aq_ethtool_get_phy_tunable()
967 struct aq_nic_s *aq_nic = netdev_priv(ndev); in aq_ethtool_set_phy_tunable() local
973 err = aq_nic_set_media_detect(aq_nic, *val); in aq_ethtool_set_phy_tunable()
979 err = aq_nic_set_downshift(aq_nic, *val); in aq_ethtool_set_phy_tunable()