From 70c387520996ca59679d73167d2289ddb96226ed Mon Sep 17 00:00:00 2001 From: Ashish Kumar Dhanotiya Date: Tue, 20 Apr 2021 21:11:41 +0530 Subject: [PATCH] qcacmn: Fill bonded_chan_ptr correctly Driver does not update bonded_chan_ptr correctly in reg_get_320_bonded_chan_array api which may lead to undefined behavior. To address above issue, fill bonded_chan_ptr correctly. Change-Id: I13ffe96ad855dbf97b72f32e982c73322a29626f CRs-Fixed: 2929853 --- umac/regulatory/core/src/reg_services_common.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/umac/regulatory/core/src/reg_services_common.c b/umac/regulatory/core/src/reg_services_common.c index e495027c3a..2bad1d3e1e 100644 --- a/umac/regulatory/core/src/reg_services_common.c +++ b/umac/regulatory/core/src/reg_services_common.c @@ -3501,7 +3501,8 @@ reg_get_320_bonded_chan_array(struct wlan_objmgr_pdev *pdev, if (((bonded_chan_ar[i].start_freq + bonded_chan_ar[i].end_freq) / 2) == band_center_320) { - bonded_chan_ptr[i] = &bonded_chan_ar[i]; + bonded_chan_ptr[num_bonded_pairs] = + &bonded_chan_ar[i]; num_bonded_pairs++; break; }