Lines Matching refs:mac
187 bna_bfi_ucast_req(struct bna_rxf *rxf, struct bna_mac *mac, in bna_bfi_ucast_req() argument
195 ether_addr_copy(req->mac_addr, mac->addr); in bna_bfi_ucast_req()
202 bna_bfi_mcast_add_req(struct bna_rxf *rxf, struct bna_mac *mac) in bna_bfi_mcast_add_req() argument
211 ether_addr_copy(req->mac_addr, mac->addr); in bna_bfi_mcast_add_req()
358 struct bna_mac *mac; in bna_rxf_mcmac_get() local
360 list_for_each_entry(mac, &rxf->mcast_active_q, qe) in bna_rxf_mcmac_get()
361 if (ether_addr_equal(mac->addr, mac_addr)) in bna_rxf_mcmac_get()
362 return mac; in bna_rxf_mcmac_get()
364 list_for_each_entry(mac, &rxf->mcast_pending_del_q, qe) in bna_rxf_mcmac_get()
365 if (ether_addr_equal(mac->addr, mac_addr)) in bna_rxf_mcmac_get()
366 return mac; in bna_rxf_mcmac_get()
402 bna_rxf_mcast_del(struct bna_rxf *rxf, struct bna_mac *mac, in bna_rxf_mcast_del() argument
408 mchandle = mac->handle; in bna_rxf_mcast_del()
421 mac->handle = NULL; in bna_rxf_mcast_del()
429 struct bna_mac *mac = NULL; in bna_rxf_mcast_cfg_apply() local
434 mac = list_first_entry(&rxf->mcast_pending_del_q, in bna_rxf_mcast_cfg_apply()
436 ret = bna_rxf_mcast_del(rxf, mac, BNA_HARD_CLEANUP); in bna_rxf_mcast_cfg_apply()
437 list_move_tail(&mac->qe, bna_mcam_mod_del_q(rxf->rx->bna)); in bna_rxf_mcast_cfg_apply()
444 mac = list_first_entry(&rxf->mcast_pending_add_q, in bna_rxf_mcast_cfg_apply()
446 list_move_tail(&mac->qe, &rxf->mcast_active_q); in bna_rxf_mcast_cfg_apply()
447 bna_bfi_mcast_add_req(rxf, mac); in bna_rxf_mcast_cfg_apply()
477 struct bna_mac *mac; in bna_rxf_mcast_cfg_reset() local
482 mac = list_first_entry(&rxf->mcast_pending_del_q, in bna_rxf_mcast_cfg_reset()
484 ret = bna_rxf_mcast_del(rxf, mac, cleanup); in bna_rxf_mcast_cfg_reset()
485 list_move_tail(&mac->qe, bna_mcam_mod_del_q(rxf->rx->bna)); in bna_rxf_mcast_cfg_reset()
492 mac = list_first_entry(&rxf->mcast_active_q, in bna_rxf_mcast_cfg_reset()
494 list_move_tail(&mac->qe, &rxf->mcast_pending_add_q); in bna_rxf_mcast_cfg_reset()
495 if (bna_rxf_mcast_del(rxf, mac, cleanup)) in bna_rxf_mcast_cfg_reset()
661 struct bna_mac *mac; in bna_rxf_uninit() local
667 mac = list_first_entry(&rxf->ucast_pending_add_q, in bna_rxf_uninit()
669 list_move_tail(&mac->qe, bna_ucam_mod_free_q(rxf->rx->bna)); in bna_rxf_uninit()
679 mac = list_first_entry(&rxf->mcast_pending_add_q, in bna_rxf_uninit()
681 list_move_tail(&mac->qe, bna_mcam_mod_free_q(rxf->rx->bna)); in bna_rxf_uninit()
758 struct bna_mac *mac; in bna_rx_mcast_add() local
768 mac = bna_cam_mod_mac_get(bna_mcam_mod_free_q(rxf->rx->bna)); in bna_rx_mcast_add()
769 if (mac == NULL) in bna_rx_mcast_add()
771 ether_addr_copy(mac->addr, addr); in bna_rx_mcast_add()
772 list_add_tail(&mac->qe, &rxf->mcast_pending_add_q); in bna_rx_mcast_add()
789 struct bna_mac *mac, *del_mac; in bna_rx_ucast_listset() local
794 mac = list_first_entry(&rxf->ucast_pending_add_q, in bna_rx_ucast_listset()
796 list_move_tail(&mac->qe, &ucam_mod->free_q); in bna_rx_ucast_listset()
801 mac = list_first_entry(&rxf->ucast_active_q, in bna_rx_ucast_listset()
804 ether_addr_copy(del_mac->addr, mac->addr); in bna_rx_ucast_listset()
805 del_mac->handle = mac->handle; in bna_rx_ucast_listset()
807 list_move_tail(&mac->qe, &ucam_mod->free_q); in bna_rx_ucast_listset()
813 mac = bna_cam_mod_mac_get(&ucam_mod->free_q); in bna_rx_ucast_listset()
814 if (mac == NULL) in bna_rx_ucast_listset()
816 ether_addr_copy(mac->addr, mcaddr); in bna_rx_ucast_listset()
817 list_add_tail(&mac->qe, &list_head); in bna_rx_ucast_listset()
823 mac = list_first_entry(&list_head, struct bna_mac, qe); in bna_rx_ucast_listset()
824 list_move_tail(&mac->qe, &rxf->ucast_pending_add_q); in bna_rx_ucast_listset()
833 mac = list_first_entry(&list_head, struct bna_mac, qe); in bna_rx_ucast_listset()
834 list_move_tail(&mac->qe, &ucam_mod->free_q); in bna_rx_ucast_listset()
847 struct bna_mac *mac, *del_mac; in bna_rx_mcast_listset() local
852 mac = list_first_entry(&rxf->mcast_pending_add_q, in bna_rx_mcast_listset()
854 list_move_tail(&mac->qe, &mcam_mod->free_q); in bna_rx_mcast_listset()
859 mac = list_first_entry(&rxf->mcast_active_q, in bna_rx_mcast_listset()
862 ether_addr_copy(del_mac->addr, mac->addr); in bna_rx_mcast_listset()
863 del_mac->handle = mac->handle; in bna_rx_mcast_listset()
865 mac->handle = NULL; in bna_rx_mcast_listset()
866 list_move_tail(&mac->qe, &mcam_mod->free_q); in bna_rx_mcast_listset()
872 mac = bna_cam_mod_mac_get(&mcam_mod->free_q); in bna_rx_mcast_listset()
873 if (mac == NULL) in bna_rx_mcast_listset()
875 ether_addr_copy(mac->addr, mcaddr); in bna_rx_mcast_listset()
876 list_add_tail(&mac->qe, &list_head); in bna_rx_mcast_listset()
883 mac = list_first_entry(&list_head, struct bna_mac, qe); in bna_rx_mcast_listset()
884 list_move_tail(&mac->qe, &rxf->mcast_pending_add_q); in bna_rx_mcast_listset()
893 mac = list_first_entry(&list_head, struct bna_mac, qe); in bna_rx_mcast_listset()
894 list_move_tail(&mac->qe, &mcam_mod->free_q); in bna_rx_mcast_listset()
904 struct bna_mac *mac, *del_mac; in bna_rx_mcast_delall() local
909 mac = list_first_entry(&rxf->mcast_pending_add_q, in bna_rx_mcast_delall()
911 list_move_tail(&mac->qe, bna_mcam_mod_free_q(rxf->rx->bna)); in bna_rx_mcast_delall()
916 mac = list_first_entry(&rxf->mcast_active_q, in bna_rx_mcast_delall()
918 list_del(&mac->qe); in bna_rx_mcast_delall()
920 memcpy(del_mac, mac, sizeof(*del_mac)); in bna_rx_mcast_delall()
922 mac->handle = NULL; in bna_rx_mcast_delall()
923 list_add_tail(&mac->qe, bna_mcam_mod_free_q(rxf->rx->bna)); in bna_rx_mcast_delall()
964 struct bna_mac *mac = NULL; in bna_rxf_ucast_cfg_apply() local
968 mac = list_first_entry(&rxf->ucast_pending_del_q, in bna_rxf_ucast_cfg_apply()
970 bna_bfi_ucast_req(rxf, mac, BFI_ENET_H2I_MAC_UCAST_DEL_REQ); in bna_rxf_ucast_cfg_apply()
971 list_move_tail(&mac->qe, bna_ucam_mod_del_q(rxf->rx->bna)); in bna_rxf_ucast_cfg_apply()
988 mac = list_first_entry(&rxf->ucast_pending_add_q, in bna_rxf_ucast_cfg_apply()
990 list_add_tail(&mac->qe, &rxf->ucast_active_q); in bna_rxf_ucast_cfg_apply()
991 bna_bfi_ucast_req(rxf, mac, BFI_ENET_H2I_MAC_UCAST_ADD_REQ); in bna_rxf_ucast_cfg_apply()
1001 struct bna_mac *mac; in bna_rxf_ucast_cfg_reset() local
1005 mac = list_first_entry(&rxf->ucast_pending_del_q, in bna_rxf_ucast_cfg_reset()
1008 list_move_tail(&mac->qe, in bna_rxf_ucast_cfg_reset()
1011 bna_bfi_ucast_req(rxf, mac, in bna_rxf_ucast_cfg_reset()
1013 list_move_tail(&mac->qe, in bna_rxf_ucast_cfg_reset()
1021 mac = list_first_entry(&rxf->ucast_active_q, in bna_rxf_ucast_cfg_reset()
1023 list_move_tail(&mac->qe, &rxf->ucast_pending_add_q); in bna_rxf_ucast_cfg_reset()
1025 bna_bfi_ucast_req(rxf, mac, in bna_rxf_ucast_cfg_reset()