1/****************************************************************************** 2 * 3 * Copyright(c) 2009-2014 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#include "../wifi.h" 27#include "dm_common.h" 28#include "../rtl8723ae/dm.h" 29#include <linux/module.h> 30 31/* These routines are common to RTL8723AE and RTL8723bE */ 32 33void rtl8723_dm_init_dynamic_txpower(struct ieee80211_hw *hw) 34{ 35 struct rtl_priv *rtlpriv = rtl_priv(hw); 36 37 rtlpriv->dm.dynamic_txpower_enable = false; 38 39 rtlpriv->dm.last_dtp_lvl = TXHIGHPWRLEVEL_NORMAL; 40 rtlpriv->dm.dynamic_txhighpower_lvl = TXHIGHPWRLEVEL_NORMAL; 41} 42EXPORT_SYMBOL_GPL(rtl8723_dm_init_dynamic_txpower); 43 44void rtl8723_dm_init_edca_turbo(struct ieee80211_hw *hw) 45{ 46 struct rtl_priv *rtlpriv = rtl_priv(hw); 47 rtlpriv->dm.current_turbo_edca = false; 48 rtlpriv->dm.is_any_nonbepkts = false; 49 rtlpriv->dm.is_cur_rdlstate = false; 50} 51EXPORT_SYMBOL_GPL(rtl8723_dm_init_edca_turbo); 52 53void rtl8723_dm_init_dynamic_bb_powersaving(struct ieee80211_hw *hw) 54{ 55 struct rtl_priv *rtlpriv = rtl_priv(hw); 56 struct ps_t *dm_pstable = &rtlpriv->dm_pstable; 57 58 dm_pstable->pre_ccastate = CCA_MAX; 59 dm_pstable->cur_ccasate = CCA_MAX; 60 dm_pstable->pre_rfstate = RF_MAX; 61 dm_pstable->cur_rfstate = RF_MAX; 62 dm_pstable->rssi_val_min = 0; 63 dm_pstable->initialize = 0; 64} 65EXPORT_SYMBOL_GPL(rtl8723_dm_init_dynamic_bb_powersaving); 66