1*5113495bSYour Name /*
2*5113495bSYour Name * Copyright (c) 2016-2021 The Linux Foundation. All rights reserved.
3*5113495bSYour Name * Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved.
4*5113495bSYour Name *
5*5113495bSYour Name * Permission to use, copy, modify, and/or distribute this software for
6*5113495bSYour Name * any purpose with or without fee is hereby granted, provided that the
7*5113495bSYour Name * above copyright notice and this permission notice appear in all
8*5113495bSYour Name * copies.
9*5113495bSYour Name *
10*5113495bSYour Name * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
11*5113495bSYour Name * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
12*5113495bSYour Name * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
13*5113495bSYour Name * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
14*5113495bSYour Name * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
15*5113495bSYour Name * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
16*5113495bSYour Name * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
17*5113495bSYour Name * PERFORMANCE OF THIS SOFTWARE.
18*5113495bSYour Name */
19*5113495bSYour Name
20*5113495bSYour Name /**
21*5113495bSYour Name * DOC: cdp_txrx_me.h
22*5113495bSYour Name * Define the host data path mcast enhance API functions
23*5113495bSYour Name * called by the host control SW and the OS interface module
24*5113495bSYour Name */
25*5113495bSYour Name #ifndef _CDP_TXRX_ME_H_
26*5113495bSYour Name #define _CDP_TXRX_ME_H_
27*5113495bSYour Name
28*5113495bSYour Name #include <cdp_txrx_ops.h>
29*5113495bSYour Name #include "cdp_txrx_handle.h"
30*5113495bSYour Name #include <cdp_txrx_cmn.h>
31*5113495bSYour Name
32*5113495bSYour Name static inline void
cdp_tx_me_alloc_descriptor(ol_txrx_soc_handle soc,uint8_t pdev_id)33*5113495bSYour Name cdp_tx_me_alloc_descriptor(ol_txrx_soc_handle soc, uint8_t pdev_id)
34*5113495bSYour Name {
35*5113495bSYour Name if (!soc || !soc->ops) {
36*5113495bSYour Name dp_cdp_debug("Invalid Instance");
37*5113495bSYour Name QDF_BUG(0);
38*5113495bSYour Name return;
39*5113495bSYour Name }
40*5113495bSYour Name
41*5113495bSYour Name if (!soc->ops->me_ops ||
42*5113495bSYour Name !soc->ops->me_ops->tx_me_alloc_descriptor)
43*5113495bSYour Name return;
44*5113495bSYour Name
45*5113495bSYour Name soc->ops->me_ops->tx_me_alloc_descriptor(soc, pdev_id);
46*5113495bSYour Name }
47*5113495bSYour Name
48*5113495bSYour Name static inline void
cdp_tx_me_free_descriptor(ol_txrx_soc_handle soc,uint8_t pdev_id)49*5113495bSYour Name cdp_tx_me_free_descriptor(ol_txrx_soc_handle soc, uint8_t pdev_id)
50*5113495bSYour Name {
51*5113495bSYour Name if (!soc || !soc->ops) {
52*5113495bSYour Name dp_cdp_debug("Invalid Instance");
53*5113495bSYour Name QDF_BUG(0);
54*5113495bSYour Name return;
55*5113495bSYour Name }
56*5113495bSYour Name
57*5113495bSYour Name if (!soc->ops->me_ops ||
58*5113495bSYour Name !soc->ops->me_ops->tx_me_free_descriptor)
59*5113495bSYour Name return;
60*5113495bSYour Name
61*5113495bSYour Name soc->ops->me_ops->tx_me_free_descriptor(soc, pdev_id);
62*5113495bSYour Name }
63*5113495bSYour Name
64*5113495bSYour Name static inline uint16_t
cdp_tx_me_convert_ucast(ol_txrx_soc_handle soc,uint8_t vdev_id,qdf_nbuf_t wbuf,u_int8_t newmac[][6],uint8_t newmaccnt,uint8_t tid,bool is_igmp,bool is_dms_pkt)65*5113495bSYour Name cdp_tx_me_convert_ucast(ol_txrx_soc_handle soc, uint8_t vdev_id,
66*5113495bSYour Name qdf_nbuf_t wbuf, u_int8_t newmac[][6],
67*5113495bSYour Name uint8_t newmaccnt, uint8_t tid, bool is_igmp,
68*5113495bSYour Name bool is_dms_pkt)
69*5113495bSYour Name {
70*5113495bSYour Name if (!soc || !soc->ops) {
71*5113495bSYour Name dp_cdp_debug("Invalid Instance");
72*5113495bSYour Name QDF_BUG(0);
73*5113495bSYour Name return 0;
74*5113495bSYour Name }
75*5113495bSYour Name
76*5113495bSYour Name if (!soc->ops->me_ops ||
77*5113495bSYour Name !soc->ops->me_ops->tx_me_convert_ucast)
78*5113495bSYour Name return 0;
79*5113495bSYour Name
80*5113495bSYour Name return soc->ops->me_ops->tx_me_convert_ucast
81*5113495bSYour Name (soc, vdev_id, wbuf, newmac, newmaccnt, tid, is_igmp,
82*5113495bSYour Name is_dms_pkt);
83*5113495bSYour Name }
84*5113495bSYour Name
85*5113495bSYour Name #endif
86