• Home
  • Raw
  • Download

Lines Matching refs:rxf

32 #define bna_rxf_vlan_cfg_soft_reset(rxf)				\  argument
34 (rxf)->vlan_pending_bitmask = (u8)BFI_VLAN_BMASK_ALL; \
35 (rxf)->vlan_strip_pending = true; \
38 #define bna_rxf_rss_cfg_soft_reset(rxf) \ argument
40 if ((rxf)->rss_status == BNA_STATUS_T_ENABLED) \
41 (rxf)->rss_pending = (BNA_RSS_F_RIT_PENDING | \
46 static int bna_rxf_cfg_apply(struct bna_rxf *rxf);
47 static void bna_rxf_cfg_reset(struct bna_rxf *rxf);
48 static int bna_rxf_fltr_clear(struct bna_rxf *rxf);
49 static int bna_rxf_ucast_cfg_apply(struct bna_rxf *rxf);
50 static int bna_rxf_promisc_cfg_apply(struct bna_rxf *rxf);
51 static int bna_rxf_allmulti_cfg_apply(struct bna_rxf *rxf);
52 static int bna_rxf_vlan_strip_cfg_apply(struct bna_rxf *rxf);
53 static int bna_rxf_ucast_cfg_reset(struct bna_rxf *rxf,
55 static int bna_rxf_promisc_cfg_reset(struct bna_rxf *rxf,
57 static int bna_rxf_allmulti_cfg_reset(struct bna_rxf *rxf,
74 bna_rxf_sm_stopped_entry(struct bna_rxf *rxf) in bna_rxf_sm_stopped_entry() argument
76 call_rxf_stop_cbfn(rxf); in bna_rxf_sm_stopped_entry()
80 bna_rxf_sm_stopped(struct bna_rxf *rxf, enum bna_rxf_event event) in bna_rxf_sm_stopped() argument
84 if (rxf->flags & BNA_RXF_F_PAUSED) { in bna_rxf_sm_stopped()
85 bfa_fsm_set_state(rxf, bna_rxf_sm_paused); in bna_rxf_sm_stopped()
86 call_rxf_start_cbfn(rxf); in bna_rxf_sm_stopped()
88 bfa_fsm_set_state(rxf, bna_rxf_sm_cfg_wait); in bna_rxf_sm_stopped()
92 call_rxf_stop_cbfn(rxf); in bna_rxf_sm_stopped()
100 call_rxf_cam_fltr_cbfn(rxf); in bna_rxf_sm_stopped()
104 rxf->flags |= BNA_RXF_F_PAUSED; in bna_rxf_sm_stopped()
105 call_rxf_pause_cbfn(rxf); in bna_rxf_sm_stopped()
109 rxf->flags &= ~BNA_RXF_F_PAUSED; in bna_rxf_sm_stopped()
110 call_rxf_resume_cbfn(rxf); in bna_rxf_sm_stopped()
119 bna_rxf_sm_paused_entry(struct bna_rxf *rxf) in bna_rxf_sm_paused_entry() argument
121 call_rxf_pause_cbfn(rxf); in bna_rxf_sm_paused_entry()
125 bna_rxf_sm_paused(struct bna_rxf *rxf, enum bna_rxf_event event) in bna_rxf_sm_paused() argument
130 bfa_fsm_set_state(rxf, bna_rxf_sm_stopped); in bna_rxf_sm_paused()
134 call_rxf_cam_fltr_cbfn(rxf); in bna_rxf_sm_paused()
138 rxf->flags &= ~BNA_RXF_F_PAUSED; in bna_rxf_sm_paused()
139 bfa_fsm_set_state(rxf, bna_rxf_sm_cfg_wait); in bna_rxf_sm_paused()
148 bna_rxf_sm_cfg_wait_entry(struct bna_rxf *rxf) in bna_rxf_sm_cfg_wait_entry() argument
150 if (!bna_rxf_cfg_apply(rxf)) { in bna_rxf_sm_cfg_wait_entry()
152 bfa_fsm_set_state(rxf, bna_rxf_sm_started); in bna_rxf_sm_cfg_wait_entry()
157 bna_rxf_sm_cfg_wait(struct bna_rxf *rxf, enum bna_rxf_event event) in bna_rxf_sm_cfg_wait() argument
161 bfa_fsm_set_state(rxf, bna_rxf_sm_last_resp_wait); in bna_rxf_sm_cfg_wait()
165 bna_rxf_cfg_reset(rxf); in bna_rxf_sm_cfg_wait()
166 call_rxf_start_cbfn(rxf); in bna_rxf_sm_cfg_wait()
167 call_rxf_cam_fltr_cbfn(rxf); in bna_rxf_sm_cfg_wait()
168 call_rxf_resume_cbfn(rxf); in bna_rxf_sm_cfg_wait()
169 bfa_fsm_set_state(rxf, bna_rxf_sm_stopped); in bna_rxf_sm_cfg_wait()
177 rxf->flags |= BNA_RXF_F_PAUSED; in bna_rxf_sm_cfg_wait()
178 call_rxf_start_cbfn(rxf); in bna_rxf_sm_cfg_wait()
179 bfa_fsm_set_state(rxf, bna_rxf_sm_fltr_clr_wait); in bna_rxf_sm_cfg_wait()
183 if (!bna_rxf_cfg_apply(rxf)) { in bna_rxf_sm_cfg_wait()
185 bfa_fsm_set_state(rxf, bna_rxf_sm_started); in bna_rxf_sm_cfg_wait()
195 bna_rxf_sm_started_entry(struct bna_rxf *rxf) in bna_rxf_sm_started_entry() argument
197 call_rxf_start_cbfn(rxf); in bna_rxf_sm_started_entry()
198 call_rxf_cam_fltr_cbfn(rxf); in bna_rxf_sm_started_entry()
199 call_rxf_resume_cbfn(rxf); in bna_rxf_sm_started_entry()
203 bna_rxf_sm_started(struct bna_rxf *rxf, enum bna_rxf_event event) in bna_rxf_sm_started() argument
208 bna_rxf_cfg_reset(rxf); in bna_rxf_sm_started()
209 bfa_fsm_set_state(rxf, bna_rxf_sm_stopped); in bna_rxf_sm_started()
213 bfa_fsm_set_state(rxf, bna_rxf_sm_cfg_wait); in bna_rxf_sm_started()
217 rxf->flags |= BNA_RXF_F_PAUSED; in bna_rxf_sm_started()
218 if (!bna_rxf_fltr_clear(rxf)) in bna_rxf_sm_started()
219 bfa_fsm_set_state(rxf, bna_rxf_sm_paused); in bna_rxf_sm_started()
221 bfa_fsm_set_state(rxf, bna_rxf_sm_fltr_clr_wait); in bna_rxf_sm_started()
230 bna_rxf_sm_fltr_clr_wait_entry(struct bna_rxf *rxf) in bna_rxf_sm_fltr_clr_wait_entry() argument
235 bna_rxf_sm_fltr_clr_wait(struct bna_rxf *rxf, enum bna_rxf_event event) in bna_rxf_sm_fltr_clr_wait() argument
239 bna_rxf_cfg_reset(rxf); in bna_rxf_sm_fltr_clr_wait()
240 call_rxf_pause_cbfn(rxf); in bna_rxf_sm_fltr_clr_wait()
241 bfa_fsm_set_state(rxf, bna_rxf_sm_stopped); in bna_rxf_sm_fltr_clr_wait()
245 if (!bna_rxf_fltr_clear(rxf)) { in bna_rxf_sm_fltr_clr_wait()
247 bfa_fsm_set_state(rxf, bna_rxf_sm_paused); in bna_rxf_sm_fltr_clr_wait()
257 bna_rxf_sm_last_resp_wait_entry(struct bna_rxf *rxf) in bna_rxf_sm_last_resp_wait_entry() argument
262 bna_rxf_sm_last_resp_wait(struct bna_rxf *rxf, enum bna_rxf_event event) in bna_rxf_sm_last_resp_wait() argument
267 bna_rxf_cfg_reset(rxf); in bna_rxf_sm_last_resp_wait()
268 bfa_fsm_set_state(rxf, bna_rxf_sm_stopped); in bna_rxf_sm_last_resp_wait()
277 bna_bfi_ucast_req(struct bna_rxf *rxf, struct bna_mac *mac, in bna_bfi_ucast_req() argument
280 struct bfi_enet_ucast_req *req = &rxf->bfi_enet_cmd.ucast_req; in bna_bfi_ucast_req()
282 bfi_msgq_mhdr_set(req->mh, BFI_MC_ENET, req_type, 0, rxf->rx->rid); in bna_bfi_ucast_req()
286 bfa_msgq_cmd_set(&rxf->msgq_cmd, NULL, NULL, in bna_bfi_ucast_req()
288 bfa_msgq_cmd_post(&rxf->rx->bna->msgq, &rxf->msgq_cmd); in bna_bfi_ucast_req()
292 bna_bfi_mcast_add_req(struct bna_rxf *rxf, struct bna_mac *mac) in bna_bfi_mcast_add_req() argument
295 &rxf->bfi_enet_cmd.mcast_add_req; in bna_bfi_mcast_add_req()
298 0, rxf->rx->rid); in bna_bfi_mcast_add_req()
302 bfa_msgq_cmd_set(&rxf->msgq_cmd, NULL, NULL, in bna_bfi_mcast_add_req()
304 bfa_msgq_cmd_post(&rxf->rx->bna->msgq, &rxf->msgq_cmd); in bna_bfi_mcast_add_req()
308 bna_bfi_mcast_del_req(struct bna_rxf *rxf, u16 handle) in bna_bfi_mcast_del_req() argument
311 &rxf->bfi_enet_cmd.mcast_del_req; in bna_bfi_mcast_del_req()
314 0, rxf->rx->rid); in bna_bfi_mcast_del_req()
318 bfa_msgq_cmd_set(&rxf->msgq_cmd, NULL, NULL, in bna_bfi_mcast_del_req()
320 bfa_msgq_cmd_post(&rxf->rx->bna->msgq, &rxf->msgq_cmd); in bna_bfi_mcast_del_req()
324 bna_bfi_mcast_filter_req(struct bna_rxf *rxf, enum bna_status status) in bna_bfi_mcast_filter_req() argument
326 struct bfi_enet_enable_req *req = &rxf->bfi_enet_cmd.req; in bna_bfi_mcast_filter_req()
329 BFI_ENET_H2I_MAC_MCAST_FILTER_REQ, 0, rxf->rx->rid); in bna_bfi_mcast_filter_req()
333 bfa_msgq_cmd_set(&rxf->msgq_cmd, NULL, NULL, in bna_bfi_mcast_filter_req()
335 bfa_msgq_cmd_post(&rxf->rx->bna->msgq, &rxf->msgq_cmd); in bna_bfi_mcast_filter_req()
339 bna_bfi_rx_promisc_req(struct bna_rxf *rxf, enum bna_status status) in bna_bfi_rx_promisc_req() argument
341 struct bfi_enet_enable_req *req = &rxf->bfi_enet_cmd.req; in bna_bfi_rx_promisc_req()
344 BFI_ENET_H2I_RX_PROMISCUOUS_REQ, 0, rxf->rx->rid); in bna_bfi_rx_promisc_req()
348 bfa_msgq_cmd_set(&rxf->msgq_cmd, NULL, NULL, in bna_bfi_rx_promisc_req()
350 bfa_msgq_cmd_post(&rxf->rx->bna->msgq, &rxf->msgq_cmd); in bna_bfi_rx_promisc_req()
354 bna_bfi_rx_vlan_filter_set(struct bna_rxf *rxf, u8 block_idx) in bna_bfi_rx_vlan_filter_set() argument
356 struct bfi_enet_rx_vlan_req *req = &rxf->bfi_enet_cmd.vlan_req; in bna_bfi_rx_vlan_filter_set()
361 BFI_ENET_H2I_RX_VLAN_SET_REQ, 0, rxf->rx->rid); in bna_bfi_rx_vlan_filter_set()
367 if (rxf->vlan_filter_status == BNA_STATUS_T_ENABLED) in bna_bfi_rx_vlan_filter_set()
369 htonl(rxf->vlan_filter_table[j]); in bna_bfi_rx_vlan_filter_set()
373 bfa_msgq_cmd_set(&rxf->msgq_cmd, NULL, NULL, in bna_bfi_rx_vlan_filter_set()
375 bfa_msgq_cmd_post(&rxf->rx->bna->msgq, &rxf->msgq_cmd); in bna_bfi_rx_vlan_filter_set()
379 bna_bfi_vlan_strip_enable(struct bna_rxf *rxf) in bna_bfi_vlan_strip_enable() argument
381 struct bfi_enet_enable_req *req = &rxf->bfi_enet_cmd.req; in bna_bfi_vlan_strip_enable()
384 BFI_ENET_H2I_RX_VLAN_STRIP_ENABLE_REQ, 0, rxf->rx->rid); in bna_bfi_vlan_strip_enable()
387 req->enable = rxf->vlan_strip_status; in bna_bfi_vlan_strip_enable()
388 bfa_msgq_cmd_set(&rxf->msgq_cmd, NULL, NULL, in bna_bfi_vlan_strip_enable()
390 bfa_msgq_cmd_post(&rxf->rx->bna->msgq, &rxf->msgq_cmd); in bna_bfi_vlan_strip_enable()
394 bna_bfi_rit_cfg(struct bna_rxf *rxf) in bna_bfi_rit_cfg() argument
396 struct bfi_enet_rit_req *req = &rxf->bfi_enet_cmd.rit_req; in bna_bfi_rit_cfg()
399 BFI_ENET_H2I_RIT_CFG_REQ, 0, rxf->rx->rid); in bna_bfi_rit_cfg()
402 req->size = htons(rxf->rit_size); in bna_bfi_rit_cfg()
403 memcpy(&req->table[0], rxf->rit, rxf->rit_size); in bna_bfi_rit_cfg()
404 bfa_msgq_cmd_set(&rxf->msgq_cmd, NULL, NULL, in bna_bfi_rit_cfg()
406 bfa_msgq_cmd_post(&rxf->rx->bna->msgq, &rxf->msgq_cmd); in bna_bfi_rit_cfg()
410 bna_bfi_rss_cfg(struct bna_rxf *rxf) in bna_bfi_rss_cfg() argument
412 struct bfi_enet_rss_cfg_req *req = &rxf->bfi_enet_cmd.rss_req; in bna_bfi_rss_cfg()
416 BFI_ENET_H2I_RSS_CFG_REQ, 0, rxf->rx->rid); in bna_bfi_rss_cfg()
419 req->cfg.type = rxf->rss_cfg.hash_type; in bna_bfi_rss_cfg()
420 req->cfg.mask = rxf->rss_cfg.hash_mask; in bna_bfi_rss_cfg()
423 htonl(rxf->rss_cfg.toeplitz_hash_key[i]); in bna_bfi_rss_cfg()
424 bfa_msgq_cmd_set(&rxf->msgq_cmd, NULL, NULL, in bna_bfi_rss_cfg()
426 bfa_msgq_cmd_post(&rxf->rx->bna->msgq, &rxf->msgq_cmd); in bna_bfi_rss_cfg()
430 bna_bfi_rss_enable(struct bna_rxf *rxf) in bna_bfi_rss_enable() argument
432 struct bfi_enet_enable_req *req = &rxf->bfi_enet_cmd.req; in bna_bfi_rss_enable()
435 BFI_ENET_H2I_RSS_ENABLE_REQ, 0, rxf->rx->rid); in bna_bfi_rss_enable()
438 req->enable = rxf->rss_status; in bna_bfi_rss_enable()
439 bfa_msgq_cmd_set(&rxf->msgq_cmd, NULL, NULL, in bna_bfi_rss_enable()
441 bfa_msgq_cmd_post(&rxf->rx->bna->msgq, &rxf->msgq_cmd); in bna_bfi_rss_enable()
446 bna_rxf_mcmac_get(struct bna_rxf *rxf, u8 *mac_addr) in bna_rxf_mcmac_get() argument
451 list_for_each(qe, &rxf->mcast_active_q) { in bna_rxf_mcmac_get()
457 list_for_each(qe, &rxf->mcast_pending_del_q) { in bna_rxf_mcmac_get()
467 bna_rxf_mchandle_get(struct bna_rxf *rxf, int handle) in bna_rxf_mchandle_get() argument
472 list_for_each(qe, &rxf->mcast_handle_q) { in bna_rxf_mchandle_get()
482 bna_rxf_mchandle_attach(struct bna_rxf *rxf, u8 *mac_addr, int handle) in bna_rxf_mchandle_attach() argument
487 mcmac = bna_rxf_mcmac_get(rxf, mac_addr); in bna_rxf_mchandle_attach()
488 mchandle = bna_rxf_mchandle_get(rxf, handle); in bna_rxf_mchandle_attach()
490 mchandle = bna_mcam_mod_handle_get(&rxf->rx->bna->mcam_mod); in bna_rxf_mchandle_attach()
493 list_add_tail(&mchandle->qe, &rxf->mcast_handle_q); in bna_rxf_mchandle_attach()
500 bna_rxf_mcast_del(struct bna_rxf *rxf, struct bna_mac *mac, in bna_rxf_mcast_del() argument
513 bna_bfi_mcast_del_req(rxf, mchandle->handle); in bna_rxf_mcast_del()
518 bna_mcam_mod_handle_put(&rxf->rx->bna->mcam_mod, mchandle); in bna_rxf_mcast_del()
526 bna_rxf_mcast_cfg_apply(struct bna_rxf *rxf) in bna_rxf_mcast_cfg_apply() argument
533 while (!list_empty(&rxf->mcast_pending_del_q)) { in bna_rxf_mcast_cfg_apply()
534 bfa_q_deq(&rxf->mcast_pending_del_q, &qe); in bna_rxf_mcast_cfg_apply()
537 ret = bna_rxf_mcast_del(rxf, mac, BNA_HARD_CLEANUP); in bna_rxf_mcast_cfg_apply()
538 bna_cam_mod_mac_put(bna_mcam_mod_del_q(rxf->rx->bna), mac); in bna_rxf_mcast_cfg_apply()
544 if (!list_empty(&rxf->mcast_pending_add_q)) { in bna_rxf_mcast_cfg_apply()
545 bfa_q_deq(&rxf->mcast_pending_add_q, &qe); in bna_rxf_mcast_cfg_apply()
548 list_add_tail(&mac->qe, &rxf->mcast_active_q); in bna_rxf_mcast_cfg_apply()
549 bna_bfi_mcast_add_req(rxf, mac); in bna_rxf_mcast_cfg_apply()
557 bna_rxf_vlan_cfg_apply(struct bna_rxf *rxf) in bna_rxf_vlan_cfg_apply() argument
562 if (rxf->vlan_pending_bitmask) { in bna_rxf_vlan_cfg_apply()
563 vlan_pending_bitmask = rxf->vlan_pending_bitmask; in bna_rxf_vlan_cfg_apply()
568 rxf->vlan_pending_bitmask &= ~(1 << block_idx); in bna_rxf_vlan_cfg_apply()
569 bna_bfi_rx_vlan_filter_set(rxf, block_idx); in bna_rxf_vlan_cfg_apply()
577 bna_rxf_mcast_cfg_reset(struct bna_rxf *rxf, enum bna_cleanup_type cleanup) in bna_rxf_mcast_cfg_reset() argument
584 while (!list_empty(&rxf->mcast_pending_del_q)) { in bna_rxf_mcast_cfg_reset()
585 bfa_q_deq(&rxf->mcast_pending_del_q, &qe); in bna_rxf_mcast_cfg_reset()
588 ret = bna_rxf_mcast_del(rxf, mac, cleanup); in bna_rxf_mcast_cfg_reset()
589 bna_cam_mod_mac_put(bna_mcam_mod_del_q(rxf->rx->bna), mac); in bna_rxf_mcast_cfg_reset()
595 while (!list_empty(&rxf->mcast_active_q)) { in bna_rxf_mcast_cfg_reset()
596 bfa_q_deq(&rxf->mcast_active_q, &qe); in bna_rxf_mcast_cfg_reset()
598 list_add_tail(qe, &rxf->mcast_pending_add_q); in bna_rxf_mcast_cfg_reset()
600 if (bna_rxf_mcast_del(rxf, mac, cleanup)) in bna_rxf_mcast_cfg_reset()
608 bna_rxf_rss_cfg_apply(struct bna_rxf *rxf) in bna_rxf_rss_cfg_apply() argument
610 if (rxf->rss_pending) { in bna_rxf_rss_cfg_apply()
611 if (rxf->rss_pending & BNA_RSS_F_RIT_PENDING) { in bna_rxf_rss_cfg_apply()
612 rxf->rss_pending &= ~BNA_RSS_F_RIT_PENDING; in bna_rxf_rss_cfg_apply()
613 bna_bfi_rit_cfg(rxf); in bna_rxf_rss_cfg_apply()
617 if (rxf->rss_pending & BNA_RSS_F_CFG_PENDING) { in bna_rxf_rss_cfg_apply()
618 rxf->rss_pending &= ~BNA_RSS_F_CFG_PENDING; in bna_rxf_rss_cfg_apply()
619 bna_bfi_rss_cfg(rxf); in bna_rxf_rss_cfg_apply()
623 if (rxf->rss_pending & BNA_RSS_F_STATUS_PENDING) { in bna_rxf_rss_cfg_apply()
624 rxf->rss_pending &= ~BNA_RSS_F_STATUS_PENDING; in bna_rxf_rss_cfg_apply()
625 bna_bfi_rss_enable(rxf); in bna_rxf_rss_cfg_apply()
634 bna_rxf_cfg_apply(struct bna_rxf *rxf) in bna_rxf_cfg_apply() argument
636 if (bna_rxf_ucast_cfg_apply(rxf)) in bna_rxf_cfg_apply()
639 if (bna_rxf_mcast_cfg_apply(rxf)) in bna_rxf_cfg_apply()
642 if (bna_rxf_promisc_cfg_apply(rxf)) in bna_rxf_cfg_apply()
645 if (bna_rxf_allmulti_cfg_apply(rxf)) in bna_rxf_cfg_apply()
648 if (bna_rxf_vlan_cfg_apply(rxf)) in bna_rxf_cfg_apply()
651 if (bna_rxf_vlan_strip_cfg_apply(rxf)) in bna_rxf_cfg_apply()
654 if (bna_rxf_rss_cfg_apply(rxf)) in bna_rxf_cfg_apply()
662 bna_rxf_fltr_clear(struct bna_rxf *rxf) in bna_rxf_fltr_clear() argument
664 if (bna_rxf_ucast_cfg_reset(rxf, BNA_HARD_CLEANUP)) in bna_rxf_fltr_clear()
667 if (bna_rxf_mcast_cfg_reset(rxf, BNA_HARD_CLEANUP)) in bna_rxf_fltr_clear()
670 if (bna_rxf_promisc_cfg_reset(rxf, BNA_HARD_CLEANUP)) in bna_rxf_fltr_clear()
673 if (bna_rxf_allmulti_cfg_reset(rxf, BNA_HARD_CLEANUP)) in bna_rxf_fltr_clear()
680 bna_rxf_cfg_reset(struct bna_rxf *rxf) in bna_rxf_cfg_reset() argument
682 bna_rxf_ucast_cfg_reset(rxf, BNA_SOFT_CLEANUP); in bna_rxf_cfg_reset()
683 bna_rxf_mcast_cfg_reset(rxf, BNA_SOFT_CLEANUP); in bna_rxf_cfg_reset()
684 bna_rxf_promisc_cfg_reset(rxf, BNA_SOFT_CLEANUP); in bna_rxf_cfg_reset()
685 bna_rxf_allmulti_cfg_reset(rxf, BNA_SOFT_CLEANUP); in bna_rxf_cfg_reset()
686 bna_rxf_vlan_cfg_soft_reset(rxf); in bna_rxf_cfg_reset()
687 bna_rxf_rss_cfg_soft_reset(rxf); in bna_rxf_cfg_reset()
691 bna_rit_init(struct bna_rxf *rxf, int rit_size) in bna_rit_init() argument
693 struct bna_rx *rx = rxf->rx; in bna_rit_init()
698 rxf->rit_size = rit_size; in bna_rit_init()
701 rxf->rit[offset] = rxp->cq.ccb->id; in bna_rit_init()
708 bna_bfi_rxf_cfg_rsp(struct bna_rxf *rxf, struct bfi_msgq_mhdr *msghdr) in bna_bfi_rxf_cfg_rsp() argument
710 bfa_fsm_send_event(rxf, RXF_E_FW_RESP); in bna_bfi_rxf_cfg_rsp()
714 bna_bfi_rxf_ucast_set_rsp(struct bna_rxf *rxf, in bna_bfi_rxf_ucast_set_rsp() argument
722 rxf->ucast_active_set = 0; in bna_bfi_rxf_ucast_set_rsp()
725 bfa_fsm_send_event(rxf, RXF_E_FW_RESP); in bna_bfi_rxf_ucast_set_rsp()
729 bna_bfi_rxf_mcast_add_rsp(struct bna_rxf *rxf, in bna_bfi_rxf_mcast_add_rsp() argument
733 &rxf->bfi_enet_cmd.mcast_add_req; in bna_bfi_rxf_mcast_add_rsp()
737 bna_rxf_mchandle_attach(rxf, (u8 *)&req->mac_addr, in bna_bfi_rxf_mcast_add_rsp()
739 bfa_fsm_send_event(rxf, RXF_E_FW_RESP); in bna_bfi_rxf_mcast_add_rsp()
743 bna_rxf_init(struct bna_rxf *rxf, in bna_rxf_init() argument
748 rxf->rx = rx; in bna_rxf_init()
750 INIT_LIST_HEAD(&rxf->ucast_pending_add_q); in bna_rxf_init()
751 INIT_LIST_HEAD(&rxf->ucast_pending_del_q); in bna_rxf_init()
752 rxf->ucast_pending_set = 0; in bna_rxf_init()
753 rxf->ucast_active_set = 0; in bna_rxf_init()
754 INIT_LIST_HEAD(&rxf->ucast_active_q); in bna_rxf_init()
755 rxf->ucast_pending_mac = NULL; in bna_rxf_init()
757 INIT_LIST_HEAD(&rxf->mcast_pending_add_q); in bna_rxf_init()
758 INIT_LIST_HEAD(&rxf->mcast_pending_del_q); in bna_rxf_init()
759 INIT_LIST_HEAD(&rxf->mcast_active_q); in bna_rxf_init()
760 INIT_LIST_HEAD(&rxf->mcast_handle_q); in bna_rxf_init()
763 rxf->flags |= BNA_RXF_F_PAUSED; in bna_rxf_init()
765 rxf->rit = (u8 *) in bna_rxf_init()
767 bna_rit_init(rxf, q_config->num_paths); in bna_rxf_init()
769 rxf->rss_status = q_config->rss_status; in bna_rxf_init()
770 if (rxf->rss_status == BNA_STATUS_T_ENABLED) { in bna_rxf_init()
771 rxf->rss_cfg = q_config->rss_config; in bna_rxf_init()
772 rxf->rss_pending |= BNA_RSS_F_CFG_PENDING; in bna_rxf_init()
773 rxf->rss_pending |= BNA_RSS_F_RIT_PENDING; in bna_rxf_init()
774 rxf->rss_pending |= BNA_RSS_F_STATUS_PENDING; in bna_rxf_init()
777 rxf->vlan_filter_status = BNA_STATUS_T_DISABLED; in bna_rxf_init()
778 memset(rxf->vlan_filter_table, 0, in bna_rxf_init()
780 rxf->vlan_filter_table[0] |= 1; /* for pure priority tagged frames */ in bna_rxf_init()
781 rxf->vlan_pending_bitmask = (u8)BFI_VLAN_BMASK_ALL; in bna_rxf_init()
783 rxf->vlan_strip_status = q_config->vlan_strip_status; in bna_rxf_init()
785 bfa_fsm_set_state(rxf, bna_rxf_sm_stopped); in bna_rxf_init()
789 bna_rxf_uninit(struct bna_rxf *rxf) in bna_rxf_uninit() argument
793 rxf->ucast_pending_set = 0; in bna_rxf_uninit()
794 rxf->ucast_active_set = 0; in bna_rxf_uninit()
796 while (!list_empty(&rxf->ucast_pending_add_q)) { in bna_rxf_uninit()
797 bfa_q_deq(&rxf->ucast_pending_add_q, &mac); in bna_rxf_uninit()
799 bna_cam_mod_mac_put(bna_ucam_mod_free_q(rxf->rx->bna), mac); in bna_rxf_uninit()
802 if (rxf->ucast_pending_mac) { in bna_rxf_uninit()
803 bfa_q_qe_init(&rxf->ucast_pending_mac->qe); in bna_rxf_uninit()
804 bna_cam_mod_mac_put(bna_ucam_mod_free_q(rxf->rx->bna), in bna_rxf_uninit()
805 rxf->ucast_pending_mac); in bna_rxf_uninit()
806 rxf->ucast_pending_mac = NULL; in bna_rxf_uninit()
809 while (!list_empty(&rxf->mcast_pending_add_q)) { in bna_rxf_uninit()
810 bfa_q_deq(&rxf->mcast_pending_add_q, &mac); in bna_rxf_uninit()
812 bna_cam_mod_mac_put(bna_mcam_mod_free_q(rxf->rx->bna), mac); in bna_rxf_uninit()
815 rxf->rxmode_pending = 0; in bna_rxf_uninit()
816 rxf->rxmode_pending_bitmask = 0; in bna_rxf_uninit()
817 if (rxf->rx->bna->promisc_rid == rxf->rx->rid) in bna_rxf_uninit()
818 rxf->rx->bna->promisc_rid = BFI_INVALID_RID; in bna_rxf_uninit()
819 if (rxf->rx->bna->default_mode_rid == rxf->rx->rid) in bna_rxf_uninit()
820 rxf->rx->bna->default_mode_rid = BFI_INVALID_RID; in bna_rxf_uninit()
822 rxf->rss_pending = 0; in bna_rxf_uninit()
823 rxf->vlan_strip_pending = false; in bna_rxf_uninit()
825 rxf->flags = 0; in bna_rxf_uninit()
827 rxf->rx = NULL; in bna_rxf_uninit()
837 bna_rxf_start(struct bna_rxf *rxf) in bna_rxf_start() argument
839 rxf->start_cbfn = bna_rx_cb_rxf_started; in bna_rxf_start()
840 rxf->start_cbarg = rxf->rx; in bna_rxf_start()
841 bfa_fsm_send_event(rxf, RXF_E_START); in bna_rxf_start()
851 bna_rxf_stop(struct bna_rxf *rxf) in bna_rxf_stop() argument
853 rxf->stop_cbfn = bna_rx_cb_rxf_stopped; in bna_rxf_stop()
854 rxf->stop_cbarg = rxf->rx; in bna_rxf_stop()
855 bfa_fsm_send_event(rxf, RXF_E_STOP); in bna_rxf_stop()
859 bna_rxf_fail(struct bna_rxf *rxf) in bna_rxf_fail() argument
861 bfa_fsm_send_event(rxf, RXF_E_FAIL); in bna_rxf_fail()
868 struct bna_rxf *rxf = &rx->rxf; in bna_rx_ucast_set() local
870 if (rxf->ucast_pending_mac == NULL) { in bna_rx_ucast_set()
871 rxf->ucast_pending_mac = in bna_rx_ucast_set()
872 bna_cam_mod_mac_get(bna_ucam_mod_free_q(rxf->rx->bna)); in bna_rx_ucast_set()
873 if (rxf->ucast_pending_mac == NULL) in bna_rx_ucast_set()
875 bfa_q_qe_init(&rxf->ucast_pending_mac->qe); in bna_rx_ucast_set()
878 memcpy(rxf->ucast_pending_mac->addr, ucmac, ETH_ALEN); in bna_rx_ucast_set()
879 rxf->ucast_pending_set = 1; in bna_rx_ucast_set()
880 rxf->cam_fltr_cbfn = cbfn; in bna_rx_ucast_set()
881 rxf->cam_fltr_cbarg = rx->bna->bnad; in bna_rx_ucast_set()
883 bfa_fsm_send_event(rxf, RXF_E_CONFIG); in bna_rx_ucast_set()
892 struct bna_rxf *rxf = &rx->rxf; in bna_rx_mcast_add() local
896 if (bna_mac_find(&rxf->mcast_active_q, addr) || in bna_rx_mcast_add()
897 bna_mac_find(&rxf->mcast_pending_add_q, addr)) { in bna_rx_mcast_add()
903 mac = bna_cam_mod_mac_get(bna_mcam_mod_free_q(rxf->rx->bna)); in bna_rx_mcast_add()
908 list_add_tail(&mac->qe, &rxf->mcast_pending_add_q); in bna_rx_mcast_add()
910 rxf->cam_fltr_cbfn = cbfn; in bna_rx_mcast_add()
911 rxf->cam_fltr_cbarg = rx->bna->bnad; in bna_rx_mcast_add()
913 bfa_fsm_send_event(rxf, RXF_E_CONFIG); in bna_rx_mcast_add()
923 struct bna_rxf *rxf = &rx->rxf; in bna_rx_ucast_listset() local
931 while (!list_empty(&rxf->ucast_pending_add_q)) { in bna_rx_ucast_listset()
932 bfa_q_deq(&rxf->ucast_pending_add_q, &qe); in bna_rx_ucast_listset()
939 while (!list_empty(&rxf->ucast_active_q)) { in bna_rx_ucast_listset()
940 bfa_q_deq(&rxf->ucast_active_q, &qe); in bna_rx_ucast_listset()
946 list_add_tail(&del_mac->qe, &rxf->ucast_pending_del_q); in bna_rx_ucast_listset()
967 list_add_tail(&mac->qe, &rxf->ucast_pending_add_q); in bna_rx_ucast_listset()
970 rxf->cam_fltr_cbfn = cbfn; in bna_rx_ucast_listset()
971 rxf->cam_fltr_cbarg = rx->bna->bnad; in bna_rx_ucast_listset()
972 bfa_fsm_send_event(rxf, RXF_E_CONFIG); in bna_rx_ucast_listset()
992 struct bna_rxf *rxf = &rx->rxf; in bna_rx_mcast_listset() local
1000 while (!list_empty(&rxf->mcast_pending_add_q)) { in bna_rx_mcast_listset()
1001 bfa_q_deq(&rxf->mcast_pending_add_q, &qe); in bna_rx_mcast_listset()
1008 while (!list_empty(&rxf->mcast_active_q)) { in bna_rx_mcast_listset()
1009 bfa_q_deq(&rxf->mcast_active_q, &qe); in bna_rx_mcast_listset()
1016 list_add_tail(&del_mac->qe, &rxf->mcast_pending_del_q); in bna_rx_mcast_listset()
1039 list_add_tail(&mac->qe, &rxf->mcast_pending_add_q); in bna_rx_mcast_listset()
1042 rxf->cam_fltr_cbfn = cbfn; in bna_rx_mcast_listset()
1043 rxf->cam_fltr_cbarg = rx->bna->bnad; in bna_rx_mcast_listset()
1044 bfa_fsm_send_event(rxf, RXF_E_CONFIG); in bna_rx_mcast_listset()
1063 struct bna_rxf *rxf = &rx->rxf; in bna_rx_mcast_delall() local
1069 while (!list_empty(&rxf->mcast_pending_add_q)) { in bna_rx_mcast_delall()
1070 bfa_q_deq(&rxf->mcast_pending_add_q, &qe); in bna_rx_mcast_delall()
1073 bna_cam_mod_mac_put(bna_mcam_mod_free_q(rxf->rx->bna), mac); in bna_rx_mcast_delall()
1077 while (!list_empty(&rxf->mcast_active_q)) { in bna_rx_mcast_delall()
1078 bfa_q_deq(&rxf->mcast_active_q, &qe); in bna_rx_mcast_delall()
1082 del_mac = bna_cam_mod_mac_get(bna_mcam_mod_del_q(rxf->rx->bna)); in bna_rx_mcast_delall()
1085 list_add_tail(&del_mac->qe, &rxf->mcast_pending_del_q); in bna_rx_mcast_delall()
1087 bna_cam_mod_mac_put(bna_mcam_mod_free_q(rxf->rx->bna), mac); in bna_rx_mcast_delall()
1092 rxf->cam_fltr_cbfn = cbfn; in bna_rx_mcast_delall()
1093 rxf->cam_fltr_cbarg = rx->bna->bnad; in bna_rx_mcast_delall()
1094 bfa_fsm_send_event(rxf, RXF_E_CONFIG); in bna_rx_mcast_delall()
1105 struct bna_rxf *rxf = &rx->rxf; in bna_rx_vlan_add() local
1110 rxf->vlan_filter_table[index] |= bit; in bna_rx_vlan_add()
1111 if (rxf->vlan_filter_status == BNA_STATUS_T_ENABLED) { in bna_rx_vlan_add()
1112 rxf->vlan_pending_bitmask |= (1 << group_id); in bna_rx_vlan_add()
1113 bfa_fsm_send_event(rxf, RXF_E_CONFIG); in bna_rx_vlan_add()
1120 struct bna_rxf *rxf = &rx->rxf; in bna_rx_vlan_del() local
1125 rxf->vlan_filter_table[index] &= ~bit; in bna_rx_vlan_del()
1126 if (rxf->vlan_filter_status == BNA_STATUS_T_ENABLED) { in bna_rx_vlan_del()
1127 rxf->vlan_pending_bitmask |= (1 << group_id); in bna_rx_vlan_del()
1128 bfa_fsm_send_event(rxf, RXF_E_CONFIG); in bna_rx_vlan_del()
1133 bna_rxf_ucast_cfg_apply(struct bna_rxf *rxf) in bna_rxf_ucast_cfg_apply() argument
1139 if (!list_empty(&rxf->ucast_pending_del_q)) { in bna_rxf_ucast_cfg_apply()
1140 bfa_q_deq(&rxf->ucast_pending_del_q, &qe); in bna_rxf_ucast_cfg_apply()
1143 bna_bfi_ucast_req(rxf, mac, BFI_ENET_H2I_MAC_UCAST_DEL_REQ); in bna_rxf_ucast_cfg_apply()
1144 bna_cam_mod_mac_put(bna_ucam_mod_del_q(rxf->rx->bna), mac); in bna_rxf_ucast_cfg_apply()
1149 if (rxf->ucast_pending_set) { in bna_rxf_ucast_cfg_apply()
1150 rxf->ucast_pending_set = 0; in bna_rxf_ucast_cfg_apply()
1151 memcpy(rxf->ucast_active_mac.addr, in bna_rxf_ucast_cfg_apply()
1152 rxf->ucast_pending_mac->addr, ETH_ALEN); in bna_rxf_ucast_cfg_apply()
1153 rxf->ucast_active_set = 1; in bna_rxf_ucast_cfg_apply()
1154 bna_bfi_ucast_req(rxf, &rxf->ucast_active_mac, in bna_rxf_ucast_cfg_apply()
1160 if (!list_empty(&rxf->ucast_pending_add_q)) { in bna_rxf_ucast_cfg_apply()
1161 bfa_q_deq(&rxf->ucast_pending_add_q, &qe); in bna_rxf_ucast_cfg_apply()
1164 list_add_tail(&mac->qe, &rxf->ucast_active_q); in bna_rxf_ucast_cfg_apply()
1165 bna_bfi_ucast_req(rxf, mac, BFI_ENET_H2I_MAC_UCAST_ADD_REQ); in bna_rxf_ucast_cfg_apply()
1173 bna_rxf_ucast_cfg_reset(struct bna_rxf *rxf, enum bna_cleanup_type cleanup) in bna_rxf_ucast_cfg_reset() argument
1179 while (!list_empty(&rxf->ucast_pending_del_q)) { in bna_rxf_ucast_cfg_reset()
1180 bfa_q_deq(&rxf->ucast_pending_del_q, &qe); in bna_rxf_ucast_cfg_reset()
1184 bna_cam_mod_mac_put(bna_ucam_mod_del_q(rxf->rx->bna), in bna_rxf_ucast_cfg_reset()
1187 bna_bfi_ucast_req(rxf, mac, in bna_rxf_ucast_cfg_reset()
1189 bna_cam_mod_mac_put(bna_ucam_mod_del_q(rxf->rx->bna), in bna_rxf_ucast_cfg_reset()
1196 while (!list_empty(&rxf->ucast_active_q)) { in bna_rxf_ucast_cfg_reset()
1197 bfa_q_deq(&rxf->ucast_active_q, &qe); in bna_rxf_ucast_cfg_reset()
1199 list_add_tail(qe, &rxf->ucast_pending_add_q); in bna_rxf_ucast_cfg_reset()
1202 bna_bfi_ucast_req(rxf, mac, in bna_rxf_ucast_cfg_reset()
1208 if (rxf->ucast_active_set) { in bna_rxf_ucast_cfg_reset()
1209 rxf->ucast_pending_set = 1; in bna_rxf_ucast_cfg_reset()
1210 rxf->ucast_active_set = 0; in bna_rxf_ucast_cfg_reset()
1212 bna_bfi_ucast_req(rxf, &rxf->ucast_active_mac, in bna_rxf_ucast_cfg_reset()
1222 bna_rxf_promisc_cfg_apply(struct bna_rxf *rxf) in bna_rxf_promisc_cfg_apply() argument
1224 struct bna *bna = rxf->rx->bna; in bna_rxf_promisc_cfg_apply()
1227 if (is_promisc_enable(rxf->rxmode_pending, in bna_rxf_promisc_cfg_apply()
1228 rxf->rxmode_pending_bitmask)) { in bna_rxf_promisc_cfg_apply()
1230 promisc_inactive(rxf->rxmode_pending, in bna_rxf_promisc_cfg_apply()
1231 rxf->rxmode_pending_bitmask); in bna_rxf_promisc_cfg_apply()
1232 rxf->rxmode_active |= BNA_RXMODE_PROMISC; in bna_rxf_promisc_cfg_apply()
1233 bna_bfi_rx_promisc_req(rxf, BNA_STATUS_T_ENABLED); in bna_rxf_promisc_cfg_apply()
1235 } else if (is_promisc_disable(rxf->rxmode_pending, in bna_rxf_promisc_cfg_apply()
1236 rxf->rxmode_pending_bitmask)) { in bna_rxf_promisc_cfg_apply()
1238 promisc_inactive(rxf->rxmode_pending, in bna_rxf_promisc_cfg_apply()
1239 rxf->rxmode_pending_bitmask); in bna_rxf_promisc_cfg_apply()
1240 rxf->rxmode_active &= ~BNA_RXMODE_PROMISC; in bna_rxf_promisc_cfg_apply()
1242 bna_bfi_rx_promisc_req(rxf, BNA_STATUS_T_DISABLED); in bna_rxf_promisc_cfg_apply()
1250 bna_rxf_promisc_cfg_reset(struct bna_rxf *rxf, enum bna_cleanup_type cleanup) in bna_rxf_promisc_cfg_reset() argument
1252 struct bna *bna = rxf->rx->bna; in bna_rxf_promisc_cfg_reset()
1255 if (is_promisc_disable(rxf->rxmode_pending, in bna_rxf_promisc_cfg_reset()
1256 rxf->rxmode_pending_bitmask)) { in bna_rxf_promisc_cfg_reset()
1257 promisc_inactive(rxf->rxmode_pending, in bna_rxf_promisc_cfg_reset()
1258 rxf->rxmode_pending_bitmask); in bna_rxf_promisc_cfg_reset()
1259 rxf->rxmode_active &= ~BNA_RXMODE_PROMISC; in bna_rxf_promisc_cfg_reset()
1262 bna_bfi_rx_promisc_req(rxf, BNA_STATUS_T_DISABLED); in bna_rxf_promisc_cfg_reset()
1268 if (rxf->rxmode_active & BNA_RXMODE_PROMISC) { in bna_rxf_promisc_cfg_reset()
1269 promisc_enable(rxf->rxmode_pending, in bna_rxf_promisc_cfg_reset()
1270 rxf->rxmode_pending_bitmask); in bna_rxf_promisc_cfg_reset()
1271 rxf->rxmode_active &= ~BNA_RXMODE_PROMISC; in bna_rxf_promisc_cfg_reset()
1273 bna_bfi_rx_promisc_req(rxf, BNA_STATUS_T_DISABLED); in bna_rxf_promisc_cfg_reset()
1282 bna_rxf_allmulti_cfg_apply(struct bna_rxf *rxf) in bna_rxf_allmulti_cfg_apply() argument
1285 if (is_allmulti_enable(rxf->rxmode_pending, in bna_rxf_allmulti_cfg_apply()
1286 rxf->rxmode_pending_bitmask)) { in bna_rxf_allmulti_cfg_apply()
1288 allmulti_inactive(rxf->rxmode_pending, in bna_rxf_allmulti_cfg_apply()
1289 rxf->rxmode_pending_bitmask); in bna_rxf_allmulti_cfg_apply()
1290 rxf->rxmode_active |= BNA_RXMODE_ALLMULTI; in bna_rxf_allmulti_cfg_apply()
1291 bna_bfi_mcast_filter_req(rxf, BNA_STATUS_T_DISABLED); in bna_rxf_allmulti_cfg_apply()
1293 } else if (is_allmulti_disable(rxf->rxmode_pending, in bna_rxf_allmulti_cfg_apply()
1294 rxf->rxmode_pending_bitmask)) { in bna_rxf_allmulti_cfg_apply()
1296 allmulti_inactive(rxf->rxmode_pending, in bna_rxf_allmulti_cfg_apply()
1297 rxf->rxmode_pending_bitmask); in bna_rxf_allmulti_cfg_apply()
1298 rxf->rxmode_active &= ~BNA_RXMODE_ALLMULTI; in bna_rxf_allmulti_cfg_apply()
1299 bna_bfi_mcast_filter_req(rxf, BNA_STATUS_T_ENABLED); in bna_rxf_allmulti_cfg_apply()
1307 bna_rxf_allmulti_cfg_reset(struct bna_rxf *rxf, enum bna_cleanup_type cleanup) in bna_rxf_allmulti_cfg_reset() argument
1310 if (is_allmulti_disable(rxf->rxmode_pending, in bna_rxf_allmulti_cfg_reset()
1311 rxf->rxmode_pending_bitmask)) { in bna_rxf_allmulti_cfg_reset()
1312 allmulti_inactive(rxf->rxmode_pending, in bna_rxf_allmulti_cfg_reset()
1313 rxf->rxmode_pending_bitmask); in bna_rxf_allmulti_cfg_reset()
1314 rxf->rxmode_active &= ~BNA_RXMODE_ALLMULTI; in bna_rxf_allmulti_cfg_reset()
1316 bna_bfi_mcast_filter_req(rxf, BNA_STATUS_T_ENABLED); in bna_rxf_allmulti_cfg_reset()
1322 if (rxf->rxmode_active & BNA_RXMODE_ALLMULTI) { in bna_rxf_allmulti_cfg_reset()
1323 allmulti_enable(rxf->rxmode_pending, in bna_rxf_allmulti_cfg_reset()
1324 rxf->rxmode_pending_bitmask); in bna_rxf_allmulti_cfg_reset()
1325 rxf->rxmode_active &= ~BNA_RXMODE_ALLMULTI; in bna_rxf_allmulti_cfg_reset()
1327 bna_bfi_mcast_filter_req(rxf, BNA_STATUS_T_ENABLED); in bna_rxf_allmulti_cfg_reset()
1336 bna_rxf_promisc_enable(struct bna_rxf *rxf) in bna_rxf_promisc_enable() argument
1338 struct bna *bna = rxf->rx->bna; in bna_rxf_promisc_enable()
1341 if (is_promisc_enable(rxf->rxmode_pending, in bna_rxf_promisc_enable()
1342 rxf->rxmode_pending_bitmask) || in bna_rxf_promisc_enable()
1343 (rxf->rxmode_active & BNA_RXMODE_PROMISC)) { in bna_rxf_promisc_enable()
1345 } else if (is_promisc_disable(rxf->rxmode_pending, in bna_rxf_promisc_enable()
1346 rxf->rxmode_pending_bitmask)) { in bna_rxf_promisc_enable()
1348 promisc_inactive(rxf->rxmode_pending, in bna_rxf_promisc_enable()
1349 rxf->rxmode_pending_bitmask); in bna_rxf_promisc_enable()
1352 promisc_enable(rxf->rxmode_pending, in bna_rxf_promisc_enable()
1353 rxf->rxmode_pending_bitmask); in bna_rxf_promisc_enable()
1354 bna->promisc_rid = rxf->rx->rid; in bna_rxf_promisc_enable()
1362 bna_rxf_promisc_disable(struct bna_rxf *rxf) in bna_rxf_promisc_disable() argument
1364 struct bna *bna = rxf->rx->bna; in bna_rxf_promisc_disable()
1367 if (is_promisc_disable(rxf->rxmode_pending, in bna_rxf_promisc_disable()
1368 rxf->rxmode_pending_bitmask) || in bna_rxf_promisc_disable()
1369 (!(rxf->rxmode_active & BNA_RXMODE_PROMISC))) { in bna_rxf_promisc_disable()
1371 } else if (is_promisc_enable(rxf->rxmode_pending, in bna_rxf_promisc_disable()
1372 rxf->rxmode_pending_bitmask)) { in bna_rxf_promisc_disable()
1374 promisc_inactive(rxf->rxmode_pending, in bna_rxf_promisc_disable()
1375 rxf->rxmode_pending_bitmask); in bna_rxf_promisc_disable()
1377 } else if (rxf->rxmode_active & BNA_RXMODE_PROMISC) { in bna_rxf_promisc_disable()
1379 promisc_disable(rxf->rxmode_pending, in bna_rxf_promisc_disable()
1380 rxf->rxmode_pending_bitmask); in bna_rxf_promisc_disable()
1388 bna_rxf_allmulti_enable(struct bna_rxf *rxf) in bna_rxf_allmulti_enable() argument
1392 if (is_allmulti_enable(rxf->rxmode_pending, in bna_rxf_allmulti_enable()
1393 rxf->rxmode_pending_bitmask) || in bna_rxf_allmulti_enable()
1394 (rxf->rxmode_active & BNA_RXMODE_ALLMULTI)) { in bna_rxf_allmulti_enable()
1396 } else if (is_allmulti_disable(rxf->rxmode_pending, in bna_rxf_allmulti_enable()
1397 rxf->rxmode_pending_bitmask)) { in bna_rxf_allmulti_enable()
1399 allmulti_inactive(rxf->rxmode_pending, in bna_rxf_allmulti_enable()
1400 rxf->rxmode_pending_bitmask); in bna_rxf_allmulti_enable()
1403 allmulti_enable(rxf->rxmode_pending, in bna_rxf_allmulti_enable()
1404 rxf->rxmode_pending_bitmask); in bna_rxf_allmulti_enable()
1412 bna_rxf_allmulti_disable(struct bna_rxf *rxf) in bna_rxf_allmulti_disable() argument
1416 if (is_allmulti_disable(rxf->rxmode_pending, in bna_rxf_allmulti_disable()
1417 rxf->rxmode_pending_bitmask) || in bna_rxf_allmulti_disable()
1418 (!(rxf->rxmode_active & BNA_RXMODE_ALLMULTI))) { in bna_rxf_allmulti_disable()
1420 } else if (is_allmulti_enable(rxf->rxmode_pending, in bna_rxf_allmulti_disable()
1421 rxf->rxmode_pending_bitmask)) { in bna_rxf_allmulti_disable()
1423 allmulti_inactive(rxf->rxmode_pending, in bna_rxf_allmulti_disable()
1424 rxf->rxmode_pending_bitmask); in bna_rxf_allmulti_disable()
1425 } else if (rxf->rxmode_active & BNA_RXMODE_ALLMULTI) { in bna_rxf_allmulti_disable()
1427 allmulti_disable(rxf->rxmode_pending, in bna_rxf_allmulti_disable()
1428 rxf->rxmode_pending_bitmask); in bna_rxf_allmulti_disable()
1436 bna_rxf_vlan_strip_cfg_apply(struct bna_rxf *rxf) in bna_rxf_vlan_strip_cfg_apply() argument
1438 if (rxf->vlan_strip_pending) { in bna_rxf_vlan_strip_cfg_apply()
1439 rxf->vlan_strip_pending = false; in bna_rxf_vlan_strip_cfg_apply()
1440 bna_bfi_vlan_strip_enable(rxf); in bna_rxf_vlan_strip_cfg_apply()
1593 bna_rxf_start(&rx->rxf); in bna_rx_sm_rxf_start_wait_entry()
1607 bna_rxf_fail(&rx->rxf); in bna_rx_sm_rxf_stop_wait()
1613 bna_rxf_stop(&rx->rxf); in bna_rx_sm_rxf_stop_wait()
1675 bna_rxf_stop(&rx->rxf); in bna_rx_sm_started()
1681 bna_rxf_fail(&rx->rxf); in bna_rx_sm_started()
1702 bna_rxf_fail(&rx->rxf); in bna_rx_sm_rxf_start_wait()
1898 cfg_req->rx_cfg.strip_vlan = rx->rxf.vlan_strip_status; in bna_bfi_rx_enet_start()
2723 bna_rxf_init(&rx->rxf, rx, rx_cfg, res_info); in bna_rx_create()
2741 bna_rxf_uninit(&rx->rxf); in bna_rx_destroy()
2823 struct bna_rxf *rxf = &rx->rxf; in bna_rx_vlan_strip_enable() local
2825 if (rxf->vlan_strip_status == BNA_STATUS_T_DISABLED) { in bna_rx_vlan_strip_enable()
2826 rxf->vlan_strip_status = BNA_STATUS_T_ENABLED; in bna_rx_vlan_strip_enable()
2827 rxf->vlan_strip_pending = true; in bna_rx_vlan_strip_enable()
2828 bfa_fsm_send_event(rxf, RXF_E_CONFIG); in bna_rx_vlan_strip_enable()
2835 struct bna_rxf *rxf = &rx->rxf; in bna_rx_vlan_strip_disable() local
2837 if (rxf->vlan_strip_status != BNA_STATUS_T_DISABLED) { in bna_rx_vlan_strip_disable()
2838 rxf->vlan_strip_status = BNA_STATUS_T_DISABLED; in bna_rx_vlan_strip_disable()
2839 rxf->vlan_strip_pending = true; in bna_rx_vlan_strip_disable()
2840 bfa_fsm_send_event(rxf, RXF_E_CONFIG); in bna_rx_vlan_strip_disable()
2849 struct bna_rxf *rxf = &rx->rxf; in bna_rx_mode_set() local
2857 (rx->bna->promisc_rid != rxf->rx->rid)) in bna_rx_mode_set()
2872 (rx->bna->default_mode_rid != rxf->rx->rid)) { in bna_rx_mode_set()
2884 if (bna_rxf_promisc_enable(rxf)) in bna_rx_mode_set()
2887 if (bna_rxf_promisc_disable(rxf)) in bna_rx_mode_set()
2892 if (bna_rxf_allmulti_enable(rxf)) in bna_rx_mode_set()
2895 if (bna_rxf_allmulti_disable(rxf)) in bna_rx_mode_set()
2902 rxf->cam_fltr_cbfn = cbfn; in bna_rx_mode_set()
2903 rxf->cam_fltr_cbarg = rx->bna->bnad; in bna_rx_mode_set()
2904 bfa_fsm_send_event(rxf, RXF_E_CONFIG); in bna_rx_mode_set()
2917 struct bna_rxf *rxf = &rx->rxf; in bna_rx_vlanfilter_enable() local
2919 if (rxf->vlan_filter_status == BNA_STATUS_T_DISABLED) { in bna_rx_vlanfilter_enable()
2920 rxf->vlan_filter_status = BNA_STATUS_T_ENABLED; in bna_rx_vlanfilter_enable()
2921 rxf->vlan_pending_bitmask = (u8)BFI_VLAN_BMASK_ALL; in bna_rx_vlanfilter_enable()
2922 bfa_fsm_send_event(rxf, RXF_E_CONFIG); in bna_rx_vlanfilter_enable()