浏览代码

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
Ashish Kumar Dhanotiya 4 年之前
父节点
当前提交
70c3875209
共有 1 个文件被更改,包括 2 次插入1 次删除
  1. 2 1
      umac/regulatory/core/src/reg_services_common.c

+ 2 - 1
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;
 			}