Home
last modified time | relevance | path

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

/linux-4.4.14/drivers/net/ethernet/hisilicon/hns/
Dhns_dsaf_mac.c56 static enum mac_mode hns_mac_dev_to_enet_if(const struct hns_mac_cb *mac_cb) in hns_mac_dev_to_enet_if() argument
58 switch (mac_cb->max_speed) { in hns_mac_dev_to_enet_if()
60 return g_mac_mode_100[mac_cb->phy_if]; in hns_mac_dev_to_enet_if()
62 return g_mac_mode_1000[mac_cb->phy_if]; in hns_mac_dev_to_enet_if()
70 static enum mac_mode hns_get_enet_interface(const struct hns_mac_cb *mac_cb) in hns_get_enet_interface() argument
72 switch (mac_cb->max_speed) { in hns_get_enet_interface()
74 return g_mac_mode_100[mac_cb->phy_if]; in hns_get_enet_interface()
76 return g_mac_mode_1000[mac_cb->phy_if]; in hns_get_enet_interface()
84 int hns_mac_get_sfp_prsnt(struct hns_mac_cb *mac_cb, int *sfp_prsnt) in hns_mac_get_sfp_prsnt() argument
86 if (!mac_cb->cpld_vaddr) in hns_mac_get_sfp_prsnt()
[all …]
Dhns_dsaf_misc.c15 void hns_cpld_set_led(struct hns_mac_cb *mac_cb, int link_status, in hns_cpld_set_led() argument
21 if (!mac_cb) { in hns_cpld_set_led()
25 if (!mac_cb->cpld_vaddr) { in hns_cpld_set_led()
26 dev_err(mac_cb->dev, "mac_id=%d, cpld_vaddr is null !\n", in hns_cpld_set_led()
27 mac_cb->mac_id); in hns_cpld_set_led()
34 value = mac_cb->cpld_led_value; in hns_cpld_set_led()
42 if (value != mac_cb->cpld_led_value) { in hns_cpld_set_led()
43 dsaf_write_b(mac_cb->cpld_vaddr, value); in hns_cpld_set_led()
44 mac_cb->cpld_led_value = value; in hns_cpld_set_led()
47 dsaf_write_b(mac_cb->cpld_vaddr, CPLD_LED_DEFAULT_VALUE); in hns_cpld_set_led()
[all …]
Dhns_ae_adapt.c29 return vf_cb->mac_cb; in hns_get_mac_cb()
172 vf_cb->mac_cb = &dsaf_dev->mac_cb[port_idx]; in hns_ae_get_handle()
174 ae_handle->phy_if = vf_cb->mac_cb->phy_if; in hns_ae_get_handle()
175 ae_handle->phy_node = vf_cb->mac_cb->phy_node; in hns_ae_get_handle()
176 ae_handle->if_support = vf_cb->mac_cb->if_support; in hns_ae_get_handle()
177 ae_handle->port_type = vf_cb->mac_cb->mac_type; in hns_ae_get_handle()
191 vf_cb->mac_cb = NULL; in hns_ae_put_handle()
220 if (vf_cb->mac_cb->mac_type == HNAE_PORT_SERVICE) in hns_ae_fini_queue()
227 struct hns_mac_cb *mac_cb = hns_get_mac_cb(handle); in hns_ae_set_mac_address() local
234 ret = hns_mac_change_vf_addr(mac_cb, handle->vf_id, p); in hns_ae_set_mac_address()
[all …]
Dhns_dsaf_mac.h395 struct hns_mac_cb *mac_cb; member
413 const struct hns_mac_cb *mac_cb) in hns_mac_get_drv() argument
415 return (struct mac_driver *)(mac_cb->priv.mac); in hns_mac_get_drv()
418 void *hns_gmac_config(struct hns_mac_cb *mac_cb,
420 void *hns_xgmac_config(struct hns_mac_cb *mac_cb,
425 void hns_mac_get_link_status(struct hns_mac_cb *mac_cb, u32 *link_status);
426 int hns_mac_change_vf_addr(struct hns_mac_cb *mac_cb, u32 vmid, char *addr);
427 int hns_mac_set_multi(struct hns_mac_cb *mac_cb,
429 int hns_mac_vm_config_bc_en(struct hns_mac_cb *mac_cb, u32 vm, u8 en);
430 void hns_mac_start(struct hns_mac_cb *mac_cb);
[all …]
Dhns_dsaf_misc.h36 void hns_cpld_set_led(struct hns_mac_cb *mac_cb, int link_status,
38 void cpld_led_reset(struct hns_mac_cb *mac_cb);
39 int cpld_set_led_id(struct hns_mac_cb *mac_cb,
41 int hns_mac_get_sfp_prsnt(struct hns_mac_cb *mac_cb, int *sfp_prsnt);
Dhns_dsaf_main.h185 struct hns_mac_cb *mac_cb; member
297 struct hns_mac_cb *mac_cb; member
408 void hns_dsaf_fix_mac_mode(struct hns_mac_cb *mac_cb);
Dhns_dsaf_gmac.c315 hw_stats = &drv->mac_cb->hw_stats; in hns_gmac_update_stats()
627 hw_stats = &drv->mac_cb->hw_stats; in hns_gmac_get_stats()
662 void *hns_gmac_config(struct hns_mac_cb *mac_cb, struct mac_params *mac_param) in hns_gmac_config() argument
666 mac_drv = devm_kzalloc(mac_cb->dev, sizeof(*mac_drv), GFP_KERNEL); in hns_gmac_config()
683 mac_drv->mac_cb = mac_cb; in hns_gmac_config()
Dhns_dsaf_xgmac.c312 struct mac_hw_stats *hw_stats = &drv->mac_cb->hw_stats; in hns_xgmac_update_stats()
745 hw_stats = &drv->mac_cb->hw_stats; in hns_xgmac_get_stats()
794 void *hns_xgmac_config(struct hns_mac_cb *mac_cb, struct mac_params *mac_param) in hns_xgmac_config() argument
798 mac_drv = devm_kzalloc(mac_cb->dev, sizeof(*mac_drv), GFP_KERNEL); in hns_xgmac_config()
810 mac_drv->mac_cb = mac_cb; in hns_xgmac_config()
Dhns_dsaf_main.c1849 void hns_dsaf_fix_mac_mode(struct hns_mac_cb *mac_cb) in hns_dsaf_fix_mac_mode() argument
1852 struct dsaf_device *dsaf_dev = mac_cb->dsaf_dev; in hns_dsaf_fix_mac_mode()
1853 int mac_id = mac_cb->mac_id; in hns_dsaf_fix_mac_mode()
1855 if (mac_cb->mac_type != HNAE_PORT_SERVICE) in hns_dsaf_fix_mac_mode()
1857 if (mac_cb->phy_if == PHY_INTERFACE_MODE_XGMII) in hns_dsaf_fix_mac_mode()
/linux-4.4.14/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-4.4.14/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-4.4.14/net/ieee802154/6lowpan/
Dtx.c99 *mac_cb(frag) = *mac_cb(skb); in lowpan_alloc_frag()
/linux-4.4.14/net/ieee802154/
Dsocket.c741 ieee802154_addr_to_sa(&saddr->addr, &mac_cb(skb)->source); in dgram_recvmsg()