瀏覽代碼

qcacld-3.0: Rename field pHddCtx in struct hdd_adapter

In struct hdd_adapter rename field pHddCtx to hdd_ctx to align with
the Linux Coding Style.

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

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

@@ -1059,6 +1059,8 @@ struct hdd_connect_pm_context {
 #endif
 #endif
 
+struct hdd_context;
+
 struct hdd_adapter {
 	/* Magic cookie for adapter sanity verification.  Note that this
 	 * needs to be at the beginning of the private data structure so
@@ -1067,7 +1069,7 @@ struct hdd_adapter {
 	 */
 	uint32_t magic;
 
-	void *pHddCtx;
+	struct hdd_context *hdd_ctx;
 	struct wlan_objmgr_vdev *hdd_vdev;
 
 	void *txrx_vdev;
@@ -1316,8 +1318,8 @@ struct hdd_adapter {
 #define WLAN_HDD_GET_STATION_CTX_PTR(pAdapter) (&(pAdapter)->sessionCtx.station)
 #define WLAN_HDD_GET_AP_CTX_PTR(pAdapter) (&(pAdapter)->sessionCtx.ap)
 #define WLAN_HDD_GET_WEXT_STATE_PTR(pAdapter)  (&(pAdapter)->sessionCtx.station.WextState)
-#define WLAN_HDD_GET_CTX(pAdapter) ((struct hdd_context *)pAdapter->pHddCtx)
-#define WLAN_HDD_GET_HAL_CTX(pAdapter)  (((struct hdd_context *)(pAdapter->pHddCtx))->hHal)
+#define WLAN_HDD_GET_CTX(adapter) ((adapter)->hdd_ctx)
+#define WLAN_HDD_GET_HAL_CTX(adapter)  ((adapter)->hdd_ctx->hHal)
 #define WLAN_HDD_GET_HOSTAP_STATE_PTR(pAdapter) (&(pAdapter)->sessionCtx.ap.HostapdState)
 #define WLAN_HDD_GET_CFG_STATE_PTR(pAdapter)  (&(pAdapter)->cfg80211State)
 #define WLAN_HDD_GET_SAP_CTX_PTR(pAdapter) (pAdapter->sessionCtx.ap.sapContext)

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

@@ -6672,7 +6672,7 @@ struct hdd_adapter *hdd_wlan_create_ap_dev(struct hdd_context *pHddCtx,
 		/* Initialize the adapter context to zeros. */
 		qdf_mem_zero(pHostapdAdapter, sizeof(struct hdd_adapter));
 		pHostapdAdapter->dev = pWlanHostapdDev;
-		pHostapdAdapter->pHddCtx = pHddCtx;
+		pHostapdAdapter->hdd_ctx = pHddCtx;
 		pHostapdAdapter->magic = WLAN_HDD_ADAPTER_MAGIC;
 		pHostapdAdapter->sessionId = HDD_SESSION_ID_INVALID;
 

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

@@ -3014,7 +3014,7 @@ static struct hdd_adapter *hdd_alloc_station_adapter(struct hdd_context *hdd_ctx
 			sizeof(sta_ctx->conn_info.staId),
 			HDD_WLAN_INVALID_STA_ID);
 		adapter->dev = pWlanDev;
-		adapter->pHddCtx = hdd_ctx;
+		adapter->hdd_ctx = hdd_ctx;
 		adapter->magic = WLAN_HDD_ADAPTER_MAGIC;
 		adapter->sessionId = HDD_SESSION_ID_INVALID;