-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
rtlwifi: rtl8723ae: rtl8723-common: Copy common dynamic power managem…
…ent code The drivers for RTL8723AE and RTL8723BE have some code in common. This commit copies the common power management routines into the shared code. Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
- Loading branch information
Larry Finger
authored and
John W. Linville
committed
Mar 4, 2014
1 parent
cbd0c85
commit 57d9d96
Showing
6 changed files
with
106 additions
and
41 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
rtl8723-common-objs := \ | ||
main.o \ | ||
dm_common.o \ | ||
fw_common.o \ | ||
phy_common.o | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
/****************************************************************************** | ||
* | ||
* Copyright(c) 2009-2014 Realtek Corporation. | ||
* | ||
* This program is free software; you can redistribute it and/or modify it | ||
* under the terms of version 2 of the GNU General Public License as | ||
* published by the Free Software Foundation. | ||
* | ||
* This program is distributed in the hope that it will be useful, but WITHOUT | ||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | ||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for | ||
* more details. | ||
* | ||
* The full GNU General Public License is included in this distribution in the | ||
* file called LICENSE. | ||
* | ||
* Contact Information: | ||
* wlanfae <wlanfae@realtek.com> | ||
* Realtek Corporation, No. 2, Innovation Road II, Hsinchu Science Park, | ||
* Hsinchu 300, Taiwan. | ||
* | ||
* Larry Finger <Larry.Finger@lwfinger.net> | ||
* | ||
*****************************************************************************/ | ||
|
||
#include "../wifi.h" | ||
#include "dm_common.h" | ||
#include "../rtl8723ae/dm.h" | ||
#include <linux/module.h> | ||
|
||
/* These routines are common to RTL8723AE and RTL8723bE */ | ||
|
||
void rtl8723_dm_init_dynamic_txpower(struct ieee80211_hw *hw) | ||
{ | ||
struct rtl_priv *rtlpriv = rtl_priv(hw); | ||
|
||
rtlpriv->dm.dynamic_txpower_enable = false; | ||
|
||
rtlpriv->dm.last_dtp_lvl = TXHIGHPWRLEVEL_NORMAL; | ||
rtlpriv->dm.dynamic_txhighpower_lvl = TXHIGHPWRLEVEL_NORMAL; | ||
} | ||
EXPORT_SYMBOL_GPL(rtl8723_dm_init_dynamic_txpower); | ||
|
||
void rtl8723_dm_init_edca_turbo(struct ieee80211_hw *hw) | ||
{ | ||
struct rtl_priv *rtlpriv = rtl_priv(hw); | ||
|
||
rtlpriv->dm.current_turbo_edca = false; | ||
rtlpriv->dm.is_any_nonbepkts = false; | ||
rtlpriv->dm.is_cur_rdlstate = false; | ||
} | ||
EXPORT_SYMBOL_GPL(rtl8723_dm_init_edca_turbo); | ||
|
||
void rtl8723_dm_init_dynamic_bb_powersaving(struct ieee80211_hw *hw) | ||
{ | ||
struct rtl_priv *rtlpriv = rtl_priv(hw); | ||
|
||
rtlpriv->dm_pstable.pre_ccastate = CCA_MAX; | ||
rtlpriv->dm_pstable.cur_ccasate = CCA_MAX; | ||
rtlpriv->dm_pstable.pre_rfstate = RF_MAX; | ||
rtlpriv->dm_pstable.cur_rfstate = RF_MAX; | ||
rtlpriv->dm_pstable.rssi_val_min = 0; | ||
rtlpriv->dm_pstable.initialize = 0; | ||
} | ||
EXPORT_SYMBOL_GPL(rtl8723_dm_init_dynamic_bb_powersaving); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
/****************************************************************************** | ||
* | ||
* Copyright(c) 2009-2014 Realtek Corporation. | ||
* | ||
* This program is free software; you can redistribute it and/or modify it | ||
* under the terms of version 2 of the GNU General Public License as | ||
* published by the Free Software Foundation. | ||
* | ||
* This program is distributed in the hope that it will be useful, but WITHOUT | ||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | ||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for | ||
* more details. | ||
* | ||
* The full GNU General Public License is included in this distribution in the | ||
* file called LICENSE. | ||
* | ||
* Contact Information: | ||
* wlanfae <wlanfae@realtek.com> | ||
* Realtek Corporation, No. 2, Innovation Road II, Hsinchu Science Park, | ||
* Hsinchu 300, Taiwan. | ||
* | ||
* Larry Finger <Larry.Finger@lwfinger.net> | ||
* | ||
*****************************************************************************/ | ||
|
||
#ifndef __DM_COMMON_H__ | ||
#define __DM_COMMON_H__ | ||
|
||
void rtl8723_dm_init_dynamic_txpower(struct ieee80211_hw *hw); | ||
void rtl8723_dm_init_edca_turbo(struct ieee80211_hw *hw); | ||
void rtl8723_dm_init_dynamic_bb_powersaving(struct ieee80211_hw *hw); | ||
|
||
#endif |