qcacld-3.0: Fix to handle error conditions when pre-cac adapter fails
Currently, driver has following errors while handling pre-cac adapter
1) If SAP start operation fails in upper mac layers like PE or WMA then
without checking status of operation, SAP/HDD layer notifies policy
manager to add the connection to its table.
2) Driver is doing hardware mode change first and then it does pre-cac
adapter open operation followed by starting the bss. If pre-cac
adapter open operation fails then nobody is reverting original
hardware mode change.
3) While doing CAC wait, If radar gets detected then driver is not
releasing interfaces mac address due to which sub sequent adapter
doesn't get valid mac address as driver has limited pool of mac
addresses.
4) LIM layer is populating some garbage SME session id as it is
releasing the memory before it access in case of any failure.
Add safety checks to avoid all above conditions.
CRs-Fixed: 1103673
Change-Id: Ie94af7783527e6c55490801b52898ec0c3208503
5 files changed