Skip to content

Commit

Permalink
Update ioctl_cfg80211.c
Browse files Browse the repository at this point in the history
  • Loading branch information
raphaelscholle committed Oct 24, 2024
1 parent 162d91c commit fd29d9b
Showing 1 changed file with 8 additions and 9 deletions.
17 changes: 8 additions & 9 deletions os_dep/linux/ioctl_cfg80211.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit fd29d9b

Please sign in to comment.