qcacmn: Fix auto BW calculation

Auto BW computes new bandwidth for adjacent regulatory rules. But this
combined bandwidth can be more than the bandwidth allowed for a
particular reg-domain. So relax the check for combined BW for
adjacent regulatory rules.

Change-Id: I1486988c114f0348f7228b91aeadc5c027c6a510
CRs-Fixed: 2626165
Este commit está contenido en:
Amar Singhal
2020-02-21 12:26:19 -08:00
cometido por nshrivas
padre 8bfa58f189
commit 12105f94d1

Ver fichero

@@ -183,12 +183,10 @@ static void reg_do_auto_bw_correction(uint32_t num_reg_rules,
uint16_t new_bw;
for (count = 0; count < num_reg_rules - 1; count++) {
if ((reg_rule_ptr[count].end_freq ==
reg_rule_ptr[count + 1].start_freq) &&
((reg_rule_ptr[count].max_bw +
reg_rule_ptr[count + 1].max_bw) <= max_bw)) {
new_bw = reg_rule_ptr[count].max_bw +
reg_rule_ptr[count + 1].max_bw;
if (reg_rule_ptr[count].end_freq ==
reg_rule_ptr[count + 1].start_freq) {
new_bw = QDF_MIN(max_bw, reg_rule_ptr[count].max_bw +
reg_rule_ptr[count + 1].max_bw);
reg_rule_ptr[count].max_bw = new_bw;
reg_rule_ptr[count + 1].max_bw = new_bw;
}