Received: by 2002:a05:7412:d1aa:b0:fc:a2b0:25d7 with SMTP id ba42csp1742533rdb; Wed, 31 Jan 2024 07:49:44 -0800 (PST) X-Google-Smtp-Source: AGHT+IEPTcLU+gtjf8BmJOdY6wG03pkzU4EfKz/715IH+ebLEcEzOhwLs6aBmyaBebjURquEG6rt X-Received: by 2002:a17:906:680a:b0:a36:71c1:2ebb with SMTP id k10-20020a170906680a00b00a3671c12ebbmr1544590ejr.51.1706716184269; Wed, 31 Jan 2024 07:49:44 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706716184; cv=pass; d=google.com; s=arc-20160816; b=dYR8bJX4x3Cj4LEGtmqvZXs/jSxf3JsC99wzqczF5UK2MFsp+G1It5b1bkXB0OCEfT 8uRAA0XdeEkMtlBTpZxj8cxDN+is4s41yIiKS5WsdI95w9Dd+v2VM/JXLH57wLM6nXNq PUUMOHAdtZlXk2nZTJXkt0PWcxWBomBOalAUVoxBwT9TmxyC54xsAGcj6bslasQzHaFi z5s9RT8tW9zfbcsSEfRq58WLilJeUr9P6MZ1lEHcauVcTT2aX3yCtpZxYp0cF+bZ49O/ yVeYz7jMDkW2UE7hC58qLrnioSMkult6E1VtnKeEXvTnedKRtP1p1y2gLQqtLxvfI4TD IU2w== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from:dkim-signature; bh=Voxl96dFgNyUuFbAafrUG4XxixnaLGrtz8TT51bpzFg=; fh=Bh0NRB6tUn3WryOHa8G9YhTuIOo5cOv2bVuxkrbro70=; b=s+QAGtrxVsCjv5/y021yMjlsRNEtnxkXK0hEkHHsq0dhOQSFKTmz2IpfOHZcbXJvmH KjPUWOYUWnAX1SOpvjfdcogLW7vrCSctzq1UQioCFVGlEbkjKxFnxc9ZUyUAr8aOedgy NVc+2SKH1TPCLfCf4cDF31XfLPuuF7r13kwHPaMJi2n1OrbtpC1LctbkQCcOnkBduIr6 jR+hUno/aTqOKfNUaicW/Ib/rIC3/vlZuxbpmIeS1SdqeGYvOuMw0Gh6i7aoKvgVBqZm 4dnnEWwOHxcZfDkw1GyaXTQqD61ZoNiW2l6ibKj5zQHe55w+N8mN/KapuH+/BZTZa+lh RTPA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@sipsolutions.net header.s=mail header.b="wLa2C/ri"; arc=pass (i=1 spf=pass spfdomain=sipsolutions.net dkim=pass dkdomain=sipsolutions.net dmarc=pass fromdomain=sipsolutions.net); spf=pass (google.com: domain of linux-wireless+bounces-2889-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-wireless+bounces-2889-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=REJECT dis=NONE) header.from=sipsolutions.net X-Forwarded-Encrypted: i=1; AJvYcCUGt+wMuBmhtbcAp8aUb4kdY8cFWPXJfSSsN6nOV30DGn4NzPajz2AvcLPnutlmnVAhsb+5sSo507nSHRC05lS0XOcfLw1in3TYk6PePw== Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id d18-20020a1709067f1200b00a360458998fsi2152773ejr.16.2024.01.31.07.49.44 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 31 Jan 2024 07:49:44 -0800 (PST) Received-SPF: pass (google.com: domain of linux-wireless+bounces-2889-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@sipsolutions.net header.s=mail header.b="wLa2C/ri"; arc=pass (i=1 spf=pass spfdomain=sipsolutions.net dkim=pass dkdomain=sipsolutions.net dmarc=pass fromdomain=sipsolutions.net); spf=pass (google.com: domain of linux-wireless+bounces-2889-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-wireless+bounces-2889-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=REJECT dis=NONE) header.from=sipsolutions.net Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 00BD51F25068 for ; Wed, 31 Jan 2024 15:49:44 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 42FE5129A8E; Wed, 31 Jan 2024 15:49:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=sipsolutions.net header.i=@sipsolutions.net header.b="wLa2C/ri" X-Original-To: linux-wireless@vger.kernel.org Received: from sipsolutions.net (s3.sipsolutions.net [168.119.38.16]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 944101292FD for ; Wed, 31 Jan 2024 15:49:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=168.119.38.16 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706716148; cv=none; b=uD7KpRK0C+25pcPZ8dhGgYq7htoVT2cDGdjBMFEmRbvuLKW3hQUh7qMIVZ3SIHi1Rup5GbEJ91KqE0ZttdVLFWi8NFd4I+zc5rOwS5an8Ns5ZmOSBJn30dTxhYpiSmfYEg19EN8rfBV1DM89n8ATD2aLk0RlOPaIG4AKp0A0L/c= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706716148; c=relaxed/simple; bh=Nk/Qqn0NGXcQr9/zVaqv8TH8phnYaLE8obPdL6q1glU=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=KUQ/huMcghizClRaJKX6Y7YQk0nyDpL7N+hCgh8t0o/x2UBgRU38knwpbMpOGWQv0+P7gywhPFF7HEhya1BXixrNaPaEJxJcLoIz2s0cvmR/ppUN9hHc+lRWGdfEMuq23JsfW+10Os11J6WjrQjYvpzzEfkXlm5GJV1FezhUVtg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=sipsolutions.net; spf=pass smtp.mailfrom=sipsolutions.net; dkim=pass (2048-bit key) header.d=sipsolutions.net header.i=@sipsolutions.net header.b=wLa2C/ri; arc=none smtp.client-ip=168.119.38.16 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=sipsolutions.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=sipsolutions.net DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sipsolutions.net; s=mail; h=Content-Transfer-Encoding:MIME-Version: Message-ID:Date:Subject:Cc:To:From:Content-Type:Sender:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-To:Resent-Cc: Resent-Message-ID:In-Reply-To:References; bh=Voxl96dFgNyUuFbAafrUG4XxixnaLGrtz8TT51bpzFg=; t=1706716145; x=1707925745; b=wLa2C/rimamREHFGroUblzp2YFrdiwA/zfgmJ6v6CyMeO1YmcOVapWgllx4zcCFdxkqZVD/V56H EAlmD8XSaJF9Q56uOHjasaapsoCKVvToHrdDTNC/6j8O0M4pn6OREkTkSnwI4Ifdwqe0r9LY0i6r+ ufCa10r0fs3BAYNIrjbo9Z1nVrwu4u6XgSxr4FW3ioWLtb19F1+/H/TR3VsKniHoGdcfacGJv/bAZ JFL9BgY5dkRWlEM7IKchcJvpgFKlJkqgCNoN0H9vKf3hyTWmg8QhMu47PceOIRVrIN/SkRdN/y5PQ IHew6MGuNdW9ybpN4oiJPv+pa60YyLvtVkeQ==; Received: by sipsolutions.net with esmtpsa (TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.97) (envelope-from ) id 1rVCpi-00000007JBm-0kly; Wed, 31 Jan 2024 16:49:02 +0100 From: Johannes Berg To: linux-wireless@vger.kernel.org Cc: Johannes Berg Subject: [PATCH] wifi: mac80211: fix waiting for beacons logic Date: Wed, 31 Jan 2024 16:48:56 +0100 Message-ID: <20240131164856.922701229546.I239b379e7cee04608e73c016b737a5245e5b23dd@changeid> X-Mailer: git-send-email 2.43.0 Precedence: bulk X-Mailing-List: linux-wireless@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit From: Johannes Berg This should be waiting if we don't have a beacon yet, but somehow I managed to invert the logic. Fix that. Fixes: 74e1309acedc ("wifi: mac80211: mlme: look up beacon elems only if needed") Signed-off-by: Johannes Berg --- net/mac80211/mlme.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c index 0349e0ded1d8..dd97f402a624 100644 --- a/net/mac80211/mlme.c +++ b/net/mac80211/mlme.c @@ -8372,8 +8372,7 @@ int ieee80211_mgd_assoc(struct ieee80211_sub_if_data *sdata, rcu_read_lock(); beacon_ies = rcu_dereference(req->bss->beacon_ies); - - if (beacon_ies) { + if (!beacon_ies) { /* * Wait up to one beacon interval ... * should this be more if we miss one? -- 2.43.0