ソースを参照

qcacld-3.0: Enable support for multiple NAN peers per NDI

Enable support for multiple NAN data path peers from host.
FW already supports multiple NAN peers.

CRs-Fixed: 2121121
Change-Id: I23307c5f56114084a93b3afae0e23a07251c5013
Ravi Joshi 8 年 前
コミット
e55f42cfe7
1 ファイル変更11 行追加0 行削除
  1. 11 0
      core/mac/src/pe/nan/nan_datapath.c

+ 11 - 0
core/mac/src/pe/nan/nan_datapath.c

@@ -133,7 +133,13 @@ static QDF_STATUS lim_add_ndi_peer(tpAniSirGlobal mac_ctx,
 	}
 	pe_info("Need to create NDI Peer :" MAC_ADDRESS_STR,
 		MAC_ADDR_ARRAY(peer_mac_addr.bytes));
+
 	peer_idx = lim_assign_peer_idx(mac_ctx, session);
+	if (!peer_idx) {
+		pe_err("Invalid peer_idx: %d", peer_idx);
+		return QDF_STATUS_SUCCESS;
+	}
+
 	sta_ds = dph_add_hash_entry(mac_ctx, peer_mac_addr.bytes, peer_idx,
 			&session->dph.dphHashTable);
 	if (sta_ds == NULL) {
@@ -141,6 +147,7 @@ static QDF_STATUS lim_add_ndi_peer(tpAniSirGlobal mac_ctx,
 		/* couldn't add dph entry */
 		return QDF_STATUS_E_FAILURE;
 	}
+
 	/* wma decides NDI mode from wma->inferface struct */
 	sta_ds->staType = STA_ENTRY_NDI_PEER;
 	status = lim_add_sta(mac_ctx, sta_ds, false, session);
@@ -150,6 +157,7 @@ static QDF_STATUS lim_add_ndi_peer(tpAniSirGlobal mac_ctx,
 			status);
 		return QDF_STATUS_E_FAILURE;
 	}
+
 	return QDF_STATUS_SUCCESS;
 }
 
@@ -804,6 +812,9 @@ void lim_process_ndi_mlm_add_bss_rsp(tpAniSirGlobal mac_ctx,
 		/* Apply previously set configuration at HW */
 		lim_apply_configuration(mac_ctx, session_entry);
 		mlm_start_cnf.resultCode = eSIR_SME_SUCCESS;
+
+		/* Initialize peer ID pool */
+		lim_init_peer_idxpool(mac_ctx, session_entry);
 	} else {
 		pe_err("WDA_ADD_BSS_REQ failed with status %d",
 			add_bss_params->status);