/drivers/net/wireless/sd8797/mlan/mlan_uap.h

https://bitbucket.org/cyanogenmod/android_kernel_asus_tf300t · C Header · 104 lines · 51 code · 17 blank · 36 comment · 2 complexity · 8d7b8a9b84c497c9e8ea985ec2c1ac1d MD5 · raw file

  1. /** @file mlan_uap.h
  2. *
  3. * @brief This file contains related macros, enum, and struct
  4. * of uap functionalities
  5. *
  6. * Copyright (C) 2009-2011, Marvell International Ltd.
  7. *
  8. * This software file (the "File") is distributed by Marvell International
  9. * Ltd. under the terms of the GNU General Public License Version 2, June 1991
  10. * (the "License"). You may use, redistribute and/or modify this File in
  11. * accordance with the terms and conditions of the License, a copy of which
  12. * is available by writing to the Free Software Foundation, Inc.,
  13. * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or on the
  14. * worldwide web at http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt.
  15. *
  16. * THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE
  17. * IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE
  18. * ARE EXPRESSLY DISCLAIMED. The License provides additional details about
  19. * this warranty disclaimer.
  20. */
  21. /********************************************************
  22. Change log:
  23. 02/05/2009: initial version
  24. ********************************************************/
  25. #ifndef _MLAN_UAP_H_
  26. #define _MLAN_UAP_H_
  27. #ifdef BIG_ENDIAN_SUPPORT
  28. /** Convert TxPD to little endian format from CPU format */
  29. #define uap_endian_convert_TxPD(x) \
  30. { \
  31. (x)->tx_pkt_length = wlan_cpu_to_le16((x)->tx_pkt_length); \
  32. (x)->tx_pkt_offset = wlan_cpu_to_le16((x)->tx_pkt_offset); \
  33. (x)->tx_pkt_type = wlan_cpu_to_le16((x)->tx_pkt_type); \
  34. (x)->tx_control = wlan_cpu_to_le32((x)->tx_control); \
  35. }
  36. /** Convert RxPD from little endian format to CPU format */
  37. #define uap_endian_convert_RxPD(x) \
  38. { \
  39. (x)->rx_pkt_length = wlan_le16_to_cpu((x)->rx_pkt_length); \
  40. (x)->rx_pkt_offset = wlan_le16_to_cpu((x)->rx_pkt_offset); \
  41. (x)->rx_pkt_type = wlan_le16_to_cpu((x)->rx_pkt_type); \
  42. (x)->seq_num = wlan_le16_to_cpu((x)->seq_num); \
  43. }
  44. #else
  45. /** Convert TxPD to little endian format from CPU format */
  46. #define uap_endian_convert_TxPD(x) do {} while (0)
  47. /** Convert RxPD from little endian format to CPU format */
  48. #define uap_endian_convert_RxPD(x) do {} while (0)
  49. #endif /* BIG_ENDIAN_SUPPORT */
  50. /** Band config 5GHz */
  51. #define UAP_BAND_CONFIG_5GHZ 0x01
  52. /** Packet forwarding to be done by FW or host */
  53. #define PKT_FWD_FW_BIT 0x01
  54. /** Intra-BSS broadcast packet forwarding allow bit */
  55. #define PKT_FWD_INTRA_BCAST 0x02
  56. /** Intra-BSS unicast packet forwarding allow bit */
  57. #define PKT_FWD_INTRA_UCAST 0x04
  58. /** Inter-BSS unicast packet forwarding allow bit */
  59. #define PKT_FWD_INTER_UCAST 0x08
  60. /** Intra-BSS unicast packet */
  61. #define PKT_INTRA_UCAST 0x01
  62. /** Inter-BSS unicast packet */
  63. #define PKT_INTER_UCAST 0x02
  64. /** Enable Host PKT forwarding */
  65. #define PKT_FWD_ENABLE_BIT 0x01
  66. mlan_status wlan_uap_get_channel(IN pmlan_private pmpriv);
  67. mlan_status wlan_uap_set_channel(IN pmlan_private pmpriv,
  68. IN t_u8 uap_band_cfg, IN t_u8 channel);
  69. mlan_status wlan_uap_get_beacon_dtim(IN pmlan_private pmpriv);
  70. mlan_status wlan_ops_uap_ioctl(t_void * adapter, pmlan_ioctl_req pioctl_req);
  71. mlan_status wlan_ops_uap_prepare_cmd(IN t_void * priv,
  72. IN t_u16 cmd_no,
  73. IN t_u16 cmd_action,
  74. IN t_u32 cmd_oid,
  75. IN t_void * pioctl_buf,
  76. IN t_void * pdata_buf,
  77. IN t_void * pcmd_buf);
  78. mlan_status wlan_ops_uap_process_cmdresp(IN t_void * priv,
  79. IN t_u16 cmdresp_no,
  80. IN t_void * pcmd_buf,
  81. IN t_void * pioctl);
  82. mlan_status wlan_ops_uap_process_rx_packet(IN t_void * adapter,
  83. IN pmlan_buffer pmbuf);
  84. mlan_status wlan_ops_uap_process_event(IN t_void * priv);
  85. t_void *wlan_ops_uap_process_txpd(IN t_void * priv, IN pmlan_buffer pmbuf);
  86. mlan_status wlan_ops_uap_init_cmd(IN t_void * priv, IN t_u8 first_bss);
  87. #endif /* _MLAN_UAP_H_ */