xref: /OK3568_Linux_fs/kernel/drivers/net/wireless/rockchip_wlan/ssv6xxx/smac/p2p.h (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1 /*
2  * Copyright (c) 2015 South Silicon Valley Microelectronics Inc.
3  * Copyright (c) 2015 iComm Corporation
4  *
5  * This program is free software: you can redistribute it and/or modify
6  * it under the terms of the GNU General Public License as published by
7  * the Free Software Foundation, either version 3 of the License, or
8  * (at your option) any later version.
9  * This program is distributed in the hope that it will be useful, but
10  * WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
12  * See the GNU General Public License for more details.
13  * You should have received a copy of the GNU General Public License
14  * along with this program. If not, see <http://www.gnu.org/licenses/>.
15  */
16 
17 #ifndef _P2P_H_
18 #define _P2P_H_
19 #include <net/mac80211.h>
20 #include <ssv6200.h>
21 #include "drv_comm.h"
22 #ifdef CONFIG_P2P_NOA
23 #define P2P_MAX_NOA_INTERFACE 1
24 struct ssv_p2p_noa_detect {
25     const u8 *noa_addr;
26     s16 p2p_noa_index;
27     unsigned long last_rx;
28     struct ssv6xxx_p2p_noa_param noa_param_cmd;
29 };
30 struct ssv_p2p_noa {
31     spinlock_t p2p_config_lock;
32     struct ssv_p2p_noa_detect noa_detect[SSV_NUM_VIF];
33     u8 active_noa_vif;
34     u8 monitor_noa_vif;
35 };
36 enum ssv_cmd_state{
37     SSC_CMD_STATE_IDLE,
38     SSC_CMD_STATE_WAIT_RSP,
39 };
40 struct ssv_cmd_Info{
41     struct sk_buff_head cmd_que;
42     struct sk_buff_head evt_que;
43     enum ssv_cmd_state state;
44 };
45 enum ssv6xxx_noa_conf {
46  MONITOR_NOA_CONF_ADD,
47  MONITOR_NOA_CONF_REMOVE,
48 };
49 struct ssv_softc;
50 void ssv6xxx_process_noa_event(struct ssv_softc *sc, struct sk_buff *skb);
51 void ssv6xxx_noa_hdl_bss_change(struct ssv_softc *sc, enum ssv6xxx_noa_conf conf, u8 vif_idx);
52 void ssv6xxx_process_noa_event(struct ssv_softc *sc, struct sk_buff *skb);
53 void ssv6xxx_noa_detect(struct ssv_softc *sc, struct ieee80211_hdr * hdr, u32 len);
54 void ssv6xxx_noa_reset(struct ssv_softc *sc);
55 #endif
56 #endif
57