Browse Source

qcacld-3.0: Rename hdd_ap_ctx operatingChannel field

Per the Linux coding style "mixed-case names are frowned upon" so
rename field operatingChannel in struct hdd_ap_ctx.

Change-Id: Id7392319f9fed6aa098f349802624b55c9397cc8
CRs-Fixed: 2134931
Jeff Johnson 7 years ago
parent
commit
0120686b2c

+ 13 - 13
core/hdd/inc/wlan_hdd_main.h

@@ -815,6 +815,7 @@ struct hdd_station_info {
 /**
  * struct hdd_ap_ctx - SAP/P2PGO specific information
  * @hostapd_state: state control information
+ * @dfs_cac_block_tx: Is data tramsmission blocked due to DFS CAC?
  * @ap_active: Are any stations active?
  * @hdd_ap_inactivity_timer: Timer used to shutdown the AP if it is
  *     inactive for an extended amount of time.
@@ -827,9 +828,16 @@ struct hdd_station_info {
  * @wep_def_key_idx: WEP default key index
  * @sap_context: Pointer to context maintained by SAP (opaque to HDD)
  * @sap_config: SAP configuration
+ * @operating_channel: channel upon which the SAP is operating
+ * @beacon: Beacon information
+ * @vendor_acs_timer: Timer for ACS
+ * @vendor_acs_timer_initialized: Is @vendor_acs_timer initialized?
+ * @bss_stop_reason: Reason why the BSS was stopped
+ * @txrx_stats: TX RX statistics from firmware
  */
 struct hdd_ap_ctx {
 	struct hdd_hostapd_state hostapd_state;
+	bool dfs_cac_block_tx;
 	bool ap_active;
 	qdf_mc_timer_t hdd_ap_inactivity_timer;
 	bool disable_intrabss_fwd;
@@ -841,24 +849,16 @@ struct hdd_ap_ctx {
 	uint8_t wep_def_key_idx;
 	struct sap_context *sap_context;
 	tsap_Config_t sap_config;
-
-	tSirWPSPBCProbeReq WPSPBCProbeReq;
-
-	struct semaphore semWpsPBCOverlapInd;
-
-
-	uint8_t operatingChannel;
-
+	uint8_t operating_channel;
 	struct hdd_beacon_data *beacon;
-
-	bool dfs_cac_block_tx;
 	qdf_mc_timer_t vendor_acs_timer;
 	bool vendor_acs_timer_initialized;
-
 	enum bss_stop_reason bss_stop_reason;
-
-	/* Fw txrx stats info */
 	struct hdd_fw_txrx_stats txrx_stats;
+
+	tSirWPSPBCProbeReq WPSPBCProbeReq;
+
+	struct semaphore semWpsPBCOverlapInd;
 };
 
 /**

+ 10 - 10
core/hdd/src/wlan_hdd_cfg80211.c

@@ -1546,7 +1546,7 @@ int wlan_hdd_sap_cfg_dfs_override(struct hdd_adapter *adapter)
 
 	sap_config = &adapter->sessionCtx.ap.sap_config;
 	con_sap_config = &con_sap_adapter->sessionCtx.ap.sap_config;
-	con_ch = con_sap_adapter->sessionCtx.ap.operatingChannel;
+	con_ch = con_sap_adapter->sessionCtx.ap.operating_channel;
 
 	if (!wlan_reg_is_dfs_ch(hdd_ctx->hdd_pdev, con_ch))
 		return 0;
@@ -4145,7 +4145,7 @@ static bool wlan_hdd_check_dfs_channel_for_adapter(struct hdd_context *hdd_ctx,
 			 */
 			if (CHANNEL_STATE_DFS == wlan_reg_get_channel_state(
 						hdd_ctx->hdd_pdev,
-						ap_ctx->operatingChannel)) {
+						ap_ctx->operating_channel)) {
 				hdd_err("SAP running on DFS channel");
 				return true;
 			}
@@ -8017,7 +8017,7 @@ static int __wlan_hdd_cfg80211_get_link_properties(struct wiphy *wiphy,
 
 		nss = adapter->sta_info[sta_id].nss;
 		freq = cds_chan_to_freq(
-			(WLAN_HDD_GET_AP_CTX_PTR(adapter))->operatingChannel);
+			(WLAN_HDD_GET_AP_CTX_PTR(adapter))->operating_channel);
 		rate_flags = adapter->sta_info[sta_id].rate_flags;
 	} else {
 		hdd_err("Not Associated! with mac "MAC_ADDRESS_STR,
@@ -9443,15 +9443,15 @@ int wlan_hdd_request_pre_cac(uint8_t channel)
 	}
 
 	if (wlan_reg_is_dfs_ch(hdd_ctx->hdd_pdev,
-				hdd_ap_ctx->operatingChannel)) {
+				hdd_ap_ctx->operating_channel)) {
 		hdd_err("SAP is already on DFS channel:%d",
-			hdd_ap_ctx->operatingChannel);
+			hdd_ap_ctx->operating_channel);
 		return -EINVAL;
 	}
 
