Browse Source

qcacld-3.0: Do not send DTIM value to FW during beacon process

Do not set the listen interval with DTIM value while processing
the connected AP beacon. Host processes the connected AP beacon
only when device in non WOW mode and FW expects the listen
interval to be always 1 when device is in non WOW mode hence
do not set listen interval with connected AP's DTIM value

Change-Id: I8a1bce1010ba271efdd1d7b8572e06d7c3693e07
CRs-Fixed: 2164690
Kiran Kumar Lokere 7 years ago
parent
commit
decad51801

+ 0 - 2
core/mac/src/pe/include/lim_session.h

@@ -195,8 +195,6 @@ typedef struct sPESession       /* Added to Support BT-AMP */
 	uint64_t lastBeaconTimeStamp;
 	/* RX Beacon count for the current BSS to which STA is connected. */
 	uint32_t currentBssBeaconCnt;
-	uint8_t lastBeaconDtimCount;
-	uint8_t lastBeaconDtimPeriod;
 
 	uint32_t bcnLen;
 	uint8_t *beacon;        /* Used to store last beacon / probe response before assoc. */

+ 1 - 3
core/mac/src/pe/lim/lim_process_beacon_frame.c

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011-2017 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2011-2018 The Linux Foundation. All rights reserved.
  *
  * Previously licensed under the ISC license by Qualcomm Atheros, Inc.
  *
