1 /****************************************************************************** 2 * 3 * Copyright(c) 2007 - 2017 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 * The full GNU General Public License is included in this distribution in the 15 * file called LICENSE. 16 * 17 * Contact Information: 18 * wlanfae <wlanfae@realtek.com> 19 * Realtek Corporation, No. 2, Innovation Road II, Hsinchu Science Park, 20 * Hsinchu 300, Taiwan. 21 * 22 * Larry Finger <Larry.Finger@lwfinger.net> 23 * 24 *****************************************************************************/ 25 26 #ifndef __PHYDM_PRIMARYCCA_H__ 27 #define __PHYDM_PRIMARYCCA_H__ 28 29 #ifdef PHYDM_PRIMARY_CCA 30 #define PRIMARYCCA_VERSION "2.0" 31 32 /*@============================================================*/ 33 /*@Definition */ 34 /*@============================================================*/ 35 36 #define OFDMCCA_TH 500 37 #define bw_ind_bias 500 38 #define PRI_CCA_MONITOR_TIME 30 39 40 /*@============================================================*/ 41 /*structure and define*/ 42 /*@============================================================*/ 43 enum primary_cca_ch_position { /*N-series REG0xc6c[8:7]*/ 44 MF_USC_LSC = 0, 45 MF_LSC = 1, 46 MF_USC = 2 47 }; 48 49 struct phydm_pricca_struct { 50 #if (RTL8188E_SUPPORT == 1) || (RTL8192E_SUPPORT == 1) 51 u8 pri_cca_flag; 52 u8 intf_flag; 53 u8 intf_type; 54 u8 monitor_flag; 55 u8 ch_offset; 56 #endif 57 u8 dup_rts_flag; 58 u8 cca_th_40m_bkp; /*@c84[31:28]*/ 59 enum channel_width pre_bw; 60 u8 pri_cca_is_become_linked; 61 u8 mf_state; 62 }; 63 64 /*@============================================================*/ 65 /*@function prototype*/ 66 /*@============================================================*/ 67 void phydm_write_dynamic_cca(void *dm_void, u8 curr_mf_state); 68 69 boolean odm_dynamic_primary_cca_dup_rts(void *dm_void); 70 71 void phydm_primary_cca_init(void *dm_void); 72 73 void phydm_primary_cca(void *dm_void); 74 #endif /*@#ifdef PHYDM_PRIMARY_CCA*/ 75 #endif /*@#ifndef __PHYDM_PRIMARYCCA_H__*/ 76 77