Prechádzať zdrojové kódy

qcacld-3.0: Replace tAniSirGlobal with the underlying struct

Change "qcacld-3.0: Rename struct sAniSirGlobal to mac_context"
(Change-Id Ibaaeb5296e42a24c66d4adf4f720d32a9ae41888) introduced a new
name for the global MAC context. In addition, the Linux coding style
document tells us "In general, a pointer, or a struct that has
elements that can reasonably be directly accessed should never be a
typedef."

To align with the new name, as well as to align with the guidance from
the Linux coding style, replace all instances of typedef tAniSirGlobal
with the underlying struct mac_context.

Change-Id: Ibb6c1f69fecbe00a17f4cc98a28706d859fa2928
CRs-Fixed: 2346156
Jeff Johnson 6 rokov pred
rodič
commit
61c999d5cd

+ 0 - 4
core/mac/inc/ani_global.h

@@ -915,10 +915,6 @@ struct mac_context {
 	bool obss_scan_offload;
 };
 
-/* legacy definitions in place until converted to use struct mac_context */
-typedef struct mac_context tAniSirGlobal;
-
-
 #ifdef FEATURE_WLAN_TDLS
 
 #define RFC1042_HDR_LENGTH      (6)

+ 3 - 3
core/mac/src/sys/legacy/src/system/src/mac_init_api.c

@@ -41,11 +41,11 @@
 #endif
 
 #ifdef WLAN_ALLOCATE_GLOBAL_BUFFERS_DYNAMICALLY
-static tAniSirGlobal *global_mac_context;
+static struct mac_context *global_mac_context;
 
 static inline tpAniSirGlobal mac_allocate_context_buffer(void)
 {
-	global_mac_context = qdf_mem_malloc(sizeof(tAniSirGlobal));
+	global_mac_context = qdf_mem_malloc(sizeof(*global_mac_context));
 
 	return global_mac_context;
 }
@@ -56,7 +56,7 @@ static inline void mac_free_context_buffer(void)
 	global_mac_context = NULL;
 }
 #else /* WLAN_ALLOCATE_GLOBAL_BUFFERS_DYNAMICALLY */
-static tAniSirGlobal global_mac_context;
+static struct mac_context global_mac_context;
 
 static inline tpAniSirGlobal mac_allocate_context_buffer(void)
 {