If is_pre_cac_on is set, in __wlan_hdd_del_virtual_intf firstly
frees the sap context by calling hdd_clean_up_interface and then
frees the pre cac by calling hdd_clean_up_pre_cac_interface this
will fails to access the sap context which is already freed.
So, replace order of calling, firstly hdd_clean_up_pre_cac_interface
and then hdd_clean_up_interface.
cds flush work will cancel the work which will not delete the pre cac
vdev. Replace with qdf_flush_work will wait for a work to finish,
executing the last queueing instance.
Assign NULL to fn and arg of pre cac work to ensure proper cleanup
of work
Change-Id: I093bf627ce7a73e7c4f7c4cf30e2ec56814a80ed
CRs-Fixed: 3286477
At present Pre CAC work queue callback pre_cac_handle_failure
doesn't release the vdev ref count. And the pre_cac_handle_radar_ind
doesn't take ref count before schedule work pre_cac_work.
To fix inconsistency by using psoc as work queue callback parameter
and get pre CAC vdev id from psoc context.
Change-Id: I65339ca9f3ac4b91faf31090978337d041320f99
CRs-Fixed: 3288125