Browse Source

qcacld-3.0: Converge on enum tdls_peer_state

As part of TDLS componentization the legacy enum WMA_TdlsPeerState was
replicated, creating enum tdls_peer_state.  Unfortunately this left
the driver with two different enums which serve the same purpose,
which is pointless. Furthermore, due to the way in which these enums
are used, there is an implicit requirement that they be exactly
identical. This approach is very fragile. To align with the converged
software architecture and to improve code maintainability remove the
legacy enum and exclusively use the TDLS public enum.

Change-Id: I4ded30d12cd7c8ebcf6a36331240f5c26c413d85
CRs-Fixed: 2397351
Jeff Johnson 6 years ago
parent
commit
f51c7fa48b
3 changed files with 3 additions and 19 deletions
  1. 0 16
      core/wma/inc/wma_types.h
  2. 1 1
      core/wma/src/wma_dev_if.c
  3. 2 2
      core/wma/src/wma_features.c

+ 0 - 16
core/wma/inc/wma_types.h

@@ -627,22 +627,6 @@ typedef struct {
 } wma_cli_set_cmd_t;
 
 #ifdef FEATURE_WLAN_TDLS
-/**
- * enum WMA_TdlsPeerState - TDLS PEER state
- * @WMA_TDLS_PEER_STATE_PEERING: peer is making connection
- * @WMA_TDLS_PEER_STATE_CONNECTED: peer is connected
- * @WMA_TDLS_PEER_STATE_TEARDOWN: peer is teardown
- * @WMA_TDLS_PEER_ADD_MAC_ADDR: add peer into connection table
- * @WMA_TDLS_PEER_REMOVE_MAC_ADDR: remove peer from connection table
- */
-enum WMA_TdlsPeerState {
-	WMA_TDLS_PEER_STATE_PEERING,
-	WMA_TDLS_PEER_STATE_CONNECTED,
-	WMA_TDLS_PEER_STATE_TEARDOWN,
-	WMA_TDLS_PEER_ADD_MAC_ADDR,
-	WMA_TDLS_PEER_REMOVE_MAC_ADDR,
-};
-
 /**
  * enum wma_tdls_off_chan_mode - modes for WMI_TDLS_SET_OFFCHAN_MODE_CMDID
  * @WMA_TDLS_ENABLE_OFFCHANNEL: enable off channel

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

@@ -5816,7 +5816,7 @@ static void wma_del_tdls_sta(tp_wma_handle wma, tpDeleteStaParams del_sta)
 		goto send_del_rsp;
 	}
 
-	peerStateParams->peerState = WMA_TDLS_PEER_STATE_TEARDOWN;
+	peerStateParams->peerState = TDLS_PEER_STATE_TEARDOWN;
 	peerStateParams->vdevId = del_sta->smesessionId;
 	peerStateParams->resp_reqd = del_sta->respReqd;
 	qdf_mem_copy(&peerStateParams->peerMacAddr,

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

@@ -4088,7 +4088,7 @@ int wma_update_tdls_peer_state(WMA_HANDLE handle,
 	}
 
 	/* peer capability info is valid only when peer state is connected */
-	if (WMA_TDLS_PEER_STATE_CONNECTED != peerStateParams->peerState) {
+	if (TDLS_PEER_STATE_CONNECTED != peerStateParams->peerState) {
 		qdf_mem_zero(&peerStateParams->peerCap,
 			     sizeof(tTdlsPeerCapParams));
 	}
@@ -4137,7 +4137,7 @@ int wma_update_tdls_peer_state(WMA_HANDLE handle,
 	}
 
 	/* in case of teardown, remove peer from fw */
-	if (WMA_TDLS_PEER_STATE_TEARDOWN == peerStateParams->peerState) {
+	if (TDLS_PEER_STATE_TEARDOWN == peerStateParams->peerState) {
 		peer_mac_addr = cdp_peer_get_peer_mac_addr(soc, peer);
 		if (peer_mac_addr == NULL) {
 			WMA_LOGE("peer_mac_addr is NULL");