From 215263ece03b568f1878de0a951bb985050e2047 Mon Sep 17 00:00:00 2001 From: Rachit Kankane Date: Wed, 30 Oct 2019 10:12:52 +0530 Subject: [PATCH] qcacmn: Update Beacon template On detecting RADAR, if SAP / Auto GO is operating on DFS channel, host driver updates Beacon / Probe response template with CSA / ECSA IE to firmware. Once the count in CSA IE is reached to 0, host should remove these IEs from both Beacon / Probe response template and send it to FW. But with INI gDisableDFSChSwitch=1 (test only), After detecting RADAR, host driver updates the Beacon and Probe response template with (E)CSA IEs but doesn't remove these after count reaches to 0. Updated the code to remove these IEs when INI gDisableDFSChSwitch is set. Change-Id: Ie01c80a57191a78d71a8a27f1bead533388a4580 CRs-Fixed: 2555696 --- .../dispatcher/inc/wlan_vdev_mlme_main.h | 3 +++ umac/mlme/vdev_mgr/core/src/vdev_mlme_sm.c | 14 ++++++++++++++ 2 files changed, 17 insertions(+) diff --git a/umac/mlme/mlme_objmgr/dispatcher/inc/wlan_vdev_mlme_main.h b/umac/mlme/mlme_objmgr/dispatcher/inc/wlan_vdev_mlme_main.h index 8a89344b2bda..e13bcddf009b 100644 --- a/umac/mlme/mlme_objmgr/dispatcher/inc/wlan_vdev_mlme_main.h +++ b/umac/mlme/mlme_objmgr/dispatcher/inc/wlan_vdev_mlme_main.h @@ -116,6 +116,8 @@ enum wlan_vdev_state { * @WLAN_VDEV_SM_EV_DOWN_COMPLETE: Notification of DOWN complete * @WLAN_VDEV_SM_EV_ROAM: Notifiction on ROAMING * @WLAN_VDEV_SM_EV_STOP_REQ: Invoke API to initiate STOP handshake + * @WLAN_VDEV_SM_EV_CHAN_SWITCH_DISABLED:Test only, CSA completes without + * change in channel */ enum wlan_vdev_sm_evt { WLAN_VDEV_SM_EV_START = 0, @@ -148,6 +150,7 @@ enum wlan_vdev_sm_evt { WLAN_VDEV_SM_EV_DOWN_COMPLETE = 27, WLAN_VDEV_SM_EV_ROAM = 28, WLAN_VDEV_SM_EV_STOP_REQ = 29, + WLAN_VDEV_SM_EV_CHAN_SWITCH_DISABLED = 30, }; /** diff --git a/umac/mlme/vdev_mgr/core/src/vdev_mlme_sm.c b/umac/mlme/vdev_mgr/core/src/vdev_mlme_sm.c index 5e936b2b7f7b..47d178eb3af5 100644 --- a/umac/mlme/vdev_mgr/core/src/vdev_mlme_sm.c +++ b/umac/mlme/vdev_mgr/core/src/vdev_mlme_sm.c @@ -1374,6 +1374,19 @@ static bool mlme_vdev_subst_suspend_csa_restart_event(void *ctx, bool status; switch (event) { + case WLAN_VDEV_SM_EV_CHAN_SWITCH_DISABLED: + /** + * This event is sent when CSA count becomes 0 without + * change in channel i.e. only Beacon Probe response template + * is updated (CSA / ECSA IE is removed). + */ + + mlme_vdev_sm_transition_to(vdev_mlme, WLAN_VDEV_S_UP); + mlme_vdev_sm_deliver_event(vdev_mlme, + WLAN_VDEV_SM_EV_UP_HOST_RESTART, + event_data_len, event_data); + status = true; + break; case WLAN_VDEV_SM_EV_CSA_RESTART: mlme_vdev_update_beacon(vdev_mlme, BEACON_CSA, event_data_len, event_data); @@ -1640,6 +1653,7 @@ static const char *vdev_sm_event_names[] = { "EV_DOWN_COMPLETE", "EV_ROAM", "EV_STOP_REQ", + "EV_CHAN_SWITCH_DISABLED", }; struct wlan_sm_state_info sm_info[] = {