mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-24 21:54:34 -04:00
qcacld-3.0: Convert CSR legacy channel ID usage
Remove wlan_reg_freq_to_chan within function csr_update_op_class_array and use channel frequencies directly to retrieve opclass. To utilize the new channel frequency function, regional opclass table will be used unconditionally, given no OTA packets' country IEs will be populated here(and thus no need to carry global opclass). Change-Id: Ida9831e7e74223455089770744222185ae3cb1d3 CRs-Fixed: 2576285
This commit is contained in:
parent
8aa81b668b
commit
fbf576a8fa
1 changed files with 18 additions and 24 deletions
|
|
@ -20915,35 +20915,29 @@ csr_update_op_class_array(struct mac_context *mac_ctx,
|
|||
uint8_t j = 0, idx = 0, class = 0;
|
||||
bool found = false;
|
||||
uint8_t num_channels = channel_info->numChannels;
|
||||
uint8_t ch_bandwidth;
|
||||
uint8_t ch_num;
|
||||
|
||||
sme_debug("Num of %s channels, %d",
|
||||
ch_name, num_channels);
|
||||
sme_debug("Num of %s channels, %d", ch_name, num_channels);
|
||||
|
||||
for (idx = 0; idx < num_channels &&
|
||||
*i < (REG_MAX_SUPP_OPER_CLASSES - 1); idx++) {
|
||||
for (ch_bandwidth = BW20; ch_bandwidth < BWALL;
|
||||
ch_bandwidth++) {
|
||||
class = wlan_reg_dmn_get_opclass_from_channel(
|
||||
mac_ctx->scan.countryCodeCurrent,
|
||||
wlan_reg_freq_to_chan(mac_ctx->pdev, channel_info->channel_freq_list[idx]),
|
||||
ch_bandwidth);
|
||||
sme_debug("for chan freq %d, op class: %d",
|
||||
channel_info->channel_freq_list[idx], class);
|
||||
*i < (REG_MAX_SUPP_OPER_CLASSES - 1); idx++) {
|
||||
wlan_reg_freq_to_chan_op_class(
|
||||
mac_ctx->pdev, channel_info->channel_freq_list[idx],
|
||||
false, BIT(BEHAV_NONE), &class, &ch_num);
|
||||
sme_debug("for chan freq %d, op class: %d",
|
||||
channel_info->channel_freq_list[idx], class);
|
||||
|
||||
found = false;
|
||||
for (j = 0; j < REG_MAX_SUPP_OPER_CLASSES - 1;
|
||||
j++) {
|
||||
if (op_classes[j] == class) {
|
||||
found = true;
|
||||
break;
|
||||
}
|
||||
found = false;
|
||||
for (j = 0; j < REG_MAX_SUPP_OPER_CLASSES - 1; j++) {
|
||||
if (op_classes[j] == class) {
|
||||
found = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (!found) {
|
||||
op_classes[*i] = class;
|
||||
*i = *i + 1;
|
||||
}
|
||||
if (!found) {
|
||||
op_classes[*i] = class;
|
||||
*i = *i + 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue