xref: /OK3568_Linux_fs/external/rkwifibt/drivers/bcmdhd/wl_iapsta.h (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593Smuzhiyun 
2*4882a593Smuzhiyun #ifndef _wl_iapsta_
3*4882a593Smuzhiyun #define _wl_iapsta_
4*4882a593Smuzhiyun typedef enum IFMODE {
5*4882a593Smuzhiyun 	ISTA_MODE = 1,
6*4882a593Smuzhiyun 	IAP_MODE,
7*4882a593Smuzhiyun 	IGO_MODE,
8*4882a593Smuzhiyun 	IGC_MODE,
9*4882a593Smuzhiyun 	IMESH_MODE
10*4882a593Smuzhiyun } ifmode_t;
11*4882a593Smuzhiyun 
12*4882a593Smuzhiyun enum wl_ext_status {
13*4882a593Smuzhiyun 	WL_EXT_STATUS_PRE_DISCONNECTING = 0,
14*4882a593Smuzhiyun 	WL_EXT_STATUS_DISCONNECTING,
15*4882a593Smuzhiyun 	WL_EXT_STATUS_DISCONNECTED,
16*4882a593Smuzhiyun 	WL_EXT_STATUS_SCAN,
17*4882a593Smuzhiyun 	WL_EXT_STATUS_SCANNING,
18*4882a593Smuzhiyun 	WL_EXT_STATUS_SCAN_COMPLETE,
19*4882a593Smuzhiyun 	WL_EXT_STATUS_CONNECTING,
20*4882a593Smuzhiyun 	WL_EXT_STATUS_RECONNECT,
21*4882a593Smuzhiyun 	WL_EXT_STATUS_CONNECTED,
22*4882a593Smuzhiyun 	WL_EXT_STATUS_ROAMED,
23*4882a593Smuzhiyun 	WL_EXT_STATUS_ADD_KEY,
24*4882a593Smuzhiyun 	WL_EXT_STATUS_AP_ENABLING,
25*4882a593Smuzhiyun 	WL_EXT_STATUS_AP_ENABLED,
26*4882a593Smuzhiyun 	WL_EXT_STATUS_DELETE_STA,
27*4882a593Smuzhiyun 	WL_EXT_STATUS_STA_DISCONNECTED,
28*4882a593Smuzhiyun 	WL_EXT_STATUS_STA_CONNECTED,
29*4882a593Smuzhiyun 	WL_EXT_STATUS_AP_DISABLING,
30*4882a593Smuzhiyun 	WL_EXT_STATUS_AP_DISABLED
31*4882a593Smuzhiyun };
32*4882a593Smuzhiyun 
33*4882a593Smuzhiyun extern int op_mode;
34*4882a593Smuzhiyun void wl_ext_update_conn_state(dhd_pub_t *dhd, int ifidx, uint conn_state);
35*4882a593Smuzhiyun #ifdef EAPOL_RESEND
36*4882a593Smuzhiyun void wl_ext_backup_eapol_txpkt(dhd_pub_t *dhd, int ifidx, void *pkt);
37*4882a593Smuzhiyun void wl_ext_release_eapol_txpkt(dhd_pub_t *dhd, int ifidx, bool rx);
38*4882a593Smuzhiyun #endif /* EAPOL_RESEND */
39*4882a593Smuzhiyun void wl_ext_iapsta_get_vif_macaddr(struct dhd_pub *dhd, int ifidx, u8 *mac_addr);
40*4882a593Smuzhiyun #ifdef WLDWDS
41*4882a593Smuzhiyun int wl_ext_iapsta_attach_dwds_netdev(struct net_device *net, int ifidx, uint8 bssidx);
42*4882a593Smuzhiyun int wl_ext_iapsta_dettach_dwds_netdev(struct net_device *net, int ifidx, uint8 bssidx);
43*4882a593Smuzhiyun #endif /* WLDWDS */
44*4882a593Smuzhiyun int wl_ext_iapsta_attach_netdev(struct net_device *net, int ifidx, uint8 bssidx);
45*4882a593Smuzhiyun int wl_ext_iapsta_attach_name(struct net_device *net, int ifidx);
46*4882a593Smuzhiyun int wl_ext_iapsta_dettach_netdev(struct net_device *net, int ifidx);
47*4882a593Smuzhiyun int wl_ext_iapsta_update_net_device(struct net_device *net, int ifidx);
48*4882a593Smuzhiyun int wl_ext_iapsta_alive_preinit(struct net_device *dev);
49*4882a593Smuzhiyun int wl_ext_iapsta_alive_postinit(struct net_device *dev);
50*4882a593Smuzhiyun int wl_ext_iapsta_attach(struct net_device *net);
51*4882a593Smuzhiyun void wl_ext_iapsta_dettach(struct net_device *net);
52*4882a593Smuzhiyun int wl_ext_iapsta_enable(struct net_device *dev, char *command, int total_len);
53*4882a593Smuzhiyun int wl_ext_iapsta_disable(struct net_device *dev, char *command, int total_len);
54*4882a593Smuzhiyun int wl_ext_isam_param(struct net_device *dev, char *command, int total_len);
55*4882a593Smuzhiyun int wl_ext_isam_status(struct net_device *dev, char *command, int total_len);
56*4882a593Smuzhiyun int wl_ext_isam_init(struct net_device *dev, char *command, int total_len);
57*4882a593Smuzhiyun int wl_ext_iapsta_config(struct net_device *dev, char *command, int total_len);
58*4882a593Smuzhiyun void wl_ext_add_remove_pm_enable_work(struct net_device *dev, bool add);
59*4882a593Smuzhiyun bool wl_ext_iapsta_other_if_enabled(struct net_device *net);
60*4882a593Smuzhiyun bool wl_ext_sta_connecting(struct net_device *dev);
61*4882a593Smuzhiyun void wl_ext_get_chan_str(struct net_device *dev, char *chan_str, int total_len);
62*4882a593Smuzhiyun #ifdef DHD_LOSSLESS_ROAMING
63*4882a593Smuzhiyun int wl_ext_any_sta_handshaking(struct dhd_pub *dhd);
64*4882a593Smuzhiyun #endif /* DHD_LOSSLESS_ROAMING */
65*4882a593Smuzhiyun void wl_iapsta_wait_event_complete(struct dhd_pub *dhd);
66*4882a593Smuzhiyun int wl_iapsta_suspend_resume(dhd_pub_t *dhd, int suspend);
67*4882a593Smuzhiyun #ifdef USE_IW
68*4882a593Smuzhiyun int wl_ext_in4way_sync_wext(struct net_device *dev, uint action,
69*4882a593Smuzhiyun 	enum wl_ext_status status, void *context);
70*4882a593Smuzhiyun #endif /* USE_IW */
71*4882a593Smuzhiyun #ifdef WLMESH
72*4882a593Smuzhiyun int wl_ext_mesh_peer_status(struct net_device *dev, char *data, char *command,
73*4882a593Smuzhiyun 	int total_len);
74*4882a593Smuzhiyun int wl_ext_isam_peer_path(struct net_device *dev, char *command, int total_len);
75*4882a593Smuzhiyun #endif
76*4882a593Smuzhiyun #ifdef WL_CFG80211
77*4882a593Smuzhiyun int wl_ext_in4way_sync(struct net_device *dev, uint action,
78*4882a593Smuzhiyun 	enum wl_ext_status status, void *context);
79*4882a593Smuzhiyun void wl_ext_update_extsae_4way(struct net_device *dev,
80*4882a593Smuzhiyun 	const struct ieee80211_mgmt *mgmt, bool tx);
81*4882a593Smuzhiyun u32 wl_ext_iapsta_update_channel(struct net_device *dev, u32 channel);
82*4882a593Smuzhiyun void wl_ext_iapsta_update_iftype(struct net_device *net, int wl_iftype);
83*4882a593Smuzhiyun bool wl_ext_iapsta_iftype_enabled(struct net_device *net, int wl_iftype);
84*4882a593Smuzhiyun void wl_ext_iapsta_enable_master_if(struct net_device *dev, bool post);
85*4882a593Smuzhiyun void wl_ext_iapsta_restart_master(struct net_device *dev);
86*4882a593Smuzhiyun void wl_ext_iapsta_ifadding(struct net_device *net, int ifidx);
87*4882a593Smuzhiyun bool wl_ext_iapsta_mesh_creating(struct net_device *net);
88*4882a593Smuzhiyun void wl_ext_fw_reinit_incsa(struct net_device *dev);
89*4882a593Smuzhiyun void wl_ext_send_event_msg(struct net_device *dev, int event, int status,
90*4882a593Smuzhiyun 	int reason);
91*4882a593Smuzhiyun #ifdef BTC_WAR
92*4882a593Smuzhiyun void wl_ext_btc_config(struct net_device *dev, bool enable);
93*4882a593Smuzhiyun #endif /* BTC_WAR */
94*4882a593Smuzhiyun #ifdef STA_MGMT
95*4882a593Smuzhiyun bool wl_ext_del_sta_info(struct net_device *net, u8 *bssid);
96*4882a593Smuzhiyun bool wl_ext_add_sta_info(struct net_device *net, u8 *bssid);
97*4882a593Smuzhiyun #endif /* STA_MGMT */
98*4882a593Smuzhiyun #ifdef SCAN_SUPPRESS
99*4882a593Smuzhiyun uint16 wl_ext_scan_suppress(struct net_device *dev, void *scan_params, bool scan_v2,
100*4882a593Smuzhiyun 	struct wl_chan_info *chan_info);
101*4882a593Smuzhiyun void wl_ext_reset_scan_busy(dhd_pub_t *dhd);
102*4882a593Smuzhiyun #endif /* SCAN_SUPPRESS */
103*4882a593Smuzhiyun #endif
104*4882a593Smuzhiyun #ifdef PROPTX_MAXCOUNT
105*4882a593Smuzhiyun int wl_ext_get_wlfc_maxcount(struct dhd_pub *dhd, int ifidx);
106*4882a593Smuzhiyun #endif /* PROPTX_MAXCOUNT */
107*4882a593Smuzhiyun #endif
108