xref: /wlan-dirver/qca-wifi-host-cmn/dp/inc/cdp_txrx_pmf.h (revision 4865edfd190c086bbe2c69aae12a8226f877b91e)
1 /*
2  * Copyright (c) 2016 The Linux Foundation. All rights reserved.
3  *
4  * Permission to use, copy, modify, and/or distribute this software for
5  * any purpose with or without fee is hereby granted, provided that the
6  * above copyright notice and this permission notice appear in all
7  * copies.
8  *
9  * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
10  * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
11  * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
12  * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
13  * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
14  * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
15  * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
16  * PERFORMANCE OF THIS SOFTWARE.
17  */
18 
19 #ifndef _CDP_TXRX_PMF_H_
20 #define _CDP_TXRX_PMF_H_
21 
22 /**
23  * cdp_get_pn_info() - Returns pn info from peer
24  * @soc - data path soc handle
25  * @peer: handle to peer
26  * @last_pn_valid: return last_rmf_pn_valid value from peer.
27  * @last_pn: return last_rmf_pn value from peer.
28  * @rmf_pn_replays: return rmf_pn_replays value from peer.
29  *
30  * Return: NONE
31  */
32 static inline void
33 cdp_get_pn_info(ol_txrx_soc_handle soc, void *peer, uint8_t **last_pn_valid,
34 		    uint64_t **last_pn, uint32_t **rmf_pn_replays)
35 {
36 	if (!soc || !soc->ops || !soc->ops->pmf_ops) {
37 		QDF_TRACE(QDF_MODULE_ID_DP, QDF_TRACE_LEVEL_FATAL,
38 			"%s invalid instance", __func__);
39 		return;
40 	}
41 
42 	if (soc->ops->pmf_ops->get_pn_info)
43 		return soc->ops->pmf_ops->get_pn_info(
44 			peer, last_pn_valid, last_pn, rmf_pn_replays);
45 
46 	return;
47 }
48 #endif /* _CDP_TXRX_PMF_H_ */
49