wcnss: fix the race condition issue during cal data extraction
The wcnss platform driver update the wlan calibration data
by the user space wlan daemon. The wlan user space daemon store
the updated wlan calibration data reported by wlan firmware in
user space and write it back to the wcnss platform calibration
data buffer for the calibration data download and update.
During the wlan calibration data extraction there are some potential
race condition which leads to memory leak and buffer overflow during
the context switch. Fix the above issue by adding protection code.
CRs-Fixed:
2015791
Change-Id: I231807f6b2d8094d7138b95c659ed6272897ba2d
Signed-off-by: Sarada Prasanna Garnayak <sgarna@codeaurora.org>