wlan: Address memory corruption due to double free

If MC thread fails to post any WDI message over bus then failure
status is sent to the caller through registered request callback
and WDI_STATUS_PENDING is returned to the actual request funcion
to avoid repeated functionality done in the request callback for
failure case. But the commit "Reload driver if EXIT IMPS REQ fails
due to invalid SMD port" will modify the wdiStatus which results
in double free, i.e both WDA request and WDA request status callback
functions endup in freeing the same memory.

To mitigate this issue, return WDI_STATUS_PENDING to the request
function if we already returned WDI_STATUS_DEV_INTERNAL_FAILURE
or WDI_STATUS_E_FAILURE status through registered request callback.
And also handle the logic to reload the wlan driver if WDI_EXIT_IMPS
REQ fails due to closed SMD port in request callback function.

Change-Id: I932e6684c4272332c2b14cc4896b7c00c86fa4cd
CRs-Fixed: 767711
3 files changed
tree: 673cd623d3667d7d0dbafae4d0958bee0026a83a
  1. CORE/
  2. firmware_bin/
  3. riva/
  4. Android.mk
  5. Kbuild
  6. Kconfig
  7. Makefile