wilc_wfi_cfgoperations.h 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109
  1. /*!
  2. * @file wilc_wfi_cfgoperations.h
  3. * @brief Definitions for the network module
  4. * @author syounan
  5. * @sa wilc_oswrapper.h top level OS wrapper file
  6. * @date 31 Aug 2010
  7. * @version 1.0
  8. */
  9. #ifndef NM_WFI_CFGOPERATIONS
  10. #define NM_WFI_CFGOPERATIONS
  11. #include "wilc_wfi_netdevice.h"
  12. /* The following macros describe the bitfield map used by the firmware to determine its 11i mode */
  13. #define NO_ENCRYPT 0
  14. #define ENCRYPT_ENABLED BIT(0)
  15. #define WEP BIT(1)
  16. #define WEP_EXTENDED BIT(2)
  17. #define WPA BIT(3)
  18. #define WPA2 BIT(4)
  19. #define AES BIT(5)
  20. #define TKIP BIT(6)
  21. /*Public action frame index IDs*/
  22. #define FRAME_TYPE_ID 0
  23. #define ACTION_CAT_ID 24
  24. #define ACTION_SUBTYPE_ID 25
  25. #define P2P_PUB_ACTION_SUBTYPE 30
  26. /*Public action frame Attribute IDs*/
  27. #define ACTION_FRAME 0xd0
  28. #define GO_INTENT_ATTR_ID 0x04
  29. #define CHANLIST_ATTR_ID 0x0b
  30. #define OPERCHAN_ATTR_ID 0x11
  31. #define PUB_ACTION_ATTR_ID 0x04
  32. #define P2PELEM_ATTR_ID 0xdd
  33. /*Public action subtype values*/
  34. #define GO_NEG_REQ 0x00
  35. #define GO_NEG_RSP 0x01
  36. #define GO_NEG_CONF 0x02
  37. #define P2P_INV_REQ 0x03
  38. #define P2P_INV_RSP 0x04
  39. #define PUBLIC_ACT_VENDORSPEC 0x09
  40. #define GAS_INTIAL_REQ 0x0a
  41. #define GAS_INTIAL_RSP 0x0b
  42. #define INVALID_CHANNEL 0
  43. #define nl80211_SCAN_RESULT_EXPIRE (3 * HZ)
  44. #define SCAN_RESULT_EXPIRE (40 * HZ)
  45. static const u32 cipher_suites[] = {
  46. WLAN_CIPHER_SUITE_WEP40,
  47. WLAN_CIPHER_SUITE_WEP104,
  48. WLAN_CIPHER_SUITE_TKIP,
  49. WLAN_CIPHER_SUITE_CCMP,
  50. WLAN_CIPHER_SUITE_AES_CMAC,
  51. };
  52. static const struct ieee80211_txrx_stypes
  53. wilc_wfi_cfg80211_mgmt_types[NUM_NL80211_IFTYPES] = {
  54. [NL80211_IFTYPE_STATION] = {
  55. .tx = 0xffff,
  56. .rx = BIT(IEEE80211_STYPE_ACTION >> 4) |
  57. BIT(IEEE80211_STYPE_PROBE_REQ >> 4)
  58. },
  59. [NL80211_IFTYPE_AP] = {
  60. .tx = 0xffff,
  61. .rx = BIT(IEEE80211_STYPE_ASSOC_REQ >> 4) |
  62. BIT(IEEE80211_STYPE_REASSOC_REQ >> 4) |
  63. BIT(IEEE80211_STYPE_PROBE_REQ >> 4) |
  64. BIT(IEEE80211_STYPE_DISASSOC >> 4) |
  65. BIT(IEEE80211_STYPE_AUTH >> 4) |
  66. BIT(IEEE80211_STYPE_DEAUTH >> 4) |
  67. BIT(IEEE80211_STYPE_ACTION >> 4)
  68. },
  69. [NL80211_IFTYPE_P2P_CLIENT] = {
  70. .tx = 0xffff,
  71. .rx = BIT(IEEE80211_STYPE_ACTION >> 4) |
  72. BIT(IEEE80211_STYPE_PROBE_REQ >> 4) |
  73. BIT(IEEE80211_STYPE_ASSOC_REQ >> 4) |
  74. BIT(IEEE80211_STYPE_REASSOC_REQ >> 4) |
  75. BIT(IEEE80211_STYPE_DISASSOC >> 4) |
  76. BIT(IEEE80211_STYPE_AUTH >> 4) |
  77. BIT(IEEE80211_STYPE_DEAUTH >> 4)
  78. }
  79. };
  80. /* Time to stay on the channel */
  81. #define WILC_WFI_DWELL_PASSIVE 100
  82. #define WILC_WFI_DWELL_ACTIVE 40
  83. struct wireless_dev *WILC_WFI_CfgAlloc(void);
  84. struct wireless_dev *wilc_create_wiphy(struct net_device *net);
  85. void wilc_free_wiphy(struct net_device *net);
  86. int WILC_WFI_update_stats(struct wiphy *wiphy, u32 pktlen, u8 changed);
  87. int wilc_deinit_host_int(struct net_device *net);
  88. int wilc_init_host_int(struct net_device *net);
  89. void WILC_WFI_monitor_rx(u8 *buff, u32 size);
  90. int WILC_WFI_deinit_mon_interface(void);
  91. struct net_device *WILC_WFI_init_mon_interface(const char *name, struct net_device *real_dev);
  92. void wilc_mgmt_frame_register(struct wiphy *wiphy, struct wireless_dev *wdev,
  93. u16 frame_type, bool reg);
  94. #define TCP_ACK_FILTER_LINK_SPEED_THRESH 54
  95. #define DEFAULT_LINK_SPEED 72
  96. void Enable_TCP_ACK_Filter(bool value);
  97. #endif