Browse Source

qcacld-3.0: clean flag chan_switch_in_progress if link tear down

If the channel-list that AP is asking us to switch is invalid, then
we cannot switch the channel. Just call lim_tear_down_link_with_ap()
to disassociate from AP. We will find better AP.
So, vdev_stop, peer_del, vdev_down will be sent. VDEV_MLME state
is back to init.

But, we didn't clean flag chan_switch_in_progress. When better AP
found, vdev will start. Because flag chan_switch_in_progress is true,
WMI_VDEV_RESTART_REQUEST_CMDID sent. But WMI_VDEV_START_REQUEST_CMDID
is expected. And then WMI_VDEV_RESTART_RESP_EVENT received.

Host will send WMI_PEER_SET_PARAM_CMDID with parameter ID
WMI_PEER_CHWIDTH(4) once WMI_VDEV_RESTART_RESP_EVENT received.
However, FW was already back to INIT state because vdev already down.
PEER state was init state, PEE_CHWIDTH set not allowed.

So, flag chan_switch_in_progress should be clean if vdev_stop sent.

Change-Id: I1b72b2a774b80b3725c7a21ec0d308036d551dcb
CRs-Fixed: 2970123
Yu Ouyang 3 years ago
parent
commit
3d25ada75c
1 changed files with 6 additions and 0 deletions
  1. 6 0
      core/wma/src/wma_utils.c

+ 6 - 0
core/wma/src/wma_utils.c

@@ -3850,6 +3850,12 @@ QDF_STATUS wma_send_vdev_stop_to_fw(t_wma_handle *wma, uint8_t vdev_id)
 
 	status = vdev_mgr_stop_send(vdev_mlme);
 
+	/*
+	 * If vdev_stop send to fw during channel switch, it means channel
+	 * switch failure. Clean flag chan_switch_in_progress.
+	 */
+	mlme_set_chan_switch_in_progress(vdev_mlme->vdev, false);
+
 	return status;
 }