Lines Matching refs:epbh

113 static int fjes_hw_alloc_epbuf(struct epbuf_handler *epbh)  in fjes_hw_alloc_epbuf()  argument
121 epbh->buffer = mem; in fjes_hw_alloc_epbuf()
122 epbh->size = EP_BUFFER_SIZE; in fjes_hw_alloc_epbuf()
124 epbh->info = (union ep_buffer_info *)mem; in fjes_hw_alloc_epbuf()
125 epbh->ring = (u8 *)(mem + sizeof(union ep_buffer_info)); in fjes_hw_alloc_epbuf()
130 static void fjes_hw_free_epbuf(struct epbuf_handler *epbh) in fjes_hw_free_epbuf() argument
132 vfree(epbh->buffer); in fjes_hw_free_epbuf()
133 epbh->buffer = NULL; in fjes_hw_free_epbuf()
134 epbh->size = 0; in fjes_hw_free_epbuf()
136 epbh->info = NULL; in fjes_hw_free_epbuf()
137 epbh->ring = NULL; in fjes_hw_free_epbuf()
140 void fjes_hw_setup_epbuf(struct epbuf_handler *epbh, const u8 *mac_addr, in fjes_hw_setup_epbuf() argument
143 union ep_buffer_info *info = epbh->info; in fjes_hw_setup_epbuf()
161 info->v1i.buffer_size = epbh->size - info->v1i.info_size; in fjes_hw_setup_epbuf()
832 bool fjes_hw_check_epbuf_version(struct epbuf_handler *epbh, u32 version) in fjes_hw_check_epbuf_version() argument
834 union ep_buffer_info *info = epbh->info; in fjes_hw_check_epbuf_version()
839 bool fjes_hw_check_mtu(struct epbuf_handler *epbh, u32 mtu) in fjes_hw_check_mtu() argument
841 union ep_buffer_info *info = epbh->info; in fjes_hw_check_mtu()
847 bool fjes_hw_check_vlan_id(struct epbuf_handler *epbh, u16 vlan_id) in fjes_hw_check_vlan_id() argument
849 union ep_buffer_info *info = epbh->info; in fjes_hw_check_vlan_id()
866 bool fjes_hw_set_vlan_id(struct epbuf_handler *epbh, u16 vlan_id) in fjes_hw_set_vlan_id() argument
868 union ep_buffer_info *info = epbh->info; in fjes_hw_set_vlan_id()
880 void fjes_hw_del_vlan_id(struct epbuf_handler *epbh, u16 vlan_id) in fjes_hw_del_vlan_id() argument
882 union ep_buffer_info *info = epbh->info; in fjes_hw_del_vlan_id()
893 bool fjes_hw_epbuf_rx_is_empty(struct epbuf_handler *epbh) in fjes_hw_epbuf_rx_is_empty() argument
895 union ep_buffer_info *info = epbh->info; in fjes_hw_epbuf_rx_is_empty()
907 void *fjes_hw_epbuf_rx_curpkt_get_addr(struct epbuf_handler *epbh, in fjes_hw_epbuf_rx_curpkt_get_addr() argument
910 union ep_buffer_info *info = epbh->info; in fjes_hw_epbuf_rx_curpkt_get_addr()
914 ring_frame = (struct esmem_frame *)&(epbh->ring[EP_RING_INDEX in fjes_hw_epbuf_rx_curpkt_get_addr()
926 void fjes_hw_epbuf_rx_curpkt_drop(struct epbuf_handler *epbh) in fjes_hw_epbuf_rx_curpkt_drop() argument
928 union ep_buffer_info *info = epbh->info; in fjes_hw_epbuf_rx_curpkt_drop()
930 if (fjes_hw_epbuf_rx_is_empty(epbh)) in fjes_hw_epbuf_rx_curpkt_drop()
933 EP_RING_INDEX_INC(epbh->info->v1i.head, info->v1i.count_max); in fjes_hw_epbuf_rx_curpkt_drop()
936 int fjes_hw_epbuf_tx_pkt_send(struct epbuf_handler *epbh, in fjes_hw_epbuf_tx_pkt_send() argument
939 union ep_buffer_info *info = epbh->info; in fjes_hw_epbuf_tx_pkt_send()
945 ring_frame = (struct esmem_frame *)&(epbh->ring[EP_RING_INDEX in fjes_hw_epbuf_tx_pkt_send()
953 EP_RING_INDEX_INC(epbh->info->v1i.tail, info->v1i.count_max); in fjes_hw_epbuf_tx_pkt_send()