ol_rx_fwd.h 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. /*
  2. * Copyright (c) 2011, 2014 The Linux Foundation. All rights reserved.
  3. *
  4. * Previously licensed under the ISC license by Qualcomm Atheros, Inc.
  5. *
  6. *
  7. * Permission to use, copy, modify, and/or distribute this software for
  8. * any purpose with or without fee is hereby granted, provided that the
  9. * above copyright notice and this permission notice appear in all
  10. * copies.
  11. *
  12. * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
  13. * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
  14. * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
  15. * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
  16. * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
  17. * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
  18. * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
  19. * PERFORMANCE OF THIS SOFTWARE.
  20. */
  21. /*
  22. * This file was originally distributed by Qualcomm Atheros, Inc.
  23. * under proprietary terms before Copyright ownership was assigned
  24. * to the Linux Foundation.
  25. */
  26. #ifndef _OL_RX_FWD_H_
  27. #define _OL_RX_FWD_H_
  28. #include <cdf_nbuf.h> /* cdf_nbuf_t, etc. */
  29. #include <ol_txrx_api.h> /* ol_txrx_peer_t, etc. */
  30. cdf_nbuf_t
  31. ol_rx_fwd_mcast_check_sta(struct ol_txrx_vdev_t *vdev,
  32. struct ol_txrx_peer_t *peer,
  33. cdf_nbuf_t msdu, void *rx_desc, int is_wlan_mcast);
  34. cdf_nbuf_t
  35. ol_rx_fwd_mcast_check_ap(struct ol_txrx_vdev_t *vdev,
  36. struct ol_txrx_peer_t *peer,
  37. cdf_nbuf_t msdu, void *rx_desc, int is_wlan_mcast);
  38. /**
  39. * @brief Check if rx frames should be transmitted over WLAN.
  40. * @details
  41. * Check if rx frames should be transmitted back over WLAN, instead of
  42. * or in addition to delivering the rx frames to the OS.
  43. * Rx frames will be forwarded to the transmit path under the following
  44. * conditions:
  45. * 1. If the destination is a STA associated to the same virtual device
  46. * within this physical device, the rx frame will be forwarded to the
  47. * tx path rather than being sent to the OS. If the destination is a
  48. * STA associated to a different virtual device within this physical
  49. * device, then the rx frame will optionally be forwarded to the tx path.
  50. * 2. If the frame is received by an AP, but the destination is for another
  51. * AP that the current AP is associated with for WDS forwarding, the
  52. * intermediate AP will forward the rx frame to the tx path to transmit
  53. * to send to the destination AP, rather than sending it to the OS.
  54. * 3. If the AP receives a multicast frame, it will retransmit the frame
  55. * within the BSS, in addition to sending the frame to the OS.
  56. *
  57. * @param vdev - which virtual device the frames were addressed to
  58. * @param peer - which peer the rx frames belong to
  59. * @param tid - which TID within the peer the rx frames belong to
  60. * @param msdu_list - NULL-terminated list of MSDUs to perform the rx->tx
  61. * forwarding check on
  62. */
  63. void
  64. ol_rx_fwd_check(struct ol_txrx_vdev_t *vdev,
  65. struct ol_txrx_peer_t *peer,
  66. unsigned tid, cdf_nbuf_t msdu_list);
  67. #endif /* _OL_RX_FWD_H_ */