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