Преглед на файлове

qcacld-3.0: Add channel frequency into struct hdd_mon_set_ch_info

Add channel frequency(freq) into struct hdd_mon_set_ch_info and
populate its value where channel in the same structure is
populated.

Remove a few camel cases detected by checkpatch.

Change-Id: I5f0d64a88c054476739bc06887bffd37238b10fc
CRs-Fixed: 2496707
wadesong преди 5 години
родител
ревизия
59e727ce43
променени са 2 файла, в които са добавени 9 реда и са изтрити 5 реда
  1. 2 0
      core/hdd/inc/wlan_hdd_main.h
  2. 7 5
      core/hdd/src/wlan_hdd_cfg80211.c

+ 2 - 0
core/hdd/inc/wlan_hdd_main.h

@@ -676,12 +676,14 @@ struct hdd_beacon_data {
 /**
  * struct hdd_mon_set_ch_info - Holds monitor mode channel switch params
  * @channel: Channel number.
+ * @freq: Channel frequency.
  * @cb_mode: Channel bonding
  * @channel_width: Channel width 0/1/2 for 20/40/80MHz respectively.
  * @phy_mode: PHY mode
  */
 struct hdd_mon_set_ch_info {
 	uint8_t channel;
+	uint32_t freq;
 	uint8_t cb_mode;
 	uint32_t channel_width;
 	eCsrPhyMode phy_mode;

+ 7 - 5
core/hdd/src/wlan_hdd_cfg80211.c

@@ -16040,11 +16040,12 @@ wlan_hdd_cfg80211_roam_metrics_handover(struct hdd_adapter *adapter,
 #ifdef FEATURE_MONITOR_MODE_SUPPORT
 static
 void hdd_mon_select_cbmode(struct hdd_adapter *adapter,
-			   uint8_t operationChannel,
+			   uint8_t op_chan,
 			   struct ch_params *ch_params)
 {
 	struct hdd_station_ctx *station_ctx =
 			 WLAN_HDD_GET_STATION_CTX_PTR(adapter);
+	struct hdd_context *hdd_ctx = WLAN_HDD_GET_CTX(adapter);
 	struct hdd_mon_set_ch_info *ch_info = &station_ctx->ch_info;
 	enum hdd_dot11_mode hdd_dot11_mode;
 	uint8_t ini_dot11_mode =
@@ -16080,16 +16081,17 @@ void hdd_mon_select_cbmode(struct hdd_adapter *adapter,
 	ch_info->channel_width = ch_params->ch_width;
 	ch_info->phy_mode =
 		hdd_cfg_xlate_to_csr_phy_mode(hdd_dot11_mode);
-	ch_info->channel = operationChannel;
+	ch_info->channel = op_chan;
+	ch_info->freq = wlan_reg_chan_to_freq(hdd_ctx->pdev, op_chan);
 	ch_info->cb_mode = ch_params->ch_width;
-	hdd_debug("ch_info width %d, phymode %d channel %d",
+	hdd_debug("ch_info width %d, phymode %d channel freq %d",
 		  ch_info->channel_width, ch_info->phy_mode,
-		  ch_info->channel);
+		  ch_info->freq);
 }
 #else
 static
 void hdd_mon_select_cbmode(struct hdd_adapter *adapter,
-			   uint8_t operationChannel,
+			   uint8_t op_chan,
 			   struct ch_params *ch_params)
 {
 }