xref: /OK3568_Linux_fs/external/rkwifibt/drivers/bcmdhd/dhd_wet.h (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593Smuzhiyun /*
2*4882a593Smuzhiyun  * Wireless Ethernet (WET) interface
3*4882a593Smuzhiyun  *
4*4882a593Smuzhiyun  * Copyright (C) 2020, Broadcom.
5*4882a593Smuzhiyun  *
6*4882a593Smuzhiyun  *      Unless you and Broadcom execute a separate written software license
7*4882a593Smuzhiyun  * agreement governing use of this software, this software is licensed to you
8*4882a593Smuzhiyun  * under the terms of the GNU General Public License version 2 (the "GPL"),
9*4882a593Smuzhiyun  * available at http://www.broadcom.com/licenses/GPLv2.php, with the
10*4882a593Smuzhiyun  * following added to such license:
11*4882a593Smuzhiyun  *
12*4882a593Smuzhiyun  *      As a special exception, the copyright holders of this software give you
13*4882a593Smuzhiyun  * permission to link this software with independent modules, and to copy and
14*4882a593Smuzhiyun  * distribute the resulting executable under terms of your choice, provided that
15*4882a593Smuzhiyun  * you also meet, for each linked independent module, the terms and conditions of
16*4882a593Smuzhiyun  * the license of that module.  An independent module is a module which is not
17*4882a593Smuzhiyun  * derived from this software.  The special exception does not apply to any
18*4882a593Smuzhiyun  * modifications of the software.
19*4882a593Smuzhiyun  *
20*4882a593Smuzhiyun  *
21*4882a593Smuzhiyun  * <<Broadcom-WL-IPTag/Open:>>
22*4882a593Smuzhiyun  *
23*4882a593Smuzhiyun  * $Id$
24*4882a593Smuzhiyun  */
25*4882a593Smuzhiyun 
26*4882a593Smuzhiyun /** XXX Twiki: [WirelessEthernet] */
27*4882a593Smuzhiyun 
28*4882a593Smuzhiyun #ifndef _dhd_wet_h_
29*4882a593Smuzhiyun #define _dhd_wet_h_
30*4882a593Smuzhiyun 
31*4882a593Smuzhiyun #include <ethernet.h>
32*4882a593Smuzhiyun #include <dngl_stats.h>
33*4882a593Smuzhiyun #include <dhd.h>
34*4882a593Smuzhiyun 
35*4882a593Smuzhiyun #define DHD_WET_ENAB 1
36*4882a593Smuzhiyun #define	WET_ENABLED(dhdp)	((dhdp)->info->wet_mode == DHD_WET_ENAB)
37*4882a593Smuzhiyun 
38*4882a593Smuzhiyun /* forward declaration */
39*4882a593Smuzhiyun typedef struct dhd_wet_info dhd_wet_info_t;
40*4882a593Smuzhiyun 
41*4882a593Smuzhiyun extern dhd_wet_info_t *dhd_get_wet_info(dhd_pub_t *pub);
42*4882a593Smuzhiyun extern void dhd_free_wet_info(dhd_pub_t *pub, void *wet);
43*4882a593Smuzhiyun 
44*4882a593Smuzhiyun /* Process frames in transmit direction */
45*4882a593Smuzhiyun extern int dhd_wet_send_proc(void *weth, void *sdu, void **new);
46*4882a593Smuzhiyun extern void dhd_set_wet_host_ipv4(dhd_pub_t *pub, void *parms, uint32 len);
47*4882a593Smuzhiyun extern void dhd_set_wet_host_mac(dhd_pub_t *pub, void *parms, uint32 len);
48*4882a593Smuzhiyun /* Process frames in receive direction */
49*4882a593Smuzhiyun extern int dhd_wet_recv_proc(void *weth, void *sdu);
50*4882a593Smuzhiyun extern void dhd_wet_sta_delete_list(dhd_pub_t *dhd_pub);
51*4882a593Smuzhiyun 
52*4882a593Smuzhiyun #ifdef PLC_WET
53*4882a593Smuzhiyun extern void dhd_wet_bssid_upd(dhd_wet_info_t *weth, dhd_bsscfg_t *cfg);
54*4882a593Smuzhiyun #endif /* PLC_WET */
55*4882a593Smuzhiyun 
56*4882a593Smuzhiyun int dhd_set_wet_mode(dhd_pub_t *dhdp, uint32 val);
57*4882a593Smuzhiyun int dhd_get_wet_mode(dhd_pub_t *dhdp);
58*4882a593Smuzhiyun extern void dhd_wet_dump(dhd_pub_t *dhdp, struct bcmstrbuf *b);
59*4882a593Smuzhiyun 
60*4882a593Smuzhiyun #endif	/* _dhd_wet_h_ */
61