cdp_txrx_scs.h 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. /*
  2. * Copyright (c) 2022 Qualcomm Innovation Center, Inc. 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_SCS_H_
  19. #define _CDP_TXRX_SCS_H_
  20. #ifdef WLAN_SUPPORT_SCS
  21. #include "cdp_txrx_handle.h"
  22. /**
  23. * cdp_scs_peer_lookup_n_rule_match() - Find peer and check if SCS rule
  24. * is applicable for the peer or not
  25. *
  26. * @soc: soc handle
  27. * @rule_id: scs rule id
  28. * @dst_mac_addr: destination mac addr for peer lookup
  29. *
  30. * Return: bool true on success and false on failure
  31. */
  32. static inline
  33. bool cdp_scs_peer_lookup_n_rule_match(ol_txrx_soc_handle soc,
  34. uint32_t rule_id, uint8_t *dst_mac_addr)
  35. {
  36. if (!soc || !soc->ops) {
  37. dp_cdp_debug("Invalid Instance");
  38. QDF_BUG(0);
  39. return false;
  40. }
  41. if (!soc->ops->scs_ops ||
  42. !soc->ops->scs_ops->scs_peer_lookup_n_rule_match)
  43. return false;
  44. return soc->ops->scs_ops->scs_peer_lookup_n_rule_match(soc, rule_id,
  45. dst_mac_addr);
  46. }
  47. #endif
  48. #endif