Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Unverified Commit 0258a91d authored by Dustin Brown's avatar Dustin Brown Committed by derfelot
Browse files

staging: qca-wifi-host-cmn: Featurize QDF_ASSERT

QDF_ASSERT is not properly featurized with its own build time config
flag. This leads to unnecessary logs and increased driver size for
platforms which do not want the feature enabled. Use the newly
introduced WLAN_WARN_ON_ASSERT build time flag to decide if QDF_ASSERT
should be a no-op.

Change-Id: I39e3ab6499210569b6ce09d77ee72f0081741989
CRs-Fixed: 2211983
parent 08a885a1
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -83,6 +83,7 @@

#ifdef QDF_ENABLE_TRACING

#ifdef WLAN_WARN_ON_ASSERT
#define QDF_ASSERT(_condition) \
	do { \
		if (!(_condition)) { \
@@ -91,6 +92,14 @@
			WARN_ON(1); \
		} \
	} while (0)
#else
#define QDF_ASSERT(_condition) \
	do { \
		if (!(_condition)) { \
			/* no-op */ \
		} \
	} while (0)
#endif /* WLAN_WARN_ON_ASSERT */

#else