소스 검색

qcacmn: Remove temp_samp_msg_len and unnecessary updates to it

Remove unused variable temp_samp_msg_len from
target_if_spectral_create_samp_msg(). This variable does get updated,
but is ultimately unused. By removing it, we save processor cycles
which would otherwise be wasted on the update operations occurring for
each Spectral sample.

Change-Id: Ib5ca5598d5bee6cc15ca72e9e002239d2e76fd6c
CRs-Fixed: 2349113
Krishna Rao 6 년 전
부모
커밋
8bd4f992f9
1개의 변경된 파일0개의 추가작업 그리고 8개의 파일을 삭제
  1. 0 8
      target_if/spectral/target_if_spectral_netlink.c

+ 0 - 8
target_if/spectral/target_if_spectral_netlink.c

@@ -36,8 +36,6 @@ target_if_spectral_create_samp_msg(struct target_if_spectral *spectral,
 	 *       operation on multi-processor system
 	 *       operation on multi-processor system
 	 */
 	 */
 
 
-	int temp_samp_msg_len = 0;
-
 	struct spectral_samp_msg *spec_samp_msg = NULL;
 	struct spectral_samp_msg *spec_samp_msg = NULL;
 
 
 	uint8_t *bin_pwr_data = NULL;
 	uint8_t *bin_pwr_data = NULL;
@@ -61,12 +59,6 @@ target_if_spectral_create_samp_msg(struct target_if_spectral *spectral,
 		if (spectral->spectral_gen == SPECTRAL_GEN3)
 		if (spectral->spectral_gen == SPECTRAL_GEN3)
 			save_spectral_report_skb(spectral, spec_samp_msg);
 			save_spectral_report_skb(spectral, spec_samp_msg);
 		p_sops = GET_TARGET_IF_SPECTRAL_OPS(spectral);
 		p_sops = GET_TARGET_IF_SPECTRAL_OPS(spectral);
-		temp_samp_msg_len = sizeof(struct spectral_samp_msg) -
-		    (MAX_NUM_BINS * sizeof(uint8_t));
-		temp_samp_msg_len += (params->pwr_count * sizeof(uint8_t));
-		if (spectral->ch_width == CH_WIDTH_160MHZ)
-			temp_samp_msg_len +=
-			    (params->pwr_count_sec80 * sizeof(uint8_t));
 		bin_pwr_data = params->bin_pwr_data;
 		bin_pwr_data = params->bin_pwr_data;
 
 
 		spec_samp_msg->signature = SPECTRAL_SIGNATURE;
 		spec_samp_msg->signature = SPECTRAL_SIGNATURE;