-	if (!WLAN_REG_IS_24GHZ_CH(hdd_ap_ctx->operatingChannel)) {
+	if (!WLAN_REG_IS_24GHZ_CH(hdd_ap_ctx->operating_channel)) {
 		hdd_err("pre CAC alllowed only when SAP is in 2.4GHz:%d",
-			hdd_ap_ctx->operatingChannel);
+			hdd_ap_ctx->operating_channel);
 		return -EINVAL;
 	}
 
@@ -9605,7 +9605,7 @@ int wlan_hdd_request_pre_cac(uint8_t channel)
 	}
 
 	ret = wlan_hdd_set_chan_before_pre_cac(ap_adapter,
-				hdd_ap_ctx->operatingChannel);
+				hdd_ap_ctx->operating_channel);
 	if (0 != ret) {
 		hdd_err("failed to set channel before pre cac");
 		goto stop_close_pre_cac_adapter;
@@ -9801,7 +9801,7 @@ uint8_t hdd_get_sap_operating_band(struct hdd_context *hdd_ctx)
 			adapter_node = next;
 			continue;
 		}
-		operating_channel = adapter->sessionCtx.ap.operatingChannel;
+		operating_channel = adapter->sessionCtx.ap.operating_channel;
 		if (IS_24G_CH(operating_channel))
 			sap_operating_band = eCSR_BAND_24;
 		else if (IS_5G_CH(operating_channel))
@@ -15561,7 +15561,7 @@ static bool wlan_hdd_handle_sap_sta_dfs_conc(struct hdd_adapter *adapter,
 
 	/* sap is on non-dfs channel, nothing to handle */
 	if (!wlan_reg_is_dfs_ch(hdd_ctx->hdd_pdev,
-				hdd_ap_ctx->operatingChannel)) {
+				hdd_ap_ctx->operating_channel)) {
 		hdd_info("sap is on non-dfs channel, sta is allowed");
 		return true;
 	}

+ 15 - 16
core/hdd/src/wlan_hdd_hostapd.c

@@ -1586,7 +1586,7 @@ QDF_STATUS hdd_hostapd_sap_event_cb(tpSap_Event pSapEvent,
 		return QDF_STATUS_E_FAILURE;
 	}
 
-	dfs_info.channel = ap_ctx->operatingChannel;
+	dfs_info.channel = ap_ctx->operating_channel;
 	sme_get_country_code(hdd_ctx->hHal, dfs_info.country_code, &cc_len);
 
 	switch (sapEvent) {
@@ -1610,7 +1610,7 @@ QDF_STATUS hdd_hostapd_sap_event_cb(tpSap_Event pSapEvent,
 		/* DFS requirement: DO NOT transmit during CAC. */
 		if ((CHANNEL_STATE_DFS !=
 			wlan_reg_get_channel_state(hdd_ctx->hdd_pdev,
-				ap_ctx->operatingChannel))
+				ap_ctx->operating_channel))
 			|| ignoreCAC
 			|| hdd_ctx->dev_dfs_cac_status == DFS_CAC_ALREADY_DONE)
 			ap_ctx->dfs_cac_block_tx = false;
@@ -1702,12 +1702,11 @@ QDF_STATUS hdd_hostapd_sap_event_cb(tpSap_Event pSapEvent,
 #ifdef FEATURE_WLAN_AUTO_SHUTDOWN
 		wlan_hdd_auto_shutdown_enable(hdd_ctx, true);
 #endif
-		ap_ctx->operatingChannel =
+		ap_ctx->operating_channel =
 			pSapEvent->sapevt.sapStartBssCompleteEvent.operatingChannel;
 
 		hdd_hostapd_channel_prevent_suspend(adapter,
-						    ap_ctx->
-						    operatingChannel);
+						    ap_ctx->operating_channel);
 
 		hostapd_state->bssState = BSS_START;
 
