xref: /wlan-dirver/qca-wifi-host-cmn/dp/inc/cdp_txrx_pmf.h (revision 503663c6daafffe652fa360bde17243568cd6d2a)
1 /*
2  * Copyright (c) 2016, 2019 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_mac: peer mac address
26  * @vdev_id: virtual device/interface id
27  * @last_pn_valid: return last_rmf_pn_valid value from peer.
28  * @last_pn: return last_rmf_pn value from peer.
29  * @rmf_pn_replays: return rmf_pn_replays value from peer.
30  *
31  * Return: NONE
32  */
33 static inline void
34 cdp_get_pn_info(ol_txrx_soc_handle soc, uint8_t *peer_mac, uint8_t vdev_id,
35 		uint8_t **last_pn_valid, uint64_t **last_pn,
36 		uint32_t **rmf_pn_replays)
37 {
38 	if (!soc || !soc->ops || !soc->ops->pmf_ops) {
39 		QDF_TRACE(QDF_MODULE_ID_DP, QDF_TRACE_LEVEL_FATAL,
40 			"%s invalid instance", __func__);
41 		return;
42 	}
43 
44 	if (soc->ops->pmf_ops->get_pn_info)
45 		return soc->ops->pmf_ops->get_pn_info(soc, peer_mac, vdev_id,
46 						      last_pn_valid,
47 						      last_pn, rmf_pn_replays);
48 
49 	return;
50 }
51 #endif /* _CDP_TXRX_PMF_H_ */
52