7 #include <dngl_stats.h>
13 #define FW_TYPE_APSTA 1
15 #define FW_TYPE_MESH 3
21 #define FW_PATH_AUTO_SELECT 1
22 //#define CONFIG_PATH_AUTO_SELECT
23 extern char firmware_path
[MOD_PARAM_PATHLEN
];
24 #if defined(BCMSDIO) || defined(BCMPCIE)
25 extern uint dhd_rxbound
;
26 extern uint dhd_txbound
;
29 #define TXGLOM_RECV_OFFSET 8
30 extern uint dhd_doflow
;
31 extern uint dhd_slpauto
;
34 typedef struct wl_mac_range
{
40 typedef struct wl_mac_list
{
43 char name
[MOD_PARAM_PATHLEN
];
46 typedef struct wl_mac_list_ctrl
{
48 struct wl_mac_list
*m_mac_list_head
;
51 typedef struct wl_chip_nv_path
{
54 char name
[MOD_PARAM_PATHLEN
];
57 typedef struct wl_chip_nv_path_list_ctrl
{
59 struct wl_chip_nv_path
*m_chip_nv_path_head
;
60 } wl_chip_nv_path_list_ctrl_t
;
62 typedef struct wl_channel_list
{
64 uint32 channel
[WL_NUMCHANNELS
];
67 typedef struct wmes_param
{
74 #ifdef PKT_FILTER_SUPPORT
75 #define DHD_CONF_FILTER_MAX 8
76 #define PKT_FILTER_LEN 300
77 #define MAGIC_PKT_FILTER_LEN 450
78 typedef struct conf_pkt_filter_add
{
80 char filter
[DHD_CONF_FILTER_MAX
][PKT_FILTER_LEN
];
81 } conf_pkt_filter_add_t
;
83 typedef struct conf_pkt_filter_del
{
85 uint32 id
[DHD_CONF_FILTER_MAX
];
86 } conf_pkt_filter_del_t
;
89 #define CONFIG_COUNTRY_LIST_SIZE 100
90 typedef struct conf_country_list
{
91 wl_country_t
*cspec
[CONFIG_COUNTRY_LIST_SIZE
];
92 } conf_country_list_t
;
95 #define MCHAN_MAX_NUM 4
96 #define MIRACAST_SOURCE 1
97 #define MIRACAST_SINK 2
98 typedef struct mchan_params
{
105 NO_SCAN_IN4WAY
= (1 << (0)),
106 NO_BTC_IN4WAY
= (1 << (1)),
107 DONT_DELETE_GC_AFTER_WPS
= (1 << (2)),
108 WAIT_DISCONNECTED
= (1 << (3)),
111 enum in_suspend_flags
{
112 NO_EVENT_IN_SUSPEND
= (1 << (0)),
113 NO_TXDATA_IN_SUSPEND
= (1 << (1)),
114 NO_TXCTL_IN_SUSPEND
= (1 << (2)),
115 AP_DOWN_IN_SUSPEND
= (1 << (3)),
116 ROAM_OFFLOAD_IN_SUSPEND
= (1 << (4)),
117 AP_FILTER_IN_SUSPEND
= (1 << (5)),
118 WOWL_IN_SUSPEND
= (1 << (6)),
119 ALL_IN_SUSPEND
= 0xFFFFFFFF,
123 EAPOL_STATUS_NONE
= 0,
124 EAPOL_STATUS_REQID
= 1,
125 EAPOL_STATUS_RSPID
= 2,
126 EAPOL_STATUS_WSC_START
= 3,
127 EAPOL_STATUS_WPS_M1
= 4,
128 EAPOL_STATUS_WPS_M2
= 5,
129 EAPOL_STATUS_WPS_M3
= 6,
130 EAPOL_STATUS_WPS_M4
= 7,
131 EAPOL_STATUS_WPS_M5
= 8,
132 EAPOL_STATUS_WPS_M6
= 9,
133 EAPOL_STATUS_WPS_M7
= 10,
134 EAPOL_STATUS_WPS_M8
= 11,
135 EAPOL_STATUS_WSC_DONE
= 12,
136 EAPOL_STATUS_4WAY_START
= 13,
137 EAPOL_STATUS_4WAY_M1
= 14,
138 EAPOL_STATUS_4WAY_M2
= 15,
139 EAPOL_STATUS_4WAY_M3
= 16,
140 EAPOL_STATUS_4WAY_M4
= 17,
141 EAPOL_STATUS_GROUPKEY_M1
= 18,
142 EAPOL_STATUS_GROUPKEY_M2
= 19,
143 EAPOL_STATUS_4WAY_DONE
= 20
146 typedef struct dhd_conf
{
151 wl_mac_list_ctrl_t fw_by_mac
;
152 wl_mac_list_ctrl_t nv_by_mac
;
154 wl_chip_nv_path_list_ctrl_t nv_by_chip
;
155 conf_country_list_t country_list
;
159 wl_channel_list_t channels
;
161 uint roam_off_suspend
;
163 int roam_scan_period
[2];
166 uint keep_alive_period
;
167 #ifdef ARP_OFFLOAD_SUPPORT
173 #ifdef PKT_FILTER_SUPPORT
174 conf_pkt_filter_add_t pkt_filter_add
;
175 conf_pkt_filter_del_t pkt_filter_del
;
176 char *magic_pkt_filter_add
;
186 bool txglom_ext
; /* Only for 43362/4330/43340/43341/43241 */
188 1) conf->tx_max_offset = 1 to fix credict issue in adaptivity testing
189 2) conf->tx_max_offset = 1 will cause to UDP Tx not work in rxglom supported,
190 but not happened in sw txglom
196 uint deferred_tx_len
;
197 /*txglom_bucket_size:
199 * 43340/43341/43241: 1684
201 int txglom_bucket_size
;
203 int dhd_txminmax
; // -1=DATABUFCNT(bus)
204 bool oob_enabled_later
;
205 #if defined(SDIO_ISR_THREAD)
208 #ifdef BCMSDIO_RXLIM_POST
213 int bus_deepsleep_disable
;
221 int suspend_bcn_li_dtim
;
222 #ifdef DHDTCPACK_SUPPRESS
223 uint8 tcpack_sup_mode
;
229 char resume_eventmask
[WL_EVENTING_MASK_LEN
];
230 struct ether_addr bssid_insuspend
;
236 struct ipv4_addr dhcpd_ip_addr
;
237 struct ipv4_addr dhcpd_ip_mask
;
238 struct ipv4_addr dhcpd_ip_start
;
239 struct ipv4_addr dhcpd_ip_end
;
243 char isam_config
[300];
244 char isam_enable
[50];
247 struct mchan_params mchan
[MCHAN_MAX_NUM
];
256 #ifdef GET_CUSTOM_MAC_FROM_CONFIG
262 int dhd_conf_get_mac(dhd_pub_t
*dhd
, bcmsdh_info_t
*sdh
, si_t
*sih
, uint8
*mac
);
263 #if defined(HW_OOB) || defined(FORCE_WOWLAN)
264 void dhd_conf_set_hw_oob_intr(bcmsdh_info_t
*sdh
, struct si_pub
*sih
);
266 void dhd_conf_set_txglom_params(dhd_pub_t
*dhd
, bool enable
);
267 int dhd_conf_set_blksize(bcmsdh_info_t
*sdh
);
269 void dhd_conf_set_path_params(dhd_pub_t
*dhd
, void *sdh
, void *sih
,
270 char *fw_path
, char *nv_path
);
271 int dhd_conf_set_intiovar(dhd_pub_t
*dhd
, uint cmd
, char *name
, int val
,
273 int dhd_conf_get_band(dhd_pub_t
*dhd
);
274 int dhd_conf_set_country(dhd_pub_t
*dhd
, wl_country_t
*cspec
);
275 int dhd_conf_get_country(dhd_pub_t
*dhd
, wl_country_t
*cspec
);
276 int dhd_conf_map_country_list(dhd_pub_t
*dhd
, wl_country_t
*cspec
);
277 int dhd_conf_fix_country(dhd_pub_t
*dhd
);
278 bool dhd_conf_match_channel(dhd_pub_t
*dhd
, uint32 channel
);
279 void dhd_conf_set_wme(dhd_pub_t
*dhd
, int ifidx
, int mode
);
280 void dhd_conf_set_mchan_bw(dhd_pub_t
*dhd
, int go
, int source
);
281 void dhd_conf_add_pkt_filter(dhd_pub_t
*dhd
);
282 bool dhd_conf_del_pkt_filter(dhd_pub_t
*dhd
, uint32 id
);
283 void dhd_conf_discard_pkt_filter(dhd_pub_t
*dhd
);
284 int dhd_conf_read_config(dhd_pub_t
*dhd
, char *conf_path
);
285 int dhd_conf_set_chiprev(dhd_pub_t
*dhd
, uint chip
, uint chiprev
);
286 uint
dhd_conf_get_chip(void *context
);
287 uint
dhd_conf_get_chiprev(void *context
);
288 int dhd_conf_get_pm(dhd_pub_t
*dhd
);
289 int dhd_conf_check_hostsleep(dhd_pub_t
*dhd
, int cmd
, void *buf
, int len
,
290 int *hostsleep_set
, int *hostsleep_val
, int *ret
);
291 void dhd_conf_get_hostsleep(dhd_pub_t
*dhd
,
292 int hostsleep_set
, int hostsleep_val
, int ret
);
293 int dhd_conf_mkeep_alive(dhd_pub_t
*dhd
, int ifidx
, int id
, int period
,
294 char *packet
, bool bcast
);
295 #ifdef ARP_OFFLOAD_SUPPORT
296 void dhd_conf_set_garp(dhd_pub_t
*dhd
, int ifidx
, uint32 ipa
, bool enable
);
299 int dhd_conf_get_disable_proptx(dhd_pub_t
*dhd
);
301 uint
dhd_conf_get_insuspend(dhd_pub_t
*dhd
, uint mask
);
302 int dhd_conf_set_suspend_resume(dhd_pub_t
*dhd
, int suspend
);
303 void dhd_conf_postinit_ioctls(dhd_pub_t
*dhd
);
304 int dhd_conf_preinit(dhd_pub_t
*dhd
);
305 int dhd_conf_reset(dhd_pub_t
*dhd
);
306 int dhd_conf_attach(dhd_pub_t
*dhd
);
307 void dhd_conf_detach(dhd_pub_t
*dhd
);
308 void *dhd_get_pub(struct net_device
*dev
);
309 int wl_pattern_atoh(char *src
, char *dst
);
310 #endif /* _dhd_config_ */