From 502dceb933eefe56b2b0a428f637fe3f96498c5b Mon Sep 17 00:00:00 2001 From: Neil Zhao Date: Tue, 8 Aug 2017 11:30:05 -0700 Subject: [PATCH] qcacmn: fix vdev id limited to 32 issue Issue: create 33 VAPs on both WIFI0 and WIFI1, will see fw crash Root cause: 2nd DWORD in vdev id map array is never used, so max id is 32 Fix: map_index needed to be updated before used to calculate adjust_ix. CRs-Fixed: 2089479 Change-Id: If808d13dbd375197fe637bb53da0bcc3d654ec9e --- umac/cmn_services/obj_mgr/src/wlan_objmgr_psoc_obj.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/umac/cmn_services/obj_mgr/src/wlan_objmgr_psoc_obj.c b/umac/cmn_services/obj_mgr/src/wlan_objmgr_psoc_obj.c index cc45ad82205c..b49639017591 100644 --- a/umac/cmn_services/obj_mgr/src/wlan_objmgr_psoc_obj.c +++ b/umac/cmn_services/obj_mgr/src/wlan_objmgr_psoc_obj.c @@ -812,9 +812,9 @@ QDF_STATUS wlan_objmgr_psoc_vdev_attach(struct wlan_objmgr_psoc *psoc, * The map is two DWORDS(32 bits), so, map_index * adjust_ix derived based on the id value */ - if (id == ((map_index+1)*map_entry_size)) { - adjust_ix = map_index*map_entry_size; + if (id == ((map_index + 1) * map_entry_size)) { map_index++; + adjust_ix = map_index * map_entry_size; } } /* If no free slot, return failure */