mirror of
https://github.com/aircrack-ng/rtl8812au.git
synced 2025-01-06 06:06:09 +00:00
commit
ac5840e10b
@ -457,8 +457,11 @@ void rtl8812_init_dm_priv(IN PADAPTER Adapter)
|
|||||||
|
|
||||||
Init_ODM_ComInfo_8812(Adapter);
|
Init_ODM_ComInfo_8812(Adapter);
|
||||||
ODM_InitAllTimers(podmpriv);
|
ODM_InitAllTimers(podmpriv);
|
||||||
|
|
||||||
|
pHalData->CurrentTxPwrIdx = 18;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void rtl8812_deinit_dm_priv(IN PADAPTER Adapter)
|
void rtl8812_deinit_dm_priv(IN PADAPTER Adapter)
|
||||||
{
|
{
|
||||||
PHAL_DATA_TYPE pHalData = GET_HAL_DATA(Adapter);
|
PHAL_DATA_TYPE pHalData = GET_HAL_DATA(Adapter);
|
||||||
|
@ -3163,6 +3163,27 @@ static int cfg80211_rtw_set_txpower(struct wiphy *wiphy,
|
|||||||
enum tx_power_setting type, int dbm)
|
enum tx_power_setting type, int dbm)
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
|
|
||||||
|
_adapter *padapter = wiphy_to_adapter(wiphy);
|
||||||
|
HAL_DATA_TYPE *pHalData = GET_HAL_DATA(padapter);
|
||||||
|
int value;
|
||||||
|
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,36)) || defined(COMPAT_KERNEL_RELEASE)
|
||||||
|
value = mbm/100;
|
||||||
|
#else
|
||||||
|
value = dbm;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
if(value < 0)
|
||||||
|
value = 0;
|
||||||
|
if(value > 40)
|
||||||
|
value = 40;
|
||||||
|
|
||||||
|
if(type == NL80211_TX_POWER_FIXED) {
|
||||||
|
pHalData->CurrentTxPwrIdx = value;
|
||||||
|
rtw_hal_set_tx_power_level(padapter, pHalData->CurrentChannel);
|
||||||
|
} else
|
||||||
|
return -EOPNOTSUPP;
|
||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
struct iwm_priv *iwm = wiphy_to_iwm(wiphy);
|
struct iwm_priv *iwm = wiphy_to_iwm(wiphy);
|
||||||
int ret;
|
int ret;
|
||||||
@ -3199,9 +3220,13 @@ static int cfg80211_rtw_get_txpower(struct wiphy *wiphy,
|
|||||||
#endif
|
#endif
|
||||||
int *dbm)
|
int *dbm)
|
||||||
{
|
{
|
||||||
|
_adapter *padapter = wiphy_to_adapter(wiphy);
|
||||||
|
HAL_DATA_TYPE *pHalData = GET_HAL_DATA(padapter);
|
||||||
|
|
||||||
RTW_INFO("%s\n", __func__);
|
RTW_INFO("%s\n", __func__);
|
||||||
|
|
||||||
*dbm = (12);
|
*dbm = pHalData->CurrentTxPwrIdx;
|
||||||
|
//*dbm = (12);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user