diff --git a/qdf/linux/src/qdf_trace.c b/qdf/linux/src/qdf_trace.c index e12e3e762a9c..07db48d3c399 100644 --- a/qdf/linux/src/qdf_trace.c +++ b/qdf/linux/src/qdf_trace.c @@ -88,6 +88,7 @@ module_trace_info g_qdf_trace_info[QDF_MODULE_ID_MAX] = { [QDF_MODULE_ID_TXRX] = {QDF_DEFAULT_TRACE_LEVEL, "TRX"}, [QDF_MODULE_ID_HTT] = {QDF_DEFAULT_TRACE_LEVEL, "HTT"}, [QDF_MODULE_ID_SERIALIZATION] = {QDF_DEFAULT_TRACE_LEVEL, "SER"}, + [QDF_MODULE_ID_REGULATORY] = {QDF_DEFAULT_TRACE_LEVEL, "REG"}, }; /* Static and Global variables */ diff --git a/umac/regulatory/core/src/reg_services.c b/umac/regulatory/core/src/reg_services.c index 248f6399474d..0d2390bf1553 100644 --- a/umac/regulatory/core/src/reg_services.c +++ b/umac/regulatory/core/src/reg_services.c @@ -1076,6 +1076,7 @@ static void reg_fill_channel_info(enum channel_enum chan_enum, master_list[chan_enum].chan_flags &= ~REGULATORY_CHAN_DISABLED; + master_list[chan_enum].tx_power = reg_rule->reg_power; master_list[chan_enum].state = CHANNEL_STATE_ENABLE; if (reg_rule->flags & REGULATORY_CHAN_NO_IR) { @@ -1437,32 +1438,32 @@ modify_chan_list_for_freq_range(struct regulatory_channel low_limit_5g = 0, high_limit_5g = 0, chan_enum; bool chan_in_range; - for (chan_enum = 0; chan_enum < NUM_CHANNELS && !low_limit_2g; - chan_enum++) { - if ((chan_list[chan_enum].center_freq - 10) >= - low_freq_2g) + for (chan_enum = 0; chan_enum < NUM_CHANNELS; chan_enum++) { + if ((chan_list[chan_enum].center_freq - 10) >= low_freq_2g) { low_limit_2g = chan_enum; + break; + } } - for (chan_enum = 0; chan_enum < NUM_CHANNELS && !low_limit_5g; - chan_enum++) { - if ((chan_list[chan_enum].center_freq - 10) >= - low_freq_5g) + for (chan_enum = 0; chan_enum < NUM_CHANNELS; chan_enum++) { + if ((chan_list[chan_enum].center_freq - 10) >= low_freq_5g) { low_limit_5g = chan_enum; + break; + } } - for (chan_enum = NUM_CHANNELS - 1; chan_enum >= 0 && - !high_limit_2g; chan_enum--) { - if (chan_list[chan_enum].center_freq + 10 <= - high_freq_2g) + for (chan_enum = NUM_CHANNELS - 1; chan_enum >= 0; chan_enum--) { + if (chan_list[chan_enum].center_freq + 10 <= high_freq_2g) { high_limit_2g = chan_enum; + break; + } } - for (chan_enum = NUM_CHANNELS - 1; chan_enum >= 0 && - !high_limit_5g; chan_enum--) { - if (chan_list[chan_enum].center_freq + 10 <= - high_freq_5g) + for (chan_enum = NUM_CHANNELS - 1; chan_enum >= 0; chan_enum--) { + if (chan_list[chan_enum].center_freq + 10 <= high_freq_5g) { high_limit_5g = chan_enum; + break; + } } for (chan_enum = 0; chan_enum < NUM_CHANNELS; chan_enum++) { diff --git a/wmi/src/wmi_unified_tlv.c b/wmi/src/wmi_unified_tlv.c index 0761fd0e432f..ed70bdfbd567 100644 --- a/wmi/src/wmi_unified_tlv.c +++ b/wmi/src/wmi_unified_tlv.c @@ -16188,9 +16188,11 @@ static QDF_STATUS extract_reg_chan_list_update_event_tlv( num_2g_reg_rules = reg_info->num_2g_reg_rules; num_5g_reg_rules = reg_info->num_5g_reg_rules; - wmi_reg_rule = (wmi_regulatory_rule_struct *)(chan_list_event_hdr - + sizeof(wmi_reg_chan_list_cc_event_fixed_param)); + wmi_reg_rule = + (wmi_regulatory_rule_struct *)((uint8_t *)chan_list_event_hdr + + sizeof(wmi_reg_chan_list_cc_event_fixed_param) + + WMI_TLV_HDR_SIZE); reg_info->reg_rules_2g_ptr = create_reg_rules_from_wmi(num_2g_reg_rules, wmi_reg_rule); wmi_reg_rule += num_2g_reg_rules;