Lines Matching +full:rx +full:- +full:mode
1 /* SPDX-License-Identifier: GPL-2.0-only */
3 * Linux network driver for QLogic BR-series Converged Network Adapter.
6 * Copyright (c) 2005-2014 Brocade Communications Systems, Inc.
7 * Copyright (c) 2014-2015 QLogic Corporation
26 * input : _addr-> os dma addr in host endian format,
27 * output : _bna_dma_addr-> pointer to hw dma addr
33 (_bna_dma_addr)->msb = ((struct bna_dma_addr *)&tmp_addr)->msb; \
34 (_bna_dma_addr)->lsb = ((struct bna_dma_addr *)&tmp_addr)->lsb; \
38 * input : _bna_dma_addr-> pointer to hw dma addr
39 * output : _addr-> os dma addr in host endian format
43 (_addr) = ((((u64)ntohl((_bna_dma_addr)->msb))) << 32) \
44 | ((ntohl((_bna_dma_addr)->lsb) & 0xffffffff)); \
50 ((_qe_idx) = ((_qe_idx) + (_qe_num)) & ((_q_depth) - 1))
55 (((_updated_idx) - (_old_idx)) & ((_q_depth) - 1))
58 (((_q_ptr)->consumer_index - (_q_ptr)->producer_index - 1) & \
59 ((_q_depth) - 1))
61 ((((_q_ptr)->producer_index - (_q_ptr)->consumer_index)) & \
62 (_q_depth - 1))
69 (_pkt)->large_pkt_cnt++; \
71 (_pkt)->small_pkt_cnt++; \
77 if ((rxf)->stop_cbfn) { \
80 cbfn = (rxf)->stop_cbfn; \
81 cbarg = (rxf)->stop_cbarg; \
82 (rxf)->stop_cbfn = NULL; \
83 (rxf)->stop_cbarg = NULL; \
90 if ((rxf)->start_cbfn) { \
93 cbfn = (rxf)->start_cbfn; \
94 cbarg = (rxf)->start_cbarg; \
95 (rxf)->start_cbfn = NULL; \
96 (rxf)->start_cbarg = NULL; \
103 if ((rxf)->cam_fltr_cbfn) { \
106 cbfn = (rxf)->cam_fltr_cbfn; \
107 cbarg = (rxf)->cam_fltr_cbarg; \
108 (rxf)->cam_fltr_cbfn = NULL; \
109 (rxf)->cam_fltr_cbarg = NULL; \
110 cbfn(cbarg, rxf->rx); \
114 #define is_xxx_enable(mode, bitmask, xxx) ((bitmask & xxx) && (mode & xxx)) argument
116 #define is_xxx_disable(mode, bitmask, xxx) ((bitmask & xxx) && !(mode & xxx)) argument
118 #define xxx_enable(mode, bitmask, xxx) \ argument
121 mode |= xxx; \
124 #define xxx_disable(mode, bitmask, xxx) \ argument
127 mode &= ~xxx; \
130 #define xxx_inactive(mode, bitmask, xxx) \ argument
133 mode &= ~xxx; \
136 #define is_promisc_enable(mode, bitmask) \ argument
137 is_xxx_enable(mode, bitmask, BNA_RXMODE_PROMISC)
139 #define is_promisc_disable(mode, bitmask) \ argument
140 is_xxx_disable(mode, bitmask, BNA_RXMODE_PROMISC)
142 #define promisc_enable(mode, bitmask) \ argument
143 xxx_enable(mode, bitmask, BNA_RXMODE_PROMISC)
145 #define promisc_disable(mode, bitmask) \ argument
146 xxx_disable(mode, bitmask, BNA_RXMODE_PROMISC)
148 #define promisc_inactive(mode, bitmask) \ argument
149 xxx_inactive(mode, bitmask, BNA_RXMODE_PROMISC)
151 #define is_default_enable(mode, bitmask) \ argument
152 is_xxx_enable(mode, bitmask, BNA_RXMODE_DEFAULT)
154 #define is_default_disable(mode, bitmask) \ argument
155 is_xxx_disable(mode, bitmask, BNA_RXMODE_DEFAULT)
157 #define default_enable(mode, bitmask) \ argument
158 xxx_enable(mode, bitmask, BNA_RXMODE_DEFAULT)
160 #define default_disable(mode, bitmask) \ argument
161 xxx_disable(mode, bitmask, BNA_RXMODE_DEFAULT)
163 #define default_inactive(mode, bitmask) \ argument
164 xxx_inactive(mode, bitmask, BNA_RXMODE_DEFAULT)
166 #define is_allmulti_enable(mode, bitmask) \ argument
167 is_xxx_enable(mode, bitmask, BNA_RXMODE_ALLMULTI)
169 #define is_allmulti_disable(mode, bitmask) \ argument
170 is_xxx_disable(mode, bitmask, BNA_RXMODE_ALLMULTI)
172 #define allmulti_enable(mode, bitmask) \ argument
173 xxx_enable(mode, bitmask, BNA_RXMODE_ALLMULTI)
175 #define allmulti_disable(mode, bitmask) \ argument
176 xxx_disable(mode, bitmask, BNA_RXMODE_ALLMULTI)
178 #define allmulti_inactive(mode, bitmask) \ argument
179 xxx_inactive(mode, bitmask, BNA_RXMODE_ALLMULTI)
182 switch ((rxp)->type) { \
184 (q0) = rxp->rxq.single.only; \
188 (q0) = rxp->rxq.slr.large; \
189 (q1) = rxp->rxq.slr.small; \
192 (q0) = rxp->rxq.hds.data; \
193 (q1) = rxp->rxq.hds.hdr; \
198 #define bna_tx_rid_mask(_bna) ((_bna)->tx_mod.rid_mask)
200 #define bna_rx_rid_mask(_bna) ((_bna)->rx_mod.rid_mask)
204 struct bna_tx_mod *__tx_mod = &(_bna)->tx_mod; \
207 list_for_each_entry(__tx, &__tx_mod->tx_active_q, qe) { \
208 if (__tx->rid == (_rid)) { \
217 struct bna_rx_mod *__rx_mod = &(_bna)->rx_mod; \
220 list_for_each_entry(__rx, &__rx_mod->rx_active_q, qe) { \
221 if (__rx->rid == (_rid)) { \
228 #define bna_mcam_mod_free_q(_bna) (&(_bna)->mcam_mod.free_q)
230 #define bna_mcam_mod_del_q(_bna) (&(_bna)->mcam_mod.del_q)
232 #define bna_ucam_mod_free_q(_bna) (&(_bna)->ucam_mod.free_q)
234 #define bna_ucam_mod_del_q(_bna) (&(_bna)->ucam_mod.del_q)
243 if (ether_addr_equal(mac->addr, addr)) in bna_mac_find()
248 #define bna_attr(_bna) (&(_bna)->ioceth.attr)
282 /* Callbacks for RX */
319 /* RX MODULE, RX, RXF */
322 void bna_bfi_rx_enet_start_rsp(struct bna_rx *rx,
324 void bna_bfi_rx_enet_stop_rsp(struct bna_rx *rx,
349 void bna_rx_destroy(struct bna_rx *rx);
350 void bna_rx_enable(struct bna_rx *rx);
351 void bna_rx_disable(struct bna_rx *rx, enum bna_cleanup_type type,
353 void bna_rx_cleanup_complete(struct bna_rx *rx);
354 void bna_rx_coalescing_timeo_set(struct bna_rx *rx, int coalescing_timeo);
357 enum bna_cb_status bna_rx_ucast_set(struct bna_rx *rx, const u8 *ucmac);
358 enum bna_cb_status bna_rx_ucast_listset(struct bna_rx *rx, int count,
360 enum bna_cb_status bna_rx_mcast_add(struct bna_rx *rx, const u8 *mcmac,
363 enum bna_cb_status bna_rx_mcast_listset(struct bna_rx *rx, int count,
366 bna_rx_mcast_delall(struct bna_rx *rx);
368 bna_rx_mode_set(struct bna_rx *rx, enum bna_rxmode rxmode,
370 void bna_rx_vlan_add(struct bna_rx *rx, int vlan_id);
371 void bna_rx_vlan_del(struct bna_rx *rx, int vlan_id);
372 void bna_rx_vlanfilter_enable(struct bna_rx *rx);
373 void bna_rx_vlan_strip_enable(struct bna_rx *rx);
374 void bna_rx_vlan_strip_disable(struct bna_rx *rx);
377 /* API for RX */
380 /* Callbacks for TX, RX */