cdp_txrx_pmf.h 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  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. #ifndef _CDP_TXRX_PMF_H_
  19. #define _CDP_TXRX_PMF_H_
  20. /**
  21. * cdp_get_pn_info() - Returns pn info from peer
  22. * @soc - data path soc handle
  23. * @peer_mac: peer mac address
  24. * @vdev_id: virtual device/interface id
  25. * @last_pn_valid: return last_rmf_pn_valid value from peer.
  26. * @last_pn: return last_rmf_pn value from peer.
  27. * @rmf_pn_replays: return rmf_pn_replays value from peer.
  28. *
  29. * Return: NONE
  30. */
  31. static inline void
  32. cdp_get_pn_info(ol_txrx_soc_handle soc, uint8_t *peer_mac, uint8_t vdev_id,
  33. uint8_t **last_pn_valid, uint64_t **last_pn,
  34. 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. if (soc->ops->pmf_ops->get_pn_info)
  42. return soc->ops->pmf_ops->get_pn_info(soc, peer_mac, vdev_id,
  43. last_pn_valid,
  44. last_pn, rmf_pn_replays);
  45. return;
  46. }
  47. #endif /* _CDP_TXRX_PMF_H_ */