xref: /OK3568_Linux_fs/kernel/drivers/net/wireless/ath/ath6kl/cfg80211.h (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593Smuzhiyun /*
2*4882a593Smuzhiyun  * Copyright (c) 2011 Atheros Communications Inc.
3*4882a593Smuzhiyun  * Copyright (c) 2011-2012 Qualcomm Atheros, Inc.
4*4882a593Smuzhiyun  *
5*4882a593Smuzhiyun  * Permission to use, copy, modify, and/or distribute this software for any
6*4882a593Smuzhiyun  * purpose with or without fee is hereby granted, provided that the above
7*4882a593Smuzhiyun  * copyright notice and this permission notice appear in all copies.
8*4882a593Smuzhiyun  *
9*4882a593Smuzhiyun  * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
10*4882a593Smuzhiyun  * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
11*4882a593Smuzhiyun  * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
12*4882a593Smuzhiyun  * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
13*4882a593Smuzhiyun  * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
14*4882a593Smuzhiyun  * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
15*4882a593Smuzhiyun  * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
16*4882a593Smuzhiyun  */
17*4882a593Smuzhiyun 
18*4882a593Smuzhiyun #ifndef ATH6KL_CFG80211_H
19*4882a593Smuzhiyun #define ATH6KL_CFG80211_H
20*4882a593Smuzhiyun 
21*4882a593Smuzhiyun enum ath6kl_cfg_suspend_mode {
22*4882a593Smuzhiyun 	ATH6KL_CFG_SUSPEND_DEEPSLEEP,
23*4882a593Smuzhiyun 	ATH6KL_CFG_SUSPEND_CUTPOWER,
24*4882a593Smuzhiyun 	ATH6KL_CFG_SUSPEND_WOW,
25*4882a593Smuzhiyun };
26*4882a593Smuzhiyun 
27*4882a593Smuzhiyun struct wireless_dev *ath6kl_interface_add(struct ath6kl *ar, const char *name,
28*4882a593Smuzhiyun 					  unsigned char name_assign_type,
29*4882a593Smuzhiyun 					  enum nl80211_iftype type,
30*4882a593Smuzhiyun 					  u8 fw_vif_idx, u8 nw_type);
31*4882a593Smuzhiyun void ath6kl_cfg80211_ch_switch_notify(struct ath6kl_vif *vif, int freq,
32*4882a593Smuzhiyun 				      enum wmi_phy_mode mode);
33*4882a593Smuzhiyun void ath6kl_cfg80211_scan_complete_event(struct ath6kl_vif *vif, bool aborted);
34*4882a593Smuzhiyun 
35*4882a593Smuzhiyun void ath6kl_cfg80211_connect_event(struct ath6kl_vif *vif, u16 channel,
36*4882a593Smuzhiyun 				   u8 *bssid, u16 listen_intvl,
37*4882a593Smuzhiyun 				   u16 beacon_intvl,
38*4882a593Smuzhiyun 				   enum network_type nw_type,
39*4882a593Smuzhiyun 				   u8 beacon_ie_len, u8 assoc_req_len,
40*4882a593Smuzhiyun 				   u8 assoc_resp_len, u8 *assoc_info);
41*4882a593Smuzhiyun 
42*4882a593Smuzhiyun void ath6kl_cfg80211_disconnect_event(struct ath6kl_vif *vif, u8 reason,
43*4882a593Smuzhiyun 				      u8 *bssid, u8 assoc_resp_len,
44*4882a593Smuzhiyun 				      u8 *assoc_info, u16 proto_reason);
45*4882a593Smuzhiyun 
46*4882a593Smuzhiyun void ath6kl_cfg80211_tkip_micerr_event(struct ath6kl_vif *vif, u8 keyid,
47*4882a593Smuzhiyun 				     bool ismcast);
48*4882a593Smuzhiyun 
49*4882a593Smuzhiyun int ath6kl_cfg80211_suspend(struct ath6kl *ar,
50*4882a593Smuzhiyun 			    enum ath6kl_cfg_suspend_mode mode,
51*4882a593Smuzhiyun 			    struct cfg80211_wowlan *wow);
52*4882a593Smuzhiyun 
53*4882a593Smuzhiyun int ath6kl_cfg80211_resume(struct ath6kl *ar);
54*4882a593Smuzhiyun 
55*4882a593Smuzhiyun void ath6kl_cfg80211_vif_cleanup(struct ath6kl_vif *vif);
56*4882a593Smuzhiyun 
57*4882a593Smuzhiyun void ath6kl_cfg80211_stop(struct ath6kl_vif *vif);
58*4882a593Smuzhiyun void ath6kl_cfg80211_stop_all(struct ath6kl *ar);
59*4882a593Smuzhiyun 
60*4882a593Smuzhiyun int ath6kl_cfg80211_init(struct ath6kl *ar);
61*4882a593Smuzhiyun void ath6kl_cfg80211_cleanup(struct ath6kl *ar);
62*4882a593Smuzhiyun 
63*4882a593Smuzhiyun struct ath6kl *ath6kl_cfg80211_create(void);
64*4882a593Smuzhiyun void ath6kl_cfg80211_destroy(struct ath6kl *ar);
65*4882a593Smuzhiyun 
66*4882a593Smuzhiyun #endif /* ATH6KL_CFG80211_H */
67