Jelajahi Sumber

qcacld-3.0: Remove duplicate GET_IE_LEN_IN_BSS_DESC() macros

Both HDD and SAP define GET_IE_LEN_IN_BSS_DESC() macros, but these
macros simply replicate the logic already present in the global macro
GET_IE_LEN_IN_BSS(). Therefore delete these macros, and use
GET_IE_LEN_IN_BSS() instead.

Change-Id: I431984673141715ad32ca6ea96e31722129ce929
CRs-Fixed: 2122547
Jeff Johnson 7 tahun lalu
induk
melakukan
38e38a8483
2 mengubah file dengan 3 tambahan dan 8 penghapusan
  1. 2 4
      core/hdd/src/wlan_hdd_cfg80211.c
  2. 1 4
      core/sap/src/sap_ch_select.c

+ 2 - 4
core/hdd/src/wlan_hdd_cfg80211.c

@@ -114,8 +114,6 @@
 
 #define g_mode_rates_size (12)
 #define a_mode_rates_size (8)
-#define GET_IE_LEN_IN_BSS_DESC(lenInBss) (lenInBss + sizeof(lenInBss) - \
-					   ((uintptr_t)OFFSET_OF(tSirBssDescription, ieFields)))
 
 /*
  * Android CTS verifier needs atleast this much wait time (in msec)
@@ -14648,9 +14646,9 @@ struct cfg80211_bss *wlan_hdd_cfg80211_inform_bss_frame(struct hdd_adapter *adap
 #ifdef WLAN_ENABLE_AGEIE_ON_SCAN_RESULTS
 	qcom_ie_age *qie_age = NULL;
 	int ie_length =
-		GET_IE_LEN_IN_BSS_DESC(bss_desc->length) + sizeof(qcom_ie_age);
+		GET_IE_LEN_IN_BSS(bss_desc->length) + sizeof(qcom_ie_age);
 #else
-	int ie_length = GET_IE_LEN_IN_BSS_DESC(bss_desc->length);
+	int ie_length = GET_IE_LEN_IN_BSS(bss_desc->length);
 #endif
 	const char *ie =
 		((ie_length != 0) ? (const char *)&bss_desc->ieFields : NULL);

+ 1 - 4
core/sap/src/sap_ch_select.c

@@ -82,9 +82,6 @@
 		acs_band = eCSR_DOT11_MODE_abg; \
 }
 
-#define GET_IE_LEN_IN_BSS_DESC(lenInBss) (lenInBss + sizeof(lenInBss) - \
-			((uintptr_t)OFFSET_OF(tSirBssDescription, ieFields)))
-
 #define ACS_WEIGHT_AMOUNT_LOCAL    240
 
 #define ACS_WEIGHT_AMOUNT_CONFIG(weights) \
@@ -350,7 +347,7 @@ static void sap_process_avoid_ie(tHalHandle hal,
 
 	while (node) {
 		total_ie_len =
-			GET_IE_LEN_IN_BSS_DESC(node->BssDescriptor.length);
+			GET_IE_LEN_IN_BSS(node->BssDescriptor.length);
 		temp_ptr = wlan_get_vendor_ie_ptr_from_oui(
 				SIR_MAC_QCOM_VENDOR_OUI,
 				SIR_MAC_QCOM_VENDOR_SIZE,