/linux-6.1.9/drivers/net/ethernet/hisilicon/hns/ |
D | hns_dsaf_mac.c | 55 static enum mac_mode hns_get_enet_interface(const struct hns_mac_cb *mac_cb) in hns_get_enet_interface() argument 57 switch (mac_cb->max_speed) { in hns_get_enet_interface() 59 return g_mac_mode_100[mac_cb->phy_if]; in hns_get_enet_interface() 61 return g_mac_mode_1000[mac_cb->phy_if]; in hns_get_enet_interface() 69 void hns_mac_get_link_status(struct hns_mac_cb *mac_cb, u32 *link_status) in hns_mac_get_link_status() argument 74 mac_ctrl_drv = hns_mac_get_drv(mac_cb); in hns_mac_get_link_status() 81 if (mac_cb->media_type == HNAE_MEDIA_TYPE_FIBER) { in hns_mac_get_link_status() 82 ret = mac_cb->dsaf_dev->misc_op->get_sfp_prsnt(mac_cb, in hns_mac_get_link_status() 88 mac_cb->link = *link_status; in hns_mac_get_link_status() 91 int hns_mac_get_port_info(struct hns_mac_cb *mac_cb, in hns_mac_get_port_info() argument [all …]
|
D | hns_dsaf_misc.c | 58 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 75 obj = acpi_evaluate_dsm(ACPI_HANDLE(mac_cb->dev), in hns_dsaf_acpi_ledctrl_by_port() 78 dev_warn(mac_cb->dev, "ledctrl fail, link:%d port:%d act:%d!\n", in hns_dsaf_acpi_ledctrl_by_port() 86 static void hns_dsaf_acpi_locate_ledctrl_by_port(struct hns_mac_cb *mac_cb, in hns_dsaf_acpi_locate_ledctrl_by_port() argument 102 obj = acpi_evaluate_dsm(ACPI_HANDLE(mac_cb->dev), in hns_dsaf_acpi_locate_ledctrl_by_port() 105 dev_err(mac_cb->dev, "ledctrl fail, locate:%d port:%d!\n", in hns_dsaf_acpi_locate_ledctrl_by_port() 113 static void hns_cpld_set_led(struct hns_mac_cb *mac_cb, int link_status, in hns_cpld_set_led() argument 119 if (!mac_cb) { in hns_cpld_set_led() 123 if (!mac_cb->cpld_ctrl) { in hns_cpld_set_led() 124 dev_err(mac_cb->dev, "mac_id=%d, cpld syscon is null !\n", in hns_cpld_set_led() [all …]
|
D | hns_ae_adapt.c | 20 return vf_cb->mac_cb; in hns_get_mac_cb() 122 vf_cb->mac_cb = dsaf_dev->mac_cb[port_id]; in hns_ae_get_handle() 124 ae_handle->phy_if = vf_cb->mac_cb->phy_if; in hns_ae_get_handle() 125 ae_handle->phy_dev = vf_cb->mac_cb->phy_dev; in hns_ae_get_handle() 126 ae_handle->if_support = vf_cb->mac_cb->if_support; in hns_ae_get_handle() 127 ae_handle->port_type = vf_cb->mac_cb->mac_type; in hns_ae_get_handle() 128 ae_handle->media_type = vf_cb->mac_cb->media_type; in hns_ae_get_handle() 176 ret = hns_mac_wait_fifo_clean(vf_cb->mac_cb); in hns_ae_wait_flow_down() 205 if (vf_cb->mac_cb->mac_type == HNAE_PORT_SERVICE) in hns_ae_fini_queue() 212 struct hns_mac_cb *mac_cb = hns_get_mac_cb(handle); in hns_ae_set_mac_address() local [all …]
|
D | hns_dsaf_mac.h | 396 struct hns_mac_cb *mac_cb; member 414 const struct hns_mac_cb *mac_cb) in hns_mac_get_drv() argument 416 return (struct mac_driver *)(mac_cb->priv.mac); in hns_mac_get_drv() 419 void *hns_gmac_config(struct hns_mac_cb *mac_cb, 421 void *hns_xgmac_config(struct hns_mac_cb *mac_cb, 426 bool hns_mac_need_adjust_link(struct hns_mac_cb *mac_cb, int speed, int duplex); 427 void hns_mac_get_link_status(struct hns_mac_cb *mac_cb, u32 *link_status); 428 int hns_mac_change_vf_addr(struct hns_mac_cb *mac_cb, u32 vmid, 430 int hns_mac_set_multi(struct hns_mac_cb *mac_cb, 432 int hns_mac_vm_config_bc_en(struct hns_mac_cb *mac_cb, u32 vm, bool enable); [all …]
|
D | hns_dsaf_main.h | 211 struct hns_mac_cb *mac_cb; member 299 void (*cpld_set_led)(struct hns_mac_cb *mac_cb, int link_status, 301 void (*cpld_reset_led)(struct hns_mac_cb *mac_cb); 302 int (*cpld_set_led_id)(struct hns_mac_cb *mac_cb, 314 phy_interface_t (*get_phy_if)(struct hns_mac_cb *mac_cb); 315 int (*get_sfp_prsnt)(struct hns_mac_cb *mac_cb, int *sfp_prsnt); 317 int (*cfg_serdes_loopback)(struct hns_mac_cb *mac_cb, bool en); 344 struct hns_mac_cb *mac_cb[DSAF_MAX_PORT_NUM]; member 436 void hns_dsaf_fix_mac_mode(struct hns_mac_cb *mac_cb);
|
D | hns_dsaf_gmac.c | 250 struct hns_mac_cb *mac_cb = drv->mac_cb; in hns_gmac_need_adjust_link() local 252 return (mac_cb->speed != speed) || in hns_gmac_need_adjust_link() 253 (mac_cb->half_duplex == duplex); in hns_gmac_need_adjust_link() 304 if (drv->mac_cb->mac_type == HNAE_PORT_DEBUG) in hns_gmac_set_promisc() 347 if (drv->mac_cb->mac_type == HNAE_PORT_DEBUG) in hns_gmac_init() 367 hw_stats = &drv->mac_cb->hw_stats; in hns_gmac_update_stats() 664 hw_stats = &drv->mac_cb->hw_stats; in hns_gmac_get_stats() 697 void *hns_gmac_config(struct hns_mac_cb *mac_cb, struct mac_params *mac_param) in hns_gmac_config() argument 701 mac_drv = devm_kzalloc(mac_cb->dev, sizeof(*mac_drv), GFP_KERNEL); in hns_gmac_config() 719 mac_drv->mac_cb = mac_cb; in hns_gmac_config()
|
D | hns_dsaf_xgmac.c | 301 struct mac_hw_stats *hw_stats = &drv->mac_cb->hw_stats; in hns_xgmac_update_stats() 733 hw_stats = &drv->mac_cb->hw_stats; in hns_xgmac_get_stats() 780 void *hns_xgmac_config(struct hns_mac_cb *mac_cb, struct mac_params *mac_param) in hns_xgmac_config() argument 784 mac_drv = devm_kzalloc(mac_cb->dev, sizeof(*mac_drv), GFP_KERNEL); in hns_xgmac_config() 796 mac_drv->mac_cb = mac_cb; in hns_xgmac_config()
|
D | hns_dsaf_main.c | 1733 memcpy(mask, dsaf_dev->mac_cb[port_num]->mc_mask, ETH_ALEN); in hns_dsaf_setup_mc_mask() 2175 void hns_dsaf_fix_mac_mode(struct hns_mac_cb *mac_cb) in hns_dsaf_fix_mac_mode() argument 2178 struct dsaf_device *dsaf_dev = mac_cb->dsaf_dev; in hns_dsaf_fix_mac_mode() 2179 int mac_id = mac_cb->mac_id; in hns_dsaf_fix_mac_mode() 2181 if (mac_cb->mac_type != HNAE_PORT_SERVICE) in hns_dsaf_fix_mac_mode() 2183 if (mac_cb->phy_if == PHY_INTERFACE_MODE_XGMII) in hns_dsaf_fix_mac_mode() 2773 struct hns_mac_cb *mac_cb; in set_promisc_tcam_enable() local 2794 mac_cb = dsaf_dev->mac_cb[port]; in set_promisc_tcam_enable() 2795 (void)hns_mac_get_inner_port_num(mac_cb, 0, &port_num); in set_promisc_tcam_enable()
|
D | hns_dsaf_ppe.c | 366 if (ppe_common->dsaf_dev->mac_cb[i]) in hns_ppe_uninit_ex() 403 if (dsaf_dev->mac_cb[i]) in hns_ppe_reset_common()
|
/linux-6.1.9/net/mac802154/ |
D | rx.c | 45 switch (mac_cb(skb)->dest.mode) { in ieee802154_subif_frame() 55 if (mac_cb(skb)->dest.pan_id != span && in ieee802154_subif_frame() 56 mac_cb(skb)->dest.pan_id != cpu_to_le16(IEEE802154_PANID_BROADCAST)) in ieee802154_subif_frame() 58 else if (mac_cb(skb)->dest.extended_addr == wpan_dev->extended_addr) in ieee802154_subif_frame() 64 if (mac_cb(skb)->dest.pan_id != span && in ieee802154_subif_frame() 65 mac_cb(skb)->dest.pan_id != cpu_to_le16(IEEE802154_PANID_BROADCAST)) in ieee802154_subif_frame() 67 else if (mac_cb(skb)->dest.short_addr == sshort) in ieee802154_subif_frame() 69 else if (mac_cb(skb)->dest.short_addr == in ieee802154_subif_frame() 95 switch (mac_cb(skb)->type) { in ieee802154_subif_frame() 105 "(type = %d)\n", mac_cb(skb)->type); in ieee802154_subif_frame() [all …]
|
D | iface.c | 370 struct ieee802154_mac_cb *cb = mac_cb(skb); in ieee802154_header_create()
|
/linux-6.1.9/include/net/ |
D | ieee802154_netdev.h | 259 static inline struct ieee802154_mac_cb *mac_cb(struct sk_buff *skb) in mac_cb() function 269 return mac_cb(skb); in mac_cb_init()
|
/linux-6.1.9/net/ieee802154/6lowpan/ |
D | tx.c | 116 *mac_cb(frag) = *mac_cb(skb); in lowpan_alloc_frag()
|
/linux-6.1.9/net/ieee802154/ |
D | socket.c | 741 ieee802154_addr_to_sa(&saddr->addr, &mac_cb(skb)->source); in dgram_recvmsg() 747 sizeof(uint8_t), &(mac_cb(skb)->lqi)); in dgram_recvmsg()
|