1 /****************************************************************************** 2 * 3 * Copyright(c) 2007 - 2020 Realtek Corporation. 4 * 5 * This program is free software; you can redistribute it and/or modify it 6 * under the terms of version 2 of the GNU General Public License as 7 * published by the Free Software Foundation. 8 * 9 * This program is distributed in the hope that it will be useful, but WITHOUT 10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for 12 * more details. 13 * 14 *****************************************************************************/ 15 #ifndef __RTW_ROCH_H__ 16 #define __RTW_ROCH_H__ 17 18 #include <drv_types.h> 19 20 struct rtw_roch_parm; 21 22 #if (defined(CONFIG_P2P) && defined(CONFIG_CONCURRENT_MODE)) || defined(CONFIG_IOCTL_CFG80211) 23 struct roch_info { 24 #ifdef CONFIG_CONCURRENT_MODE 25 _timer ap_roch_ch_switch_timer; /* Used to switch the channel between legacy AP and listen state. */ 26 #ifdef CONFIG_IOCTL_CFG80211 27 u32 min_home_dur; /* min duration for traffic, home_time */ 28 u32 max_away_dur; /* max acceptable away duration, home_away_time */ 29 #endif 30 #endif 31 32 #ifdef CONFIG_IOCTL_CFG80211 33 _timer remain_on_ch_timer; 34 u8 restore_channel; 35 struct ieee80211_channel remain_on_ch_channel; 36 enum nl80211_channel_type remain_on_ch_type; 37 ATOMIC_T ro_ch_cookie_gen; 38 u64 remain_on_ch_cookie; 39 bool is_ro_ch; 40 struct wireless_dev *ro_ch_wdev; 41 systime last_ro_ch_time; /* this will be updated at the beginning and end of ro_ch */ 42 #endif 43 }; 44 #endif 45 46 #ifdef CONFIG_IOCTL_CFG80211 47 u8 rtw_roch_stay_in_cur_chan(_adapter *padapter); 48 #endif 49 50 #if (defined(CONFIG_P2P) && defined(CONFIG_CONCURRENT_MODE)) || defined(CONFIG_IOCTL_CFG80211) 51 s32 rtw_roch_wk_hdl(_adapter *padapter, int intCmdType, u8 *buf); 52 u8 rtw_roch_wk_cmd(_adapter *padapter, int intCmdType, struct rtw_roch_parm *roch_parm, u8 flags); 53 54 #ifdef CONFIG_CONCURRENT_MODE 55 void rtw_concurrent_handler(_adapter *padapter); 56 #endif 57 58 void rtw_init_roch_info(_adapter *padapter); 59 #endif /* (defined(CONFIG_P2P) && defined(CONFIG_CONCURRENT_MODE)) || defined(CONFIG_IOCTL_CFG80211) */ 60 61 #endif 62