From e493ece20be67fa88ba9cf73ab7617ca5ff28d6c Mon Sep 17 00:00:00 2001 From: Srinivas Dasari Date: Mon, 27 Apr 2020 13:26:40 +0530 Subject: [PATCH] qcacld-3.0: Use MAX_PEERS instead of IBSS define in conn_info Currently, SIR_MAX_NUM_STA_IN_IBSS(16) is used while updating sta_ctx->conn_info in hdd_save_peer/hdd_delete_peer. IBSS supports maximum 16 peers but NDP might support more based on platform. This restricts the max supported NDP peers to 16. But host driver supports MAX_PEERS(32) no.of peers and use the same here as sta_ctx->conn_info has support for MAX_PEERS(32) mac addresses. Change-Id: Ic52422435f97929e22cf3c0897ce9173793ee12e CRs-Fixed: 2673110 --- core/hdd/src/wlan_hdd_assoc.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/core/hdd/src/wlan_hdd_assoc.c b/core/hdd/src/wlan_hdd_assoc.c index e159dbbbd0f2..40d1262e7a2a 100644 --- a/core/hdd/src/wlan_hdd_assoc.c +++ b/core/hdd/src/wlan_hdd_assoc.c @@ -3762,7 +3762,7 @@ bool hdd_save_peer(struct hdd_station_ctx *sta_ctx, int idx; struct qdf_mac_addr *mac_addr; - for (idx = 0; idx < SIR_MAX_NUM_STA_IN_IBSS; idx++) { + for (idx = 0; idx < MAX_PEERS; idx++) { mac_addr = &sta_ctx->conn_info.peer_macaddr[idx]; if (qdf_is_macaddr_zero(mac_addr)) { hdd_debug("adding peer: %pM at idx: %d", @@ -3781,7 +3781,7 @@ void hdd_delete_peer(struct hdd_station_ctx *sta_ctx, int i; struct qdf_mac_addr *mac_addr; - for (i = 0; i < SIR_MAX_NUM_STA_IN_IBSS; i++) { + for (i = 0; i < MAX_PEERS; i++) { mac_addr = &sta_ctx->conn_info.peer_macaddr[i]; if (qdf_is_macaddr_equal(mac_addr, peer_mac_addr)) { qdf_zero_macaddr(mac_addr); @@ -3796,7 +3796,7 @@ bool hdd_any_valid_peer_present(struct hdd_adapter *adapter) int i; struct qdf_mac_addr *mac_addr; - for (i = 0; i < SIR_MAX_NUM_STA_IN_IBSS; i++) { + for (i = 0; i < MAX_PEERS; i++) { mac_addr = &sta_ctx->conn_info.peer_macaddr[i]; if (!qdf_is_macaddr_zero(mac_addr) && !qdf_is_macaddr_broadcast(mac_addr)) {