From fd29d9bcad0ad845c87b89777ec478bfd544eb15 Mon Sep 17 00:00:00 2001 From: Raphael <68374617+raphaelscholle@users.noreply.github.com> Date: Thu, 24 Oct 2024 22:16:31 +0200 Subject: [PATCH] Update ioctl_cfg80211.c --- os_dep/linux/ioctl_cfg80211.c | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/os_dep/linux/ioctl_cfg80211.c b/os_dep/linux/ioctl_cfg80211.c index fe79a83..9513050 100644 --- a/os_dep/linux/ioctl_cfg80211.c +++ b/os_dep/linux/ioctl_cfg80211.c @@ -4864,22 +4864,21 @@ static int cfg80211_rtw_set_txpower(struct wiphy *wiphy, RTW_WARN(FUNC_WIPHY_FMT" unknown type:%d\n", FUNC_WIPHY_ARG(wiphy), type); } // OpenHD -#if 1 +#if 0 openhd_override_tx_power_mbm=get_openhd_override_tx_power_mbm(); - RTW_WARN("Using openhd_override_tx_power_mbm %d",openhd_override_tx_power_mbm); - // if(openhd_override_tx_power_mbm){ - // // wiphy_data->txpwr_total_lmt_mbm = UNSPECIFIED_MBM; - // // wiphy_data->txpwr_total_target_mbm= openhd_override_tx_power_mbm; - // // If the chip cannot do the requested tx power, the driver just seems to set tx power index 63" - // RTW_WARN("Using openhd_override_tx_power_mbm %d",openhd_override_tx_power_mbm); - // } + if(openhd_override_tx_power_mbm){ + wiphy_data->txpwr_total_lmt_mbm = UNSPECIFIED_MBM; + wiphy_data->txpwr_total_target_mbm= openhd_override_tx_power_mbm; + // If the chip cannot do the requested tx power, the driver just seems to set tx power index 63" + RTW_WARN("Using openhd_override_tx_power_mbm %d",openhd_override_tx_power_mbm); + } #endif RTW_WARN(FUNC_WIPHY_FMT" OpenHD cf80211 tx power %s txpwr_total_lmt_mbm:%d txpwr_total_target_mbm%d openhd_override_tx_power_mbm:%d\n", FUNC_WIPHY_ARG(wiphy) , nl80211_tx_power_setting_str(type), wiphy_data->txpwr_total_lmt_mbm,wiphy_data->txpwr_total_target_mbm, openhd_override_tx_power_mbm); if (ret == 0) - // rtw_run_in_thread_cmd_wait(adapter, ((void *)(rtw_update_txpwr_level_all_hwband)), adapter_to_dvobj(adapter), 2000); + rtw_run_in_thread_cmd_wait(adapter, ((void *)(rtw_update_txpwr_level_all_hwband)), adapter_to_dvobj(adapter), 2000); exit: return ret;