From e37acdc291669497ff961eb45b2bff20d622d5b0 Mon Sep 17 00:00:00 2001 From: Sergei Makarenkov Date: Sat, 11 Feb 2017 15:54:32 +0300 Subject: [PATCH] Use HAL methods to apply TX power settings --- hal/rtl8812a/rtl8812a_phycfg.c | 2 ++ hal/rtl8814a/rtl8814a_phycfg.c | 2 ++ os_dep/linux/ioctl_cfg80211.c | 2 +- 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/hal/rtl8812a/rtl8812a_phycfg.c b/hal/rtl8812a/rtl8812a_phycfg.c index 05315e3..04f7137 100755 --- a/hal/rtl8812a/rtl8812a_phycfg.c +++ b/hal/rtl8812a/rtl8812a_phycfg.c @@ -578,6 +578,8 @@ PHY_GetTxPowerLevel8812( OUT s32* powerlevel ) { + HAL_DATA_TYPE *pHalData = GET_HAL_DATA(Adapter); + *powerlevel = pHalData->CurrentTxPwrIdx; #if 0 HAL_DATA_TYPE *pHalData = GET_HAL_DATA(Adapter); PMGNT_INFO pMgntInfo = &(Adapter->MgntInfo); diff --git a/hal/rtl8814a/rtl8814a_phycfg.c b/hal/rtl8814a/rtl8814a_phycfg.c index c7c2610..a686721 100644 --- a/hal/rtl8814a/rtl8814a_phycfg.c +++ b/hal/rtl8814a/rtl8814a_phycfg.c @@ -1218,6 +1218,8 @@ PHY_GetTxPowerLevel8814( OUT ps4Byte powerlevel ) { + HAL_DATA_TYPE *pHalData = GET_HAL_DATA(Adapter); + *powerlevel = pHalData->CurrentTxPwrIdx; #if 0 HAL_DATA_TYPE *pHalData = GET_HAL_DATA(Adapter); PMGNT_INFO pMgntInfo = &(Adapter->MgntInfo); diff --git a/os_dep/linux/ioctl_cfg80211.c b/os_dep/linux/ioctl_cfg80211.c index 20ee8db..ff09de6 100644 --- a/os_dep/linux/ioctl_cfg80211.c +++ b/os_dep/linux/ioctl_cfg80211.c @@ -3460,7 +3460,7 @@ static int cfg80211_rtw_set_txpower(struct wiphy *wiphy, value = 40; pHalData->CurrentTxPwrIdx = value; - PHY_SetTxPowerLevel8812(padapter, pHalData->CurrentChannel); + rtw_hal_set_tx_power_level(padapter, pHalData->CurrentChannel); #if 0 struct iwm_priv *iwm = wiphy_to_iwm(wiphy);