瀏覽代碼

qcacld-3.0: Rename hdd_ap_ctx bApActive field

Per the Linux coding style "mixed-case names are frowned upon" and
"so-called Hungarian notation [...] is brain damaged" so rename field
bApActive in struct hdd_ap_ctx.

Change-Id: Id17869c55aa0467a4d1e845e9afd5002079197c9
CRs-Fixed: 2134930
Jeff Johnson 7 年之前
父節點
當前提交
136c51b1b9
共有 3 個文件被更改,包括 14 次插入12 次删除
  1. 5 3
      core/hdd/inc/wlan_hdd_main.h
  2. 6 6
      core/hdd/src/wlan_hdd_hostapd.c
  3. 3 3
      core/hdd/src/wlan_hdd_main.c

+ 5 - 3
core/hdd/inc/wlan_hdd_main.h

@@ -815,6 +815,9 @@ struct hdd_station_info {
 /**
  * struct hdd_ap_ctx - SAP/P2PGO specific information
  * @hostapd_state: state control information
+ * @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.
  * @disable_intrabss_fwd: Prevent forwarding between stations
  * @broadcast_sta_id: Station ID assigned after BSS starts
  * @privacy: The privacy bits of configuration
@@ -827,6 +830,8 @@ struct hdd_station_info {
  */
 struct hdd_ap_ctx {
 	struct hdd_hostapd_state hostapd_state;
+	bool ap_active;
+	qdf_mc_timer_t hdd_ap_inactivity_timer;
 	bool disable_intrabss_fwd;
 	uint8_t broadcast_sta_id;
 	uint8_t privacy;
@@ -841,14 +846,11 @@ struct hdd_ap_ctx {
 
 	struct semaphore semWpsPBCOverlapInd;
 
-	qdf_mc_timer_t hdd_ap_inactivity_timer;
 
 	uint8_t operatingChannel;
 
 	struct hdd_beacon_data *beacon;
 
-	bool bApActive;
-
 	bool dfs_cac_block_tx;
 	qdf_mc_timer_t vendor_acs_timer;
 	bool vendor_acs_timer_initialized;

+ 6 - 6
core/hdd/src/wlan_hdd_hostapd.c

@@ -2071,7 +2071,7 @@ QDF_STATUS hdd_hostapd_sap_event_cb(tpSap_Event pSapEvent,
 
 #ifdef MSM_PLATFORM
 		/* start timer in sap/p2p_go */
-		if (ap_ctx->bApActive == false) {
+		if (ap_ctx->ap_active == false) {
 			spin_lock_bh(&hdd_ctx->bus_bw_lock);
 			adapter->prev_tx_packets =
 				adapter->stats.tx_packets;
@@ -2088,7 +2088,7 @@ QDF_STATUS hdd_hostapd_sap_event_cb(tpSap_Event pSapEvent,
 			hdd_bus_bw_compute_timer_start(hdd_ctx);
 		}
 #endif
-		ap_ctx->bApActive = true;
+		ap_ctx->ap_active = true;
 		/* Stop AP inactivity timer */
 		if (ap_ctx->hdd_ap_inactivity_timer.state ==
 		    QDF_TIMER_STATE_RUNNING) {
@@ -2213,14 +2213,14 @@ QDF_STATUS hdd_hostapd_sap_event_cb(tpSap_Event pSapEvent,
 
 		hdd_softap_deregister_sta(adapter, staId);
 
-		ap_ctx->bApActive = false;
+		ap_ctx->ap_active = false;
 		spin_lock_bh(&adapter->sta_info_lock);
 		for (i = 0; i < WLAN_MAX_STA_COUNT; i++) {
 			if (adapter->sta_info[i].in_use
 			    && i !=
 			    (WLAN_HDD_GET_AP_CTX_PTR(adapter))->
 			    broadcast_sta_id) {
-				ap_ctx->bApActive = true;
+				ap_ctx->ap_active = true;
 				break;
 			}
 		}
@@ -2230,7 +2230,7 @@ QDF_STATUS hdd_hostapd_sap_event_cb(tpSap_Event pSapEvent,
 		if ((0 !=
 		     (WLAN_HDD_GET_CTX(adapter))->config->
 		     nAPAutoShutOff)) {
-			if (ap_ctx->bApActive == false) {
+			if (ap_ctx->ap_active == false) {
 				if (ap_ctx->hdd_ap_inactivity_timer.state ==
 				    QDF_TIMER_STATE_STOPPED) {
 					qdf_status =
@@ -2285,7 +2285,7 @@ QDF_STATUS hdd_hostapd_sap_event_cb(tpSap_Event pSapEvent,
 		}
 #ifdef MSM_PLATFORM
 		/*stop timer in sap/p2p_go */
-		if (ap_ctx->bApActive == false) {
+		if (ap_ctx->ap_active == false) {
 			spin_lock_bh(&hdd_ctx->bus_bw_lock);
 			adapter->prev_tx_packets = 0;
 			adapter->prev_rx_packets = 0;

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

@@ -6496,7 +6496,7 @@ static void hdd_bus_bw_work_handler(struct work_struct *work)
 
 		if ((adapter->device_mode == QDF_SAP_MODE ||
 		     adapter->device_mode == QDF_P2P_GO_MODE) &&
-		    WLAN_HDD_GET_AP_CTX_PTR(adapter)->bApActive == false) {
+		    WLAN_HDD_GET_AP_CTX_PTR(adapter)->ap_active == false) {
 
 			continue;
 		}
@@ -10518,7 +10518,7 @@ void wlan_hdd_auto_shutdown_enable(struct hdd_context *hdd_ctx, bool enable)
 			if (adapter
 			    && adapter->device_mode == QDF_SAP_MODE) {
 				if (WLAN_HDD_GET_AP_CTX_PTR(adapter)->
-				    bApActive == true) {
+				    ap_active == true) {
 					ap_connected = true;
 					break;
 				}
@@ -10611,7 +10611,7 @@ static bool hdd_any_adapter_is_assoc(struct hdd_context *hdd_ctx)
 
 		if (adapter &&
 		    hdd_adapter_is_ap(adapter) &&
-		    WLAN_HDD_GET_AP_CTX_PTR(adapter)->bApActive) {
+		    WLAN_HDD_GET_AP_CTX_PTR(adapter)->ap_active) {
 			return true;
 		}