Quellcode durchsuchen

qcacld-3.0: Fix clang issues related to FILS and frame parser

Two clang issues reported in csr_api_roam.c and dot11f.c for
unwanted NULL Checks.

Remove the below unwanted NULL checks:
1. for fils_info->keyname_nai in csr_update_fils_params_rso function
2. for gp_mgmt_cipher_suite in RSN IE for pack and get_packed_size
functions.

Change-Id: Ifd3a5772ee8b604d06293b6d4ebd3a049aebd3cd
CRs-Fixed: 2167373
Vignesh Viswanathan vor 7 Jahren
Ursprung
Commit
925db8c5ee

+ 1 - 1
core/mac/src/include/dot11f.h

@@ -35,7 +35,7 @@
  *
  *
  * This file was automatically generated by 'framesc'
- * Wed Dec 27 16:34:21 2017 from the following file(s):
+ * Tue Jan  9 16:51:56 2018 from the following file(s):
  *
  * dot11f.frms
  *

+ 7 - 13
core/mac/src/sys/legacy/src/utils/src/dot11f.c

@@ -33,7 +33,7 @@
  *
  *
  * This file was automatically generated by 'framesc'
- * Wed Dec 27 16:34:21 2017 from the following file(s):
+ * Tue Jan  9 16:51:56 2018 from the following file(s):
  *
  * dot11f.frms
  *
@@ -13162,11 +13162,8 @@ uint32_t dot11f_get_packed_iersn(tpAniSirGlobal pCtx,
 			break;
 		}
 		*pnNeeded += (pIe->pmkid_count * 16);
-		if (pIe->gp_mgmt_cipher_suite) {
-			*pnNeeded += 4;
-		} else {
-			break;
-		}
+		/* gp_mgmt_cipher_suite */
+		*pnNeeded += 4;
 		break;
 	}
 	return status;
@@ -21509,13 +21506,10 @@ uint32_t dot11f_pack_ie_rsn(tpAniSirGlobal pCtx,
 		DOT11F_MEMCPY(pCtx, pBuf, &(pSrc->pmkid), (pSrc->pmkid_count * 16));
 		*pnConsumed += (pSrc->pmkid_count * 16);
 		pBuf += (pSrc->pmkid_count * 16);
-		if (pSrc->gp_mgmt_cipher_suite) {
-			DOT11F_MEMCPY(pCtx, pBuf, pSrc->gp_mgmt_cipher_suite, 4);
-			*pnConsumed += 4;
-			/* fieldsEndFlag = 1 */
-		} else {
-			break;
-		}
+		/* gp_mgmt_cipher_suite */
+		DOT11F_MEMCPY(pCtx, pBuf, pSrc->gp_mgmt_cipher_suite, 4);
+		*pnConsumed += 4;
+		/* fieldsEndFlag = 1 */
 		break;
 	}
 	(void)pCtx;

+ 1 - 1
core/sme/src/csr/csr_api_roam.c

@@ -18630,7 +18630,7 @@ static void csr_update_fils_params_rso(tpAniSirGlobal mac,
 	if (!fils_info || !req_buffer)
 		return;
 
-	if ((!fils_info->keyname_nai) || (!fils_info->key_nai_length)) {
+	if (!fils_info->key_nai_length) {
 		sme_debug("key_nai_length is NULL");
 		return;
 	}