Home
last modified time | relevance | path

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

/linux-6.12.1/drivers/net/ethernet/hisilicon/hns/
Dhns_dsaf_mac.c55 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()
90 void hns_mac_get_link_status(struct hns_mac_cb *mac_cb, u32 *link_status) in hns_mac_get_link_status() argument
95 mac_ctrl_drv = hns_mac_get_drv(mac_cb); in hns_mac_get_link_status()
102 if (mac_cb->media_type == HNAE_MEDIA_TYPE_FIBER) { in hns_mac_get_link_status()
103 ret = mac_cb->dsaf_dev->misc_op->get_sfp_prsnt(mac_cb, in hns_mac_get_link_status()
113 if (*link_status && !mac_cb->link) in hns_mac_get_link_status()
117 mac_cb->link = *link_status; in hns_mac_get_link_status()
[all …]
Dhns_dsaf_misc.c58 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 …]
Dhns_ae_adapt.c20 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 …]
Dhns_dsaf_mac.h396 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,
425 bool hns_mac_need_adjust_link(struct hns_mac_cb *mac_cb, int speed, int duplex);
426 void hns_mac_get_link_status(struct hns_mac_cb *mac_cb, u32 *link_status);
427 int hns_mac_change_vf_addr(struct hns_mac_cb *mac_cb, u32 vmid,
429 int hns_mac_set_multi(struct hns_mac_cb *mac_cb,
431 int hns_mac_vm_config_bc_en(struct hns_mac_cb *mac_cb, u32 vm, bool enable);
[all …]
Dhns_dsaf_main.h211 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);
Dhns_dsaf_gmac.c250 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()
Dhns_dsaf_xgmac.c301 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()
Dhns_dsaf_main.c1733 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()
Dhns_dsaf_ppe.c363 if (ppe_common->dsaf_dev->mac_cb[i]) in hns_ppe_uninit_ex()
400 if (dsaf_dev->mac_cb[i]) in hns_ppe_reset_common()
/linux-6.12.1/net/mac802154/
Drx.c149 if (mac_cb(skb)->type != IEEE802154_FC_TYPE_BEACON) { in ieee802154_subif_frame()
152 mac_cb(skb)->type); in ieee802154_subif_frame()
157 switch (mac_cb(skb)->dest.mode) { in ieee802154_subif_frame()
170 if (mac_cb(skb)->dest.pan_id != span && in ieee802154_subif_frame()
171 mac_cb(skb)->dest.pan_id != cpu_to_le16(IEEE802154_PANID_BROADCAST)) in ieee802154_subif_frame()
173 else if (mac_cb(skb)->dest.extended_addr == wpan_dev->extended_addr) in ieee802154_subif_frame()
179 if (mac_cb(skb)->dest.pan_id != span && in ieee802154_subif_frame()
180 mac_cb(skb)->dest.pan_id != cpu_to_le16(IEEE802154_PANID_BROADCAST)) in ieee802154_subif_frame()
182 else if (mac_cb(skb)->dest.short_addr == sshort) in ieee802154_subif_frame()
184 else if (mac_cb(skb)->dest.short_addr == in ieee802154_subif_frame()
[all …]
Dscan.c314 struct ieee802154_addr *src = &mac_cb(skb)->source; in mac802154_process_beacon()
331 desc.link_quality = mac_cb(skb)->lqi; in mac802154_process_beacon()
612 struct ieee802154_addr *src = &mac_cb(skb)->source; in mac802154_process_association_resp()
613 struct ieee802154_addr *dest = &mac_cb(skb)->dest; in mac802154_process_association_resp()
761 struct ieee802154_addr *src = &mac_cb(skb)->source; in mac802154_process_association_req()
762 struct ieee802154_addr *dest = &mac_cb(skb)->dest; in mac802154_process_association_req()
867 struct ieee802154_addr *src = &mac_cb(skb)->source; in mac802154_process_disassociation_notif()
868 struct ieee802154_addr *dest = &mac_cb(skb)->dest; in mac802154_process_disassociation_notif()
Dieee802154_i.h173 if (mac_cb(skb)->type != IEEE802154_FC_TYPE_MAC_CMD) in ieee802154_get_mac_cmd()
Diface.c363 struct ieee802154_mac_cb *cb = mac_cb(skb); in ieee802154_header_create()
/linux-6.12.1/drivers/net/ieee802154/
Dmac802154_hwsim.c170 switch (mac_cb(skb)->type) { in hwsim_hw_receive()
178 mac_cb(skb)->type); in hwsim_hw_receive()
196 if ((mac_cb(skb)->dest.mode == IEEE802154_ADDR_LONG || in hwsim_hw_receive()
197 mac_cb(skb)->dest.mode == IEEE802154_ADDR_SHORT) && in hwsim_hw_receive()
198 mac_cb(skb)->dest.pan_id != pib->filt.pan_id && in hwsim_hw_receive()
199 mac_cb(skb)->dest.pan_id != cpu_to_le16(IEEE802154_PANID_BROADCAST)) { in hwsim_hw_receive()
202 le16_to_cpu(mac_cb(skb)->dest.pan_id)); in hwsim_hw_receive()
207 if (mac_cb(skb)->dest.mode == IEEE802154_ADDR_SHORT && in hwsim_hw_receive()
208 mac_cb(skb)->dest.short_addr != pib->filt.short_addr && in hwsim_hw_receive()
209 mac_cb(skb)->dest.short_addr != cpu_to_le16(IEEE802154_ADDR_BROADCAST)) { in hwsim_hw_receive()
[all …]
/linux-6.12.1/net/ieee802154/6lowpan/
Dtx.c116 *mac_cb(frag) = *mac_cb(skb); in lowpan_alloc_frag()
/linux-6.12.1/include/net/
Dieee802154_netdev.h397 static inline struct ieee802154_mac_cb *mac_cb(struct sk_buff *skb) in mac_cb() function
407 return mac_cb(skb); in mac_cb_init()
/linux-6.12.1/net/ieee802154/
Dsocket.c739 ieee802154_addr_to_sa(&saddr->addr, &mac_cb(skb)->source); in dgram_recvmsg()
745 sizeof(uint8_t), &(mac_cb(skb)->lqi)); in dgram_recvmsg()