qcacld-3.0: Disassoc peers in SAP mode before stop ap

When the driver gets virtual interface delete, as part
of change interface, stop bss cmd is queued, and when
the command is processed by LIM layer, it deletes all
the peers and sends the disassociation frame.

It may happen that at the same time the peer which was
associated to the SAP sent a disassoc before it got the
same from the SAP.

That disassoc frame would also the queued, and processed
after the stop bss command is done. When the command of
disassoc frame from the peer is processed, the peer is
searched in the session, but since the stop bss has already
been processed, and the peer is deleted, the driver won't be
able to find the peer, hence will drop the command process.

Since the command process was dropped, but command was still
in the active list, timeout would happen in the serialization
module, and the remaining commands in the pending list would
not be processed.

Fix is to flush all the peers and send disassoc frame before
the stop bss cmd is put in a serialization list, to avoid this
race condition.

Change-Id: Ideefbca5b250a24e29b66122fd32019cf7441f30
CRs-Fixed: 2399221
1 file changed