From 2fcd71bff6520023be2a4e7d08548392a23ee90f Mon Sep 17 00:00:00 2001 From: Ashish Kumar Dhanotiya Date: Tue, 16 Oct 2018 18:03:20 +0530 Subject: [PATCH] qcacmn: Overwrite center frequency segment_1 to 0 Currently center_freq_seg1 value is not getting reset for non 160, 80+80 width and 2.4 GHz channel which are stored in sap context, in case of SSR on SAP restart, this old value can be used which might be some junk value and can lead to stop bss as a result of invalid values. To resolve this issue reset the center_freq_seg1 to 0 for non 160, 80+80 width and 2.4 GHz. Change-Id: Ie4bffb1c2424024fab32d30d7d790f99d54ad58c CRs-Fixed: 2326392 --- umac/regulatory/core/src/reg_services.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/umac/regulatory/core/src/reg_services.c b/umac/regulatory/core/src/reg_services.c index 336f8bb0f934..5f8fedab706e 100644 --- a/umac/regulatory/core/src/reg_services.c +++ b/umac/regulatory/core/src/reg_services.c @@ -1237,6 +1237,11 @@ static void reg_set_5g_channel_params(struct wlan_objmgr_pdev *pdev, bonded_chan_ptr->end_ch)/2; } + /* Overwrite center_freq_seg1 to 0 for non 160 and 80+80 width */ + if (!(ch_params->ch_width == CH_WIDTH_160MHZ || + ch_params->ch_width == CH_WIDTH_80P80MHZ)) + ch_params->center_freq_seg1 = 0; + reg_debug("ch %d ch_wd %d freq0 %d freq1 %d", ch, ch_params->ch_width, ch_params->center_freq_seg0, ch_params->center_freq_seg1); @@ -1288,6 +1293,8 @@ static void reg_set_2g_channel_params(struct wlan_objmgr_pdev *pdev, ch_params->ch_width = get_next_lower_bw[ch_params->ch_width]; } + /* Overwrite center_freq_seg1 to 0 for 2.4 Ghz */ + ch_params->center_freq_seg1 = 0; } /**