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 /* The following macros describe the bitfield map used by the firmware to determine its 11i mode */
15 #define ENCRYPT_ENABLED BIT(0)
17 #define WEP_EXTENDED BIT(2)
25 /*Public action frame index IDs*/
26 #define FRAME_TYPE_ID 0
27 #define ACTION_CAT_ID 24
28 #define ACTION_SUBTYPE_ID 25
29 #define P2P_PUB_ACTION_SUBTYPE 30
31 /*Public action frame Attribute IDs*/
32 #define ACTION_FRAME 0xd0
33 #define GO_INTENT_ATTR_ID 0x04
34 #define CHANLIST_ATTR_ID 0x0b
35 #define OPERCHAN_ATTR_ID 0x11
36 #define PUB_ACTION_ATTR_ID 0x04
37 #define P2PELEM_ATTR_ID 0xdd
39 /*Public action subtype values*/
40 #define GO_NEG_REQ 0x00
41 #define GO_NEG_RSP 0x01
42 #define GO_NEG_CONF 0x02
43 #define P2P_INV_REQ 0x03
44 #define P2P_INV_RSP 0x04
45 #define PUBLIC_ACT_VENDORSPEC 0x09
46 #define GAS_INTIAL_REQ 0x0a
47 #define GAS_INTIAL_RSP 0x0b
49 #define INVALID_CHANNEL 0
50 /* #define FORCE_P2P_CLIENT */
53 #define nl80211_SCAN_RESULT_EXPIRE (3 * HZ)
54 #define SCAN_RESULT_EXPIRE (40 * HZ)
56 static const u32 cipher_suites
[] = {
57 WLAN_CIPHER_SUITE_WEP40
,
58 WLAN_CIPHER_SUITE_WEP104
,
59 WLAN_CIPHER_SUITE_TKIP
,
60 WLAN_CIPHER_SUITE_CCMP
,
61 WLAN_CIPHER_SUITE_AES_CMAC
,
64 static const struct ieee80211_txrx_stypes
65 wilc_wfi_cfg80211_mgmt_types
[NUM_NL80211_IFTYPES
] = {
66 [NL80211_IFTYPE_STATION
] = {
68 .rx
= BIT(IEEE80211_STYPE_ACTION
>> 4) |
69 BIT(IEEE80211_STYPE_PROBE_REQ
>> 4)
71 [NL80211_IFTYPE_AP
] = {
73 .rx
= BIT(IEEE80211_STYPE_ASSOC_REQ
>> 4) |
74 BIT(IEEE80211_STYPE_REASSOC_REQ
>> 4) |
75 BIT(IEEE80211_STYPE_PROBE_REQ
>> 4) |
76 BIT(IEEE80211_STYPE_DISASSOC
>> 4) |
77 BIT(IEEE80211_STYPE_AUTH
>> 4) |
78 BIT(IEEE80211_STYPE_DEAUTH
>> 4) |
79 BIT(IEEE80211_STYPE_ACTION
>> 4)
81 [NL80211_IFTYPE_P2P_CLIENT
] = {
83 .rx
= BIT(IEEE80211_STYPE_ACTION
>> 4) |
84 BIT(IEEE80211_STYPE_PROBE_REQ
>> 4) |
85 BIT(IEEE80211_STYPE_ASSOC_REQ
>> 4) |
86 BIT(IEEE80211_STYPE_REASSOC_REQ
>> 4) |
87 BIT(IEEE80211_STYPE_PROBE_REQ
>> 4) |
88 BIT(IEEE80211_STYPE_DISASSOC
>> 4) |
89 BIT(IEEE80211_STYPE_AUTH
>> 4) |
90 BIT(IEEE80211_STYPE_DEAUTH
>> 4)
94 /* Time to stay on the channel */
95 #define WILC_WFI_DWELL_PASSIVE 100
96 #define WILC_WFI_DWELL_ACTIVE 40
98 struct wireless_dev
*WILC_WFI_CfgAlloc(void);
99 struct wireless_dev
*WILC_WFI_WiphyRegister(struct net_device
*net
);
100 void WILC_WFI_WiphyFree(struct net_device
*net
);
101 int WILC_WFI_update_stats(struct wiphy
*wiphy
, u32 pktlen
, u8 changed
);
102 int WILC_WFI_DeInitHostInt(struct net_device
*net
);
103 int WILC_WFI_InitHostInt(struct net_device
*net
);
104 void WILC_WFI_monitor_rx(u8
*buff
, u32 size
);
105 int WILC_WFI_deinit_mon_interface(void);
106 struct net_device
*WILC_WFI_init_mon_interface(const char *name
, struct net_device
*real_dev
);
108 #ifdef TCP_ENHANCEMENTS
109 #define TCP_ACK_FILTER_LINK_SPEED_THRESH 54
110 #define DEFAULT_LINK_SPEED 72
111 void Enable_TCP_ACK_Filter(bool value
);