diff options
author | Hans Ulli Kroll <ulli.kroll@googlemail.com> | 2015-06-07 13:19:16 +0200 |
---|---|---|
committer | Kalle Valo <kvalo@codeaurora.org> | 2015-06-15 12:30:20 +0300 |
commit | 1637c1b7ebbb51de63b71c7eebcfff6407a0be72 (patch) | |
tree | 60b608d9e212dab76d85968a468c383d9f0c01ec /drivers/net/wireless/rtlwifi/rtl8192c/dm_common.c | |
parent | fbcaee1c6da13d10b8fb7810d76fb8ce92dd9226 (diff) | |
download | op-kernel-dev-1637c1b7ebbb51de63b71c7eebcfff6407a0be72.zip op-kernel-dev-1637c1b7ebbb51de63b71c7eebcfff6407a0be72.tar.gz |
rtlwifi: fix tm_trigger usage
While working on getting my rtl8821au driver in pretty shape for
inclusion, it is dicosvered that the tm_trigger flag is used only for
the first device using this driver.
This flag handles the thermal power management in the hardware.
To change this add a entry in sttruct rtl_dm, so each device can handle
is separately.
Signed-off-by: Hans Ulli Kroll <ulli.kroll@googlemail.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Diffstat (limited to 'drivers/net/wireless/rtlwifi/rtl8192c/dm_common.c')
-rw-r--r-- | drivers/net/wireless/rtlwifi/rtl8192c/dm_common.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/net/wireless/rtlwifi/rtl8192c/dm_common.c b/drivers/net/wireless/rtlwifi/rtl8192c/dm_common.c index f5ee67c..0aca6f4 100644 --- a/drivers/net/wireless/rtlwifi/rtl8192c/dm_common.c +++ b/drivers/net/wireless/rtlwifi/rtl8192c/dm_common.c @@ -1169,23 +1169,22 @@ static void rtl92c_dm_check_txpower_tracking_thermal_meter( struct ieee80211_hw *hw) { struct rtl_priv *rtlpriv = rtl_priv(hw); - static u8 tm_trigger; if (!rtlpriv->dm.txpower_tracking) return; - if (!tm_trigger) { + if (!rtlpriv->dm.tm_trigger) { rtl_set_rfreg(hw, RF90_PATH_A, RF_T_METER, RFREG_OFFSET_MASK, 0x60); RT_TRACE(rtlpriv, COMP_POWER_TRACKING, DBG_LOUD, "Trigger 92S Thermal Meter!!\n"); - tm_trigger = 1; + rtlpriv->dm.tm_trigger = 1; return; } else { RT_TRACE(rtlpriv, COMP_POWER_TRACKING, DBG_LOUD, "Schedule TxPowerTracking direct call!!\n"); rtl92c_dm_txpower_tracking_directcall(hw); - tm_trigger = 0; + rtlpriv->dm.tm_trigger = 0; } } |