Lines Matching refs:nic_dev
37 static int change_mac(struct hinic_dev *nic_dev, const u8 *addr, in change_mac() argument
40 struct hinic_hwdev *hwdev = nic_dev->hwdev; in change_mac()
90 int hinic_port_add_mac(struct hinic_dev *nic_dev, in hinic_port_add_mac() argument
93 return change_mac(nic_dev, addr, vlan_id, MAC_SET); in hinic_port_add_mac()
104 int hinic_port_del_mac(struct hinic_dev *nic_dev, const u8 *addr, in hinic_port_del_mac() argument
107 return change_mac(nic_dev, addr, vlan_id, MAC_DEL); in hinic_port_del_mac()
117 int hinic_port_get_mac(struct hinic_dev *nic_dev, u8 *addr) in hinic_port_get_mac() argument
119 struct hinic_hwdev *hwdev = nic_dev->hwdev; in hinic_port_get_mac()
148 int hinic_port_set_mtu(struct hinic_dev *nic_dev, int new_mtu) in hinic_port_set_mtu() argument
150 struct net_device *netdev = nic_dev->netdev; in hinic_port_set_mtu()
151 struct hinic_hwdev *hwdev = nic_dev->hwdev; in hinic_port_set_mtu()
159 netif_err(nic_dev, drv, netdev, "mtu < MIN MTU size"); in hinic_port_set_mtu()
165 netif_err(nic_dev, drv, netdev, "mtu > MAX MTU size"); in hinic_port_set_mtu()
191 int hinic_port_add_vlan(struct hinic_dev *nic_dev, u16 vlan_id) in hinic_port_add_vlan() argument
193 struct hinic_hwdev *hwdev = nic_dev->hwdev; in hinic_port_add_vlan()
211 int hinic_port_del_vlan(struct hinic_dev *nic_dev, u16 vlan_id) in hinic_port_del_vlan() argument
213 struct hinic_hwdev *hwdev = nic_dev->hwdev; in hinic_port_del_vlan()
231 int hinic_port_set_rx_mode(struct hinic_dev *nic_dev, u32 rx_mode) in hinic_port_set_rx_mode() argument
233 struct hinic_hwdev *hwdev = nic_dev->hwdev; in hinic_port_set_rx_mode()
251 int hinic_port_link_state(struct hinic_dev *nic_dev, in hinic_port_link_state() argument
254 struct hinic_hwdev *hwdev = nic_dev->hwdev; in hinic_port_link_state()
283 int hinic_port_set_state(struct hinic_dev *nic_dev, enum hinic_port_state state) in hinic_port_set_state() argument
285 struct hinic_hwdev *hwdev = nic_dev->hwdev; in hinic_port_set_state()
316 int hinic_port_set_func_state(struct hinic_dev *nic_dev, in hinic_port_set_func_state() argument
320 struct hinic_hwdev *hwdev = nic_dev->hwdev; in hinic_port_set_func_state()
348 int hinic_port_get_cap(struct hinic_dev *nic_dev, in hinic_port_get_cap() argument
351 struct hinic_hwdev *hwdev = nic_dev->hwdev; in hinic_port_get_cap()
379 int hinic_port_set_tso(struct hinic_dev *nic_dev, enum hinic_tso_state state) in hinic_port_set_tso() argument
381 struct hinic_hwdev *hwdev = nic_dev->hwdev; in hinic_port_set_tso()
404 int hinic_set_rx_csum_offload(struct hinic_dev *nic_dev, u32 en) in hinic_set_rx_csum_offload() argument
407 struct hinic_hwdev *hwdev = nic_dev->hwdev; in hinic_set_rx_csum_offload()
434 int hinic_set_rx_vlan_offload(struct hinic_dev *nic_dev, u8 en) in hinic_set_rx_vlan_offload() argument
436 struct hinic_hwdev *hwdev = nic_dev->hwdev; in hinic_set_rx_vlan_offload()
465 int hinic_set_max_qnum(struct hinic_dev *nic_dev, u8 num_rqs) in hinic_set_max_qnum() argument
467 struct hinic_hwdev *hwdev = nic_dev->hwdev; in hinic_set_max_qnum()
476 rq_num.rq_depth = ilog2(nic_dev->rq_depth); in hinic_set_max_qnum()
491 static int hinic_set_rx_lro(struct hinic_dev *nic_dev, u8 ipv4_en, u8 ipv6_en, in hinic_set_rx_lro() argument
494 struct hinic_hwdev *hwdev = nic_dev->hwdev; in hinic_set_rx_lro()
519 static int hinic_set_rx_lro_timer(struct hinic_dev *nic_dev, u32 timer_value) in hinic_set_rx_lro_timer() argument
521 struct hinic_hwdev *hwdev = nic_dev->hwdev; in hinic_set_rx_lro_timer()
554 int hinic_set_rx_lro_state(struct hinic_dev *nic_dev, u8 lro_en, in hinic_set_rx_lro_state() argument
557 struct hinic_hwdev *hwdev = nic_dev->hwdev; in hinic_set_rx_lro_state()
568 err = hinic_set_rx_lro(nic_dev, ipv4_en, ipv6_en, (u8)wqe_num); in hinic_set_rx_lro_state()
572 if (HINIC_IS_VF(nic_dev->hwdev->hwif)) in hinic_set_rx_lro_state()
575 err = hinic_set_rx_lro_timer(nic_dev, lro_timer); in hinic_set_rx_lro_state()
582 int hinic_rss_set_indir_tbl(struct hinic_dev *nic_dev, u32 tmpl_idx, in hinic_rss_set_indir_tbl() argument
596 hwdev = nic_dev->hwdev; in hinic_rss_set_indir_tbl()
653 int hinic_rss_get_indir_tbl(struct hinic_dev *nic_dev, u32 tmpl_idx, in hinic_rss_get_indir_tbl() argument
657 struct hinic_hwdev *hwdev = nic_dev->hwdev; in hinic_rss_get_indir_tbl()
683 int hinic_set_rss_type(struct hinic_dev *nic_dev, u32 tmpl_idx, in hinic_set_rss_type() argument
696 hwdev = nic_dev->hwdev; in hinic_set_rss_type()
743 int hinic_get_rss_type(struct hinic_dev *nic_dev, u32 tmpl_idx, in hinic_get_rss_type() argument
747 struct hinic_hwdev *hwdev = nic_dev->hwdev; in hinic_get_rss_type()
784 int hinic_rss_set_template_tbl(struct hinic_dev *nic_dev, u32 template_id, in hinic_rss_set_template_tbl() argument
787 struct hinic_hwdev *hwdev = nic_dev->hwdev; in hinic_rss_set_template_tbl()
811 int hinic_rss_get_template_tbl(struct hinic_dev *nic_dev, u32 tmpl_idx, in hinic_rss_get_template_tbl() argument
815 struct hinic_hwdev *hwdev = nic_dev->hwdev; in hinic_rss_get_template_tbl()
844 int hinic_rss_set_hash_engine(struct hinic_dev *nic_dev, u8 template_id, in hinic_rss_set_hash_engine() argument
848 struct hinic_hwdev *hwdev = nic_dev->hwdev; in hinic_rss_set_hash_engine()
871 int hinic_rss_get_hash_engine(struct hinic_dev *nic_dev, u8 tmpl_idx, u8 *type) in hinic_rss_get_hash_engine() argument
874 struct hinic_hwdev *hwdev = nic_dev->hwdev; in hinic_rss_get_hash_engine()
902 int hinic_rss_cfg(struct hinic_dev *nic_dev, u8 rss_en, u8 template_id) in hinic_rss_cfg() argument
904 struct hinic_hwdev *hwdev = nic_dev->hwdev; in hinic_rss_cfg()
929 int hinic_rss_template_alloc(struct hinic_dev *nic_dev, u8 *tmpl_idx) in hinic_rss_template_alloc() argument
932 struct hinic_hwdev *hwdev = nic_dev->hwdev; in hinic_rss_template_alloc()
955 int hinic_rss_template_free(struct hinic_dev *nic_dev, u8 tmpl_idx) in hinic_rss_template_free() argument
958 struct hinic_hwdev *hwdev = nic_dev->hwdev; in hinic_rss_template_free()
980 int hinic_get_vport_stats(struct hinic_dev *nic_dev, in hinic_get_vport_stats() argument
985 struct hinic_hwdev *hwdev = nic_dev->hwdev; in hinic_get_vport_stats()
1009 int hinic_get_phy_port_stats(struct hinic_dev *nic_dev, in hinic_get_phy_port_stats() argument
1013 struct hinic_hwdev *hwdev = nic_dev->hwdev; in hinic_get_phy_port_stats()
1046 int hinic_get_mgmt_version(struct hinic_dev *nic_dev, u8 *mgmt_ver) in hinic_get_mgmt_version() argument
1048 struct hinic_hwdev *hwdev = nic_dev->hwdev; in hinic_get_mgmt_version()