qcacld-2.0 to qcacld-3.0 propagation
If connect is received and queued to sme pending list while scan
is in progress in sme, once scan is completed, again scan is
queued to get the scanned channel info with reason
eCsrScanGetScanChnInfo behind connect command.
Connect is executed next with scan command in pending queue.
Now if disconnect is received from hdd it is also queued in sme
pending cmd list behind scan.
Once connect is executed the wait for key state is set and wait
key timer is started. As only disconnect and set key command are
allowed in wait for key state, the pending cmd queue is not
executed with scan command at the head and thus the disconnect is
not executed. Also as supplicant has issued disconnect, no keys
will be set and pending command queue will not be processed till
wait for key timer expires.
If during this time unload starts all the commands including the
disconnect command sme pending queue are flushed and thus no
DEL BSS is sent to firmware before HAL STOP which leads to crash.
To avoid this add disconnect to the head of sme pending command
list so that disconnect can be processed after connect during
wait for key state.
Change-Id: I333e7b103ac10e368d34b5bf8b87cc360650cd50
CRs-Fixed: 930713