[PATCH 12/97] NAN: Wait longer timeout on counter response

Andrei Otcheretianski andrei.otcheretianski at intel.com
Tue Apr 28 13:05:13 PDT 2026


Since counter response may require more processing on the initiator
side, which may include local schedule adjustments by upper layers,
allow longer NAF timeout in such case.

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

diff --git a/src/nan/nan.c b/src/nan/nan.c
index a885804e8f..102c4a42cc 100644
--- a/src/nan/nan.c
+++ b/src/nan/nan.c
@@ -2045,7 +2045,14 @@ int nan_handle_ndp_setup(struct nan_data *nan, struct nan_ndp_params *params)
 		}
 
 		naf_oui = NAN_SUBTYPE_DATA_PATH_RESPONSE;
-		timeout = NAN_NDP_SETUP_TIMEOUT_SHORT;
+
+		/*
+		 * In case of counter proposal, allow the peer more time to
+		 * process the counter request
+		 */
+		timeout = (peer->ndl->status == NAN_NDL_STATUS_CONTINUED) ?
+			  NAN_NDP_SETUP_TIMEOUT_LONG :
+			  NAN_NDP_SETUP_TIMEOUT_SHORT;
 		break;
 	case NAN_NDP_ACTION_CONF:
 		ret = nan_ndl_setup(nan, peer, params,
-- 
2.53.0




More information about the Hostap mailing list