Wlan: Update the protStatusCode in Re/assoc response in case of failure

If deauth is received just after Assoc rsp from AP in addSTA
response Re/assoc confirm is sent with status failure.
But protStatusCode in assoc confirm is not updated and thus the
pRoamInfo->reasonCode may have garbage value.
In case of Wep connection failure reason code,
pRoamInfo->reasonCode, is sent to the supplicant in connect
result. Now if pRoamInfo->reasonCode is 0 supplicant receives
connection success though connection have actually failed.

To avoid this update protStatusCode, before sending Re/assoc
failure.
Also properly derive if connection is WEP from roamProfile before
clearing it.

CRs-Fixed: 926572
Change-Id: I5ae0832d37746be16696f521bddd5b67307b1ee4
tree: 30235f5a236ff1bf2ae2cf1499298ea25a8aa4c2
  1. CORE/
  2. firmware_bin/
  3. riva/
  4. Android.mk
  5. Kbuild
  6. Kconfig
  7. Makefile