Lines Matching refs:rxf

33 #define bna_rxf_vlan_cfg_soft_reset(rxf)				\  argument
35 (rxf)->vlan_pending_bitmask = (u8)BFI_VLAN_BMASK_ALL; \
36 (rxf)->vlan_strip_pending = true; \
39 #define bna_rxf_rss_cfg_soft_reset(rxf) \ argument
41 if ((rxf)->rss_status == BNA_STATUS_T_ENABLED) \
42 (rxf)->rss_pending = (BNA_RSS_F_RIT_PENDING | \
47 static int bna_rxf_cfg_apply(struct bna_rxf *rxf);
48 static void bna_rxf_cfg_reset(struct bna_rxf *rxf);
49 static int bna_rxf_fltr_clear(struct bna_rxf *rxf);
50 static int bna_rxf_ucast_cfg_apply(struct bna_rxf *rxf);
51 static int bna_rxf_promisc_cfg_apply(struct bna_rxf *rxf);
52 static int bna_rxf_allmulti_cfg_apply(struct bna_rxf *rxf);
53 static int bna_rxf_vlan_strip_cfg_apply(struct bna_rxf *rxf);
54 static int bna_rxf_ucast_cfg_reset(struct bna_rxf *rxf,
56 static int bna_rxf_promisc_cfg_reset(struct bna_rxf *rxf,
58 static int bna_rxf_allmulti_cfg_reset(struct bna_rxf *rxf,
75 bna_rxf_sm_stopped_entry(struct bna_rxf *rxf) in bna_rxf_sm_stopped_entry() argument
77 call_rxf_stop_cbfn(rxf); in bna_rxf_sm_stopped_entry()
81 bna_rxf_sm_stopped(struct bna_rxf *rxf, enum bna_rxf_event event) in bna_rxf_sm_stopped() argument
85 if (rxf->flags & BNA_RXF_F_PAUSED) { in bna_rxf_sm_stopped()
86 bfa_fsm_set_state(rxf, bna_rxf_sm_paused); in bna_rxf_sm_stopped()
87 call_rxf_start_cbfn(rxf); in bna_rxf_sm_stopped()
89 bfa_fsm_set_state(rxf, bna_rxf_sm_cfg_wait); in bna_rxf_sm_stopped()
93 call_rxf_stop_cbfn(rxf); in bna_rxf_sm_stopped()
101 call_rxf_cam_fltr_cbfn(rxf); in bna_rxf_sm_stopped()
105 rxf->flags |= BNA_RXF_F_PAUSED; in bna_rxf_sm_stopped()
106 call_rxf_pause_cbfn(rxf); in bna_rxf_sm_stopped()
110 rxf->flags &= ~BNA_RXF_F_PAUSED; in bna_rxf_sm_stopped()
111 call_rxf_resume_cbfn(rxf); in bna_rxf_sm_stopped()
120 bna_rxf_sm_paused_entry(struct bna_rxf *rxf) in bna_rxf_sm_paused_entry() argument
122 call_rxf_pause_cbfn(rxf); in bna_rxf_sm_paused_entry()
126 bna_rxf_sm_paused(struct bna_rxf *rxf, enum bna_rxf_event event) in bna_rxf_sm_paused() argument
131 bfa_fsm_set_state(rxf, bna_rxf_sm_stopped); in bna_rxf_sm_paused()
135 call_rxf_cam_fltr_cbfn(rxf); in bna_rxf_sm_paused()
139 rxf->flags &= ~BNA_RXF_F_PAUSED; in bna_rxf_sm_paused()
140 bfa_fsm_set_state(rxf, bna_rxf_sm_cfg_wait); in bna_rxf_sm_paused()
149 bna_rxf_sm_cfg_wait_entry(struct bna_rxf *rxf) in bna_rxf_sm_cfg_wait_entry() argument
151 if (!bna_rxf_cfg_apply(rxf)) { in bna_rxf_sm_cfg_wait_entry()
153 bfa_fsm_set_state(rxf, bna_rxf_sm_started); in bna_rxf_sm_cfg_wait_entry()
158 bna_rxf_sm_cfg_wait(struct bna_rxf *rxf, enum bna_rxf_event event) in bna_rxf_sm_cfg_wait() argument
162 bfa_fsm_set_state(rxf, bna_rxf_sm_last_resp_wait); in bna_rxf_sm_cfg_wait()
166 bna_rxf_cfg_reset(rxf); in bna_rxf_sm_cfg_wait()
167 call_rxf_start_cbfn(rxf); in bna_rxf_sm_cfg_wait()
168 call_rxf_cam_fltr_cbfn(rxf); in bna_rxf_sm_cfg_wait()
169 call_rxf_resume_cbfn(rxf); in bna_rxf_sm_cfg_wait()
170 bfa_fsm_set_state(rxf, bna_rxf_sm_stopped); in bna_rxf_sm_cfg_wait()
178 rxf->flags |= BNA_RXF_F_PAUSED; in bna_rxf_sm_cfg_wait()
179 call_rxf_start_cbfn(rxf); in bna_rxf_sm_cfg_wait()
180 bfa_fsm_set_state(rxf, bna_rxf_sm_fltr_clr_wait); in bna_rxf_sm_cfg_wait()
184 if (!bna_rxf_cfg_apply(rxf)) { in bna_rxf_sm_cfg_wait()
186 bfa_fsm_set_state(rxf, bna_rxf_sm_started); in bna_rxf_sm_cfg_wait()
196 bna_rxf_sm_started_entry(struct bna_rxf *rxf) in bna_rxf_sm_started_entry() argument
198 call_rxf_start_cbfn(rxf); in bna_rxf_sm_started_entry()
199 call_rxf_cam_fltr_cbfn(rxf); in bna_rxf_sm_started_entry()
200 call_rxf_resume_cbfn(rxf); in bna_rxf_sm_started_entry()
204 bna_rxf_sm_started(struct bna_rxf *rxf, enum bna_rxf_event event) in bna_rxf_sm_started() argument
209 bna_rxf_cfg_reset(rxf); in bna_rxf_sm_started()
210 bfa_fsm_set_state(rxf, bna_rxf_sm_stopped); in bna_rxf_sm_started()
214 bfa_fsm_set_state(rxf, bna_rxf_sm_cfg_wait); in bna_rxf_sm_started()
218 rxf->flags |= BNA_RXF_F_PAUSED; in bna_rxf_sm_started()
219 if (!bna_rxf_fltr_clear(rxf)) in bna_rxf_sm_started()
220 bfa_fsm_set_state(rxf, bna_rxf_sm_paused); in bna_rxf_sm_started()
222 bfa_fsm_set_state(rxf, bna_rxf_sm_fltr_clr_wait); in bna_rxf_sm_started()
231 bna_rxf_sm_fltr_clr_wait_entry(struct bna_rxf *rxf) in bna_rxf_sm_fltr_clr_wait_entry() argument
236 bna_rxf_sm_fltr_clr_wait(struct bna_rxf *rxf, enum bna_rxf_event event) in bna_rxf_sm_fltr_clr_wait() argument
240 bna_rxf_cfg_reset(rxf); in bna_rxf_sm_fltr_clr_wait()
241 call_rxf_pause_cbfn(rxf); in bna_rxf_sm_fltr_clr_wait()
242 bfa_fsm_set_state(rxf, bna_rxf_sm_stopped); in bna_rxf_sm_fltr_clr_wait()
246 if (!bna_rxf_fltr_clear(rxf)) { in bna_rxf_sm_fltr_clr_wait()
248 bfa_fsm_set_state(rxf, bna_rxf_sm_paused); in bna_rxf_sm_fltr_clr_wait()
258 bna_rxf_sm_last_resp_wait_entry(struct bna_rxf *rxf) in bna_rxf_sm_last_resp_wait_entry() argument
263 bna_rxf_sm_last_resp_wait(struct bna_rxf *rxf, enum bna_rxf_event event) in bna_rxf_sm_last_resp_wait() argument
268 bna_rxf_cfg_reset(rxf); in bna_rxf_sm_last_resp_wait()
269 bfa_fsm_set_state(rxf, bna_rxf_sm_stopped); in bna_rxf_sm_last_resp_wait()
278 bna_bfi_ucast_req(struct bna_rxf *rxf, struct bna_mac *mac, in bna_bfi_ucast_req() argument
281 struct bfi_enet_ucast_req *req = &rxf->bfi_enet_cmd.ucast_req; in bna_bfi_ucast_req()
283 bfi_msgq_mhdr_set(req->mh, BFI_MC_ENET, req_type, 0, rxf->rx->rid); in bna_bfi_ucast_req()
287 bfa_msgq_cmd_set(&rxf->msgq_cmd, NULL, NULL, in bna_bfi_ucast_req()
289 bfa_msgq_cmd_post(&rxf->rx->bna->msgq, &rxf->msgq_cmd); in bna_bfi_ucast_req()
293 bna_bfi_mcast_add_req(struct bna_rxf *rxf, struct bna_mac *mac) in bna_bfi_mcast_add_req() argument
296 &rxf->bfi_enet_cmd.mcast_add_req; in bna_bfi_mcast_add_req()
299 0, rxf->rx->rid); in bna_bfi_mcast_add_req()
303 bfa_msgq_cmd_set(&rxf->msgq_cmd, NULL, NULL, in bna_bfi_mcast_add_req()
305 bfa_msgq_cmd_post(&rxf->rx->bna->msgq, &rxf->msgq_cmd); in bna_bfi_mcast_add_req()
309 bna_bfi_mcast_del_req(struct bna_rxf *rxf, u16 handle) in bna_bfi_mcast_del_req() argument
312 &rxf->bfi_enet_cmd.mcast_del_req; in bna_bfi_mcast_del_req()
315 0, rxf->rx->rid); in bna_bfi_mcast_del_req()
319 bfa_msgq_cmd_set(&rxf->msgq_cmd, NULL, NULL, in bna_bfi_mcast_del_req()
321 bfa_msgq_cmd_post(&rxf->rx->bna->msgq, &rxf->msgq_cmd); in bna_bfi_mcast_del_req()
325 bna_bfi_mcast_filter_req(struct bna_rxf *rxf, enum bna_status status) in bna_bfi_mcast_filter_req() argument
327 struct bfi_enet_enable_req *req = &rxf->bfi_enet_cmd.req; in bna_bfi_mcast_filter_req()
330 BFI_ENET_H2I_MAC_MCAST_FILTER_REQ, 0, rxf->rx->rid); in bna_bfi_mcast_filter_req()
334 bfa_msgq_cmd_set(&rxf->msgq_cmd, NULL, NULL, in bna_bfi_mcast_filter_req()
336 bfa_msgq_cmd_post(&rxf->rx->bna->msgq, &rxf->msgq_cmd); in bna_bfi_mcast_filter_req()
340 bna_bfi_rx_promisc_req(struct bna_rxf *rxf, enum bna_status status) in bna_bfi_rx_promisc_req() argument
342 struct bfi_enet_enable_req *req = &rxf->bfi_enet_cmd.req; in bna_bfi_rx_promisc_req()
345 BFI_ENET_H2I_RX_PROMISCUOUS_REQ, 0, rxf->rx->rid); in bna_bfi_rx_promisc_req()
349 bfa_msgq_cmd_set(&rxf->msgq_cmd, NULL, NULL, in bna_bfi_rx_promisc_req()
351 bfa_msgq_cmd_post(&rxf->rx->bna->msgq, &rxf->msgq_cmd); in bna_bfi_rx_promisc_req()
355 bna_bfi_rx_vlan_filter_set(struct bna_rxf *rxf, u8 block_idx) in bna_bfi_rx_vlan_filter_set() argument
357 struct bfi_enet_rx_vlan_req *req = &rxf->bfi_enet_cmd.vlan_req; in bna_bfi_rx_vlan_filter_set()
362 BFI_ENET_H2I_RX_VLAN_SET_REQ, 0, rxf->rx->rid); in bna_bfi_rx_vlan_filter_set()
368 if (rxf->vlan_filter_status == BNA_STATUS_T_ENABLED) in bna_bfi_rx_vlan_filter_set()
370 htonl(rxf->vlan_filter_table[j]); in bna_bfi_rx_vlan_filter_set()
374 bfa_msgq_cmd_set(&rxf->msgq_cmd, NULL, NULL, in bna_bfi_rx_vlan_filter_set()
376 bfa_msgq_cmd_post(&rxf->rx->bna->msgq, &rxf->msgq_cmd); in bna_bfi_rx_vlan_filter_set()
380 bna_bfi_vlan_strip_enable(struct bna_rxf *rxf) in bna_bfi_vlan_strip_enable() argument
382 struct bfi_enet_enable_req *req = &rxf->bfi_enet_cmd.req; in bna_bfi_vlan_strip_enable()
385 BFI_ENET_H2I_RX_VLAN_STRIP_ENABLE_REQ, 0, rxf->rx->rid); in bna_bfi_vlan_strip_enable()
388 req->enable = rxf->vlan_strip_status; in bna_bfi_vlan_strip_enable()
389 bfa_msgq_cmd_set(&rxf->msgq_cmd, NULL, NULL, in bna_bfi_vlan_strip_enable()
391 bfa_msgq_cmd_post(&rxf->rx->bna->msgq, &rxf->msgq_cmd); in bna_bfi_vlan_strip_enable()
395 bna_bfi_rit_cfg(struct bna_rxf *rxf) in bna_bfi_rit_cfg() argument
397 struct bfi_enet_rit_req *req = &rxf->bfi_enet_cmd.rit_req; in bna_bfi_rit_cfg()
400 BFI_ENET_H2I_RIT_CFG_REQ, 0, rxf->rx->rid); in bna_bfi_rit_cfg()
403 req->size = htons(rxf->rit_size); in bna_bfi_rit_cfg()
404 memcpy(&req->table[0], rxf->rit, rxf->rit_size); in bna_bfi_rit_cfg()
405 bfa_msgq_cmd_set(&rxf->msgq_cmd, NULL, NULL, in bna_bfi_rit_cfg()
407 bfa_msgq_cmd_post(&rxf->rx->bna->msgq, &rxf->msgq_cmd); in bna_bfi_rit_cfg()
411 bna_bfi_rss_cfg(struct bna_rxf *rxf) in bna_bfi_rss_cfg() argument
413 struct bfi_enet_rss_cfg_req *req = &rxf->bfi_enet_cmd.rss_req; in bna_bfi_rss_cfg()
417 BFI_ENET_H2I_RSS_CFG_REQ, 0, rxf->rx->rid); in bna_bfi_rss_cfg()
420 req->cfg.type = rxf->rss_cfg.hash_type; in bna_bfi_rss_cfg()
421 req->cfg.mask = rxf->rss_cfg.hash_mask; in bna_bfi_rss_cfg()
424 htonl(rxf->rss_cfg.toeplitz_hash_key[i]); in bna_bfi_rss_cfg()
425 bfa_msgq_cmd_set(&rxf->msgq_cmd, NULL, NULL, in bna_bfi_rss_cfg()
427 bfa_msgq_cmd_post(&rxf->rx->bna->msgq, &rxf->msgq_cmd); in bna_bfi_rss_cfg()
431 bna_bfi_rss_enable(struct bna_rxf *rxf) in bna_bfi_rss_enable() argument
433 struct bfi_enet_enable_req *req = &rxf->bfi_enet_cmd.req; in bna_bfi_rss_enable()
436 BFI_ENET_H2I_RSS_ENABLE_REQ, 0, rxf->rx->rid); in bna_bfi_rss_enable()
439 req->enable = rxf->rss_status; in bna_bfi_rss_enable()
440 bfa_msgq_cmd_set(&rxf->msgq_cmd, NULL, NULL, in bna_bfi_rss_enable()
442 bfa_msgq_cmd_post(&rxf->rx->bna->msgq, &rxf->msgq_cmd); in bna_bfi_rss_enable()
447 bna_rxf_mcmac_get(struct bna_rxf *rxf, u8 *mac_addr) in bna_rxf_mcmac_get() argument
452 list_for_each(qe, &rxf->mcast_active_q) { in bna_rxf_mcmac_get()
458 list_for_each(qe, &rxf->mcast_pending_del_q) { in bna_rxf_mcmac_get()
468 bna_rxf_mchandle_get(struct bna_rxf *rxf, int handle) in bna_rxf_mchandle_get() argument
473 list_for_each(qe, &rxf->mcast_handle_q) { in bna_rxf_mchandle_get()
483 bna_rxf_mchandle_attach(struct bna_rxf *rxf, u8 *mac_addr, int handle) in bna_rxf_mchandle_attach() argument
488 mcmac = bna_rxf_mcmac_get(rxf, mac_addr); in bna_rxf_mchandle_attach()
489 mchandle = bna_rxf_mchandle_get(rxf, handle); in bna_rxf_mchandle_attach()
491 mchandle = bna_mcam_mod_handle_get(&rxf->rx->bna->mcam_mod); in bna_rxf_mchandle_attach()
494 list_add_tail(&mchandle->qe, &rxf->mcast_handle_q); in bna_rxf_mchandle_attach()
501 bna_rxf_mcast_del(struct bna_rxf *rxf, struct bna_mac *mac, in bna_rxf_mcast_del() argument
514 bna_bfi_mcast_del_req(rxf, mchandle->handle); in bna_rxf_mcast_del()
519 bna_mcam_mod_handle_put(&rxf->rx->bna->mcam_mod, mchandle); in bna_rxf_mcast_del()
527 bna_rxf_mcast_cfg_apply(struct bna_rxf *rxf) in bna_rxf_mcast_cfg_apply() argument
534 while (!list_empty(&rxf->mcast_pending_del_q)) { in bna_rxf_mcast_cfg_apply()
535 bfa_q_deq(&rxf->mcast_pending_del_q, &qe); in bna_rxf_mcast_cfg_apply()
538 ret = bna_rxf_mcast_del(rxf, mac, BNA_HARD_CLEANUP); in bna_rxf_mcast_cfg_apply()
539 bna_cam_mod_mac_put(bna_mcam_mod_del_q(rxf->rx->bna), mac); in bna_rxf_mcast_cfg_apply()
545 if (!list_empty(&rxf->mcast_pending_add_q)) { in bna_rxf_mcast_cfg_apply()
546 bfa_q_deq(&rxf->mcast_pending_add_q, &qe); in bna_rxf_mcast_cfg_apply()
549 list_add_tail(&mac->qe, &rxf->mcast_active_q); in bna_rxf_mcast_cfg_apply()
550 bna_bfi_mcast_add_req(rxf, mac); in bna_rxf_mcast_cfg_apply()
558 bna_rxf_vlan_cfg_apply(struct bna_rxf *rxf) in bna_rxf_vlan_cfg_apply() argument
563 if (rxf->vlan_pending_bitmask) { in bna_rxf_vlan_cfg_apply()
564 vlan_pending_bitmask = rxf->vlan_pending_bitmask; in bna_rxf_vlan_cfg_apply()
569 rxf->vlan_pending_bitmask &= ~(1 << block_idx); in bna_rxf_vlan_cfg_apply()
570 bna_bfi_rx_vlan_filter_set(rxf, block_idx); in bna_rxf_vlan_cfg_apply()
578 bna_rxf_mcast_cfg_reset(struct bna_rxf *rxf, enum bna_cleanup_type cleanup) in bna_rxf_mcast_cfg_reset() argument
585 while (!list_empty(&rxf->mcast_pending_del_q)) { in bna_rxf_mcast_cfg_reset()
586 bfa_q_deq(&rxf->mcast_pending_del_q, &qe); in bna_rxf_mcast_cfg_reset()
589 ret = bna_rxf_mcast_del(rxf, mac, cleanup); in bna_rxf_mcast_cfg_reset()
590 bna_cam_mod_mac_put(bna_mcam_mod_del_q(rxf->rx->bna), mac); in bna_rxf_mcast_cfg_reset()
596 while (!list_empty(&rxf->mcast_active_q)) { in bna_rxf_mcast_cfg_reset()
597 bfa_q_deq(&rxf->mcast_active_q, &qe); in bna_rxf_mcast_cfg_reset()
599 list_add_tail(qe, &rxf->mcast_pending_add_q); in bna_rxf_mcast_cfg_reset()
601 if (bna_rxf_mcast_del(rxf, mac, cleanup)) in bna_rxf_mcast_cfg_reset()
609 bna_rxf_rss_cfg_apply(struct bna_rxf *rxf) in bna_rxf_rss_cfg_apply() argument
611 if (rxf->rss_pending) { in bna_rxf_rss_cfg_apply()
612 if (rxf->rss_pending & BNA_RSS_F_RIT_PENDING) { in bna_rxf_rss_cfg_apply()
613 rxf->rss_pending &= ~BNA_RSS_F_RIT_PENDING; in bna_rxf_rss_cfg_apply()
614 bna_bfi_rit_cfg(rxf); in bna_rxf_rss_cfg_apply()
618 if (rxf->rss_pending & BNA_RSS_F_CFG_PENDING) { in bna_rxf_rss_cfg_apply()
619 rxf->rss_pending &= ~BNA_RSS_F_CFG_PENDING; in bna_rxf_rss_cfg_apply()
620 bna_bfi_rss_cfg(rxf); in bna_rxf_rss_cfg_apply()
624 if (rxf->rss_pending & BNA_RSS_F_STATUS_PENDING) { in bna_rxf_rss_cfg_apply()
625 rxf->rss_pending &= ~BNA_RSS_F_STATUS_PENDING; in bna_rxf_rss_cfg_apply()
626 bna_bfi_rss_enable(rxf); in bna_rxf_rss_cfg_apply()
635 bna_rxf_cfg_apply(struct bna_rxf *rxf) in bna_rxf_cfg_apply() argument
637 if (bna_rxf_ucast_cfg_apply(rxf)) in bna_rxf_cfg_apply()
640 if (bna_rxf_mcast_cfg_apply(rxf)) in bna_rxf_cfg_apply()
643 if (bna_rxf_promisc_cfg_apply(rxf)) in bna_rxf_cfg_apply()
646 if (bna_rxf_allmulti_cfg_apply(rxf)) in bna_rxf_cfg_apply()
649 if (bna_rxf_vlan_cfg_apply(rxf)) in bna_rxf_cfg_apply()
652 if (bna_rxf_vlan_strip_cfg_apply(rxf)) in bna_rxf_cfg_apply()
655 if (bna_rxf_rss_cfg_apply(rxf)) in bna_rxf_cfg_apply()
663 bna_rxf_fltr_clear(struct bna_rxf *rxf) in bna_rxf_fltr_clear() argument
665 if (bna_rxf_ucast_cfg_reset(rxf, BNA_HARD_CLEANUP)) in bna_rxf_fltr_clear()
668 if (bna_rxf_mcast_cfg_reset(rxf, BNA_HARD_CLEANUP)) in bna_rxf_fltr_clear()
671 if (bna_rxf_promisc_cfg_reset(rxf, BNA_HARD_CLEANUP)) in bna_rxf_fltr_clear()
674 if (bna_rxf_allmulti_cfg_reset(rxf, BNA_HARD_CLEANUP)) in bna_rxf_fltr_clear()
681 bna_rxf_cfg_reset(struct bna_rxf *rxf) in bna_rxf_cfg_reset() argument
683 bna_rxf_ucast_cfg_reset(rxf, BNA_SOFT_CLEANUP); in bna_rxf_cfg_reset()
684 bna_rxf_mcast_cfg_reset(rxf, BNA_SOFT_CLEANUP); in bna_rxf_cfg_reset()
685 bna_rxf_promisc_cfg_reset(rxf, BNA_SOFT_CLEANUP); in bna_rxf_cfg_reset()
686 bna_rxf_allmulti_cfg_reset(rxf, BNA_SOFT_CLEANUP); in bna_rxf_cfg_reset()
687 bna_rxf_vlan_cfg_soft_reset(rxf); in bna_rxf_cfg_reset()
688 bna_rxf_rss_cfg_soft_reset(rxf); in bna_rxf_cfg_reset()
692 bna_rit_init(struct bna_rxf *rxf, int rit_size) in bna_rit_init() argument
694 struct bna_rx *rx = rxf->rx; in bna_rit_init()
699 rxf->rit_size = rit_size; in bna_rit_init()
702 rxf->rit[offset] = rxp->cq.ccb->id; in bna_rit_init()
709 bna_bfi_rxf_cfg_rsp(struct bna_rxf *rxf, struct bfi_msgq_mhdr *msghdr) in bna_bfi_rxf_cfg_rsp() argument
711 bfa_fsm_send_event(rxf, RXF_E_FW_RESP); in bna_bfi_rxf_cfg_rsp()
715 bna_bfi_rxf_ucast_set_rsp(struct bna_rxf *rxf, in bna_bfi_rxf_ucast_set_rsp() argument
723 rxf->ucast_active_set = 0; in bna_bfi_rxf_ucast_set_rsp()
726 bfa_fsm_send_event(rxf, RXF_E_FW_RESP); in bna_bfi_rxf_ucast_set_rsp()
730 bna_bfi_rxf_mcast_add_rsp(struct bna_rxf *rxf, in bna_bfi_rxf_mcast_add_rsp() argument
734 &rxf->bfi_enet_cmd.mcast_add_req; in bna_bfi_rxf_mcast_add_rsp()
738 bna_rxf_mchandle_attach(rxf, (u8 *)&req->mac_addr, in bna_bfi_rxf_mcast_add_rsp()
740 bfa_fsm_send_event(rxf, RXF_E_FW_RESP); in bna_bfi_rxf_mcast_add_rsp()
744 bna_rxf_init(struct bna_rxf *rxf, in bna_rxf_init() argument
749 rxf->rx = rx; in bna_rxf_init()
751 INIT_LIST_HEAD(&rxf->ucast_pending_add_q); in bna_rxf_init()
752 INIT_LIST_HEAD(&rxf->ucast_pending_del_q); in bna_rxf_init()
753 rxf->ucast_pending_set = 0; in bna_rxf_init()
754 rxf->ucast_active_set = 0; in bna_rxf_init()
755 INIT_LIST_HEAD(&rxf->ucast_active_q); in bna_rxf_init()
756 rxf->ucast_pending_mac = NULL; in bna_rxf_init()
758 INIT_LIST_HEAD(&rxf->mcast_pending_add_q); in bna_rxf_init()
759 INIT_LIST_HEAD(&rxf->mcast_pending_del_q); in bna_rxf_init()
760 INIT_LIST_HEAD(&rxf->mcast_active_q); in bna_rxf_init()
761 INIT_LIST_HEAD(&rxf->mcast_handle_q); in bna_rxf_init()
764 rxf->flags |= BNA_RXF_F_PAUSED; in bna_rxf_init()
766 rxf->rit = (u8 *) in bna_rxf_init()
768 bna_rit_init(rxf, q_config->num_paths); in bna_rxf_init()
770 rxf->rss_status = q_config->rss_status; in bna_rxf_init()
771 if (rxf->rss_status == BNA_STATUS_T_ENABLED) { in bna_rxf_init()
772 rxf->rss_cfg = q_config->rss_config; in bna_rxf_init()
773 rxf->rss_pending |= BNA_RSS_F_CFG_PENDING; in bna_rxf_init()
774 rxf->rss_pending |= BNA_RSS_F_RIT_PENDING; in bna_rxf_init()
775 rxf->rss_pending |= BNA_RSS_F_STATUS_PENDING; in bna_rxf_init()
778 rxf->vlan_filter_status = BNA_STATUS_T_DISABLED; in bna_rxf_init()
779 memset(rxf->vlan_filter_table, 0, in bna_rxf_init()
781 rxf->vlan_filter_table[0] |= 1; /* for pure priority tagged frames */ in bna_rxf_init()
782 rxf->vlan_pending_bitmask = (u8)BFI_VLAN_BMASK_ALL; in bna_rxf_init()
784 rxf->vlan_strip_status = q_config->vlan_strip_status; in bna_rxf_init()
786 bfa_fsm_set_state(rxf, bna_rxf_sm_stopped); in bna_rxf_init()
790 bna_rxf_uninit(struct bna_rxf *rxf) in bna_rxf_uninit() argument
794 rxf->ucast_pending_set = 0; in bna_rxf_uninit()
795 rxf->ucast_active_set = 0; in bna_rxf_uninit()
797 while (!list_empty(&rxf->ucast_pending_add_q)) { in bna_rxf_uninit()
798 bfa_q_deq(&rxf->ucast_pending_add_q, &mac); in bna_rxf_uninit()
800 bna_cam_mod_mac_put(bna_ucam_mod_free_q(rxf->rx->bna), mac); in bna_rxf_uninit()
803 if (rxf->ucast_pending_mac) { in bna_rxf_uninit()
804 bfa_q_qe_init(&rxf->ucast_pending_mac->qe); in bna_rxf_uninit()
805 bna_cam_mod_mac_put(bna_ucam_mod_free_q(rxf->rx->bna), in bna_rxf_uninit()
806 rxf->ucast_pending_mac); in bna_rxf_uninit()
807 rxf->ucast_pending_mac = NULL; in bna_rxf_uninit()
810 while (!list_empty(&rxf->mcast_pending_add_q)) { in bna_rxf_uninit()
811 bfa_q_deq(&rxf->mcast_pending_add_q, &mac); in bna_rxf_uninit()
813 bna_cam_mod_mac_put(bna_mcam_mod_free_q(rxf->rx->bna), mac); in bna_rxf_uninit()
816 rxf->rxmode_pending = 0; in bna_rxf_uninit()
817 rxf->rxmode_pending_bitmask = 0; in bna_rxf_uninit()
818 if (rxf->rx->bna->promisc_rid == rxf->rx->rid) in bna_rxf_uninit()
819 rxf->rx->bna->promisc_rid = BFI_INVALID_RID; in bna_rxf_uninit()
820 if (rxf->rx->bna->default_mode_rid == rxf->rx->rid) in bna_rxf_uninit()
821 rxf->rx->bna->default_mode_rid = BFI_INVALID_RID; in bna_rxf_uninit()
823 rxf->rss_pending = 0; in bna_rxf_uninit()
824 rxf->vlan_strip_pending = false; in bna_rxf_uninit()
826 rxf->flags = 0; in bna_rxf_uninit()
828 rxf->rx = NULL; in bna_rxf_uninit()
838 bna_rxf_start(struct bna_rxf *rxf) in bna_rxf_start() argument
840 rxf->start_cbfn = bna_rx_cb_rxf_started; in bna_rxf_start()
841 rxf->start_cbarg = rxf->rx; in bna_rxf_start()
842 bfa_fsm_send_event(rxf, RXF_E_START); in bna_rxf_start()
852 bna_rxf_stop(struct bna_rxf *rxf) in bna_rxf_stop() argument
854 rxf->stop_cbfn = bna_rx_cb_rxf_stopped; in bna_rxf_stop()
855 rxf->stop_cbarg = rxf->rx; in bna_rxf_stop()
856 bfa_fsm_send_event(rxf, RXF_E_STOP); in bna_rxf_stop()
860 bna_rxf_fail(struct bna_rxf *rxf) in bna_rxf_fail() argument
862 bfa_fsm_send_event(rxf, RXF_E_FAIL); in bna_rxf_fail()
869 struct bna_rxf *rxf = &rx->rxf; in bna_rx_ucast_set() local
871 if (rxf->ucast_pending_mac == NULL) { in bna_rx_ucast_set()
872 rxf->ucast_pending_mac = in bna_rx_ucast_set()
873 bna_cam_mod_mac_get(bna_ucam_mod_free_q(rxf->rx->bna)); in bna_rx_ucast_set()
874 if (rxf->ucast_pending_mac == NULL) in bna_rx_ucast_set()
876 bfa_q_qe_init(&rxf->ucast_pending_mac->qe); in bna_rx_ucast_set()
879 memcpy(rxf->ucast_pending_mac->addr, ucmac, ETH_ALEN); in bna_rx_ucast_set()
880 rxf->ucast_pending_set = 1; in bna_rx_ucast_set()
881 rxf->cam_fltr_cbfn = cbfn; in bna_rx_ucast_set()
882 rxf->cam_fltr_cbarg = rx->bna->bnad; in bna_rx_ucast_set()
884 bfa_fsm_send_event(rxf, RXF_E_CONFIG); in bna_rx_ucast_set()
893 struct bna_rxf *rxf = &rx->rxf; in bna_rx_mcast_add() local
897 if (bna_mac_find(&rxf->mcast_active_q, addr) || in bna_rx_mcast_add()
898 bna_mac_find(&rxf->mcast_pending_add_q, addr)) { in bna_rx_mcast_add()
904 mac = bna_cam_mod_mac_get(bna_mcam_mod_free_q(rxf->rx->bna)); in bna_rx_mcast_add()
909 list_add_tail(&mac->qe, &rxf->mcast_pending_add_q); in bna_rx_mcast_add()
911 rxf->cam_fltr_cbfn = cbfn; in bna_rx_mcast_add()
912 rxf->cam_fltr_cbarg = rx->bna->bnad; in bna_rx_mcast_add()
914 bfa_fsm_send_event(rxf, RXF_E_CONFIG); in bna_rx_mcast_add()
924 struct bna_rxf *rxf = &rx->rxf; in bna_rx_ucast_listset() local
932 while (!list_empty(&rxf->ucast_pending_add_q)) { in bna_rx_ucast_listset()
933 bfa_q_deq(&rxf->ucast_pending_add_q, &qe); in bna_rx_ucast_listset()
940 while (!list_empty(&rxf->ucast_active_q)) { in bna_rx_ucast_listset()
941 bfa_q_deq(&rxf->ucast_active_q, &qe); in bna_rx_ucast_listset()
947 list_add_tail(&del_mac->qe, &rxf->ucast_pending_del_q); in bna_rx_ucast_listset()
968 list_add_tail(&mac->qe, &rxf->ucast_pending_add_q); in bna_rx_ucast_listset()
971 rxf->cam_fltr_cbfn = cbfn; in bna_rx_ucast_listset()
972 rxf->cam_fltr_cbarg = rx->bna->bnad; in bna_rx_ucast_listset()
973 bfa_fsm_send_event(rxf, RXF_E_CONFIG); in bna_rx_ucast_listset()
993 struct bna_rxf *rxf = &rx->rxf; in bna_rx_mcast_listset() local
1001 while (!list_empty(&rxf->mcast_pending_add_q)) { in bna_rx_mcast_listset()
1002 bfa_q_deq(&rxf->mcast_pending_add_q, &qe); in bna_rx_mcast_listset()
1009 while (!list_empty(&rxf->mcast_active_q)) { in bna_rx_mcast_listset()
1010 bfa_q_deq(&rxf->mcast_active_q, &qe); in bna_rx_mcast_listset()
1017 list_add_tail(&del_mac->qe, &rxf->mcast_pending_del_q); in bna_rx_mcast_listset()
1040 list_add_tail(&mac->qe, &rxf->mcast_pending_add_q); in bna_rx_mcast_listset()
1043 rxf->cam_fltr_cbfn = cbfn; in bna_rx_mcast_listset()
1044 rxf->cam_fltr_cbarg = rx->bna->bnad; in bna_rx_mcast_listset()
1045 bfa_fsm_send_event(rxf, RXF_E_CONFIG); in bna_rx_mcast_listset()
1064 struct bna_rxf *rxf = &rx->rxf; in bna_rx_mcast_delall() local
1070 while (!list_empty(&rxf->mcast_pending_add_q)) { in bna_rx_mcast_delall()
1071 bfa_q_deq(&rxf->mcast_pending_add_q, &qe); in bna_rx_mcast_delall()
1074 bna_cam_mod_mac_put(bna_mcam_mod_free_q(rxf->rx->bna), mac); in bna_rx_mcast_delall()
1078 while (!list_empty(&rxf->mcast_active_q)) { in bna_rx_mcast_delall()
1079 bfa_q_deq(&rxf->mcast_active_q, &qe); in bna_rx_mcast_delall()
1083 del_mac = bna_cam_mod_mac_get(bna_mcam_mod_del_q(rxf->rx->bna)); in bna_rx_mcast_delall()
1086 list_add_tail(&del_mac->qe, &rxf->mcast_pending_del_q); in bna_rx_mcast_delall()
1088 bna_cam_mod_mac_put(bna_mcam_mod_free_q(rxf->rx->bna), mac); in bna_rx_mcast_delall()
1093 rxf->cam_fltr_cbfn = cbfn; in bna_rx_mcast_delall()
1094 rxf->cam_fltr_cbarg = rx->bna->bnad; in bna_rx_mcast_delall()
1095 bfa_fsm_send_event(rxf, RXF_E_CONFIG); in bna_rx_mcast_delall()
1106 struct bna_rxf *rxf = &rx->rxf; in bna_rx_vlan_add() local
1111 rxf->vlan_filter_table[index] |= bit; in bna_rx_vlan_add()
1112 if (rxf->vlan_filter_status == BNA_STATUS_T_ENABLED) { in bna_rx_vlan_add()
1113 rxf->vlan_pending_bitmask |= (1 << group_id); in bna_rx_vlan_add()
1114 bfa_fsm_send_event(rxf, RXF_E_CONFIG); in bna_rx_vlan_add()
1121 struct bna_rxf *rxf = &rx->rxf; in bna_rx_vlan_del() local
1126 rxf->vlan_filter_table[index] &= ~bit; in bna_rx_vlan_del()
1127 if (rxf->vlan_filter_status == BNA_STATUS_T_ENABLED) { in bna_rx_vlan_del()
1128 rxf->vlan_pending_bitmask |= (1 << group_id); in bna_rx_vlan_del()
1129 bfa_fsm_send_event(rxf, RXF_E_CONFIG); in bna_rx_vlan_del()
1134 bna_rxf_ucast_cfg_apply(struct bna_rxf *rxf) in bna_rxf_ucast_cfg_apply() argument
1140 if (!list_empty(&rxf->ucast_pending_del_q)) { in bna_rxf_ucast_cfg_apply()
1141 bfa_q_deq(&rxf->ucast_pending_del_q, &qe); in bna_rxf_ucast_cfg_apply()
1144 bna_bfi_ucast_req(rxf, mac, BFI_ENET_H2I_MAC_UCAST_DEL_REQ); in bna_rxf_ucast_cfg_apply()
1145 bna_cam_mod_mac_put(bna_ucam_mod_del_q(rxf->rx->bna), mac); in bna_rxf_ucast_cfg_apply()
1150 if (rxf->ucast_pending_set) { in bna_rxf_ucast_cfg_apply()
1151 rxf->ucast_pending_set = 0; in bna_rxf_ucast_cfg_apply()
1152 memcpy(rxf->ucast_active_mac.addr, in bna_rxf_ucast_cfg_apply()
1153 rxf->ucast_pending_mac->addr, ETH_ALEN); in bna_rxf_ucast_cfg_apply()
1154 rxf->ucast_active_set = 1; in bna_rxf_ucast_cfg_apply()
1155 bna_bfi_ucast_req(rxf, &rxf->ucast_active_mac, in bna_rxf_ucast_cfg_apply()
1161 if (!list_empty(&rxf->ucast_pending_add_q)) { in bna_rxf_ucast_cfg_apply()
1162 bfa_q_deq(&rxf->ucast_pending_add_q, &qe); in bna_rxf_ucast_cfg_apply()
1165 list_add_tail(&mac->qe, &rxf->ucast_active_q); in bna_rxf_ucast_cfg_apply()
1166 bna_bfi_ucast_req(rxf, mac, BFI_ENET_H2I_MAC_UCAST_ADD_REQ); in bna_rxf_ucast_cfg_apply()
1174 bna_rxf_ucast_cfg_reset(struct bna_rxf *rxf, enum bna_cleanup_type cleanup) in bna_rxf_ucast_cfg_reset() argument
1180 while (!list_empty(&rxf->ucast_pending_del_q)) { in bna_rxf_ucast_cfg_reset()
1181 bfa_q_deq(&rxf->ucast_pending_del_q, &qe); in bna_rxf_ucast_cfg_reset()
1185 bna_cam_mod_mac_put(bna_ucam_mod_del_q(rxf->rx->bna), in bna_rxf_ucast_cfg_reset()
1188 bna_bfi_ucast_req(rxf, mac, in bna_rxf_ucast_cfg_reset()
1190 bna_cam_mod_mac_put(bna_ucam_mod_del_q(rxf->rx->bna), in bna_rxf_ucast_cfg_reset()
1197 while (!list_empty(&rxf->ucast_active_q)) { in bna_rxf_ucast_cfg_reset()
1198 bfa_q_deq(&rxf->ucast_active_q, &qe); in bna_rxf_ucast_cfg_reset()
1200 list_add_tail(qe, &rxf->ucast_pending_add_q); in bna_rxf_ucast_cfg_reset()
1203 bna_bfi_ucast_req(rxf, mac, in bna_rxf_ucast_cfg_reset()
1209 if (rxf->ucast_active_set) { in bna_rxf_ucast_cfg_reset()
1210 rxf->ucast_pending_set = 1; in bna_rxf_ucast_cfg_reset()
1211 rxf->ucast_active_set = 0; in bna_rxf_ucast_cfg_reset()
1213 bna_bfi_ucast_req(rxf, &rxf->ucast_active_mac, in bna_rxf_ucast_cfg_reset()
1223 bna_rxf_promisc_cfg_apply(struct bna_rxf *rxf) in bna_rxf_promisc_cfg_apply() argument
1225 struct bna *bna = rxf->rx->bna; in bna_rxf_promisc_cfg_apply()
1228 if (is_promisc_enable(rxf->rxmode_pending, in bna_rxf_promisc_cfg_apply()
1229 rxf->rxmode_pending_bitmask)) { in bna_rxf_promisc_cfg_apply()
1231 promisc_inactive(rxf->rxmode_pending, in bna_rxf_promisc_cfg_apply()
1232 rxf->rxmode_pending_bitmask); in bna_rxf_promisc_cfg_apply()
1233 rxf->rxmode_active |= BNA_RXMODE_PROMISC; in bna_rxf_promisc_cfg_apply()
1234 bna_bfi_rx_promisc_req(rxf, BNA_STATUS_T_ENABLED); in bna_rxf_promisc_cfg_apply()
1236 } else if (is_promisc_disable(rxf->rxmode_pending, in bna_rxf_promisc_cfg_apply()
1237 rxf->rxmode_pending_bitmask)) { in bna_rxf_promisc_cfg_apply()
1239 promisc_inactive(rxf->rxmode_pending, in bna_rxf_promisc_cfg_apply()
1240 rxf->rxmode_pending_bitmask); in bna_rxf_promisc_cfg_apply()
1241 rxf->rxmode_active &= ~BNA_RXMODE_PROMISC; in bna_rxf_promisc_cfg_apply()
1243 bna_bfi_rx_promisc_req(rxf, BNA_STATUS_T_DISABLED); in bna_rxf_promisc_cfg_apply()
1251 bna_rxf_promisc_cfg_reset(struct bna_rxf *rxf, enum bna_cleanup_type cleanup) in bna_rxf_promisc_cfg_reset() argument
1253 struct bna *bna = rxf->rx->bna; in bna_rxf_promisc_cfg_reset()
1256 if (is_promisc_disable(rxf->rxmode_pending, in bna_rxf_promisc_cfg_reset()
1257 rxf->rxmode_pending_bitmask)) { in bna_rxf_promisc_cfg_reset()
1258 promisc_inactive(rxf->rxmode_pending, in bna_rxf_promisc_cfg_reset()
1259 rxf->rxmode_pending_bitmask); in bna_rxf_promisc_cfg_reset()
1260 rxf->rxmode_active &= ~BNA_RXMODE_PROMISC; in bna_rxf_promisc_cfg_reset()
1263 bna_bfi_rx_promisc_req(rxf, BNA_STATUS_T_DISABLED); in bna_rxf_promisc_cfg_reset()
1269 if (rxf->rxmode_active & BNA_RXMODE_PROMISC) { in bna_rxf_promisc_cfg_reset()
1270 promisc_enable(rxf->rxmode_pending, in bna_rxf_promisc_cfg_reset()
1271 rxf->rxmode_pending_bitmask); in bna_rxf_promisc_cfg_reset()
1272 rxf->rxmode_active &= ~BNA_RXMODE_PROMISC; in bna_rxf_promisc_cfg_reset()
1274 bna_bfi_rx_promisc_req(rxf, BNA_STATUS_T_DISABLED); in bna_rxf_promisc_cfg_reset()
1283 bna_rxf_allmulti_cfg_apply(struct bna_rxf *rxf) in bna_rxf_allmulti_cfg_apply() argument
1286 if (is_allmulti_enable(rxf->rxmode_pending, in bna_rxf_allmulti_cfg_apply()
1287 rxf->rxmode_pending_bitmask)) { in bna_rxf_allmulti_cfg_apply()
1289 allmulti_inactive(rxf->rxmode_pending, in bna_rxf_allmulti_cfg_apply()
1290 rxf->rxmode_pending_bitmask); in bna_rxf_allmulti_cfg_apply()
1291 rxf->rxmode_active |= BNA_RXMODE_ALLMULTI; in bna_rxf_allmulti_cfg_apply()
1292 bna_bfi_mcast_filter_req(rxf, BNA_STATUS_T_DISABLED); in bna_rxf_allmulti_cfg_apply()
1294 } else if (is_allmulti_disable(rxf->rxmode_pending, in bna_rxf_allmulti_cfg_apply()
1295 rxf->rxmode_pending_bitmask)) { in bna_rxf_allmulti_cfg_apply()
1297 allmulti_inactive(rxf->rxmode_pending, in bna_rxf_allmulti_cfg_apply()
1298 rxf->rxmode_pending_bitmask); in bna_rxf_allmulti_cfg_apply()
1299 rxf->rxmode_active &= ~BNA_RXMODE_ALLMULTI; in bna_rxf_allmulti_cfg_apply()
1300 bna_bfi_mcast_filter_req(rxf, BNA_STATUS_T_ENABLED); in bna_rxf_allmulti_cfg_apply()
1308 bna_rxf_allmulti_cfg_reset(struct bna_rxf *rxf, enum bna_cleanup_type cleanup) in bna_rxf_allmulti_cfg_reset() argument
1311 if (is_allmulti_disable(rxf->rxmode_pending, in bna_rxf_allmulti_cfg_reset()
1312 rxf->rxmode_pending_bitmask)) { in bna_rxf_allmulti_cfg_reset()
1313 allmulti_inactive(rxf->rxmode_pending, in bna_rxf_allmulti_cfg_reset()
1314 rxf->rxmode_pending_bitmask); in bna_rxf_allmulti_cfg_reset()
1315 rxf->rxmode_active &= ~BNA_RXMODE_ALLMULTI; in bna_rxf_allmulti_cfg_reset()
1317 bna_bfi_mcast_filter_req(rxf, BNA_STATUS_T_ENABLED); in bna_rxf_allmulti_cfg_reset()
1323 if (rxf->rxmode_active & BNA_RXMODE_ALLMULTI) { in bna_rxf_allmulti_cfg_reset()
1324 allmulti_enable(rxf->rxmode_pending, in bna_rxf_allmulti_cfg_reset()
1325 rxf->rxmode_pending_bitmask); in bna_rxf_allmulti_cfg_reset()
1326 rxf->rxmode_active &= ~BNA_RXMODE_ALLMULTI; in bna_rxf_allmulti_cfg_reset()
1328 bna_bfi_mcast_filter_req(rxf, BNA_STATUS_T_ENABLED); in bna_rxf_allmulti_cfg_reset()
1337 bna_rxf_promisc_enable(struct bna_rxf *rxf) in bna_rxf_promisc_enable() argument
1339 struct bna *bna = rxf->rx->bna; in bna_rxf_promisc_enable()
1342 if (is_promisc_enable(rxf->rxmode_pending, in bna_rxf_promisc_enable()
1343 rxf->rxmode_pending_bitmask) || in bna_rxf_promisc_enable()
1344 (rxf->rxmode_active & BNA_RXMODE_PROMISC)) { in bna_rxf_promisc_enable()
1346 } else if (is_promisc_disable(rxf->rxmode_pending, in bna_rxf_promisc_enable()
1347 rxf->rxmode_pending_bitmask)) { in bna_rxf_promisc_enable()
1349 promisc_inactive(rxf->rxmode_pending, in bna_rxf_promisc_enable()
1350 rxf->rxmode_pending_bitmask); in bna_rxf_promisc_enable()
1353 promisc_enable(rxf->rxmode_pending, in bna_rxf_promisc_enable()
1354 rxf->rxmode_pending_bitmask); in bna_rxf_promisc_enable()
1355 bna->promisc_rid = rxf->rx->rid; in bna_rxf_promisc_enable()
1363 bna_rxf_promisc_disable(struct bna_rxf *rxf) in bna_rxf_promisc_disable() argument
1365 struct bna *bna = rxf->rx->bna; in bna_rxf_promisc_disable()
1368 if (is_promisc_disable(rxf->rxmode_pending, in bna_rxf_promisc_disable()
1369 rxf->rxmode_pending_bitmask) || in bna_rxf_promisc_disable()
1370 (!(rxf->rxmode_active & BNA_RXMODE_PROMISC))) { in bna_rxf_promisc_disable()
1372 } else if (is_promisc_enable(rxf->rxmode_pending, in bna_rxf_promisc_disable()
1373 rxf->rxmode_pending_bitmask)) { in bna_rxf_promisc_disable()
1375 promisc_inactive(rxf->rxmode_pending, in bna_rxf_promisc_disable()
1376 rxf->rxmode_pending_bitmask); in bna_rxf_promisc_disable()
1378 } else if (rxf->rxmode_active & BNA_RXMODE_PROMISC) { in bna_rxf_promisc_disable()
1380 promisc_disable(rxf->rxmode_pending, in bna_rxf_promisc_disable()
1381 rxf->rxmode_pending_bitmask); in bna_rxf_promisc_disable()
1389 bna_rxf_allmulti_enable(struct bna_rxf *rxf) in bna_rxf_allmulti_enable() argument
1393 if (is_allmulti_enable(rxf->rxmode_pending, in bna_rxf_allmulti_enable()
1394 rxf->rxmode_pending_bitmask) || in bna_rxf_allmulti_enable()
1395 (rxf->rxmode_active & BNA_RXMODE_ALLMULTI)) { in bna_rxf_allmulti_enable()
1397 } else if (is_allmulti_disable(rxf->rxmode_pending, in bna_rxf_allmulti_enable()
1398 rxf->rxmode_pending_bitmask)) { in bna_rxf_allmulti_enable()
1400 allmulti_inactive(rxf->rxmode_pending, in bna_rxf_allmulti_enable()
1401 rxf->rxmode_pending_bitmask); in bna_rxf_allmulti_enable()
1404 allmulti_enable(rxf->rxmode_pending, in bna_rxf_allmulti_enable()
1405 rxf->rxmode_pending_bitmask); in bna_rxf_allmulti_enable()
1413 bna_rxf_allmulti_disable(struct bna_rxf *rxf) in bna_rxf_allmulti_disable() argument
1417 if (is_allmulti_disable(rxf->rxmode_pending, in bna_rxf_allmulti_disable()
1418 rxf->rxmode_pending_bitmask) || in bna_rxf_allmulti_disable()
1419 (!(rxf->rxmode_active & BNA_RXMODE_ALLMULTI))) { in bna_rxf_allmulti_disable()
1421 } else if (is_allmulti_enable(rxf->rxmode_pending, in bna_rxf_allmulti_disable()
1422 rxf->rxmode_pending_bitmask)) { in bna_rxf_allmulti_disable()
1424 allmulti_inactive(rxf->rxmode_pending, in bna_rxf_allmulti_disable()
1425 rxf->rxmode_pending_bitmask); in bna_rxf_allmulti_disable()
1426 } else if (rxf->rxmode_active & BNA_RXMODE_ALLMULTI) { in bna_rxf_allmulti_disable()
1428 allmulti_disable(rxf->rxmode_pending, in bna_rxf_allmulti_disable()
1429 rxf->rxmode_pending_bitmask); in bna_rxf_allmulti_disable()
1437 bna_rxf_vlan_strip_cfg_apply(struct bna_rxf *rxf) in bna_rxf_vlan_strip_cfg_apply() argument
1439 if (rxf->vlan_strip_pending) { in bna_rxf_vlan_strip_cfg_apply()
1440 rxf->vlan_strip_pending = false; in bna_rxf_vlan_strip_cfg_apply()
1441 bna_bfi_vlan_strip_enable(rxf); in bna_rxf_vlan_strip_cfg_apply()
1594 bna_rxf_start(&rx->rxf); in bna_rx_sm_rxf_start_wait_entry()
1608 bna_rxf_fail(&rx->rxf); in bna_rx_sm_rxf_stop_wait()
1614 bna_rxf_stop(&rx->rxf); in bna_rx_sm_rxf_stop_wait()
1676 bna_rxf_stop(&rx->rxf); in bna_rx_sm_started()
1682 bna_rxf_fail(&rx->rxf); in bna_rx_sm_started()
1703 bna_rxf_fail(&rx->rxf); in bna_rx_sm_rxf_start_wait()
1899 cfg_req->rx_cfg.strip_vlan = rx->rxf.vlan_strip_status; in bna_bfi_rx_enet_start()
2724 bna_rxf_init(&rx->rxf, rx, rx_cfg, res_info); in bna_rx_create()
2742 bna_rxf_uninit(&rx->rxf); in bna_rx_destroy()
2824 struct bna_rxf *rxf = &rx->rxf; in bna_rx_vlan_strip_enable() local
2826 if (rxf->vlan_strip_status == BNA_STATUS_T_DISABLED) { in bna_rx_vlan_strip_enable()
2827 rxf->vlan_strip_status = BNA_STATUS_T_ENABLED; in bna_rx_vlan_strip_enable()
2828 rxf->vlan_strip_pending = true; in bna_rx_vlan_strip_enable()
2829 bfa_fsm_send_event(rxf, RXF_E_CONFIG); in bna_rx_vlan_strip_enable()
2836 struct bna_rxf *rxf = &rx->rxf; in bna_rx_vlan_strip_disable() local
2838 if (rxf->vlan_strip_status != BNA_STATUS_T_DISABLED) { in bna_rx_vlan_strip_disable()
2839 rxf->vlan_strip_status = BNA_STATUS_T_DISABLED; in bna_rx_vlan_strip_disable()
2840 rxf->vlan_strip_pending = true; in bna_rx_vlan_strip_disable()
2841 bfa_fsm_send_event(rxf, RXF_E_CONFIG); in bna_rx_vlan_strip_disable()
2850 struct bna_rxf *rxf = &rx->rxf; in bna_rx_mode_set() local
2858 (rx->bna->promisc_rid != rxf->rx->rid)) in bna_rx_mode_set()
2873 (rx->bna->default_mode_rid != rxf->rx->rid)) { in bna_rx_mode_set()
2885 if (bna_rxf_promisc_enable(rxf)) in bna_rx_mode_set()
2888 if (bna_rxf_promisc_disable(rxf)) in bna_rx_mode_set()
2893 if (bna_rxf_allmulti_enable(rxf)) in bna_rx_mode_set()
2896 if (bna_rxf_allmulti_disable(rxf)) in bna_rx_mode_set()
2903 rxf->cam_fltr_cbfn = cbfn; in bna_rx_mode_set()
2904 rxf->cam_fltr_cbarg = rx->bna->bnad; in bna_rx_mode_set()
2905 bfa_fsm_send_event(rxf, RXF_E_CONFIG); in bna_rx_mode_set()
2918 struct bna_rxf *rxf = &rx->rxf; in bna_rx_vlanfilter_enable() local
2920 if (rxf->vlan_filter_status == BNA_STATUS_T_DISABLED) { in bna_rx_vlanfilter_enable()
2921 rxf->vlan_filter_status = BNA_STATUS_T_ENABLED; in bna_rx_vlanfilter_enable()
2922 rxf->vlan_pending_bitmask = (u8)BFI_VLAN_BMASK_ALL; in bna_rx_vlanfilter_enable()
2923 bfa_fsm_send_event(rxf, RXF_E_CONFIG); in bna_rx_vlanfilter_enable()