Prechádzať zdrojové kódy

qcacld-3.0: In Monitor mode use proper event for restart failure

In monitor mode in case of restart failure,
event WLAN_VDEV_SM_EV_START_REQ_FAIL is used to move the vdev SM
to init state. But this event will not be handled in
WLAN_VDEV_SS_START_RESTART_PROGRESS and thus the vdev stop/down
won't be sent for the vdev.

Use event WLAN_VDEV_SM_EV_RESTART_REQ_FAIL for restart failure
to send vdev stop/down.

Change-Id: I2db459136955b8dc2213c0251284a08a8f57aa57
CRs-Fixed: 2964875
Abhishek Singh 3 rokov pred
rodič
commit
65aeec8465

+ 11 - 4
core/mac/src/pe/lim/lim_process_mlm_rsp_messages.c

@@ -2846,10 +2846,17 @@ static void lim_handle_mon_switch_channel_rsp(struct pe_session *session,
 		return;
 
 	if (QDF_IS_STATUS_ERROR(status)) {
-		pe_err("Set channel failed for monitor mode");
-		wlan_vdev_mlme_sm_deliver_evt(session->vdev,
-					      WLAN_VDEV_SM_EV_START_REQ_FAIL,
-					      0, NULL);
+		enum wlan_vdev_sm_evt event = WLAN_VDEV_SM_EV_START_REQ_FAIL;
+
+		pe_err("Set channel failed for monitor mode vdev substate %d",
+			wlan_vdev_mlme_get_substate(session->vdev));
+
+		if (QDF_IS_STATUS_SUCCESS(
+		    wlan_vdev_is_restart_progress(session->vdev)))
+			event = WLAN_VDEV_SM_EV_RESTART_REQ_FAIL;
+
+		wlan_vdev_mlme_sm_deliver_evt(session->vdev, event, 0, NULL);
+
 		return;
 	}