Переглянути джерело

qcacld-3.0: Replace WLAN_ALL_SESSIONS_DIALOG_ID with TWT_ALL_SESSIONS_DIALOG_ID

There are duplicate macros for the same purpose, hence
replace WLAN_ALL_SESSIONS_DIALOG_ID with TWT_ALL_SESSIONS_DIALOG_ID.

Change-Id: I63130869eed8dffcce85fe6a04586592ab3eaca2
CRs-Fixed: 3047686
Srinivas Girigowda 3 роки тому
батько
коміт
a58817a89b

+ 1 - 1
components/cp_stats/dispatcher/src/wlan_cp_stats_mc_ucfg_api.c

@@ -72,7 +72,7 @@ ucfg_twt_get_peer_session_param_by_dlg_id(struct peer_mc_cp_stats *mc_stats,
 		src_param = &mc_stats->twt_param[i];
 		if (!event_type ||
 		    (src_param->dialog_id != input_dialog_id &&
-		     input_dialog_id != WLAN_ALL_SESSIONS_DIALOG_ID))
+		     input_dialog_id != TWT_ALL_SESSIONS_DIALOG_ID))
 			continue;
 
 		if ((event_type == HOST_TWT_SESSION_SETUP) ||

+ 1 - 1
components/mlme/core/inc/wlan_mlme_twt_api.h

@@ -302,7 +302,7 @@ bool mlme_twt_is_command_in_progress(struct wlan_objmgr_psoc *psoc,
  *
  * Check if the number of active TWT sessions is equal to the maximum number
  * of TWT sessions supported. Only count the TWT session slot if it not
- * WLAN_ALL_SESSIONS_DIALOG_ID and dialog id is different from input dialog_id,
+ * TWT_ALL_SESSIONS_DIALOG_ID and dialog id is different from input dialog_id,
  * because if same dialog_id already exists in the TWT sessions, we should
  * return false since re-negotiation is supported on existing dialog_id.
  *

+ 23 - 23
components/mlme/core/src/wlan_mlme_twt_api.c

@@ -55,7 +55,7 @@ bool mlme_is_max_twt_sessions_reached(struct wlan_objmgr_psoc *psoc,
 		uint8_t existing_session_dialog_id =
 				peer_priv->twt_ctx.session_info[i].dialog_id;
 
-		if (existing_session_dialog_id != WLAN_ALL_SESSIONS_DIALOG_ID &&
+		if (existing_session_dialog_id != TWT_ALL_SESSIONS_DIALOG_ID &&
 		    existing_session_dialog_id != dialog_id)
 			num_twt_sessions++;
 	}
@@ -95,7 +95,7 @@ bool mlme_is_twt_setup_in_progress(struct wlan_objmgr_psoc *psoc,
 		existing_session_dialog_id =
 			peer_priv->twt_ctx.session_info[i].dialog_id;
 		if (existing_session_dialog_id == dialog_id &&
-		    existing_session_dialog_id != WLAN_ALL_SESSIONS_DIALOG_ID &&
+		    existing_session_dialog_id != TWT_ALL_SESSIONS_DIALOG_ID &&
 		    !setup_done) {
 			wlan_objmgr_peer_release_ref(peer, WLAN_MLME_NB_ID);
 			return true;
@@ -131,7 +131,7 @@ void mlme_add_twt_session(struct wlan_objmgr_psoc *psoc,
 
 	for (i = 0; i < peer_priv->twt_ctx.num_twt_sessions; i++) {
 		if (peer_priv->twt_ctx.session_info[i].dialog_id ==
-		    WLAN_ALL_SESSIONS_DIALOG_ID) {
+		    TWT_ALL_SESSIONS_DIALOG_ID) {
 			peer_priv->twt_ctx.session_info[i].dialog_id =
 							dialog_id;
 			break;
@@ -202,10 +202,10 @@ QDF_STATUS mlme_init_twt_context(struct wlan_objmgr_psoc *psoc,
 	peer_priv->twt_ctx.num_twt_sessions = WLAN_MAX_TWT_SESSIONS_PER_PEER;
 	for (i = 0; i < peer_priv->twt_ctx.num_twt_sessions; i++) {
 		if (peer_priv->twt_ctx.session_info[i].dialog_id == dialog_id ||
-		    dialog_id == WLAN_ALL_SESSIONS_DIALOG_ID) {
+		    dialog_id == TWT_ALL_SESSIONS_DIALOG_ID) {
 			peer_priv->twt_ctx.session_info[i].setup_done = false;
 			peer_priv->twt_ctx.session_info[i].dialog_id =
-					WLAN_ALL_SESSIONS_DIALOG_ID;
+					TWT_ALL_SESSIONS_DIALOG_ID;
 			mlme_set_twt_command_in_progress(
 				psoc, peer_mac,
 				peer_priv->twt_ctx.session_info[i].dialog_id,
@@ -267,10 +267,10 @@ mlme_init_all_peers_twt_context(struct wlan_objmgr_psoc *psoc,
 				peer_priv->twt_ctx.session_info[i].dialog_id;
 
 				if (existing_dialog_id == dialog_id ||
-				    dialog_id == WLAN_ALL_SESSIONS_DIALOG_ID) {
+				    dialog_id == TWT_ALL_SESSIONS_DIALOG_ID) {
 					peer_priv->twt_ctx.session_info[i].setup_done = false;
 					peer_priv->twt_ctx.session_info[i].dialog_id =
-							WLAN_ALL_SESSIONS_DIALOG_ID;
+							TWT_ALL_SESSIONS_DIALOG_ID;
 				}
 			}
 		}
@@ -316,11 +316,11 @@ bool mlme_is_twt_setup_done(struct wlan_objmgr_psoc *psoc,
 
 	for (i = 0; i < peer_priv->twt_ctx.num_twt_sessions; i++) {
 		if (peer_priv->twt_ctx.session_info[i].dialog_id == dialog_id ||
-		    dialog_id == WLAN_ALL_SESSIONS_DIALOG_ID) {
+		    dialog_id == TWT_ALL_SESSIONS_DIALOG_ID) {
 			is_setup_done =
 				peer_priv->twt_ctx.session_info[i].setup_done;
 
-			if (dialog_id != WLAN_ALL_SESSIONS_DIALOG_ID ||
+			if (dialog_id != TWT_ALL_SESSIONS_DIALOG_ID ||
 			    is_setup_done)
 				break;
 		}
@@ -382,7 +382,7 @@ void mlme_set_twt_session_state(struct wlan_objmgr_psoc *psoc,
 	mlme_debug("set_state:%d for dialog_id:%d", state, dialog_id);
 	for (i = 0; i < peer_priv->twt_ctx.num_twt_sessions; i++) {
 		if (peer_priv->twt_ctx.session_info[i].dialog_id == dialog_id ||
-		    dialog_id == WLAN_ALL_SESSIONS_DIALOG_ID) {
+		    dialog_id == TWT_ALL_SESSIONS_DIALOG_ID) {
 			peer_priv->twt_ctx.session_info[i].state = state;
 			break;
 		}
@@ -416,7 +416,7 @@ mlme_get_twt_session_state(struct wlan_objmgr_psoc *psoc,
 
 	for (i = 0; i < peer_priv->twt_ctx.num_twt_sessions; i++) {
 		if (peer_priv->twt_ctx.session_info[i].dialog_id == dialog_id &&
-		    dialog_id != WLAN_ALL_SESSIONS_DIALOG_ID) {
+		    dialog_id != TWT_ALL_SESSIONS_DIALOG_ID) {
 			wlan_objmgr_peer_release_ref(peer, WLAN_MLME_NB_ID);
 			return peer_priv->twt_ctx.session_info[i].state;
 		}
@@ -564,11 +564,11 @@ mlme_sap_set_twt_all_peers_cmd_in_progress(struct wlan_objmgr_psoc *psoc,
 				peer_priv->twt_ctx.session_info[i].dialog_id;
 
 				if (existing_dialog_id == dialog_id ||
-				    dialog_id == WLAN_ALL_SESSIONS_DIALOG_ID) {
+				    dialog_id == TWT_ALL_SESSIONS_DIALOG_ID) {
 					peer_priv->twt_ctx.session_info[i].active_cmd = cmd;
 
 					if (dialog_id !=
-					    WLAN_ALL_SESSIONS_DIALOG_ID) {
+					    TWT_ALL_SESSIONS_DIALOG_ID) {
 						break;
 					}
 				}
@@ -641,11 +641,11 @@ mlme_twt_any_peer_cmd_in_progress(struct wlan_objmgr_psoc *psoc,
 				 peer_priv->twt_ctx.session_info[i].dialog_id;
 
 				if (existing_dialog_id == dialog_id ||
-				    dialog_id == WLAN_ALL_SESSIONS_DIALOG_ID) {
+				    dialog_id == TWT_ALL_SESSIONS_DIALOG_ID) {
 					cmd_in_progress = (active_cmd == cmd);
 
 					if (dialog_id !=
-						WLAN_ALL_SESSIONS_DIALOG_ID ||
+						TWT_ALL_SESSIONS_DIALOG_ID ||
 					    cmd_in_progress) {
 						wlan_objmgr_peer_release_ref(
 							peer,
@@ -708,11 +708,11 @@ bool mlme_sap_twt_peer_is_cmd_in_progress(struct wlan_objmgr_psoc *psoc,
 			peer_priv->twt_ctx.session_info[i].dialog_id;
 
 		if (existing_dialog_id == dialog_id ||
-		    dialog_id == WLAN_ALL_SESSIONS_DIALOG_ID ||
-		    existing_dialog_id == WLAN_ALL_SESSIONS_DIALOG_ID) {
+		    dialog_id == TWT_ALL_SESSIONS_DIALOG_ID ||
+		    existing_dialog_id == TWT_ALL_SESSIONS_DIALOG_ID) {
 			cmd_in_progress = (active_cmd == cmd);
 
-			if (dialog_id != WLAN_ALL_SESSIONS_DIALOG_ID ||
+			if (dialog_id != TWT_ALL_SESSIONS_DIALOG_ID ||
 			    cmd_in_progress) {
 				break;
 			}
@@ -749,9 +749,9 @@ QDF_STATUS mlme_set_twt_command_in_progress(struct wlan_objmgr_psoc *psoc,
 
 	for (i = 0; i < peer_priv->twt_ctx.num_twt_sessions; i++) {
 		if (peer_priv->twt_ctx.session_info[i].dialog_id == dialog_id ||
-		    dialog_id == WLAN_ALL_SESSIONS_DIALOG_ID) {
+		    dialog_id == TWT_ALL_SESSIONS_DIALOG_ID) {
 			peer_priv->twt_ctx.session_info[i].active_cmd = cmd;
-			if (dialog_id != WLAN_ALL_SESSIONS_DIALOG_ID)
+			if (dialog_id != TWT_ALL_SESSIONS_DIALOG_ID)
 				break;
 		}
 	}
@@ -823,18 +823,18 @@ bool mlme_twt_is_command_in_progress(struct wlan_objmgr_psoc *psoc,
 			*pactive_cmd = active_cmd;
 
 		if (peer_priv->twt_ctx.session_info[i].dialog_id == dialog_id ||
-		    dialog_id == WLAN_ALL_SESSIONS_DIALOG_ID) {
+		    dialog_id == TWT_ALL_SESSIONS_DIALOG_ID) {
 			if (cmd == WLAN_TWT_ANY) {
 				is_command_in_progress =
 					(active_cmd != WLAN_TWT_NONE);
 
-				if (dialog_id != WLAN_ALL_SESSIONS_DIALOG_ID ||
+				if (dialog_id != TWT_ALL_SESSIONS_DIALOG_ID ||
 				    is_command_in_progress)
 					break;
 			} else {
 				is_command_in_progress = (active_cmd == cmd);
 
-				if (dialog_id != WLAN_ALL_SESSIONS_DIALOG_ID ||
+				if (dialog_id != TWT_ALL_SESSIONS_DIALOG_ID ||
 				    is_command_in_progress)
 					break;
 			}

+ 0 - 2
components/mlme/dispatcher/inc/wlan_mlme_twt_public_struct.h

@@ -80,8 +80,6 @@ enum wlan_twt_session_state {
 	WLAN_TWT_SETUP_STATE_SUSPEND = 2,
 };
 
-#define WLAN_ALL_SESSIONS_DIALOG_ID 255
-
 #ifdef WLAN_SUPPORT_TWT
 #define WLAN_MAX_TWT_SESSIONS_PER_PEER 1
 

+ 1 - 1
components/mlme/dispatcher/inc/wlan_mlme_twt_ucfg_api.h

@@ -278,7 +278,7 @@ ucfg_mlme_is_twt_setup_in_progress(struct wlan_objmgr_psoc *psoc,
  *
  * Check if the number of active TWT sessions is equal to the maximum number
  * of TWT sessions supported. Only count the TWT session slot if it not
- * WLAN_ALL_SESSIONS_DIALOG_ID and dialog id is different from input dialog_id,
+ * TWT_ALL_SESSIONS_DIALOG_ID and dialog id is different from input dialog_id,
  * because if same dialog_id already exists in the TWT sessions, we should
  * return false since re-negotiation is supported on existing dialog_id.
  *

+ 1 - 1
core/hdd/src/wlan_hdd_cm_connect.c

@@ -1107,7 +1107,7 @@ hdd_cm_connect_success_post_user_update(struct wlan_objmgr_vdev *vdev,
 						   FTM_TIME_SYNC_STA_CONNECTED);
 		ucfg_mlme_init_twt_context(hdd_ctx->psoc,
 					   &rsp->bssid,
-					   WLAN_ALL_SESSIONS_DIALOG_ID);
+					   TWT_ALL_SESSIONS_DIALOG_ID);
 	}
 	hdd_periodic_sta_stats_start(adapter);
 	wlan_twt_concurrency_update(hdd_ctx);

+ 1 - 1
core/hdd/src/wlan_hdd_softap_tx_rx.c

@@ -1429,7 +1429,7 @@ QDF_STATUS hdd_softap_register_sta(struct hdd_adapter *adapter,
 				   WLAN_CONTROL_PATH);
 	ucfg_mlme_update_oce_flags(hdd_ctx->pdev);
 	ucfg_mlme_init_twt_context(hdd_ctx->psoc, sta_mac,
-				   WLAN_ALL_SESSIONS_DIALOG_ID);
+				   TWT_ALL_SESSIONS_DIALOG_ID);
 	return qdf_status;
 }
 

+ 12 - 12
core/hdd/src/wlan_hdd_twt.c

@@ -986,7 +986,7 @@ static int hdd_twt_get_session_params(struct hdd_adapter *adapter,
 	case QDF_SAP_MODE:
 		return hdd_sap_twt_get_session_params(adapter, twt_param_attr);
 	default:
-		hdd_err_rl("TWT terminate is not supported on %s",
+		hdd_err_rl("TWT get session params is not supported on %s",
 			   qdf_opmode_str(adapter->device_mode));
 	}
 
@@ -2033,15 +2033,15 @@ hdd_send_twt_del_all_sessions_to_userspace(struct hdd_adapter *adapter)
 
 	if (!ucfg_mlme_is_twt_setup_done(psoc,
 					 &hdd_sta_ctx->conn_info.bssid,
-					 WLAN_ALL_SESSIONS_DIALOG_ID)) {
+					 TWT_ALL_SESSIONS_DIALOG_ID)) {
 		hdd_debug("No active TWT sessions, vdev_id: %d dialog_id: %d",
-			  adapter->vdev_id, WLAN_ALL_SESSIONS_DIALOG_ID);
+			  adapter->vdev_id, TWT_ALL_SESSIONS_DIALOG_ID);
 		return;
 	}
 
 	qdf_mem_zero(&params, sizeof(params));
 	params.vdev_id = adapter->vdev_id;
-	params.dialog_id = WLAN_ALL_SESSIONS_DIALOG_ID;
+	params.dialog_id = TWT_ALL_SESSIONS_DIALOG_ID;
 	params.status = WMI_HOST_DEL_TWT_STATUS_UNKNOWN_ERROR;
 	qdf_mem_copy(params.peer_macaddr, hdd_sta_ctx->conn_info.bssid.bytes,
 		     QDF_MAC_ADDR_SIZE);
@@ -3246,12 +3246,12 @@ free_skb:
 }
 
 /**
- * hdd_twt_get_capabilities() - Process TWT resume operation
- * in the received vendor command and send it to firmware
+ * hdd_twt_get_capabilities() - Process TWT get capabilities
+ * in the received vendor command.
  * @adapter: adapter pointer
  * @twt_param_attr: nl attributes
  *
- * Handles QCA_WLAN_TWT_RESUME
+ * Handles QCA_WLAN_TWT_GET_CAPABILITIES
  *
  * Return: 0 on success, negative value on failure
  */
@@ -3593,11 +3593,11 @@ static int hdd_twt_clear_session_traffic_stats(struct hdd_adapter *adapter,
 
 	if (ucfg_mlme_twt_is_command_in_progress(adapter->hdd_ctx->psoc,
 						 &hdd_sta_ctx->conn_info.bssid,
-						 WLAN_ALL_SESSIONS_DIALOG_ID,
+						 TWT_ALL_SESSIONS_DIALOG_ID,
 						 WLAN_TWT_STATISTICS, NULL) ||
 	   ucfg_mlme_twt_is_command_in_progress(adapter->hdd_ctx->psoc,
 						&hdd_sta_ctx->conn_info.bssid,
-						WLAN_ALL_SESSIONS_DIALOG_ID,
+						TWT_ALL_SESSIONS_DIALOG_ID,
 						WLAN_TWT_CLEAR_STATISTICS,
 						NULL)) {
 		hdd_warn("Already TWT statistics or clear statistics exists");
@@ -3709,11 +3709,11 @@ static int hdd_twt_get_session_traffic_stats(struct hdd_adapter *adapter,
 
 	if (ucfg_mlme_twt_is_command_in_progress(adapter->hdd_ctx->psoc,
 						 &hdd_sta_ctx->conn_info.bssid,
-						 WLAN_ALL_SESSIONS_DIALOG_ID,
+						 TWT_ALL_SESSIONS_DIALOG_ID,
 						 WLAN_TWT_STATISTICS, NULL) ||
 	    ucfg_mlme_twt_is_command_in_progress(adapter->hdd_ctx->psoc,
 						 &hdd_sta_ctx->conn_info.bssid,
-						 WLAN_ALL_SESSIONS_DIALOG_ID,
+						 TWT_ALL_SESSIONS_DIALOG_ID,
 						 WLAN_TWT_CLEAR_STATISTICS,
 						 NULL)) {
 		hdd_warn("Already TWT statistics or clear statistics exists");
@@ -4507,7 +4507,7 @@ void hdd_twt_del_dialog_in_ps_disable(struct hdd_context *hdd_ctx,
 	struct wmi_twt_del_dialog_param params = {0};
 	int ret;
 
-	params.dialog_id = WLAN_ALL_SESSIONS_DIALOG_ID;
+	params.dialog_id = TWT_ALL_SESSIONS_DIALOG_ID;
 	params.vdev_id = vdev_id;
 	qdf_mem_copy(params.peer_macaddr, mac_addr->bytes, QDF_MAC_ADDR_SIZE);
 

+ 6 - 6
core/sme/src/common/sme_api.c

@@ -1919,7 +1919,7 @@ static QDF_STATUS sme_process_antenna_mode_resp(struct mac_context *mac,
  * to iterate through the list of all peers and check for any given @dialog_id
  * if the command @cmd is in progress.
  * Note: If @peer_mac is broadcast MAC address then @dialog_id shall always
- * be WLAN_ALL_SESSIONS_DIALOG_ID.
+ * be TWT_ALL_SESSIONS_DIALOG_ID.
  * For ex: If TWT teardown command is issued on a particular @dialog_id and
  * non-broadcast peer mac and FW response is not yet received then for that
  * particular @dialog_id and @peer_mac, TWT teardown is the active command,
@@ -1960,7 +1960,7 @@ sme_sap_twt_is_command_in_progress(struct wlan_objmgr_psoc *psoc,
  * If the input @peer_mac is a broadcast MAC address then there is nothing
  * to do, because the initialized structure is already in the expected format
  * Note: If @peer_mac is broadcast MAC address then @dialog_id shall always
- * be WLAN_ALL_SESSIONS_DIALOG_ID.
+ * be TWT_ALL_SESSIONS_DIALOG_ID.
  *
  * If the input @peer_mac is a non-broadcast MAC address then
  * mlme_add_twt_session() shall add the @dialog_id to the @peer_mac
@@ -1991,7 +1991,7 @@ sme_sap_add_twt_session(struct wlan_objmgr_psoc *psoc,
  * to iterate through the list of all peers and set the active command to @cmd
  * for the given @dialog_id
  * Note: If @peer_mac is broadcast MAC address then @dialog_id shall always
- * be WLAN_ALL_SESSIONS_DIALOG_ID.
+ * be TWT_ALL_SESSIONS_DIALOG_ID.
  * For ex: If TWT teardown command is issued on broadcast @peer_mac, then
  * it is same as issuing TWT teardown for all the peers (all TWT sessions).
  * Invoking mlme_sap_set_twt_all_peers_cmd_in_progress() shall iterate through
@@ -2033,7 +2033,7 @@ sme_sap_set_twt_command_in_progress(struct wlan_objmgr_psoc *psoc,
  * to iterate through the list of all peers and initialize the TWT session
  * context
  * Note: If @peer_mac is broadcast MAC address then @dialog_id shall always
- * be WLAN_ALL_SESSIONS_DIALOG_ID.
+ * be TWT_ALL_SESSIONS_DIALOG_ID.
  * For ex: If TWT teardown command is issued on broadcast @peer_mac, then
  * it is same as issuing TWT teardown for all the peers (all TWT sessions).
  * Then active command for all the peers is set to @WLAN_TWT_TERMINATE.
@@ -2235,7 +2235,7 @@ sme_process_sta_twt_del_dialog_event(
 					WLAN_TWT_TERMINATE, &active_cmd);
 
 	if (!is_evt_allowed &&
-	    param->dialog_id != WLAN_ALL_SESSIONS_DIALOG_ID &&
+	    param->dialog_id != TWT_ALL_SESSIONS_DIALOG_ID &&
 	    param->status != WMI_HOST_DEL_TWT_STATUS_ROAMING &&
 	    param->status != WMI_HOST_DEL_TWT_STATUS_PEER_INIT_TEARDOWN &&
 	    param->status != WMI_HOST_DEL_TWT_STATUS_CONCURRENCY) {
@@ -2425,7 +2425,7 @@ sme_process_twt_nudge_dialog_event(struct mac_context *mac,
 					param->peer_macaddr, param->dialog_id,
 					WLAN_TWT_NUDGE, &active_cmd);
 		if (!is_evt_allowed &&
-		    param->dialog_id != WLAN_ALL_SESSIONS_DIALOG_ID) {
+		    param->dialog_id != TWT_ALL_SESSIONS_DIALOG_ID) {
 			sme_debug("Nudge event dropped active_cmd:%d",
 				  active_cmd);
 			goto fail;