Prechádzať zdrojové kódy

qcacld-3.0: Add vdev state machine for hidden ssid restart

Adds vdev state machine for hidden ssid restart.

Change-Id: I41d8c8d71050c1e80597787db4623b1359cbb92d
CRs-Fixed: 2316576
Abhishek Singh 6 rokov pred
rodič
commit
6c681f4b63

+ 21 - 0
components/mlme/core/inc/wlan_mlme_vdev_mgr_interface.h

@@ -74,5 +74,26 @@ QDF_STATUS ap_mlme_set_chan_switch_in_progress(struct wlan_objmgr_vdev *vdev,
  */
 bool ap_mlme_get_chan_switch_in_progress(struct wlan_objmgr_vdev *vdev);
 
+/**
+ * ap_mlme_set_hidden_ssid_restart_in_progress() - set mlme priv hidden ssid
+ * restart in progress
+ * @vdev: vdev pointer
+ * @val: value to be set
+ *
+ * Return: QDF_STATUS
+ */
+QDF_STATUS
+ap_mlme_set_hidden_ssid_restart_in_progress(struct wlan_objmgr_vdev *vdev,
+					    bool val);
+
+/**
+ * ap_mlme_get_hidden_ssid_restart_in_progress() - get mlme priv hidden ssid
+ * restart in progress
+ * @vdev: vdev pointer
+ *
+ * Return: value of mlme priv hidden ssid restart in progress
+ */
+bool ap_mlme_get_hidden_ssid_restart_in_progress(struct wlan_objmgr_vdev *vdev);
+
 #endif
 #endif

+ 36 - 0
components/mlme/core/src/wlan_mlme_vdev_mgr_interface.c

@@ -517,6 +517,42 @@ bool ap_mlme_get_chan_switch_in_progress(struct wlan_objmgr_vdev *vdev)
 	return mlme_priv->chan_switch_in_progress;
 }
 
+QDF_STATUS
+ap_mlme_set_hidden_ssid_restart_in_progress(struct wlan_objmgr_vdev *vdev,
+					    bool val)
+{
+	struct vdev_mlme_obj *vdev_mlme;
+	struct mlme_legacy_priv *mlme_priv;
+
+	vdev_mlme = wlan_vdev_mlme_get_cmpt_obj(vdev);
+	if (!vdev_mlme) {
+		mlme_err("vdev component object is NULL");
+		return QDF_STATUS_E_FAILURE;
+	}
+
+	mlme_priv = (struct mlme_legacy_priv *)vdev_mlme->legacy_vdev_ptr;
+
+	mlme_priv->hidden_ssid_restart_in_progress = val;
+
+	return QDF_STATUS_SUCCESS;
+}
+
+bool ap_mlme_get_hidden_ssid_restart_in_progress(struct wlan_objmgr_vdev *vdev)
+{
+	struct vdev_mlme_obj *vdev_mlme;
+	struct mlme_legacy_priv *mlme_priv;
+
+	vdev_mlme = wlan_vdev_mlme_get_cmpt_obj(vdev);
+	if (!vdev_mlme) {
+		mlme_err("vdev component object is NULL");
+		return false;
+	}
+
+	mlme_priv = (struct mlme_legacy_priv *)vdev_mlme->legacy_vdev_ptr;
+
+	return mlme_priv->hidden_ssid_restart_in_progress;
+}
+
 /**
  * ap_mlme_vdev_legacy_hdl_create () - Create sap mlme legacy priv object
  * @vdev_mlme: vdev mlme object

+ 1 - 1
core/mac/src/pe/lim/lim_process_mlm_rsp_messages.c

@@ -2661,7 +2661,7 @@ void lim_process_mlm_update_hidden_ssid_rsp(tpAniSirGlobal mac_ctx,
 	}
 	/* Update beacon */
 	sch_set_fixed_beacon_fields(mac_ctx, session_entry);
