瀏覽代碼

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
 	 */
 
-	int temp_samp_msg_len = 0;
-
 	struct spectral_samp_msg *spec_samp_msg = 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)
 			save_spectral_report_skb(spectral, spec_samp_msg);
 		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;
 
 		spec_samp_msg->signature = SPECTRAL_SIGNATURE;