瀏覽代碼

qcacld-3.0: replace mhz of struct wma_txrx_node with chan_freq

chan_freq and mhz variable represent the same thing so use chan_freq
instead of mhz.

Change-Id: I4162504562c30ece71f5ebc465b1af3a048b01b2
CRs-Fixed: 2696795
Utkarsh Bhatnagar 4 年之前
父節點
當前提交
f31d749e83
共有 6 個文件被更改,包括 12 次插入15 次删除
  1. 0 2
      core/wma/inc/wma.h
  2. 5 5
      core/wma/src/wma_data.c
  3. 2 3
      core/wma/src/wma_dev_if.c
  4. 1 1
      core/wma/src/wma_features.c
  5. 2 2
      core/wma/src/wma_scan_roam.c
  6. 2 2
      core/wma/src/wma_utils.c

+ 0 - 2
core/wma/inc/wma.h

@@ -665,7 +665,6 @@ struct wma_invalid_peer_params {
  * @llbCoexist: 11b coexist
  * @shortSlotTimeSupported: is short slot time supported or not
  * @dtimPeriod: DTIM period
- * @mhz: channel frequency in KHz
  * @chan_width: channel bandwidth
  * @vdev_up: is vdev up or not
  * @tsfadjust: TSF adjust
@@ -714,7 +713,6 @@ struct wma_txrx_node {
 	uint8_t llbCoexist;
 	uint8_t shortSlotTimeSupported;
 	uint8_t dtimPeriod;
-	A_UINT32 mhz;
 	enum phy_ch_width chan_width;
 	bool vdev_active;
 	uint64_t tsfadjust;

+ 5 - 5
core/wma/src/wma_data.c

@@ -1279,7 +1279,7 @@ QDF_STATUS wma_process_rate_update_indicate(tp_wma_handle wma,
 		 __func__, pRateUpdateParams->bssid.bytes,
 		 intr[vdev_id].config.shortgi, rate_flag);
 	ret = wma_encode_mc_rate(short_gi, intr[vdev_id].config.chwidth,
-				 intr[vdev_id].mhz, mbpsx10_rate,
+				 intr[vdev_id].ch_freq, mbpsx10_rate,
 				 pRateUpdateParams->nss, &rate);
 	if (ret != QDF_STATUS_SUCCESS) {
 		WMA_LOGE("%s: Error, Invalid input rate value", __func__);
@@ -2586,9 +2586,9 @@ QDF_STATUS wma_tx_packet(void *wma_context, void *tx_frame, uint16_t frmLen,
 		use_6mbps = 1;
 
 	if (pFc->subType == SIR_MAC_MGMT_PROBE_RSP) {
-		if ((wma_is_vdev_in_ap_mode(wma_handle, vdev_id)) &&
-		    (0 != wma_handle->interfaces[vdev_id].mhz))
-			chanfreq = wma_handle->interfaces[vdev_id].mhz;
+		if (wma_is_vdev_in_ap_mode(wma_handle, vdev_id) &&
+		    wma_handle->interfaces[vdev_id].ch_freq)
+			chanfreq = wma_handle->interfaces[vdev_id].ch_freq;
 		else
 			chanfreq = channel_freq;
 		WMA_LOGD("%s: Probe response frame on channel %d vdev:%d",
@@ -2663,7 +2663,7 @@ QDF_STATUS wma_tx_packet(void *wma_context, void *tx_frame, uint16_t frmLen,
 	    PKT_CAPTURE_MODE_MGMT_ONLY) {
 		ucfg_pkt_capture_mgmt_tx(wma_handle->pdev,
 					 tx_frame,
-					 wma_handle->interfaces[vdev_id].mhz,
+					 wma_handle->interfaces[vdev_id].ch_freq,
 					 mgmt_param.tx_param.preamble_type);
 	}
 

+ 2 - 3
core/wma/src/wma_dev_if.c

@@ -850,9 +850,9 @@ static void wma_find_mcc_ap(tp_wma_handle wma, uint8_t vdev_id, bool add)
 				ap_vdev_ids[i] = i;
 			}
 
-			if (wma->interfaces[i].mhz != prev_ch_freq) {
+			if (wma->interfaces[i].ch_freq != prev_ch_freq) {
 				num_ch++;
-				prev_ch_freq = wma->interfaces[i].mhz;
+				prev_ch_freq = wma->interfaces[i].ch_freq;
 			}
 		}
 	}
@@ -2764,7 +2764,6 @@ QDF_STATUS wma_vdev_pre_start(uint8_t vdev_id, bool restart)
 		CFG_TGT_DEFAULT_GTX_TPC_MIN;
 	intr[vdev_id].config.gtx_info.gtxBWMask =
 		CFG_TGT_DEFAULT_GTX_BW_MASK;
-	intr[vdev_id].mhz = des_chan->ch_freq;
 	intr[vdev_id].chan_width = des_chan->ch_width;
 	intr[vdev_id].ch_freq = des_chan->ch_freq;
 	intr[vdev_id].ch_flagext = des_chan->ch_flagext;

+ 1 - 1
core/wma/src/wma_features.c

@@ -1214,7 +1214,7 @@ int wma_csa_offload_handler(void *handle, uint8_t *event, uint32_t len)
 		 csa_offload_event->new_ch_freq_seg2,
 		 csa_offload_event->new_op_class);
 
-	cur_chan = cds_freq_to_chan(intr[vdev_id].mhz);
+	cur_chan = cds_freq_to_chan(intr[vdev_id].ch_freq);
 	/*
 	 * basic sanity check: requested channel should not be 0
 	 * and equal to home channel

+ 2 - 2
core/wma/src/wma_scan_roam.c

@@ -2792,7 +2792,7 @@ static void wma_update_phymode_on_roam(tp_wma_handle wma, uint8_t *bssid,
 	struct vdev_mlme_obj *vdev_mlme;
 	uint8_t channel;
 
-	channel = wlan_freq_to_chan(iface->mhz);
+	channel = wlan_freq_to_chan(iface->ch_freq);
 	if (chan)
 		bss_phymode =
 			wma_fw_to_host_phymode(WMI_GET_CHANNEL_MODE(chan));
@@ -3024,7 +3024,7 @@ int wma_mlme_roam_synch_event_handler_cb(void *handle, uint8_t *event,
 	wma_process_roam_synch_complete(wma, synch_event->vdev_id);
 
 	/* update freq and channel width */
-	wma->interfaces[synch_event->vdev_id].mhz =
+	wma->interfaces[synch_event->vdev_id].ch_freq =
 		roam_synch_ind_ptr->chan_freq;
 	if (roam_synch_ind_ptr->join_rsp)
 		wma->interfaces[synch_event->vdev_id].chan_width =

+ 2 - 2
core/wma/src/wma_utils.c

@@ -3572,7 +3572,7 @@ QDF_STATUS wma_get_connection_info(uint8_t vdev_id,
 	}
 	conn_table_entry->chan_width = wma_conn_table_entry->chan_width;
 	conn_table_entry->mac_id = wma_conn_table_entry->mac_id;
-	conn_table_entry->mhz = wma_conn_table_entry->mhz;
+	conn_table_entry->mhz = wma_conn_table_entry->ch_freq;
 	conn_table_entry->sub_type = wma_conn_table_entry->sub_type;
 	conn_table_entry->type = wma_conn_table_entry->type;
 	conn_table_entry->ch_flagext = wma_conn_table_entry->ch_flagext;
@@ -3603,7 +3603,7 @@ QDF_STATUS wma_ndi_update_connection_info(uint8_t vdev_id,
 	}
 
 	wma_iface_entry->chan_width = ndp_chan_info->ch_width;
-	wma_iface_entry->mhz = ndp_chan_info->freq;
+	wma_iface_entry->ch_freq = ndp_chan_info->freq;
 	wma_iface_entry->nss = ndp_chan_info->nss;
 	wma_iface_entry->mac_id = ndp_chan_info->mac_id;