-	lim_send_beacon_ind(mac_ctx, session_entry);
+	lim_send_beacon(mac_ctx, session_entry);
 
 free_req:
 	if (NULL != hidden_ssid_vdev_restart) {

+ 8 - 0
core/mac/src/pe/lim/lim_process_sme_req_messages.c

@@ -3873,8 +3873,16 @@ static void lim_handle_update_ssid_hidden(tpAniSirGlobal mac_ctx,
 		return;
 	}
 
+#ifdef CONFIG_VDEV_SM
+	ap_mlme_set_hidden_ssid_restart_in_progress(session->vdev, true);
+	wlan_vdev_mlme_sm_deliver_evt(session->vdev,
+				      WLAN_VDEV_SM_EV_FW_VDEV_RESTART,
+				      sizeof(*session), session);
+#else
+
 	/* Send vdev restart */
 	lim_send_vdev_restart(mac_ctx, session, session->smeSessionId);
+#endif
 
 	return;
 }

+ 10 - 7
core/mac/src/pe/lim/lim_utils.c

@@ -8544,13 +8544,16 @@ QDF_STATUS lim_ap_mlme_vdev_restart_send(struct vdev_mlme_obj *vdev_mlme,
 		return QDF_STATUS_E_INVAL;
 	}
 
-	lim_set_channel(session->mac_ctx, session->currentOperChannel,
-			session->ch_center_freq_seg0,
-			session->ch_center_freq_seg1,
-			session->ch_width,
-			session->maxTxPower, session->peSessionId,
-			session->cac_duration_ms,
-			session->dfs_regdomain);
+	if (ap_mlme_get_hidden_ssid_restart_in_progress(vdev_mlme->vdev))
+		lim_send_vdev_restart(session->mac_ctx, session,
+				      session->smeSessionId);
+	else
+		lim_set_channel(session->mac_ctx, session->currentOperChannel,
+				session->ch_center_freq_seg0,
+				session->ch_center_freq_seg1,
+				session->ch_width, session->maxTxPower,
+				session->peSessionId, session->cac_duration_ms,
+				session->dfs_regdomain);
 
 	return QDF_STATUS_SUCCESS;
 }

+ 7 - 1
core/wma/src/wma_dev_if.c

@@ -1223,9 +1223,15 @@ int wma_vdev_start_resp_handler(void *handle, uint8_t *cmd_param_info,
 			__func__);
 		qdf_atomic_set(&iface->vdev_restart_params.
 			       hidden_ssid_restart_in_progress, 0);
-
+#ifdef CONFIG_VDEV_SM
+		wlan_vdev_mlme_sm_deliver_evt(iface->vdev,
+					      WLAN_VDEV_SM_EV_RESTART_RESP,
+					      sizeof(*hidden_ssid_restart),
+					      hidden_ssid_restart);
+#else
 		wma_send_msg(wma, WMA_HIDDEN_SSID_RESTART_RSP,
 				(void *)hidden_ssid_restart, 0);
+#endif
 	}
 
 #ifdef FEATURE_AP_MCC_CH_AVOIDANCE

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

@@ -4817,11 +4817,15 @@ QDF_STATUS wma_ap_mlme_vdev_start_continue(struct vdev_mlme_obj *vdev_mlme,
 {
 	tp_wma_handle wma = cds_get_context(QDF_MODULE_ID_WMA);
 	QDF_STATUS status = QDF_STATUS_SUCCESS;
+	struct wlan_objmgr_vdev *vdev = vdev_mlme->vdev;
 
-	if (ap_mlme_get_chan_switch_in_progress(vdev_mlme->vdev)) {
+	if (ap_mlme_get_chan_switch_in_progress(vdev)) {
 		wma_send_msg_high_priority(wma, WMA_SWITCH_CHANNEL_RSP,
 					   data, 0);
-		ap_mlme_set_chan_switch_in_progress(vdev_mlme->vdev, false);
+		ap_mlme_set_chan_switch_in_progress(vdev, false);
+	} else if (ap_mlme_get_hidden_ssid_restart_in_progress(vdev)) {
+		wma_send_msg(wma, WMA_HIDDEN_SSID_RESTART_RSP, data, 0);
+		ap_mlme_set_hidden_ssid_restart_in_progress(vdev, false);
 	} else {
 		status = wma_ap_vdev_send_start_resp(vdev_mlme, data);
 	}