[PATCH 02/71] NAN: Initialize pri_chan_bm for 20/40MHz in nan_get_chan_bm()

Andrei Otcheretianski andrei.otcheretianski at intel.com
Wed Apr 1 15:01:11 PDT 2026


nan_get_chan_bm() initializes the pri_chan_bm output parameter for 80MHz
and wider bandwidths, but failed to initialize it for 20/40MHz case.
This left the variable with uninitialized stack data causing sporadic
failures.

Signed-off-by: Andrei Otcheretianski <andrei.otcheretianski at intel.com>
---
 src/nan/nan_util.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/nan/nan_util.c b/src/nan/nan_util.c
index 4ee3b8bfc2..9c500c8536 100644
--- a/src/nan/nan_util.c
+++ b/src/nan/nan_util.c
@@ -494,6 +494,7 @@ int nan_get_chan_bm(struct nan_data *nan, struct nan_sched_chan *chan,
 	case 20:
 	case 40:
 	default:
+		*pri_chan_bm = 0;
 		bandwidth = CONF_OPER_CHWIDTH_USE_HT;
 		break;
 	case 80:
-- 
2.53.0




More information about the Hostap mailing list