6 #include <dngl_stats.h>
11 #define FW_PATH_AUTO_SELECT 1
12 //#define CONFIG_PATH_AUTO_SELECT
13 extern char firmware_path
[MOD_PARAM_PATHLEN
];
14 extern uint dhd_rxbound
;
15 extern uint dhd_txbound
;
17 #define TXGLOM_RECV_OFFSET 8
18 extern uint dhd_doflow
;
19 extern uint dhd_slpauto
;
21 #define BCM43362A0_CHIP_REV 0
22 #define BCM43362A2_CHIP_REV 1
23 #define BCM43430A0_CHIP_REV 0
24 #define BCM43430A1_CHIP_REV 1
25 #define BCM43430A2_CHIP_REV 2
26 #define BCM43012B0_CHIP_REV 1
27 #define BCM4330B2_CHIP_REV 4
28 #define BCM4334B1_CHIP_REV 3
29 #define BCM43341B0_CHIP_REV 2
30 #define BCM43241B4_CHIP_REV 5
31 #define BCM4335A0_CHIP_REV 2
32 #define BCM4339A0_CHIP_REV 1
33 #define BCM43455C0_CHIP_REV 6
34 #define BCM43455C5_CHIP_REV 9
35 #define BCM4354A1_CHIP_REV 1
36 #define BCM4359B1_CHIP_REV 5
37 #define BCM4359C0_CHIP_REV 9
39 #define BCM4356A2_CHIP_REV 2
40 #define BCM4358A3_CHIP_REV 3
42 typedef struct wl_mac_range
{
48 typedef struct wl_mac_list
{
51 char name
[MOD_PARAM_PATHLEN
];
54 typedef struct wl_mac_list_ctrl
{
56 struct wl_mac_list
*m_mac_list_head
;
59 typedef struct wl_chip_nv_path
{
62 char name
[MOD_PARAM_PATHLEN
];
65 typedef struct wl_chip_nv_path_list_ctrl
{
67 struct wl_chip_nv_path
*m_chip_nv_path_head
;
68 } wl_chip_nv_path_list_ctrl_t
;
70 typedef struct wl_channel_list
{
72 uint32 channel
[WL_NUMCHANNELS
];
75 typedef struct wmes_param
{
82 #ifdef PKT_FILTER_SUPPORT
83 #define DHD_CONF_FILTER_MAX 8
84 #define PKT_FILTER_LEN 300
85 typedef struct conf_pkt_filter_add
{
87 char filter
[DHD_CONF_FILTER_MAX
][PKT_FILTER_LEN
];
88 } conf_pkt_filter_add_t
;
90 typedef struct conf_pkt_filter_del
{
92 uint32 id
[DHD_CONF_FILTER_MAX
];
93 } conf_pkt_filter_del_t
;
96 #define CONFIG_COUNTRY_LIST_SIZE 100
97 typedef struct conf_country_list
{
99 wl_country_t cspec
[CONFIG_COUNTRY_LIST_SIZE
];
100 } conf_country_list_t
;
102 typedef struct dhd_conf
{
105 wl_mac_list_ctrl_t fw_by_mac
;
106 wl_mac_list_ctrl_t nv_by_mac
;
107 wl_chip_nv_path_list_ctrl_t nv_by_chip
;
108 conf_country_list_t country_list
;
114 wl_channel_list_t channels
;
116 uint roam_off_suspend
;
118 int roam_scan_period
[2];
121 uint keep_alive_period
;
126 int phy_oclscdenable
;
127 #ifdef PKT_FILTER_SUPPORT
128 conf_pkt_filter_add_t pkt_filter_add
;
129 conf_pkt_filter_del_t pkt_filter_del
;
130 conf_pkt_filter_add_t magic_pkt_filter_add
;
143 bool txglom_ext
; /* Only for 43362/4330/43340/43341/43241 */
145 1) conf->tx_max_offset = 1 to fix credict issue in adaptivity testing
146 2) conf->tx_max_offset = 1 will cause to UDP Tx not work in rxglom supported,
147 but not happened in sw txglom
155 uint deferred_tx_len
;
156 /*txglom_bucket_size:
158 * 43340/43341/43241: 1684
160 int txglom_bucket_size
;
162 int dhd_txminmax
; // -1=DATABUFCNT(bus)
163 uint sd_f2_blocksize
;
164 bool oob_enabled_later
;
167 int ampdu_hostreorder
;
175 #ifdef DHDTCPACK_SUPPRESS
176 uint8 tcpack_sup_mode
;
181 int num_different_channels
;
185 bool suspend_eventmask_enable
;
186 char suspend_eventmask
[WL_EVENTING_MASK_LEN
];
187 char resume_eventmask
[WL_EVENTING_MASK_LEN
];
192 struct ipv4_addr dhcpd_ip_addr
;
193 struct ipv4_addr dhcpd_ip_mask
;
194 struct ipv4_addr dhcpd_ip_start
;
195 struct ipv4_addr dhcpd_ip_end
;
197 #ifdef IAPSTA_PREINIT
198 char iapsta_init
[50];
199 char iapsta_config
[300];
200 char iapsta_enable
[50];
207 int dhd_conf_get_mac(dhd_pub_t
*dhd
, bcmsdh_info_t
*sdh
, uint8
*mac
);
208 void dhd_conf_set_fw_name_by_mac(dhd_pub_t
*dhd
, bcmsdh_info_t
*sdh
, char *fw_path
);
209 void dhd_conf_set_nv_name_by_mac(dhd_pub_t
*dhd
, bcmsdh_info_t
*sdh
, char *nv_path
);
210 #if defined(HW_OOB) || defined(FORCE_WOWLAN)
211 void dhd_conf_set_hw_oob_intr(bcmsdh_info_t
*sdh
, uint chip
);
213 void dhd_conf_set_txglom_params(dhd_pub_t
*dhd
, bool enable
);
215 void dhd_conf_set_fw_name_by_chip(dhd_pub_t
*dhd
, char *fw_path
);
216 void dhd_conf_set_clm_name_by_chip(dhd_pub_t
*dhd
, char *clm_path
);
217 void dhd_conf_set_nv_name_by_chip(dhd_pub_t
*dhd
, char *nv_path
);
218 void dhd_conf_set_path(dhd_pub_t
*dhd
, char *dst_name
, char *dst_path
, char *src_path
);
219 #ifdef CONFIG_PATH_AUTO_SELECT
220 void dhd_conf_set_conf_name_by_chip(dhd_pub_t
*dhd
, char *conf_path
);
222 int dhd_conf_set_intiovar(dhd_pub_t
*dhd
, uint cmd
, char *name
, int val
, int def
, bool down
);
223 int dhd_conf_get_iovar(dhd_pub_t
*dhd
, int cmd
, char *name
, char *buf
, int len
, int ifidx
);
224 int dhd_conf_set_bufiovar(dhd_pub_t
*dhd
, uint cmd
, char *name
, char *buf
, int len
, bool down
);
225 uint
dhd_conf_get_band(dhd_pub_t
*dhd
);
226 int dhd_conf_set_country(dhd_pub_t
*dhd
);
227 int dhd_conf_get_country(dhd_pub_t
*dhd
, wl_country_t
*cspec
);
228 int dhd_conf_get_country_from_config(dhd_pub_t
*dhd
, wl_country_t
*cspec
);
229 int dhd_conf_fix_country(dhd_pub_t
*dhd
);
230 bool dhd_conf_match_channel(dhd_pub_t
*dhd
, uint32 channel
);
231 int dhd_conf_set_roam(dhd_pub_t
*dhd
);
232 void dhd_conf_set_bw_cap(dhd_pub_t
*dhd
);
233 void dhd_conf_set_wme(dhd_pub_t
*dhd
, int mode
);
234 void dhd_conf_add_pkt_filter(dhd_pub_t
*dhd
);
235 bool dhd_conf_del_pkt_filter(dhd_pub_t
*dhd
, uint32 id
);
236 void dhd_conf_discard_pkt_filter(dhd_pub_t
*dhd
);
237 int dhd_conf_read_config(dhd_pub_t
*dhd
, char *conf_path
);
238 int dhd_conf_set_chiprev(dhd_pub_t
*dhd
, uint chip
, uint chiprev
);
239 uint
dhd_conf_get_chip(void *context
);
240 uint
dhd_conf_get_chiprev(void *context
);
241 int dhd_conf_get_pm(dhd_pub_t
*dhd
);
243 int dhd_conf_get_disable_proptx(dhd_pub_t
*dhd
);
245 int dhd_conf_get_ap_mode_in_suspend(dhd_pub_t
*dhd
);
246 int dhd_conf_set_ap_in_suspend(dhd_pub_t
*dhd
, int suspend
);
247 int dhd_conf_set_blksize(bcmsdh_info_t
*sdh
);
248 int dhd_conf_preinit(dhd_pub_t
*dhd
);
249 int dhd_conf_reset(dhd_pub_t
*dhd
);
250 int dhd_conf_attach(dhd_pub_t
*dhd
);
251 void dhd_conf_detach(dhd_pub_t
*dhd
);
252 void *dhd_get_pub(struct net_device
*dev
);
253 void *dhd_get_conf(struct net_device
*dev
);
254 #endif /* _dhd_config_ */