Received: by 2002:a05:7412:d1aa:b0:fc:a2b0:25d7 with SMTP id ba42csp1182215rdb; Tue, 30 Jan 2024 10:08:58 -0800 (PST) X-Google-Smtp-Source: AGHT+IEUH9l58c3SCTC3lLSzvbL4YskCfmHNggdx7rEt5gTOfJ5TK3OvmUvbzLe6h+PvpPPMYu6j X-Received: by 2002:a05:6830:3d15:b0:6dc:90c0:4472 with SMTP id eu21-20020a0568303d1500b006dc90c04472mr6937343otb.34.1706638138155; Tue, 30 Jan 2024 10:08:58 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706638138; cv=pass; d=google.com; s=arc-20160816; b=Y/tnlMcHdCgKxGhRJOXOXr5t7qnnp5MoH7YcXt7/+QWwfneCgQ3cDg7S/i1r8yKGMP ssEHblpazutXAqGt2VhxQCnZ6zdgWvafa0ksPQnW68iqz77jmXkH+Md5QhGr84L0cOGW /+oyHvlR8PIb6QnE6dsCIiGm/qYf5KxVVf/OB3XEaVUw09wiVHQUqKywcLmqShfF0XUV QgC9y47+OPgawPyUpgITlwI3bu1WF+60KPYI/Xrx7wbom0ZolE1EKS/WevUe4VZLDzqd OKGu6PMM73USv7H8DLucg+Mj14ILKMGDUN9ZQdtbUS1uMIHkmUb3Ne+tIMqWacKEP3Ui girQ== 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:dkim-filter; bh=P6yE8Uk9j9Yd2XximEgVcEeO6vA0KMDwQyZobp1IPh8=; fh=2gHuvEkf46+QF1RzCWYwnLtxgGjIXpsDiMQ+Qw6D41Q=; b=mlyL4vafyxlMRbdHLMpsHbFN2o4y4XQvW/bf3wTTu43UuuB8OXClrSbf7thE7oYjnz +loNPxLK9nMCILaejBiogMXrZcwzy3/RYA5sZYrfT7kv90pKRuAv4dauqlcQwyRNekrG BGXx8BTYHwp6XB9f5LX6fkmuejGAGsEouNcJq/fxQBdHJXy6vk3gc2lya7aIH9EqySje ED0Tq5uan7oDsSXhQs/vUljgIJM6RAGYU5mxi/5C611hQZGc/I3oVnNC/L4ecstlLU8w KmO8Pk+FVyapHmj3bwdZu/CvPgB4H+BrLhFX4s4PZyR1xsxYstf4tU44oPoO/eZ1vUSr kN3w==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@candelatech.com header.s=default header.b=jTGVBHed; arc=pass (i=1 spf=pass spfdomain=candelatech.com dkim=pass dkdomain=candelatech.com dmarc=pass fromdomain=candelatech.com); spf=pass (google.com: domain of linux-wireless+bounces-2850-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-wireless+bounces-2850-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=candelatech.com X-Forwarded-Encrypted: i=1; AJvYcCXKVG13NW/G6jmkCYcIjY9w9ye5MapAiBAvGgT3KxteaU7jSctzKl6n/2mRF2U993pugOmCvYLk9QK7HzY2krFHzwgHyh+DepsJGQhdsw== Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id i25-20020a67f599000000b0046b189c3a83si1166195vso.765.2024.01.30.10.08.57 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 30 Jan 2024 10:08:58 -0800 (PST) Received-SPF: pass (google.com: domain of linux-wireless+bounces-2850-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@candelatech.com header.s=default header.b=jTGVBHed; arc=pass (i=1 spf=pass spfdomain=candelatech.com dkim=pass dkdomain=candelatech.com dmarc=pass fromdomain=candelatech.com); spf=pass (google.com: domain of linux-wireless+bounces-2850-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-wireless+bounces-2850-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=candelatech.com 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 ny.mirrors.kernel.org (Postfix) with ESMTPS id BDAA31C23F72 for ; Tue, 30 Jan 2024 18:08:57 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 1A5AB151CC4; Tue, 30 Jan 2024 18:08:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=candelatech.com header.i=@candelatech.com header.b="jTGVBHed" X-Original-To: linux-wireless@vger.kernel.org Received: from dispatch1-us1.ppe-hosted.com (dispatch1-us1.ppe-hosted.com [67.231.154.164]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 31D858612D for ; Tue, 30 Jan 2024 18:08:52 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=67.231.154.164 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706638135; cv=none; b=skDc2+wQ9rJPRuCE5BsNupQ0/GEG2kEMXRZfp1K7XoH+/shu/gnIBw58Lu0Nc+3ihuj7E87KDkFopkmhWKdB+wHGCLexnIFSGj0DuUNOlDfuMTLaAi+vOZ2sB6MVQmMg16SYcuU8HomnBZC13TPWMiPrYj3Lp5sIAkr71TUusRI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706638135; c=relaxed/simple; bh=hirXS9P95TZ1txLBVVJE58YC3yxQ/S/QWBJR8BjxY4Y=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=QPAMZSVvXdXzdmeHXTBu7d7wBSbhZBZPXxyA0grtyGjFJoPhJ8kiKj9kvujTd6swSGXCABITUWcDYpmsD1THSZYAXntk66q0bD6UF1XZFikVKQdOfuRHB/mh7LPRotU4V0sdtwcap7JBbhOgohEudfvUs4Bu2++Pf1hpL7c1Rh8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=candelatech.com; spf=pass smtp.mailfrom=candelatech.com; dkim=pass (1024-bit key) header.d=candelatech.com header.i=@candelatech.com header.b=jTGVBHed; arc=none smtp.client-ip=67.231.154.164 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=candelatech.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=candelatech.com X-Virus-Scanned: Proofpoint Essentials engine Received: from mail3.candelatech.com (mail2.candelatech.com [208.74.158.173]) by mx1-us1.ppe-hosted.com (PPE Hosted ESMTP Server) with ESMTP id 117A99C008F for ; Tue, 30 Jan 2024 18:08:50 +0000 (UTC) Received: from ben-dt5.candelatech.com (unknown [50.251.239.81]) by mail3.candelatech.com (Postfix) with ESMTP id 47F7813C2B0; Tue, 30 Jan 2024 10:08:50 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.11.0 mail3.candelatech.com 47F7813C2B0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=candelatech.com; s=default; t=1706638130; bh=hirXS9P95TZ1txLBVVJE58YC3yxQ/S/QWBJR8BjxY4Y=; h=From:To:Cc:Subject:Date:From; b=jTGVBHedTdpsxaUCc/Lth0xgymVLIQBlNhLI2mWf43mBYJn50UrdOAnAkDZq8dTtg RCeIR+k/ABx6WDH7g1MC6EVHZl0yIilZqZww4v5hfUJcR7Be1j6x9klGxYcCBC/pLD LpeCHiBfIkLVnedtdKDi10keyy0b4SstrWBpAC88= From: greearb@candelatech.com To: linux-wireless@vger.kernel.org Cc: Ben Greear Subject: [PATCH] mac80211: Ensure bss-coloring is always configured Date: Tue, 30 Jan 2024 10:08:48 -0800 Message-ID: <20240130180848.776867-1-greearb@candelatech.com> X-Mailer: git-send-email 2.41.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 X-MDID: 1706638131-oA4s7Bf6UaUO X-MDID-O: us5;at1;1706638131;oA4s7Bf6UaUO;;f7146c1849a4b08a52804beb1c1cdf45 From: Ben Greear Old code would not set it to disabled, just assumed that driver would default to disabled. Change this to explicitly request bss color be flushed on initial driver configuration. And I think the beacon-change logic was slightly wrong, so adjust that as well. Signed-off-by: Ben Greear --- net/mac80211/cfg.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c index 1c7fb0959cfd..1a6c6c764cbc 100644 --- a/net/mac80211/cfg.c +++ b/net/mac80211/cfg.c @@ -1331,8 +1331,7 @@ static int ieee80211_start_ap(struct wiphy *wiphy, struct net_device *dev, IEEE80211_HE_OPERATION_RTS_THRESHOLD_MASK); changed |= BSS_CHANGED_HE_OBSS_PD; - if (params->beacon.he_bss_color.enabled) - changed |= BSS_CHANGED_HE_BSS_COLOR; + changed |= BSS_CHANGED_HE_BSS_COLOR; } if (params->he_cap) { @@ -1512,6 +1511,7 @@ static int ieee80211_change_beacon(struct wiphy *wiphy, struct net_device *dev, int err; struct ieee80211_bss_conf *link_conf; u64 changed = 0; + bool color_en; lockdep_assert_wiphy(wiphy); @@ -1549,9 +1549,9 @@ static int ieee80211_change_beacon(struct wiphy *wiphy, struct net_device *dev, return err; changed |= err; - if (beacon->he_bss_color_valid && - beacon->he_bss_color.enabled != link_conf->he_bss_color.enabled) { - link_conf->he_bss_color.enabled = beacon->he_bss_color.enabled; + color_en = beacon->he_bss_color.enabled && beacon->he_bss_color_valid; + if (color_en != link_conf->he_bss_color.enabled) { + link_conf->he_bss_color.enabled = color_en; changed |= BSS_CHANGED_HE_BSS_COLOR; } -- 2.41.0