diff mbox series

NAN: Fix channel peer schedule channel filtering

Message ID 20260507191130.36955-2-andrei.otcheretianski@intel.com
State Accepted
Headers show
Series NAN: Fix channel peer schedule channel filtering | expand

Commit Message

Andrei Otcheretianski May 7, 2026, 7:11 p.m. UTC
Channel filtering should be done for any operating class of course.
The code was misplaced. Fix it.

Signed-off-by: Andrei Otcheretianski <andrei.otcheretianski@intel.com>
---
 src/nan/nan.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

Comments

Jouni Malinen May 8, 2026, 9:19 p.m. UTC | #1
On Thu, May 07, 2026 at 10:11:28PM +0300, Andrei Otcheretianski wrote:
> Channel filtering should be done for any operating class of course.
> The code was misplaced. Fix it.

Thanks, applied.
diff mbox series

Patch

diff --git a/src/nan/nan.c b/src/nan/nan.c
index 140785729d..04cc47be90 100644
--- a/src/nan/nan.c
+++ b/src/nan/nan.c
@@ -2244,13 +2244,13 @@  nan_peer_get_committed_avail_add(const struct nan_data *nan,
 			freq = freq - 70 + idx * 20;
 
 		/* TODO: Missing support for 80 + 80 */
-
-		/* Skip channels that are not in local schedule */
-		if (local_sched &&
-		    !nan_peer_channel_in_local_sched(nan, freq, local_sched))
-			return;
 	}
 
+	/* Skip channels that are not in local schedule */
+	if (local_sched &&
+	    !nan_peer_channel_in_local_sched(nan, freq, local_sched))
+		return;
+
 	/* Assume committed for conditional slots if setup is done */
 	committed = (avail->type == NAN_AVAIL_ENTRY_CTRL_TYPE_COMMITTED) ||
 		(avail->type == NAN_AVAIL_ENTRY_CTRL_TYPE_COND &&