mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 03:01:39 -04:00
qcacld-3.0: Use proper API to calculate opclass in OCI frame
Operating class is not calculated properly due to which bandwidth is getting mismatched in OCI frame. Because of this ref sta is getting disconnected with SAP. Replace wlan_reg_dmn_get_opclass_from_channel() with lim_op_class_from_bandwidth() to calculate opclass. Change-Id: Ic1d7e59692362130bf1b8205585b5ecd182d4dff CRs-Fixed: 2806146
This commit is contained in:
parent
629df433f0
commit
a3e8c05e53
1 changed files with 20 additions and 6 deletions
|
|
@ -5116,14 +5116,28 @@ static void
|
|||
lim_fill_oci_params(struct mac_context *mac, struct pe_session *session,
|
||||
tDot11fIEoci *oci)
|
||||
{
|
||||
uint8_t country_code[CDS_COUNTRY_CODE_LEN + 1];
|
||||
uint8_t ch_offset;
|
||||
uint8_t prim_ch_num = wlan_reg_freq_to_chan(mac->pdev,
|
||||
session->curr_op_freq);
|
||||
|
||||
wlan_reg_read_current_country(mac->psoc, country_code);
|
||||
oci->op_class = wlan_reg_dmn_get_opclass_from_channel(country_code,
|
||||
prim_ch_num,
|
||||
session->ch_width);
|
||||
if (session->ch_width == CH_WIDTH_80MHZ) {
|
||||
ch_offset = BW80;
|
||||
} else {
|
||||
switch (session->htSecondaryChannelOffset) {
|
||||
case PHY_DOUBLE_CHANNEL_HIGH_PRIMARY:
|
||||
ch_offset = BW40_HIGH_PRIMARY;
|
||||
break;
|
||||
case PHY_DOUBLE_CHANNEL_LOW_PRIMARY:
|
||||
ch_offset = BW40_LOW_PRIMARY;
|
||||
break;
|
||||
default:
|
||||
ch_offset = BW20;
|
||||
break;
|
||||
}
|
||||
}
|
||||
oci->op_class = lim_op_class_from_bandwidth(mac,
|
||||
session->curr_op_freq,
|
||||
session->ch_width,
|
||||
ch_offset);
|
||||
oci->prim_ch_num = prim_ch_num;
|
||||
oci->freq_seg_1_ch_num = session->ch_center_freq_seg1;
|
||||
oci->present = 1;
|
||||
|
|
|
|||
Loading…
Reference in a new issue