diff --git a/umac/cmn_services/regulatory/inc/wlan_reg_afc.h b/umac/cmn_services/regulatory/inc/wlan_reg_afc.h index 3a092b2187..da5df92a76 100644 --- a/umac/cmn_services/regulatory/inc/wlan_reg_afc.h +++ b/umac/cmn_services/regulatory/inc/wlan_reg_afc.h @@ -202,7 +202,7 @@ struct wlan_afc_resp_opclass_info { */ struct wlan_afc_resp_eirp_info { uint32_t channel_cfi; - uint32_t max_eirp_pwr; + int32_t max_eirp_pwr; } qdf_packed; /** diff --git a/umac/regulatory/core/src/reg_services_common.c b/umac/regulatory/core/src/reg_services_common.c index bb8005a5ed..d970e82b28 100644 --- a/umac/regulatory/core/src/reg_services_common.c +++ b/umac/regulatory/core/src/reg_services_common.c @@ -9414,11 +9414,11 @@ static inline bool reg_is_320_opclass(qdf_freq_t freq, uint8_t op_class) * * Return: EIRP power */ -static uint8_t reg_find_eirp_in_afc_eirp_obj(struct wlan_objmgr_pdev *pdev, - struct chan_eirp_obj *eirp_obj, - qdf_freq_t freq, - qdf_freq_t cen320, - uint8_t op_class) +static int8_t reg_find_eirp_in_afc_eirp_obj(struct wlan_objmgr_pdev *pdev, + struct chan_eirp_obj *eirp_obj, + qdf_freq_t freq, + qdf_freq_t cen320, + uint8_t op_class) { uint8_t k; uint8_t subchannels[NUM_20_MHZ_CHAN_IN_320_MHZ_CHAN]; @@ -9457,11 +9457,11 @@ static uint8_t reg_find_eirp_in_afc_eirp_obj(struct wlan_objmgr_pdev *pdev, * * Return: EIRP power */ -static uint8_t reg_find_eirp_in_afc_chan_obj(struct wlan_objmgr_pdev *pdev, - struct afc_chan_obj *chan_obj, - qdf_freq_t freq, - qdf_freq_t cen320, - uint8_t op_class) +static int8_t reg_find_eirp_in_afc_chan_obj(struct wlan_objmgr_pdev *pdev, + struct afc_chan_obj *chan_obj, + qdf_freq_t freq, + qdf_freq_t cen320, + uint8_t op_class) { uint8_t j; @@ -9469,7 +9469,7 @@ static uint8_t reg_find_eirp_in_afc_chan_obj(struct wlan_objmgr_pdev *pdev, return 0; for (j = 0; j < chan_obj->num_chans; j++) { - uint8_t afc_eirp; + int8_t afc_eirp; struct chan_eirp_obj *eirp_obj = &chan_obj->chan_eirp_info[j]; afc_eirp = reg_find_eirp_in_afc_eirp_obj(pdev, eirp_obj, @@ -9675,7 +9675,8 @@ static uint8_t reg_get_sp_eirp(struct wlan_objmgr_pdev *pdev, bool is_client_list_lookup_needed, enum reg_6g_client_type client_type) { - uint8_t i, op_class = 0, chan_num = 0, afc_eirp_pwr = 0; + uint8_t i, op_class = 0, chan_num = 0; + int8_t afc_eirp_pwr = 0; struct wlan_regulatory_pdev_priv_obj *pdev_priv_obj; struct regulatory_channel *sp_master_chan_list = NULL; struct reg_fw_afc_power_event *power_info; @@ -9757,7 +9758,7 @@ static uint8_t reg_get_sp_eirp(struct wlan_objmgr_pdev *pdev, ®_sp_eirp_pwr); if (afc_eirp_pwr) - return QDF_MIN(afc_eirp_pwr, reg_sp_eirp_pwr); + return QDF_MIN(afc_eirp_pwr, (int8_t)reg_sp_eirp_pwr); return 0; } diff --git a/umac/regulatory/dispatcher/inc/reg_services_public_struct.h b/umac/regulatory/dispatcher/inc/reg_services_public_struct.h index fcc3db460d..50dab55978 100644 --- a/umac/regulatory/dispatcher/inc/reg_services_public_struct.h +++ b/umac/regulatory/dispatcher/inc/reg_services_public_struct.h @@ -990,7 +990,7 @@ struct regulatory_channel { uint8_t chan_num; enum channel_state state; uint32_t chan_flags; - uint32_t tx_power; + int32_t tx_power; uint16_t min_bw; uint16_t max_bw; uint8_t ant_gain; @@ -1395,7 +1395,7 @@ struct afc_freq_obj { */ struct chan_eirp_obj { uint8_t cfi; - uint16_t eirp_power; + int16_t eirp_power; }; /** @@ -1871,7 +1871,7 @@ enum reg_phymode { */ struct chan_power_info { qdf_freq_t chan_cfreq; - uint8_t tx_power; + int8_t tx_power; }; /** @@ -1888,7 +1888,7 @@ struct chan_power_info { */ struct reg_tpc_power_info { bool is_psd_power; - uint8_t eirp_power; + int8_t eirp_power; uint8_t power_type_6g; uint8_t num_pwr_levels; uint8_t reg_max[MAX_NUM_PWR_LEVEL];