qcacmn: Add reference count support to PSOC/PDEV/VDEV/PEER objects
This change implements ref count mechanism, before accessing/storing object,
its ref count has to be incremented to avoid "use after free" scenarios.
1) Increments ref count of each object on its creation
2) Increments parent object on creation of child object (ex: on peer creation
vdev object ref count gets incremented)
3) On get_obj() API, caller will be returned object after incrementing ref cnt
Change-Id: Ic01cb3217881d269cc451f0e63358e1e4decaaa7
CRS-Fixed: 1096009
15 files changed