Browse Source

qcacld-3.0: Rename hdd_hostapd_state bssState field

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

Change-Id: I0c259c8344f081fd755b574344cd8a721da4af18
CRs-Fixed: 2134933
Jeff Johnson 7 years ago
parent
commit
0f9f87bca7

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

@@ -671,10 +671,33 @@ struct hdd_station_ctx {
 	bool ap_supports_immediate_power_save;
 };
 
-#define BSS_STOP    0
-#define BSS_START   1
+/**
+ * enum bss_state - current state of the BSS
+ * @BSS_STOP: BSS is stopped
+ * @BSS_START: BSS is started
+ */
+enum bss_state {
+	BSS_STOP,
+	BSS_START,
+};
+
+/**
+ * struct hdd_hostapd_state - hostapd-related state information
+ * @bss_state: Current state of the BSS
+ * @qdf_event: Event to synchronize actions between hostapd thread and
+ *    internal callback threads
+ * @qdf_stop_bss_event: Event to synchronize Stop BSS. When Stop BSS
+ *    is issued userspace thread can wait on this event. The event will
+ *    be set when the Stop BSS processing in UMAC has completed.
+ * @qdf_sta_disassoc_event: Event to synchronize STA
+ *    Disassociation. When a STA is disassociated userspace thread can
+ *    wait on this event. The event will * be set when the STA
+ *    Disassociation processing in UMAC has completed.
+ * @qdf_status: Used to communicate state from other threads to the
+ *    userspace thread.
+ */
 struct hdd_hostapd_state {
-	int bssState;
+	enum bss_state bss_state;
 	qdf_event_t qdf_event;
 	qdf_event_t qdf_stop_bss_event;
 	qdf_event_t qdf_sta_disassoc_event;

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

@@ -14409,7 +14409,7 @@ static int __wlan_hdd_cfg80211_add_key(struct wiphy *wiphy,
 	if ((adapter->device_mode == QDF_SAP_MODE) ||
 	    (adapter->device_mode == QDF_P2P_GO_MODE)) {
 		hostapd_state = WLAN_HDD_GET_HOSTAP_STATE_PTR(adapter);
-		if (hostapd_state->bssState == BSS_START) {
+		if (hostapd_state->bss_state == BSS_START) {
 			status = wlansap_set_key_sta(
 				WLAN_HDD_GET_SAP_CTX_PTR(adapter), &setKey);
 			if (status != QDF_STATUS_SUCCESS) {

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

@@ -338,12 +338,12 @@ static void hdd_hostapd_channel_allow_suspend(struct hdd_adapter *adapter,
 	struct hdd_hostapd_state *hostapd_state =
 		WLAN_HDD_GET_HOSTAP_STATE_PTR(adapter);
 
-	hdd_debug("bssState: %d, channel: %d, dfs_ref_cnt: %d",
-	       hostapd_state->bssState, channel,
+	hdd_debug("bss_state: %d, channel: %d, dfs_ref_cnt: %d",
+	       hostapd_state->bss_state, channel,
 	       atomic_read(&hdd_ctx->sap_dfs_ref_cnt));
 
 	/* Return if BSS is already stopped */
-	if (hostapd_state->bssState == BSS_STOP)
+	if (hostapd_state->bss_state == BSS_STOP)
 		return;
 
 	if (CHANNEL_STATE_DFS != wlan_reg_get_channel_state(hdd_ctx->hdd_pdev,
@@ -376,12 +376,12 @@ static void hdd_hostapd_channel_prevent_suspend(struct hdd_adapter *adapter,
 	struct hdd_hostapd_state *hostapd_state =
 		WLAN_HDD_GET_HOSTAP_STATE_PTR(adapter);
 
-	hdd_debug("bssState: %d, channel: %d, dfs_ref_cnt: %d",
-	       hostapd_state->bssState, channel,
+	hdd_debug("bss_state: %d, channel: %d, dfs_ref_cnt: %d",
+	       hostapd_state->bss_state, channel,
 	       atomic_read(&hdd_ctx->sap_dfs_ref_cnt));
 
 	/* Return if BSS is already started && wakelock is acquired */
-	if ((hostapd_state->bssState == BSS_START) &&
+	if ((hostapd_state->bss_state == BSS_START) &&
 		(atomic_read(&hdd_ctx->sap_dfs_ref_cnt) >= 1))
 		return;
 
@@ -1629,7 +1629,7 @@ QDF_STATUS hdd_hostapd_sap_event_cb(tpSap_Event pSapEvent,
 			 * wait till 10 secs and no other connection will
 			 * go through before that.
 			 */
-			hostapd_state->bssState = BSS_STOP;
+			hostapd_state->bss_state = BSS_STOP;
 			qdf_event_set(&hostapd_state->qdf_event);
 			goto stopbss;
 		} else {
@@ -1708,7 +1708,7 @@ QDF_STATUS hdd_hostapd_sap_event_cb(tpSap_Event pSapEvent,
 		hdd_hostapd_channel_prevent_suspend(adapter,
 						    ap_ctx->operating_channel);
 
-		hostapd_state->bssState = BSS_START;
+		hostapd_state->bss_state = BSS_START;
 
 		/* Set default key index */
 		QDF_TRACE(QDF_MODULE_ID_HDD, QDF_TRACE_LEVEL_DEBUG,
@@ -2373,7 +2373,7 @@ QDF_STATUS hdd_hostapd_sap_event_cb(tpSap_Event pSapEvent,
 
 	case eSAP_CHANNEL_CHANGE_EVENT:
 		hdd_debug("Received eSAP_CHANNEL_CHANGE_EVENT event");
-		if (hostapd_state->bssState != BSS_STOP) {
+		if (hostapd_state->bss_state != BSS_STOP) {
 			/* Prevent suspend for new channel */
 			hdd_hostapd_channel_prevent_suspend(adapter,
 				pSapEvent->sapevt.sap_ch_selected.pri_ch);
@@ -2551,7 +2551,7 @@ stopbss:
 		 * things down, we don't want interfaces to become
 		 * re-enabled
 		 */
-		hostapd_state->bssState = BSS_STOP;
+		hostapd_state->bss_state = BSS_STOP;
 
 		if (0 !=
 		    (WLAN_HDD_GET_CTX(adapter))->config->
@@ -3014,7 +3014,7 @@ static int hdd_sap_get_chan_width(struct hdd_adapter *adapter, int *value)
 	ENTER();
 	hostapdstate = WLAN_HDD_GET_HOSTAP_STATE_PTR(adapter);
 
-	if (hostapdstate->bssState != BSS_START) {
+	if (hostapdstate->bss_state != BSS_START) {
 		*value = -EINVAL;
 		return -EINVAL;
 	}
@@ -5019,7 +5019,7 @@ static int __iw_get_ap_freq(struct net_device *dev,
 	hostapd_state = WLAN_HDD_GET_HOSTAP_STATE_PTR(adapter);
 	hHal = WLAN_HDD_GET_HAL_CTX(adapter);
 
-	if (hostapd_state->bssState == BSS_STOP) {
+	if (hostapd_state->bss_state == BSS_STOP) {
 		if (sme_cfg_get_int(hHal, WNI_CFG_CURRENT_CHANNEL, &channel)
 		    != QDF_STATUS_SUCCESS) {
 			return -EIO;
@@ -8116,7 +8116,7 @@ int wlan_hdd_cfg80211_start_bss(struct hdd_adapter *adapter,
 	set_bit(SOFTAP_BSS_STARTED, &adapter->event_flags);
 	/* Initialize WMM configuation */
 	hdd_wmm_init(adapter);
-	if (hostapd_state->bssState == BSS_START)
+	if (hostapd_state->bss_state == BSS_START)
 		policy_mgr_incr_active_session(hdd_ctx->hdd_psoc,
 					adapter->device_mode,
 					adapter->sessionId);

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

@@ -1426,7 +1426,7 @@ void hdd_ipa_set_tx_flow_info(void)
 		case QDF_P2P_GO_MODE:
 			hdd_ap_ctx = WLAN_HDD_GET_AP_CTX_PTR(adapter);
 			hostapd_state = WLAN_HDD_GET_HOSTAP_STATE_PTR(adapter);
-			if (hostapd_state->bssState == BSS_START
+			if (hostapd_state->bss_state == BSS_START
 			    && hostapd_state->qdf_status ==
 			    QDF_STATUS_SUCCESS) {
 				p2pChannel = hdd_ap_ctx->operating_channel;
@@ -1441,7 +1441,7 @@ void hdd_ipa_set_tx_flow_info(void)
 		case QDF_SAP_MODE:
 			hdd_ap_ctx = WLAN_HDD_GET_AP_CTX_PTR(adapter);
 			hostapd_state = WLAN_HDD_GET_HOSTAP_STATE_PTR(adapter);
-			if (hostapd_state->bssState == BSS_START
+			if (hostapd_state->bss_state == BSS_START
 			    && hostapd_state->qdf_status ==
 			    QDF_STATUS_SUCCESS) {
 				apChannel = hdd_ap_ctx->operating_channel;

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

@@ -10883,7 +10883,7 @@ void wlan_hdd_start_sap(struct hdd_adapter *ap_adapter, bool reinit)
 	}
 	hdd_info("SAP Start Success");
 	set_bit(SOFTAP_BSS_STARTED, &ap_adapter->event_flags);
-	if (hostapd_state->bssState == BSS_START)
+	if (hostapd_state->bss_state == BSS_START)
 		policy_mgr_incr_active_session(hdd_ctx->hdd_psoc,
 					ap_adapter->device_mode,
 					ap_adapter->sessionId);
@@ -12512,7 +12512,7 @@ void hdd_restart_sap(struct hdd_adapter *ap_adapter)
 		}
 		hdd_err("SAP Start Success");
 		set_bit(SOFTAP_BSS_STARTED, &ap_adapter->event_flags);
-		if (hostapd_state->bssState == BSS_START)
+		if (hostapd_state->bss_state == BSS_START)
 			policy_mgr_incr_active_session(hdd_ctx->hdd_psoc,
 						ap_adapter->device_mode,
 						ap_adapter->sessionId);

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

@@ -1796,7 +1796,7 @@ static int __wlan_hdd_cfg80211_suspend_wlan(struct wiphy *wiphy,
 
 		if (QDF_SAP_MODE == adapter->device_mode) {
 			if (BSS_START ==
-			    WLAN_HDD_GET_HOSTAP_STATE_PTR(adapter)->bssState &&
+			    WLAN_HDD_GET_HOSTAP_STATE_PTR(adapter)->bss_state &&
 			    true ==
 			    WLAN_HDD_GET_AP_CTX_PTR(adapter)->
 			    dfs_cac_block_tx) {