1*5113495bSYour Name /*
2*5113495bSYour Name * Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved.
3*5113495bSYour Name *
4*5113495bSYour Name * Permission to use, copy, modify, and/or distribute this software for
5*5113495bSYour Name * any purpose with or without fee is hereby granted, provided that the
6*5113495bSYour Name * above copyright notice and this permission notice appear in all
7*5113495bSYour Name * copies.
8*5113495bSYour Name *
9*5113495bSYour Name * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
10*5113495bSYour Name * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
11*5113495bSYour Name * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
12*5113495bSYour Name * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
13*5113495bSYour Name * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
14*5113495bSYour Name * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
15*5113495bSYour Name * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
16*5113495bSYour Name * PERFORMANCE OF THIS SOFTWARE.
17*5113495bSYour Name */
18*5113495bSYour Name
19*5113495bSYour Name #ifndef _CDP_TXRX_SCS_H_
20*5113495bSYour Name #define _CDP_TXRX_SCS_H_
21*5113495bSYour Name
22*5113495bSYour Name #ifdef WLAN_SUPPORT_SCS
23*5113495bSYour Name #include "cdp_txrx_handle.h"
24*5113495bSYour Name
25*5113495bSYour Name /**
26*5113495bSYour Name * cdp_scs_peer_lookup_n_rule_match() - Find peer and check if SCS rule
27*5113495bSYour Name * is applicable for the peer or not
28*5113495bSYour Name *
29*5113495bSYour Name * @soc: soc handle
30*5113495bSYour Name * @rule_id: scs rule id
31*5113495bSYour Name * @dst_mac_addr: destination mac addr for peer lookup
32*5113495bSYour Name *
33*5113495bSYour Name * Return: bool true on success and false on failure
34*5113495bSYour Name */
35*5113495bSYour Name static inline
cdp_scs_peer_lookup_n_rule_match(ol_txrx_soc_handle soc,uint32_t rule_id,uint8_t * dst_mac_addr)36*5113495bSYour Name bool cdp_scs_peer_lookup_n_rule_match(ol_txrx_soc_handle soc,
37*5113495bSYour Name uint32_t rule_id, uint8_t *dst_mac_addr)
38*5113495bSYour Name {
39*5113495bSYour Name if (!soc || !soc->ops) {
40*5113495bSYour Name dp_cdp_debug("Invalid Instance");
41*5113495bSYour Name QDF_BUG(0);
42*5113495bSYour Name return false;
43*5113495bSYour Name }
44*5113495bSYour Name
45*5113495bSYour Name if (!soc->ops->scs_ops ||
46*5113495bSYour Name !soc->ops->scs_ops->scs_peer_lookup_n_rule_match)
47*5113495bSYour Name return false;
48*5113495bSYour Name
49*5113495bSYour Name return soc->ops->scs_ops->scs_peer_lookup_n_rule_match(soc, rule_id,
50*5113495bSYour Name dst_mac_addr);
51*5113495bSYour Name }
52*5113495bSYour Name #endif
53*5113495bSYour Name #endif
54