qcacmn: Add internal stop send event

In current code, EV_DOWN event in stop-progress sub state sends
stop command to FW, As EV_DOWN is generic, it is casuing multiple
stop commands to FW. To avoid, for internal transitions added new
event STOP_REQ, which send stop command to FW

EV_DOWN event is not honored in STOP state, as it is not initial state

Change-Id: I5a3b44ab6e12f6d1c2d10ad55954c6a0510e5f9e
CRS-Fixed: 2401298
This commit is contained in:
Srinivas Pitla
2019-02-19 14:42:56 +05:30
committed by nshrivas
parent 38a0c9fe44
commit ae6c9ee9d1
2 changed files with 8 additions and 4 deletions

View File

@@ -101,6 +101,7 @@ enum wlan_vdev_state {
* @WLAN_VDEV_SM_EV_MLME_DOWN_REQ: Invoke DOWN command operation * @WLAN_VDEV_SM_EV_MLME_DOWN_REQ: Invoke DOWN command operation
* @WLAN_VDEV_SM_EV_DOWN_COMPLETE: Notification of DOWN complete * @WLAN_VDEV_SM_EV_DOWN_COMPLETE: Notification of DOWN complete
* @WLAN_VDEV_SM_EV_ROAM: Notifiction on ROAMING * @WLAN_VDEV_SM_EV_ROAM: Notifiction on ROAMING
* @WLAN_VDEV_SM_EV_STOP_REQ: Invoke API to initiate STOP handshake
*/ */
enum wlan_vdev_sm_evt { enum wlan_vdev_sm_evt {
WLAN_VDEV_SM_EV_START = 0, WLAN_VDEV_SM_EV_START = 0,
@@ -132,6 +133,7 @@ enum wlan_vdev_sm_evt {
WLAN_VDEV_SM_EV_MLME_DOWN_REQ = 26, WLAN_VDEV_SM_EV_MLME_DOWN_REQ = 26,
WLAN_VDEV_SM_EV_DOWN_COMPLETE = 27, WLAN_VDEV_SM_EV_DOWN_COMPLETE = 27,
WLAN_VDEV_SM_EV_ROAM = 28, WLAN_VDEV_SM_EV_ROAM = 28,
WLAN_VDEV_SM_EV_STOP_REQ = 29,
}; };
#else #else

View File

@@ -335,7 +335,7 @@ static bool mlme_vdev_state_dfs_cac_wait_event(void *ctx, uint16_t event,
mlme_vdev_dfs_cac_timer_stop(vdev_mlme, event_data_len, mlme_vdev_dfs_cac_timer_stop(vdev_mlme, event_data_len,
event_data); event_data);
mlme_vdev_sm_transition_to(vdev_mlme, WLAN_VDEV_S_STOP); mlme_vdev_sm_transition_to(vdev_mlme, WLAN_VDEV_S_STOP);
mlme_vdev_sm_deliver_event(vdev_mlme, WLAN_VDEV_SM_EV_DOWN, mlme_vdev_sm_deliver_event(vdev_mlme, WLAN_VDEV_SM_EV_STOP_REQ,
event_data_len, event_data); event_data_len, event_data);
status = true; status = true;
break; break;
@@ -1030,7 +1030,7 @@ static bool mlme_vdev_subst_start_disconn_progress_event(void *ctx,
/* clean up, if any needs to be cleaned up */ /* clean up, if any needs to be cleaned up */
case WLAN_VDEV_SM_EV_CONNECTION_FAIL: case WLAN_VDEV_SM_EV_CONNECTION_FAIL:
mlme_vdev_sm_transition_to(vdev_mlme, WLAN_VDEV_S_STOP); mlme_vdev_sm_transition_to(vdev_mlme, WLAN_VDEV_S_STOP);
mlme_vdev_sm_deliver_event(vdev_mlme, WLAN_VDEV_SM_EV_DOWN, mlme_vdev_sm_deliver_event(vdev_mlme, WLAN_VDEV_SM_EV_STOP_REQ,
event_data_len, event_data); event_data_len, event_data);
status = true; status = true;
break; break;
@@ -1121,7 +1121,7 @@ static bool mlme_vdev_subst_suspend_suspend_down_event(void *ctx,
case WLAN_VDEV_SM_EV_DISCONNECT_COMPLETE: case WLAN_VDEV_SM_EV_DISCONNECT_COMPLETE:
/* clean up, if any needs to be cleaned up */ /* clean up, if any needs to be cleaned up */
mlme_vdev_sm_transition_to(vdev_mlme, WLAN_VDEV_S_STOP); mlme_vdev_sm_transition_to(vdev_mlme, WLAN_VDEV_S_STOP);
mlme_vdev_sm_deliver_event(vdev_mlme, WLAN_VDEV_SM_EV_DOWN, mlme_vdev_sm_deliver_event(vdev_mlme, WLAN_VDEV_SM_EV_STOP_REQ,
event_data_len, event_data); event_data_len, event_data);
status = true; status = true;
break; break;
@@ -1459,7 +1459,7 @@ static bool mlme_vdev_subst_stop_stop_progress_event(void *ctx,
/* Debug framework is required to hold the events */ /* Debug framework is required to hold the events */
switch (event) { switch (event) {
case WLAN_VDEV_SM_EV_DOWN: case WLAN_VDEV_SM_EV_STOP_REQ:
/* send vdev stop command to FW and delete BSS peer*/ /* send vdev stop command to FW and delete BSS peer*/
mlme_vdev_stop_send(vdev_mlme, event_data_len, event_data); mlme_vdev_stop_send(vdev_mlme, event_data_len, event_data);
status = true; status = true;
@@ -1621,6 +1621,8 @@ static const char *vdev_sm_event_names[] = {
"EV_CSA_COMPLETE", "EV_CSA_COMPLETE",
"EV_MLME_DOWN_REQ", "EV_MLME_DOWN_REQ",
"EV_DOWN_COMPLETE", "EV_DOWN_COMPLETE",
"EV_ROAM",
"EV_STOP_REQ",
}; };
struct wlan_sm_state_info sm_info[] = { struct wlan_sm_state_info sm_info[] = {