treewide: remove redundant IS_ERR() before error code check
[linux/fpc-iii.git] / drivers / net / wireless / realtek / rtlwifi / rtl8723com / dm_common.c
blob46ab90332eb7f84ba278348f7adf8c343811b2f7
1 // SPDX-License-Identifier: GPL-2.0
2 /* Copyright(c) 2009-2014 Realtek Corporation.*/
4 #include "../wifi.h"
5 #include "dm_common.h"
6 #include "../rtl8723ae/dm.h"
7 #include <linux/module.h>
9 /* These routines are common to RTL8723AE and RTL8723bE */
11 void rtl8723_dm_init_dynamic_txpower(struct ieee80211_hw *hw)
13 struct rtl_priv *rtlpriv = rtl_priv(hw);
15 rtlpriv->dm.dynamic_txpower_enable = false;
17 rtlpriv->dm.last_dtp_lvl = TXHIGHPWRLEVEL_NORMAL;
18 rtlpriv->dm.dynamic_txhighpower_lvl = TXHIGHPWRLEVEL_NORMAL;
20 EXPORT_SYMBOL_GPL(rtl8723_dm_init_dynamic_txpower);
22 void rtl8723_dm_init_edca_turbo(struct ieee80211_hw *hw)
24 struct rtl_priv *rtlpriv = rtl_priv(hw);
25 rtlpriv->dm.current_turbo_edca = false;
26 rtlpriv->dm.is_any_nonbepkts = false;
27 rtlpriv->dm.is_cur_rdlstate = false;
29 EXPORT_SYMBOL_GPL(rtl8723_dm_init_edca_turbo);
31 void rtl8723_dm_init_dynamic_bb_powersaving(struct ieee80211_hw *hw)
33 struct rtl_priv *rtlpriv = rtl_priv(hw);
34 struct ps_t *dm_pstable = &rtlpriv->dm_pstable;
36 dm_pstable->pre_ccastate = CCA_MAX;
37 dm_pstable->cur_ccasate = CCA_MAX;
38 dm_pstable->pre_rfstate = RF_MAX;
39 dm_pstable->cur_rfstate = RF_MAX;
40 dm_pstable->rssi_val_min = 0;
41 dm_pstable->initialize = 0;
43 EXPORT_SYMBOL_GPL(rtl8723_dm_init_dynamic_bb_powersaving);