qcacld-3.0: Check for invalid put_ref scenario for sta_info

Currently in the ref_count mechanism used for sta_info, the driver has
no checks to determine if there are any faulty ref counting instances.
In case multiple ref_put are done for a single take_ref, it can lead to
a memory corruption.

Add a sanity check in hdd_sta_info_put_ref that causes a device assert
in case the put_ref is called on a sta_info with already zero ref_count.

Change-Id: I0b502e1df4c37601b46cc727acc94a72a401e051
CRs-Fixed: 2707614
1 file changed