summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRavi Joshi <ravij@codeaurora.org>2017-04-03 11:07:01 -0700
committerspuligil <spuligil@codeaurora.org>2017-04-15 12:50:01 -0700
commit4e343c3961fac56ffec3845d64fd902ec57f8b02 (patch)
tree23b1e7581b2c6c9f680d234b592c8cb0507ca373
parentf1f96c0fff0a4f4d6d260371f69797fb5fac7982 (diff)
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: 2028187 Change-Id: I23307c5f56114084a93b3afae0e23a07251c5013
-rw-r--r--core/mac/src/pe/nan/nan_datapath.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/core/mac/src/pe/nan/nan_datapath.c b/core/mac/src/pe/nan/nan_datapath.c
index 3981481006a4..765c11df512d 100644
--- a/core/mac/src/pe/nan/nan_datapath.c
+++ b/core/mac/src/pe/nan/nan_datapath.c
@@ -94,7 +94,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) {
@@ -102,6 +108,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);
@@ -111,6 +118,7 @@ static QDF_STATUS lim_add_ndi_peer(tpAniSirGlobal mac_ctx,
status);
return QDF_STATUS_E_FAILURE;
}
+
return QDF_STATUS_SUCCESS;
}
@@ -719,6 +727,9 @@ void lim_process_ndi_mlm_add_bss_rsp(tpAniSirGlobal mac_ctx, tpSirMsgQ lim_msgq,
/* 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);