@@ -1744,17 +1743,17 @@ QDF_STATUS hdd_hostapd_sap_event_cb(tpSap_Event pSapEvent,
 
 		if ((CHANNEL_STATE_DFS == wlan_reg_get_channel_state(
 						hdd_ctx->hdd_pdev,
-						ap_ctx->operatingChannel))
+						ap_ctx->operating_channel))
 		    && (hdd_ctx->config->IsSapDfsChSifsBurstEnabled == 0)) {
 
 			hdd_debug("Set SIFS Burst disable for DFS channel %d",
-			       ap_ctx->operatingChannel);
+			       ap_ctx->operating_channel);
 
 			if (wma_cli_set_command(adapter->sessionId,
 						WMI_PDEV_PARAM_BURST_ENABLE,
 						0, PDEV_CMD)) {
 				hdd_err("Failed to Set SIFS Burst channel: %d",
-				       ap_ctx->operatingChannel);
+				       ap_ctx->operating_channel);
 			}
 		}
 		/* Fill the params for sending IWEVCUSTOM Event
@@ -1802,10 +1801,10 @@ QDF_STATUS hdd_hostapd_sap_event_cb(tpSap_Event pSapEvent,
 		       status ? "eSAP_STATUS_FAILURE" : "eSAP_STATUS_SUCCESS");
 
 		hdd_hostapd_channel_allow_suspend(adapter,
-						  ap_ctx->operatingChannel);
+						  ap_ctx->operating_channel);
 
 		/* Invalidate the channel info. */
-		ap_ctx->operatingChannel = 0;
+		ap_ctx->operating_channel = 0;
 		if (hdd_ipa_is_enabled(hdd_ctx)) {
 			status = hdd_ipa_wlan_evt(adapter,
 					ap_ctx->broadcast_sta_id,
@@ -2405,7 +2404,7 @@ QDF_STATUS hdd_hostapd_sap_event_cb(tpSap_Event pSapEvent,
 				pSapEvent->sapevt.sap_ch_selected.pri_ch);
 			/* Allow suspend for old channel */
 			hdd_hostapd_channel_allow_suspend(adapter,
-				ap_ctx->operatingChannel);
+				ap_ctx->operating_channel);
 		}
 		/* SME/PE is already updated for new operation
 		 * channel. So update HDD layer also here. This
@@ -2415,7 +2414,7 @@ QDF_STATUS hdd_hostapd_sap_event_cb(tpSap_Event pSapEvent,
 		 * this case if AP2 is started it needs current
 		 * operation channel for MCC DFS restriction
 		 */
-		ap_ctx->operatingChannel =
+		ap_ctx->operating_channel =
 			pSapEvent->sapevt.sap_ch_selected.pri_ch;
 		ap_ctx->sap_config.acs_cfg.pri_ch =
 			pSapEvent->sapevt.sap_ch_selected.pri_ch;
@@ -3791,8 +3790,8 @@ static __iw_softap_setparam(struct net_device *dev,
 	case QCASAP_SET_RADAR_CMD:
 	{
 		struct hdd_context *hdd_ctx = WLAN_HDD_GET_CTX(adapter);
-		uint8_t ch = (WLAN_HDD_GET_AP_CTX_PTR(adapter))->
-				operatingChannel;
+		struct hdd_ap_ctx *ap_ctx = WLAN_HDD_GET_AP_CTX_PTR(adapter);
+		uint8_t ch = ap_ctx->operating_channel;
 		struct wlan_objmgr_pdev *pdev;
 		struct radar_found_info radar;
 
@@ -4413,7 +4412,7 @@ static __iw_softap_getchannel(struct net_device *dev,
 	*value = 0;
 	if (test_bit(SOFTAP_BSS_STARTED, &adapter->event_flags))
 		*value = (WLAN_HDD_GET_AP_CTX_PTR(
-					adapter))->operatingChannel;
+					adapter))->operating_channel;
 	EXIT();
 	return 0;
 }
