2 * @file wilc_wfi_cfgoperations.h
3 * @brief Definitions for the network module
5 * @sa wilc_oswrapper.h top level OS wrapper file
9 #ifndef NM_WFI_CFGOPERATIONS
10 #define NM_WFI_CFGOPERATIONS
11 #include "wilc_wfi_netdevice.h"
13 #ifdef WILC_FULLY_HOSTING_AP
14 #include "wilc_host_ap.h"
18 /* The following macros describe the bitfield map used by the firmware to determine its 11i mode */
20 #define ENCRYPT_ENABLED (1 << 0)
22 #define WEP_EXTENDED (1 << 2)
29 /* #define USE_SUPPLICANT_GO_INTENT */
31 /*Public action frame index IDs*/
32 #define FRAME_TYPE_ID 0
33 #define ACTION_CAT_ID 24
34 #define ACTION_SUBTYPE_ID 25
35 #define P2P_PUB_ACTION_SUBTYPE 30
37 /*Public action frame Attribute IDs*/
38 #define ACTION_FRAME 0xd0
39 #define GO_INTENT_ATTR_ID 0x04
40 #define CHANLIST_ATTR_ID 0x0b
41 #define OPERCHAN_ATTR_ID 0x11
42 #ifdef USE_SUPPLICANT_GO_INTENT
43 #define GROUP_BSSID_ATTR_ID 0x07
45 #define PUB_ACTION_ATTR_ID 0x04
46 #define P2PELEM_ATTR_ID 0xdd
48 /*Public action subtype values*/
49 #define GO_NEG_REQ 0x00
50 #define GO_NEG_RSP 0x01
51 #define GO_NEG_CONF 0x02
52 #define P2P_INV_REQ 0x03
53 #define P2P_INV_RSP 0x04
54 #define PUBLIC_ACT_VENDORSPEC 0x09
55 #define GAS_INTIAL_REQ 0x0a
56 #define GAS_INTIAL_RSP 0x0b
58 #define INVALID_CHANNEL 0
59 #ifdef USE_SUPPLICANT_GO_INTENT
60 #define SUPPLICANT_GO_INTENT 6
61 #define GET_GO_INTENT(a) (((a) >> 1) & 0x0f)
62 #define GET_TIE_BREAKER(a) (((a)) & 0x01)
64 /* #define FORCE_P2P_CLIENT */
68 #define nl80211_SCAN_RESULT_EXPIRE (3 * HZ)
69 #define SCAN_RESULT_EXPIRE (40 * HZ)
71 static const u32 cipher_suites
[] = {
72 WLAN_CIPHER_SUITE_WEP40
,
73 WLAN_CIPHER_SUITE_WEP104
,
74 WLAN_CIPHER_SUITE_TKIP
,
75 WLAN_CIPHER_SUITE_CCMP
,
76 WLAN_CIPHER_SUITE_AES_CMAC
,
79 static const struct ieee80211_txrx_stypes
80 wilc_wfi_cfg80211_mgmt_types
[NUM_NL80211_IFTYPES
] = {
81 [NL80211_IFTYPE_STATION
] = {
83 .rx
= BIT(IEEE80211_STYPE_ACTION
>> 4) |
84 BIT(IEEE80211_STYPE_PROBE_REQ
>> 4)
86 [NL80211_IFTYPE_AP
] = {
88 .rx
= BIT(IEEE80211_STYPE_ASSOC_REQ
>> 4) |
89 BIT(IEEE80211_STYPE_REASSOC_REQ
>> 4) |
90 BIT(IEEE80211_STYPE_PROBE_REQ
>> 4) |
91 BIT(IEEE80211_STYPE_DISASSOC
>> 4) |
92 BIT(IEEE80211_STYPE_AUTH
>> 4) |
93 BIT(IEEE80211_STYPE_DEAUTH
>> 4) |
94 BIT(IEEE80211_STYPE_ACTION
>> 4)
96 [NL80211_IFTYPE_P2P_CLIENT
] = {
98 .rx
= BIT(IEEE80211_STYPE_ACTION
>> 4) |
99 BIT(IEEE80211_STYPE_PROBE_REQ
>> 4) |
100 BIT(IEEE80211_STYPE_ASSOC_REQ
>> 4) |
101 BIT(IEEE80211_STYPE_REASSOC_REQ
>> 4) |
102 BIT(IEEE80211_STYPE_PROBE_REQ
>> 4) |
103 BIT(IEEE80211_STYPE_DISASSOC
>> 4) |
104 BIT(IEEE80211_STYPE_AUTH
>> 4) |
105 BIT(IEEE80211_STYPE_DEAUTH
>> 4)
109 /* Time to stay on the channel */
110 #define WILC_WFI_DWELL_PASSIVE 100
111 #define WILC_WFI_DWELL_ACTIVE 40
113 struct wireless_dev
*WILC_WFI_CfgAlloc(void);
114 struct wireless_dev
*WILC_WFI_WiphyRegister(struct net_device
*net
);
115 void WILC_WFI_WiphyFree(struct net_device
*net
);
116 int WILC_WFI_update_stats(struct wiphy
*wiphy
, u32 pktlen
, u8 changed
);
117 int WILC_WFI_DeInitHostInt(struct net_device
*net
);
118 int WILC_WFI_InitHostInt(struct net_device
*net
);
119 void WILC_WFI_monitor_rx(uint8_t *buff
, uint32_t size
);
120 int WILC_WFI_deinit_mon_interface(void);
121 struct net_device
*WILC_WFI_init_mon_interface(char *name
, struct net_device
*real_dev
);
123 #ifdef TCP_ENHANCEMENTS
124 #define TCP_ACK_FILTER_LINK_SPEED_THRESH 54
125 #define DEFAULT_LINK_SPEED 72
126 extern void Enable_TCP_ACK_Filter(WILC_Bool value
);