Home
last modified time | relevance | path

Searched refs:mac_cb (Results 1 – 14 of 14) sorted by relevance

/Linux-v4.19/drivers/net/ethernet/hisilicon/hns/
Dhns_dsaf_mac.c59 static enum mac_mode hns_get_enet_interface(const struct hns_mac_cb *mac_cb) in hns_get_enet_interface() argument
61 switch (mac_cb->max_speed) { in hns_get_enet_interface()
63 return g_mac_mode_100[mac_cb->phy_if]; in hns_get_enet_interface()
65 return g_mac_mode_1000[mac_cb->phy_if]; in hns_get_enet_interface()
73 void hns_mac_get_link_status(struct hns_mac_cb *mac_cb, u32 *link_status) in hns_mac_get_link_status() argument
78 mac_ctrl_drv = hns_mac_get_drv(mac_cb); in hns_mac_get_link_status()
85 if (mac_cb->media_type == HNAE_MEDIA_TYPE_FIBER) { in hns_mac_get_link_status()
86 ret = mac_cb->dsaf_dev->misc_op->get_sfp_prsnt(mac_cb, in hns_mac_get_link_status()
92 mac_cb->link = *link_status; in hns_mac_get_link_status()
95 int hns_mac_get_port_info(struct hns_mac_cb *mac_cb, in hns_mac_get_port_info() argument
[all …]
Dhns_dsaf_misc.c62 static void hns_dsaf_acpi_ledctrl_by_port(struct hns_mac_cb *mac_cb, u8 op_type, in hns_dsaf_acpi_ledctrl_by_port() argument
79 obj = acpi_evaluate_dsm(ACPI_HANDLE(mac_cb->dev), in hns_dsaf_acpi_ledctrl_by_port()
82 dev_warn(mac_cb->dev, "ledctrl fail, link:%d port:%d act:%d!\n", in hns_dsaf_acpi_ledctrl_by_port()
90 static void hns_dsaf_acpi_locate_ledctrl_by_port(struct hns_mac_cb *mac_cb, in hns_dsaf_acpi_locate_ledctrl_by_port() argument
106 obj = acpi_evaluate_dsm(ACPI_HANDLE(mac_cb->dev), in hns_dsaf_acpi_locate_ledctrl_by_port()
109 dev_err(mac_cb->dev, "ledctrl fail, locate:%d port:%d!\n", in hns_dsaf_acpi_locate_ledctrl_by_port()
117 static void hns_cpld_set_led(struct hns_mac_cb *mac_cb, int link_status, in hns_cpld_set_led() argument
123 if (!mac_cb) { in hns_cpld_set_led()
127 if (!mac_cb->cpld_ctrl) { in hns_cpld_set_led()
128 dev_err(mac_cb->dev, "mac_id=%d, cpld syscon is null !\n", in hns_cpld_set_led()
[all …]
Dhns_ae_adapt.c26 return vf_cb->mac_cb; in hns_get_mac_cb()
129 vf_cb->mac_cb = dsaf_dev->mac_cb[port_id]; in hns_ae_get_handle()
131 ae_handle->phy_if = vf_cb->mac_cb->phy_if; in hns_ae_get_handle()
132 ae_handle->phy_dev = vf_cb->mac_cb->phy_dev; in hns_ae_get_handle()
133 ae_handle->if_support = vf_cb->mac_cb->if_support; in hns_ae_get_handle()
134 ae_handle->port_type = vf_cb->mac_cb->mac_type; in hns_ae_get_handle()
135 ae_handle->media_type = vf_cb->mac_cb->media_type; in hns_ae_get_handle()
150 vf_cb->mac_cb = NULL; in hns_ae_put_handle()
185 ret = hns_mac_wait_fifo_clean(vf_cb->mac_cb); in hns_ae_wait_flow_down()
214 if (vf_cb->mac_cb->mac_type == HNAE_PORT_SERVICE) in hns_ae_fini_queue()
[all …]
Dhns_dsaf_mac.h404 struct hns_mac_cb *mac_cb; member
422 const struct hns_mac_cb *mac_cb) in hns_mac_get_drv() argument
424 return (struct mac_driver *)(mac_cb->priv.mac); in hns_mac_get_drv()
427 void *hns_gmac_config(struct hns_mac_cb *mac_cb,
429 void *hns_xgmac_config(struct hns_mac_cb *mac_cb,
434 bool hns_mac_need_adjust_link(struct hns_mac_cb *mac_cb, int speed, int duplex);
435 void hns_mac_get_link_status(struct hns_mac_cb *mac_cb, u32 *link_status);
436 int hns_mac_change_vf_addr(struct hns_mac_cb *mac_cb, u32 vmid, char *addr);
437 int hns_mac_set_multi(struct hns_mac_cb *mac_cb,
439 int hns_mac_vm_config_bc_en(struct hns_mac_cb *mac_cb, u32 vm, bool enable);
[all …]
Dhns_dsaf_main.h215 struct hns_mac_cb *mac_cb; member
303 void (*cpld_set_led)(struct hns_mac_cb *mac_cb, int link_status,
305 void (*cpld_reset_led)(struct hns_mac_cb *mac_cb);
306 int (*cpld_set_led_id)(struct hns_mac_cb *mac_cb,
318 phy_interface_t (*get_phy_if)(struct hns_mac_cb *mac_cb);
319 int (*get_sfp_prsnt)(struct hns_mac_cb *mac_cb, int *sfp_prsnt);
321 int (*cfg_serdes_loopback)(struct hns_mac_cb *mac_cb, bool en);
348 struct hns_mac_cb *mac_cb[DSAF_MAX_PORT_NUM]; member
440 void hns_dsaf_fix_mac_mode(struct hns_mac_cb *mac_cb);
Dhns_dsaf_gmac.c264 struct hns_mac_cb *mac_cb = drv->mac_cb; in hns_gmac_need_adjust_link() local
266 return (mac_cb->speed != speed) || in hns_gmac_need_adjust_link()
267 (mac_cb->half_duplex == duplex); in hns_gmac_need_adjust_link()
318 if (drv->mac_cb->mac_type == HNAE_PORT_DEBUG) in hns_gmac_set_promisc()
361 if (drv->mac_cb->mac_type == HNAE_PORT_DEBUG) in hns_gmac_init()
381 hw_stats = &drv->mac_cb->hw_stats; in hns_gmac_update_stats()
678 hw_stats = &drv->mac_cb->hw_stats; in hns_gmac_get_stats()
714 void *hns_gmac_config(struct hns_mac_cb *mac_cb, struct mac_params *mac_param) in hns_gmac_config() argument
718 mac_drv = devm_kzalloc(mac_cb->dev, sizeof(*mac_drv), GFP_KERNEL); in hns_gmac_config()
736 mac_drv->mac_cb = mac_cb; in hns_gmac_config()
Dhns_dsaf_xgmac.c317 struct mac_hw_stats *hw_stats = &drv->mac_cb->hw_stats; in hns_xgmac_update_stats()
750 hw_stats = &drv->mac_cb->hw_stats; in hns_xgmac_get_stats()
799 void *hns_xgmac_config(struct hns_mac_cb *mac_cb, struct mac_params *mac_param) in hns_xgmac_config() argument
803 mac_drv = devm_kzalloc(mac_cb->dev, sizeof(*mac_drv), GFP_KERNEL); in hns_xgmac_config()
815 mac_drv->mac_cb = mac_cb; in hns_xgmac_config()
Dhns_dsaf_ppe.c369 if (ppe_common->dsaf_dev->mac_cb[i]) in hns_ppe_uninit_ex()
405 if (dsaf_dev->mac_cb[i]) in hns_ppe_reset_common()
Dhns_dsaf_main.c1658 memcpy(mask, dsaf_dev->mac_cb[port_num]->mc_mask, ETH_ALEN); in hns_dsaf_setup_mc_mask()
2105 void hns_dsaf_fix_mac_mode(struct hns_mac_cb *mac_cb) in hns_dsaf_fix_mac_mode() argument
2108 struct dsaf_device *dsaf_dev = mac_cb->dsaf_dev; in hns_dsaf_fix_mac_mode()
2109 int mac_id = mac_cb->mac_id; in hns_dsaf_fix_mac_mode()
2111 if (mac_cb->mac_type != HNAE_PORT_SERVICE) in hns_dsaf_fix_mac_mode()
2113 if (mac_cb->phy_if == PHY_INTERFACE_MODE_XGMII) in hns_dsaf_fix_mac_mode()
/Linux-v4.19/net/mac802154/
Drx.c53 switch (mac_cb(skb)->dest.mode) { in ieee802154_subif_frame()
55 if (mac_cb(skb)->dest.mode != IEEE802154_ADDR_NONE) in ieee802154_subif_frame()
63 if (mac_cb(skb)->dest.pan_id != span && in ieee802154_subif_frame()
64 mac_cb(skb)->dest.pan_id != cpu_to_le16(IEEE802154_PANID_BROADCAST)) in ieee802154_subif_frame()
66 else if (mac_cb(skb)->dest.extended_addr == wpan_dev->extended_addr) in ieee802154_subif_frame()
72 if (mac_cb(skb)->dest.pan_id != span && in ieee802154_subif_frame()
73 mac_cb(skb)->dest.pan_id != cpu_to_le16(IEEE802154_PANID_BROADCAST)) in ieee802154_subif_frame()
75 else if (mac_cb(skb)->dest.short_addr == sshort) in ieee802154_subif_frame()
77 else if (mac_cb(skb)->dest.short_addr == in ieee802154_subif_frame()
103 switch (mac_cb(skb)->type) { in ieee802154_subif_frame()
[all …]
Diface.c379 struct ieee802154_mac_cb *cb = mac_cb(skb); in ieee802154_header_create()
/Linux-v4.19/include/net/
Dieee802154_netdev.h224 static inline struct ieee802154_mac_cb *mac_cb(struct sk_buff *skb) in mac_cb() function
234 return mac_cb(skb); in mac_cb_init()
/Linux-v4.19/net/ieee802154/6lowpan/
Dtx.c121 *mac_cb(frag) = *mac_cb(skb); in lowpan_alloc_frag()
/Linux-v4.19/net/ieee802154/
Dsocket.c747 ieee802154_addr_to_sa(&saddr->addr, &mac_cb(skb)->source); in dgram_recvmsg()
753 sizeof(uint8_t), &(mac_cb(skb)->lqi)); in dgram_recvmsg()