From 29544d3eb71b8c5c1df5005004e5db40cb0e6fff Mon Sep 17 00:00:00 2001 From: Min Liu Date: Fri, 30 Oct 2020 18:08:54 +0800 Subject: [PATCH] qcacld-3.0: Use primary channel in OCI Primary channel should be used in OCI. Change-Id: I1e92efd5b0348f58bc951dc459e08091737ced9f CRs-Fixed: 2806607 --- core/mac/src/pe/lim/lim_send_management_frames.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/core/mac/src/pe/lim/lim_send_management_frames.c b/core/mac/src/pe/lim/lim_send_management_frames.c index 89098d4a6bca..df91ec5af480 100644 --- a/core/mac/src/pe/lim/lim_send_management_frames.c +++ b/core/mac/src/pe/lim/lim_send_management_frames.c @@ -5095,13 +5095,14 @@ 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 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, - wlan_reg_freq_to_chan(mac->pdev, session->curr_op_freq), - session->ch_width); - oci->prim_ch_num = session->ch_center_freq_seg0; + oci->op_class = wlan_reg_dmn_get_opclass_from_channel(country_code, + prim_ch_num, + session->ch_width); + oci->prim_ch_num = prim_ch_num; oci->freq_seg_1_ch_num = session->ch_center_freq_seg1; oci->present = 1; }