ソースを参照

qcacld-3.0: Refactor send_oem_reg_rsp_nlink_msg() Iterator

Iterate through all the active links in the API to account
for VDEVs in the non-deflink indices.

Change-Id: Iace7b51d484d907999ada01f74353ba917868986
CRs-Fixed: 3522476
Vinod Kumar Pirla 2 年 前
コミット
2542beeb62
1 ファイル変更10 行追加8 行削除
  1. 10 8
      core/hdd/src/wlan_hdd_oemdata.c

+ 10 - 8
core/hdd/src/wlan_hdd_oemdata.c

@@ -195,6 +195,7 @@ static void send_oem_reg_rsp_nlink_msg(void)
 	uint8_t *vdev_id;
 	struct hdd_adapter *adapter, *next_adapter = NULL;
 	wlan_net_dev_ref_dbgid dbgid = NET_DEV_HOLD_SEND_OEM_REG_RSP_NLINK_MSG;
+	struct wlan_hdd_link_info *link_info;
 
 	/* OEM msg is always to a specific process & cannot be a broadcast */
 	if (p_hdd_ctx->oem_pid == 0) {
@@ -227,14 +228,15 @@ static void send_oem_reg_rsp_nlink_msg(void)
 	/* Iterate through each adapter and fill device mode and vdev id */
 	hdd_for_each_adapter_dev_held_safe(p_hdd_ctx, adapter, next_adapter,
 					   dbgid) {
-		device_mode = buf++;
-		vdev_id = buf++;
-		*device_mode = adapter->device_mode;
-		*vdev_id = adapter->deflink->vdev_id;
-		(*num_interfaces)++;
-		hdd_debug("num_interfaces: %d, device_mode: %d, vdev_id: %d",
-			  *num_interfaces, *device_mode,
-			  *vdev_id);
+		hdd_adapter_for_each_active_link_info(adapter, link_info) {
+			device_mode = buf++;
+			vdev_id = buf++;
+			*device_mode = adapter->device_mode;
+			*vdev_id = link_info->vdev_id;
+			(*num_interfaces)++;
+			hdd_debug("num_interfaces: %d, device_mode: %d, vdev_id: %d",
+				  *num_interfaces, *device_mode, *vdev_id);
+		}
 		hdd_adapter_dev_put_debug(adapter, dbgid);
 	}