ソースを参照

qcacld-3.0: Remove obsolete code in SME QOS module

Remove the obsolete logic in the SME QOS module.
QDF_STATUS_PMC_PENDING status is not used, so remove the
obsolete code based on this status.

Change-Id: Ie891eddad2b536e43f5f933c8683d41b096bf578
CRs-Fixed: 2269866
Kiran Kumar Lokere 6 年 前
コミット
4de8755491

+ 1 - 3
core/sme/inc/sme_power_save_api.h

@@ -46,9 +46,7 @@ void sme_set_tspec_uapsd_mask_per_session(tpAniSirGlobal mac_ctx,
 typedef void (*uapsd_start_indication_cb)(void *callback_context,
 		uint32_t session_id, QDF_STATUS status);
 
-QDF_STATUS sme_ps_start_uapsd(tHalHandle hal_ctx, uint32_t session_id,
-		uapsd_start_indication_cb uapsd_start_ind_cb,
-		void *callback_context);
+QDF_STATUS sme_ps_start_uapsd(tHalHandle hal_ctx, uint32_t session_id);
 QDF_STATUS sme_set_ps_host_offload(tHalHandle hal_ctx,
 		tpSirHostOffloadReq request,
 		uint8_t session_id);

+ 1 - 5
core/sme/src/common/sme_power_save.c

@@ -574,14 +574,10 @@ void sme_set_tspec_uapsd_mask_per_session(tpAniSirGlobal mac_ctx,
  * sme_ps_start_uapsd(): function to start UAPSD.
  * @hal_ctx: global hal_handle
  * @session_id: session id
- * @uapsd_start_ind_cb: uapsd start indiation cb
- * @callback_context: callback context
  *
  * Return: QDF_STATUS
  */
-QDF_STATUS sme_ps_start_uapsd(tHalHandle hal_ctx, uint32_t session_id,
-		uapsd_start_indication_cb uapsd_start_ind_cb,
-		void *callback_context)
+QDF_STATUS sme_ps_start_uapsd(tHalHandle hal_ctx, uint32_t session_id)
 {
 	QDF_STATUS status = QDF_STATUS_E_FAILURE;
 

+ 2 - 4
core/sme/src/csr/csr_api_roam.c

@@ -7995,8 +7995,7 @@ static void csr_roam_process_join_res(tpAniSirGlobal mac_ctx,
 			sme_err(
 				" uapsd_mask (0x%X) set, request UAPSD now",
 				conn_profile->modifyProfileFields.uapsd_mask);
-			sme_ps_start_uapsd(MAC_HANDLE(mac_ctx), session_id,
-				NULL, NULL);
+			sme_ps_start_uapsd(MAC_HANDLE(mac_ctx), session_id);
 		}
 		conn_profile->dot11Mode = session->bssParams.uCfgDot11Mode;
 		roam_info.u.pConnectedProfile = conn_profile;
@@ -21826,8 +21825,7 @@ static QDF_STATUS csr_process_roam_sync_callback(tpAniSirGlobal mac_ctx,
 		sme_debug(
 				" uapsd_mask (0x%X) set, request UAPSD now",
 				conn_profile->modifyProfileFields.uapsd_mask);
-		sme_ps_start_uapsd(MAC_HANDLE(mac_ctx), session_id,
-				NULL, NULL);
+		sme_ps_start_uapsd(MAC_HANDLE(mac_ctx), session_id);
 	}
 	conn_profile->dot11Mode = session->bssParams.uCfgDot11Mode;
 	roam_info->u.pConnectedProfile = conn_profile;

+ 12 - 68
core/sme/src/qos/sme_qos.c

@@ -282,10 +282,6 @@ struct sme_qos_sessioninfo {
 	uint32_t roamID;
 	/* are we in the process of handing off to a different AP */
 	bool handoffRequested;
-	/* following reassoc or AddTS has UAPSD already been requested
-	 * from PMC
-	 */
-	bool uapsdAlreadyRequested;
 	/* commands that are being buffered for this session */
 	tDblLinkList bufferedCommandList;
 
@@ -442,9 +438,6 @@ static QDF_STATUS sme_qos_add_ts_success_fnp(tpAniSirGlobal pMac, tListElem
 static bool sme_qos_is_rsp_pending(uint8_t sessionId, sme_QosEdcaAcType ac);
 static bool sme_qos_is_uapsd_active(void);
 
-static void sme_qos_pmc_offload_start_uapsd_callback(void *callbackContext,
-					 uint32_t sessionId, QDF_STATUS status);
-
 static QDF_STATUS sme_qos_buffer_existing_flows(tpAniSirGlobal pMac,
 						uint8_t sessionId);
 static QDF_STATUS sme_qos_delete_existing_flows(tpAniSirGlobal pMac,
@@ -563,7 +556,6 @@ QDF_STATUS sme_qos_close(tpAniSirGlobal pMac)
 		/* this session doesn't require UAPSD */
 		pSession->apsdMask = 0;
 
-		pSession->uapsdAlreadyRequested = false;
 		pSession->handoffRequested = false;
 		pSession->roamID = 0;
 		/* need to clean up buffered req */
@@ -3338,7 +3330,6 @@ static QDF_STATUS sme_qos_process_ft_reassoc_req_ev(
 	 * to reset all these session variables
 	 */
 	session->apsdMask = 0;
-	session->uapsdAlreadyRequested = 0;
 
 	/*
 	 * Now change reason and HO renewal of
@@ -4820,7 +4811,6 @@ static QDF_STATUS sme_qos_process_handoff_assoc_req_ev(tpAniSirGlobal pMac,
 	pSession->apsdMask = 0;
 	/* do any sessions still require UAPSD? */
 	sme_ps_uapsd_disable(MAC_HANDLE(pMac), sessionId);
-	pSession->uapsdAlreadyRequested = false;
 	return QDF_STATUS_SUCCESS;
 }
 
@@ -4930,7 +4920,6 @@ static QDF_STATUS sme_qos_process_disconnect_ev(tpAniSirGlobal pMac, uint8_t
 
 	sme_ps_uapsd_disable(MAC_HANDLE(pMac), sessionId);
 
-	pSession->uapsdAlreadyRequested = false;
 	pSession->handoffRequested = false;
 	pSession->roamID = 0;
 	/* need to clean up buffered req */
@@ -6165,7 +6154,6 @@ static QDF_STATUS sme_qos_buffer_existing_flows(tpAniSirGlobal mac_ctx,
 		list_entry = list_nextentry;
 	}
 	qos_session = &sme_qos_cb.sessionInfo[sessionid];
-	qos_session->uapsdAlreadyRequested = false;
 	return QDF_STATUS_SUCCESS;
 }
 
@@ -6682,15 +6670,12 @@ sme_qos_reassoc_success_ev_fnp(tpAniSirGlobal mac_ctx,
 		 * do anything.
 		 */
 		if (ac_info->requested_QoSInfo[SME_QOS_TSPEC_INDEX_0].
-				ts_info.psb &&
-				!qos_session->uapsdAlreadyRequested) {
+				ts_info.psb) {
 			/* this is the first flow to detect we need
 			 * PMC in UAPSD mode
 			 */
 			pmc_status = sme_ps_start_uapsd(MAC_HANDLE(mac_ctx),
-					flow_info->sessionId,
-				sme_qos_pmc_offload_start_uapsd_callback,
-					qos_session);
+							flow_info->sessionId);
 			/* if PMC doesn't return success right away means
 			 * it is yet to put the module in BMPS state & later
 			 * to UAPSD state
@@ -6700,11 +6685,6 @@ sme_qos_reassoc_success_ev_fnp(tpAniSirGlobal mac_ctx,
 					SME_QOS_STATUS_SETUP_SUCCESS_IND_APSD_SET_FAILED;
 				/* we need to always notify this case */
 				flow_info->hoRenewal = false;
-			} else if (QDF_STATUS_PMC_PENDING == pmc_status) {
-				/* let other flows know PMC has been notified */
-				qos_session->uapsdAlreadyRequested =
-				true;
-
 			}
 		}
 		/* for any other pmc status we declare success */
@@ -6720,15 +6700,12 @@ sme_qos_reassoc_success_ev_fnp(tpAniSirGlobal mac_ctx,
 		delete_entry = false;
 		flow_info->reason = SME_QOS_REASON_REQ_SUCCESS;
 		if (ac_info->requested_QoSInfo[SME_QOS_TSPEC_INDEX_0].
-				ts_info.psb &&
-				!qos_session->uapsdAlreadyRequested) {
+				ts_info.psb) {
 			/* this is the first flow to detect we need
 			 * PMC in UAPSD mode
 			 */
 			pmc_status = sme_ps_start_uapsd(MAC_HANDLE(mac_ctx),
-					 flow_info->sessionId,
-				sme_qos_pmc_offload_start_uapsd_callback,
-					 qos_session);
+							flow_info->sessionId);
 			/* if PMC doesn't return success right away means
 			 * it is yet to put the module in BMPS state &
 			 * later to UAPSD state
@@ -6738,8 +6715,7 @@ sme_qos_reassoc_success_ev_fnp(tpAniSirGlobal mac_ctx,
 					SME_QOS_STATUS_MODIFY_SETUP_SUCCESS_IND_APSD_SET_FAILED;
 				/* we need to always notify this case */
 				flow_info->hoRenewal = false;
-			} else if (QDF_STATUS_PMC_PENDING == pmc_status)
-				qos_session->uapsdAlreadyRequested = true;
+			}
 		}
 		/* for any other pmc status we declare success */
 		break;
@@ -6921,15 +6897,12 @@ static QDF_STATUS sme_qos_add_ts_success_fnp(tpAniSirGlobal mac_ctx,
 		 * notify PMC as App is looking for APSD. If we already
 		 * requested then we don't need to do anything
 		 */
-		if (ac_info->requested_QoSInfo[tspec_index].ts_info.psb &&
-			!qos_session->uapsdAlreadyRequested) {
+		if (ac_info->requested_QoSInfo[tspec_index].ts_info.psb) {
 			/* this is the first flow to detect we need
 			 * PMC in UAPSD mode
 			 */
 			pmc_status = sme_ps_start_uapsd(MAC_HANDLE(mac_ctx),
-				flow_info->sessionId,
-				sme_qos_pmc_offload_start_uapsd_callback,
-				qos_session);
+							flow_info->sessionId);
 			/* if PMC doesn't return success right away means
 			 * it is yet to put the module in BMPS state & later
 			 * to UAPSD state
@@ -6939,10 +6912,7 @@ static QDF_STATUS sme_qos_add_ts_success_fnp(tpAniSirGlobal mac_ctx,
 					SME_QOS_STATUS_SETUP_SUCCESS_IND_APSD_SET_FAILED;
 				/* we need to always notify this case */
 				flow_info->hoRenewal = false;
-			} else if (QDF_STATUS_PMC_PENDING == pmc_status)
-				/* let other flows know PMC has been notified */
-				qos_session->uapsdAlreadyRequested = true;
-			/* for any other pmc status we declare success */
+			}
 		}
 		break;
 	case SME_QOS_REASON_RELEASE:
@@ -6962,18 +6932,13 @@ static QDF_STATUS sme_qos_add_ts_success_fnp(tpAniSirGlobal mac_ctx,
 		inform_hdd = true;
 		psb = ac_info->requested_QoSInfo[tspec_index].ts_info.psb;
 		/* notify PMC if App is looking for APSD
-		 * notify PMC as App is looking for APSD. If we already
-		 * requested then we don't need to do anything.
 		 */
-		if (psb && !qos_session->uapsdAlreadyRequested) {
+		if (psb) {
 			/* this is the first flow to detect
 			 * we need PMC in UAPSD mode
 			 */
-			pmc_status =
-				sme_ps_start_uapsd(MAC_HANDLE(mac_ctx),
-					flow_info->sessionId,
-				sme_qos_pmc_offload_start_uapsd_callback,
-					qos_session);
+			pmc_status = sme_ps_start_uapsd(MAC_HANDLE(mac_ctx),
+							flow_info->sessionId);
 			/* if PMC doesn't return success right
 			 * away means it is yet to put
 			 * the module in BMPS state & later to UAPSD state
@@ -6983,11 +6948,7 @@ static QDF_STATUS sme_qos_add_ts_success_fnp(tpAniSirGlobal mac_ctx,
 				 SME_QOS_STATUS_MODIFY_SETUP_SUCCESS_IND_APSD_SET_FAILED;
 				/* we need to always notify this case */
 				flow_info->hoRenewal = false;
-			} else if (QDF_STATUS_PMC_PENDING == pmc_status)
-				/* let other flows know PMC has been notified */
-				qos_session->uapsdAlreadyRequested = true;
-
-			/* for any other pmc status we declare success */
+			}
 		} else if (!psb &&
 		((ac_info->num_flows[flow_info->tspec_mask - 1] == 1)
 			    && (SME_QOS_TSPEC_MASK_BIT_1_2_SET !=
@@ -7116,23 +7077,6 @@ static bool sme_qos_is_uapsd_active(void)
 	return false;
 }
 
-/*
- * sme_QosPmcStartUAPSDCallback() - Callback function registered with PMC
- *  to notify SME-QoS when it puts the chip into UAPSD mode
- *
- * callbackContext - The context passed to PMC during pmc_start_uapsd call.
- * status - QDF_STATUS returned by PMC.
- *
- * Return None
- */
-static void sme_qos_pmc_offload_start_uapsd_callback(void *callbackContext,
-					  uint32_t sessionId, QDF_STATUS status)
-{
-	struct sme_qos_sessioninfo *pSession = callbackContext;
-
-	pSession->uapsdAlreadyRequested = false;
-}
-
 QDF_STATUS sme_offload_qos_process_out_of_uapsd_mode(tpAniSirGlobal pMac,
 						     uint32_t sessionId)
 {