iwlwifi: dbg: add infra for tracking free buffer size
authorMordechay Goodstein <mordechay.goodstein@intel.com>
Sat, 29 Jan 2022 11:16:11 +0000 (13:16 +0200)
committerLuca Coelho <luciano.coelho@intel.com>
Fri, 18 Feb 2022 08:40:51 +0000 (10:40 +0200)
commitf3497dda8dec6e405a4dcbe6ce8f83ced1a42322
treea9a9762d8f7b47ffbfcd06bf387ac19002d2a5c3
parentded5ded3ec342e3e8b751cfa56fd28eb3a454b96
iwlwifi: dbg: add infra for tracking free buffer size

Until now function just got a pointer to some buffer and used it as if
it's good to use with no boundaries about size left in the buffer.

This infra helps for internal functions ops to make sure buffer usage
is in bound of allocation.

We also add external checks with warnings to verify every internal
function didn't exceed usage of the free buffer size.

Signed-off-by: Mordechay Goodstein <mordechay.goodstein@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
Link: https://lore.kernel.org/r/iwlwifi.20220129105618.25c90fb14968.Ic8f05581a745d08011ca29b3f42767402643e8c5@changeid
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
drivers/net/wireless/intel/iwlwifi/fw/dbg.c