@@ -113,8 +113,6 @@ lim_process_beacon_frame(tpAniSirGlobal mac_ctx, uint8_t *rx_pkt_info,
 		qdf_mem_copy((uint8_t *)&session->lastBeaconTimeStamp,
 			(uint8_t *) bcn_ptr->timeStamp,
 			sizeof(uint64_t));
-		session->lastBeaconDtimCount =
-				bcn_ptr->tim.dtimCount;
 		session->currentBssBeaconCnt++;
 	}
 	MTRACE(mac_trace(mac_ctx,

+ 0 - 37
core/mac/src/pe/lim/lim_utils.c

@@ -7053,43 +7053,6 @@ void lim_update_caps_info_for_bss(tpAniSirGlobal mac_ctx,
 		pe_debug("Clearing Immed Blk Ack:no AP support");
 	}
 }
-/**
- * lim_send_set_dtim_period(): Send SIR_HAL_SET_DTIM_PERIOD message
- * to set dtim period.
- *
- * @sesssion: LIM session
- * @dtim_period: dtim value
- * @mac_ctx: Mac context
- * @return None
- */
-void lim_send_set_dtim_period(tpAniSirGlobal mac_ctx, uint8_t dtim_period,
-			      tpPESession session)
-{
-	struct set_dtim_params *dtim_params = NULL;
-	tSirRetStatus ret = eSIR_SUCCESS;
-	struct scheduler_msg msg = {0};
-
-	if (session == NULL) {
-		pe_err("Inavalid parameters");
-		return;
-	}
-	dtim_params = qdf_mem_malloc(sizeof(*dtim_params));
-	if (NULL == dtim_params) {
-		pe_err("Unable to allocate memory");
-		return;
-	}
-	dtim_params->dtim_period = dtim_period;
-	dtim_params->session_id = session->smeSessionId;
-	msg.type = WMA_SET_DTIM_PERIOD;
-	msg.bodyptr = dtim_params;
-	msg.bodyval = 0;
-	pe_debug("Post WMA_SET_DTIM_PERIOD to WMA");
-	ret = wma_post_ctrl_msg(mac_ctx, &msg);
-	if (eSIR_SUCCESS != ret) {
-		pe_err("wma_post_ctrl_msg() failed");
-		qdf_mem_free(dtim_params);
-	}
-}
 
 /**
  * lim_is_valid_frame(): validate RX frame using last processed frame details

+ 1 - 3
core/mac/src/pe/lim/lim_utils.h

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2012-2017 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2012-2018 The Linux Foundation. All rights reserved.
  *
  * Previously licensed under the ISC license by Qualcomm Atheros, Inc.
  *
@@ -770,8 +770,6 @@ QDF_STATUS lim_p2p_action_cnf(void *mac_ctx, qdf_nbuf_t buf,
 			uint32_t tx_complete_success, void *params);
 void lim_update_caps_info_for_bss(tpAniSirGlobal mac_ctx,
 			uint16_t *caps, uint16_t bss_caps);
-void lim_send_set_dtim_period(tpAniSirGlobal mac_ctx, uint8_t dtim_period,
-			      tpPESession session);
 
 tSirRetStatus lim_strip_ie(tpAniSirGlobal mac_ctx,
 		uint8_t *addn_ie, uint16_t *addn_ielen,

+ 1 - 7
core/mac/src/pe/sch/sch_beacon_process.c

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2012-2017 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2012-2018 The Linux Foundation. All rights reserved.
  *
  * Previously licensed under the ISC license by Qualcomm Atheros, Inc.
  *
@@ -382,13 +382,7 @@ sch_bcn_process_sta(tpAniSirGlobal mac_ctx,
 	beaconParams->bssIdx = *bssIdx;
 	qdf_mem_copy((uint8_t *) &session->lastBeaconTimeStamp,
 			(uint8_t *) bcn->timeStamp, sizeof(uint64_t));
-	session->lastBeaconDtimCount = bcn->tim.dtimCount;
 	session->currentBssBeaconCnt++;
-	if (session->lastBeaconDtimPeriod != bcn->tim.dtimPeriod) {
-		session->lastBeaconDtimPeriod = bcn->tim.dtimPeriod;
-		lim_send_set_dtim_period(mac_ctx, bcn->tim.dtimPeriod,
-				session);
-	}
 	MTRACE(mac_trace(mac_ctx, TRACE_CODE_RX_MGMT_TSF,
 	       session->peSessionId, bcn->timeStamp[0]);)
 	MTRACE(mac_trace(mac_ctx, TRACE_CODE_RX_MGMT_TSF,

+ 1 - 2
core/mac/src/sys/legacy/src/utils/src/mac_trace.c

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013-2017 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2013-2018 The Linux Foundation. All rights reserved.
  *
  * Previously licensed under the ISC license by Qualcomm Atheros, Inc.
  *
@@ -616,7 +616,6 @@ uint8_t *mac_trace_get_wma_msg_string(uint16_t wma_msg)
 		CASE_RETURN_STRING(WMA_WOWL_ENTER_RSP);
 		CASE_RETURN_STRING(WMA_WOWL_EXIT_RSP);
 		CASE_RETURN_STRING(WMA_SET_MAX_TX_POWER_RSP);
-		CASE_RETURN_STRING(WMA_SET_DTIM_PERIOD);
 		CASE_RETURN_STRING(WMA_SET_MAX_TX_POWER_PER_BAND_REQ);
 #ifdef FEATURE_WLAN_TDLS
 		CASE_RETURN_STRING(WMA_SET_TDLS_LINK_ESTABLISH_REQ);

+ 1 - 2
core/wma/inc/wma_types.h

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2012-2017 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2012-2018 The Linux Foundation. All rights reserved.
  *
  * Previously licensed under the ISC license by Qualcomm Atheros, Inc.
  *
@@ -239,7 +239,6 @@
 
 #define WMA_SET_MAX_TX_POWER_REQ       SIR_HAL_SET_MAX_TX_POWER_REQ
 #define WMA_SET_MAX_TX_POWER_RSP       SIR_HAL_SET_MAX_TX_POWER_RSP
-#define WMA_SET_DTIM_PERIOD            SIR_HAL_SET_DTIM_PERIOD
 
 #define WMA_SET_MAX_TX_POWER_PER_BAND_REQ \
 	SIR_HAL_SET_MAX_TX_POWER_PER_BAND_REQ

+ 0 - 31
core/wma/src/wma_main.c

@@ -908,32 +908,6 @@ static int32_t wma_set_priv_cfg(tp_wma_handle wma_handle,
 	return ret;
 }
 
-/**
- * wma_set_dtim_period() - set dtim period to FW
- * @wma: wma handle
- * @dtim_params: dtim params
- *
- * Return: none
- */
-static void wma_set_dtim_period(tp_wma_handle wma,
-				struct set_dtim_params *dtim_params)
-{
-	QDF_STATUS ret;
-	uint8_t vdev_id = dtim_params->session_id;
-	struct wma_txrx_node *iface =
-		&wma->interfaces[vdev_id];
-
-	WMA_LOGD("%s: set dtim_period %d", __func__,
-			dtim_params->dtim_period);
-	iface->dtimPeriod = dtim_params->dtim_period;
-	ret = wma_vdev_set_param(wma->wmi_handle,
-			vdev_id,
-			WMI_VDEV_PARAM_LISTEN_INTERVAL,
-			dtim_params->dtim_period);
-	if (QDF_IS_STATUS_ERROR(ret))
-		WMA_LOGW("Failed to set listen interval");
-
-}
 /**
  * wma_set_modulated_dtim() - function to configure modulated dtim
  * @wma: wma handle
@@ -7430,11 +7404,6 @@ static QDF_STATUS wma_mc_process_msg(struct scheduler_msg *msg)
 				       (tpDisableUapsdParams) msg->bodyptr);
 		qdf_mem_free(msg->bodyptr);
 		break;
-	case WMA_SET_DTIM_PERIOD:
-		wma_set_dtim_period(wma_handle,
-				    (struct set_dtim_params *)msg->bodyptr);
-		qdf_mem_free(msg->bodyptr);
-		break;
 	case WMA_SET_TX_POWER_REQ:
 		wma_set_tx_power(wma_handle, (tpMaxTxPowerParams) msg->bodyptr);
 		break;