core.h 2.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. /******************************************************************************
  2. *
  3. * Copyright(c) 2009-2012 Realtek Corporation.
  4. *
  5. * This program is free software; you can redistribute it and/or modify it
  6. * under the terms of version 2 of the GNU General Public License as
  7. * published by the Free Software Foundation.
  8. *
  9. * This program is distributed in the hope that it will be useful, but WITHOUT
  10. * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11. * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
  12. * more details.
  13. *
  14. * The full GNU General Public License is included in this distribution in the
  15. * file called LICENSE.
  16. *
  17. * Contact Information:
  18. * wlanfae <wlanfae@realtek.com>
  19. * Realtek Corporation, No. 2, Innovation Road II, Hsinchu Science Park,
  20. * Hsinchu 300, Taiwan.
  21. *
  22. * Larry Finger <Larry.Finger@lwfinger.net>
  23. *
  24. *****************************************************************************/
  25. #ifndef __RTL_CORE_H__
  26. #define __RTL_CORE_H__
  27. #define RTL_SUPPORTED_FILTERS \
  28. (FIF_ALLMULTI | FIF_CONTROL | \
  29. FIF_OTHER_BSS | \
  30. FIF_FCSFAIL | \
  31. FIF_BCN_PRBRESP_PROMISC)
  32. #define DM_DIG_THRESH_HIGH 40
  33. #define DM_DIG_THRESH_LOW 35
  34. #define DM_FALSEALARM_THRESH_LOW 400
  35. #define DM_FALSEALARM_THRESH_HIGH 1000
  36. #define DM_DIG_MAX 0x3e
  37. #define DM_DIG_MIN 0x1e
  38. #define DM_DIG_MAX_AP 0x32
  39. #define DM_DIG_BACKOFF_MAX 12
  40. #define DM_DIG_BACKOFF_MIN -4
  41. #define DM_DIG_BACKOFF_DEFAULT 10
  42. enum cck_packet_detection_threshold {
  43. CCK_PD_STAGE_LOWRSSI = 0,
  44. CCK_PD_STAGE_HIGHRSSI = 1,
  45. CCK_FA_STAGE_LOW = 2,
  46. CCK_FA_STAGE_HIGH = 3,
  47. CCK_PD_STAGE_MAX = 4,
  48. };
  49. enum dm_dig_ext_port_alg_e {
  50. DIG_EXT_PORT_STAGE_0 = 0,
  51. DIG_EXT_PORT_STAGE_1 = 1,
  52. DIG_EXT_PORT_STAGE_2 = 2,
  53. DIG_EXT_PORT_STAGE_3 = 3,
  54. DIG_EXT_PORT_STAGE_MAX = 4,
  55. };
  56. enum dm_dig_connect_e {
  57. DIG_STA_DISCONNECT,
  58. DIG_STA_CONNECT,
  59. DIG_STA_BEFORE_CONNECT,
  60. DIG_MULTISTA_DISCONNECT,
  61. DIG_MULTISTA_CONNECT,
  62. DIG_AP_DISCONNECT,
  63. DIG_AP_CONNECT,
  64. DIG_AP_ADD_STATION,
  65. DIG_CONNECT_MAX
  66. };
  67. extern const struct ieee80211_ops rtl_ops;
  68. void rtl_fw_cb(const struct firmware *firmware, void *context);
  69. void rtl_wowlan_fw_cb(const struct firmware *firmware, void *context);
  70. void rtl_addr_delay(u32 addr);
  71. void rtl_rfreg_delay(struct ieee80211_hw *hw, enum radio_path rfpath, u32 addr,
  72. u32 mask, u32 data);
  73. void rtl_bb_delay(struct ieee80211_hw *hw, u32 addr, u32 data);
  74. bool rtl_cmd_send_packet(struct ieee80211_hw *hw, struct sk_buff *skb);
  75. bool rtl_btc_status_false(void);
  76. void rtl_dm_diginit(struct ieee80211_hw *hw, u32 cur_igval);
  77. #endif