Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp1654604ybb; Thu, 26 Mar 2020 05:02:18 -0700 (PDT) X-Google-Smtp-Source: ADFU+vvsZy9ZPJEayXYJq0vg3oSkT9ssJSRpHh3gMnOP9rx4toS45+mQT+sAGcF8S6Uvs0mtT9Hw X-Received: by 2002:a05:6830:1b64:: with SMTP id d4mr5647436ote.368.1585224138728; Thu, 26 Mar 2020 05:02:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1585224138; cv=none; d=google.com; s=arc-20160816; b=WVy2PU9UBWpzHABwWBLD2luoJSV/tfvVa9luFKkzVY5VssthiZ6oqPQ5PDgQ8KTet6 UY9778J5TXzpN/HicxxtHkSrJlxfGpnZLPXMPjfDHgBdoIBT/ib/guFRo7shZX3BlEi5 yFpeKaw1N6JSKsHKI5ZSYfiz+M8V2Tn14i2WKLPyZ/5N7EnfgRj52n9Yrf2hLwk3+d6A D0uQWgprRnv0krxJ5DE3jZlWFBEsFrpm+36JB9UfmwI9BAlBbuqrhfE46XF69gw2ojGw ENkrO1MDOvI9+67mzTFpi42jw0cQWrzlPJzZSHXDCPJ44W1iVeGaZNL6mkru59/z0Ym1 Pqfg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:subject:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:cc:to:from; bh=qFe7N/K2MYj7XToXFhu5jgizA9jyiObjf1fw/UuA2E8=; b=W9golzOMGtN3OzBmHSYQjRqAzW39XiJajbDDCo6Y9kbrdMWaO/vrgdHrIx3Qchpsqk OXz5QKN89RKUxSyDmzai5HVU8QYVg4CAOik6rz2s7DQaADXgm3n6S9xCmJuY3vHopxqK 1LoIZPVfM5+IfUjdUH2mTmUqlT3Xb2FjCdkWRx2g2hPXvwbyzO7os8rC2Y6sExVaR+G0 ak8JtBalc0NOgEp3ncYeHr1wAPyF266jc+9aF4kNYr7SRGomS0CFRy2dt5eoLQ6kCmPI 1qlJsM8lM88zhnP/wwk/DGM+IF/rku3wxTImssAXfw7yvQ6nb6lqoBYtrnos0cXIz/JC CwHQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-wireless-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w85si919947oif.88.2020.03.26.05.01.56; Thu, 26 Mar 2020 05:02:18 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-wireless-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-wireless-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728181AbgCZMBK (ORCPT + 99 others); Thu, 26 Mar 2020 08:01:10 -0400 Received: from paleale.coelho.fi ([176.9.41.70]:44160 "EHLO farmhouse.coelho.fi" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727998AbgCZMBJ (ORCPT ); Thu, 26 Mar 2020 08:01:09 -0400 Received: from 91-156-6-193.elisa-laajakaista.fi ([91.156.6.193] helo=redipa.ger.corp.intel.com) by farmhouse.coelho.fi with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.93) (envelope-from ) id 1jHRC5-0003we-RK; Thu, 26 Mar 2020 14:01:06 +0200 From: Luca Coelho To: johannes@sipsolutions.net Cc: linux-wireless@vger.kernel.org Date: Thu, 26 Mar 2020 14:00:42 +0200 Message-Id: <20200326120042.578777-13-luca@coelho.fi> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200326120042.578777-1-luca@coelho.fi> References: <20200326120042.578777-1-luca@coelho.fi> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on farmhouse.coelho.fi X-Spam-Level: X-Spam-Status: No, score=-2.9 required=5.0 tests=ALL_TRUSTED,BAYES_00, TVD_RCVD_IP,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.4 Subject: [PATCH 12/12] cfg80211: Do not warn on same channel at the end of CSA Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org From: Ilan Peer When cfg80211_update_assoc_bss_entry() is called, there is a verification that the BSS channel actually changed. As some APs use CSA also for bandwidth changes, this would result with a kernel warning. Fix this by removing the WARN_ON(). Change-Id: I6710376b1b4257e5f4712fc7ab16e2b638d512aa Signed-off-by: Ilan Peer Signed-off-by: Luca Coelho --- net/wireless/scan.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/net/wireless/scan.c b/net/wireless/scan.c index dd41e41f9d26..4000382aef48 100644 --- a/net/wireless/scan.c +++ b/net/wireless/scan.c @@ -2019,7 +2019,11 @@ void cfg80211_update_assoc_bss_entry(struct wireless_dev *wdev, spin_lock_bh(&rdev->bss_lock); - if (WARN_ON(cbss->pub.channel == chan)) + /* + * Some APs use CSA also for bandwidth changes, i.e., without actually + * changing the control channel, so no need to update in such a case. + */ + if (cbss->pub.channel == chan) goto done; /* use transmitting bss */ -- 2.25.1