qcacld-3.0: Reinitialize mon_register_event before wait_for_completion

Reinitialize mon_register_event before wait_for_completion
to make sure that it waits for fresh completion.

"done" variable in struct completion increments in
complete() API and decrements in wait_for_completion() API.

In wait_for_completion() API, if "done" value is 0 then
it will wait for the completion else it will continue without
waiting.

If reinitialization is not done, there is a possibility that
wait_for_completion() may continue without waiting.

Change-Id: I780103f551938438f27a11b006cc7c3e6edc6820
CRs-Fixed: 3251876
This commit is contained in:
Dundi Raviteja 2022-08-08 11:11:29 +05:30
commit 7cf700a71d

View file

@ -823,6 +823,7 @@ QDF_STATUS pkt_capture_deregister_callbacks(struct wlan_objmgr_vdev *vdev)
&vdev_priv->mon_ctx->mon_event_flag);
set_bit(PKT_CAPTURE_RX_POST_EVENT,
&vdev_priv->mon_ctx->mon_event_flag);
reinit_completion(&vdev_priv->mon_ctx->mon_register_event);
wake_up_interruptible(&vdev_priv->mon_ctx->mon_wait_queue);
/*