@@ -5121,7 +5120,7 @@ static int __iw_get_ap_freq(struct net_device *dev,
 			fwrq->e = MHZ;
 		}
 	} else {
-		channel = ap_ctx->operatingChannel;
+		channel = ap_ctx->operating_channel;
 		status = hdd_wlan_get_freq(channel, &freq);
 		if (true == status) {
 			/* Set Exponent parameter as 6 (MHZ) in struct iw_freq

+ 2 - 2
core/hdd/src/wlan_hdd_ipa.c

@@ -1429,7 +1429,7 @@ void hdd_ipa_set_tx_flow_info(void)
 			if (hostapd_state->bssState == BSS_START
 			    && hostapd_state->qdf_status ==
 			    QDF_STATUS_SUCCESS) {
-				p2pChannel = hdd_ap_ctx->operatingChannel;
+				p2pChannel = hdd_ap_ctx->operating_channel;
 				qdf_copy_macaddr(&p2pBssid,
 						 &adapter->macAddressCurrent);
 #ifdef QCA_LL_LEGACY_TX_FLOW_CONTROL
@@ -1444,7 +1444,7 @@ void hdd_ipa_set_tx_flow_info(void)
 			if (hostapd_state->bssState == BSS_START
 			    && hostapd_state->qdf_status ==
 			    QDF_STATUS_SUCCESS) {
-				apChannel = hdd_ap_ctx->operatingChannel;
+				apChannel = hdd_ap_ctx->operating_channel;
 				qdf_copy_macaddr(&apBssid,
 						&adapter->macAddressCurrent);
 #ifdef QCA_LL_LEGACY_TX_FLOW_CONTROL

+ 8 - 8
core/hdd/src/wlan_hdd_main.c

@@ -1862,7 +1862,7 @@ bool hdd_dfs_indicate_radar(struct hdd_context *hdd_ctx)
 		if ((QDF_SAP_MODE == adapter->device_mode ||
 		    QDF_P2P_GO_MODE == adapter->device_mode) &&
 		    (wlan_reg_is_dfs_ch(hdd_ctx->hdd_pdev,
-		     ap_ctx->operatingChannel))) {
+		     ap_ctx->operating_channel))) {
 			WLAN_HDD_GET_AP_CTX_PTR(adapter)->dfs_cac_block_tx =
 				true;
 			hdd_info("tx blocked for session: %d",
@@ -5541,7 +5541,7 @@ uint8_t hdd_get_operating_channel(struct hdd_context *hdd_ctx,
 					    &adapter->event_flags))
 					operatingChannel =
 						(WLAN_HDD_GET_AP_CTX_PTR
-						(adapter))->operatingChannel;
+						(adapter))->operating_channel;
 				break;
 			default:
 				break;
@@ -7241,18 +7241,18 @@ void hdd_unsafe_channel_restart_sap(struct hdd_context *hdd_ctxt)
 
 		found = false;
 		for (i = 0; i < hdd_ctxt->unsafe_channel_count; i++) {
-			if (adapter_temp->sessionCtx.ap.operatingChannel ==
+			if (adapter_temp->sessionCtx.ap.operating_channel ==
 				hdd_ctxt->unsafe_channel_list[i]) {
 				found = true;
 				hdd_debug("operating ch:%d is unsafe",
-				  adapter_temp->sessionCtx.ap.operatingChannel);
+				  adapter_temp->sessionCtx.ap.operating_channel);
 				break;
 			}
 		}
 
 		if (!found) {
 			hdd_debug("ch:%d is safe. no need to change channel",
-				adapter_temp->sessionCtx.ap.operatingChannel);
+				adapter_temp->sessionCtx.ap.operating_channel);
 			goto next_adapater;
 		}
 
@@ -10748,13 +10748,13 @@ wlan_hdd_check_custom_con_channel_rules(struct hdd_adapter *sta_adapter,
 	if (QDF_STATUS_SUCCESS == status) {
 		if ((QDF_SAP_MODE == device_mode) &&
 			(channel_id < SIR_11A_CHANNEL_BEGIN)) {
-			if (hdd_ap_ctx->operatingChannel != channel_id) {
+			if (hdd_ap_ctx->operating_channel != channel_id) {
 				*concurrent_chnl_same = false;
 				hdd_debug("channels are different");
 			}
 		} else if ((QDF_P2P_GO_MODE == device_mode) &&
 				(channel_id >= SIR_11A_CHANNEL_BEGIN)) {
-			if (hdd_ap_ctx->operatingChannel != channel_id) {
+			if (hdd_ap_ctx->operating_channel != channel_id) {
 				*concurrent_chnl_same = false;
 				hdd_debug("channels are different");
 			}
@@ -12557,7 +12557,7 @@ void hdd_check_and_restart_sap_with_non_dfs_acs(void)
 	if (ap_adapter != NULL && test_bit(SOFTAP_BSS_STARTED,
 			&ap_adapter->event_flags) &&
 			wlan_reg_is_dfs_ch(hdd_ctx->hdd_pdev,
-				ap_adapter->sessionCtx.ap.operatingChannel)) {
+				ap_adapter->sessionCtx.ap.operating_channel)) {
 
 		hdd_warn("STA-AP Mode DFS not supported. Restart SAP with Non DFS ACS");
 		ap_adapter->sessionCtx.ap.sap_config.channel =

+ 1 - 1
core/hdd/src/wlan_hdd_scan.c

@@ -523,7 +523,7 @@ static int __wlan_hdd_cfg80211_scan(struct wiphy *wiphy,
 		con_dfs_ch = con_sap_adapter->sessionCtx.ap.sap_config.channel;
 		if (con_dfs_ch == AUTO_CHANNEL_SELECT)
 			con_dfs_ch =
-				con_sap_adapter->sessionCtx.ap.operatingChannel;
+				con_sap_adapter->sessionCtx.ap.operating_channel;
 
 		if (!policy_mgr_is_hw_dbs_capable(hdd_ctx->hdd_psoc) &&
 			wlan_reg_is_dfs_ch(hdd_ctx->hdd_pdev, con_dfs_ch)) {