Received: by 2002:ab2:3319:0:b0:1ef:7a0f:c32d with SMTP id i25csp63630lqc; Thu, 7 Mar 2024 10:20:18 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCVAJA7sfVHz9++xVFAMdJam81HKGJnNSbFDsZj6a1IRj2C0Le87L3rIdDeakG7Uq+XmZM/RfhBHqSVFUAlvFb/1Z0VyZF6RIuj5EpJr2A== X-Google-Smtp-Source: AGHT+IEkCt6+epfbw8rrlsfsHDqSYQGuoKuXpZsByAQnTmCYf6D7bqZ3Xfpmy5qxZGERKH0iGi4J X-Received: by 2002:a9d:6c90:0:b0:6e4:efc8:656b with SMTP id c16-20020a9d6c90000000b006e4efc8656bmr8670576otr.38.1709835618410; Thu, 07 Mar 2024 10:20:18 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709835618; cv=pass; d=google.com; s=arc-20160816; b=dFRHa3JBisRfMz663AhD5AGQsSGeGbOZcqd/XXBSO5Isw52+26hlKJeMh5RmR0aLpg eX0/zKvg0joBC/YyeEhgxpf7Yw6B8Z8XVwD7PTk/K7ZHZunF1GJtaXb0J5xL74jXpPFU ie1FHBCGaUqpvc2MH2YEmyZCSvi//D4neWPN6vfoZInFbiFTZG3r5PDt6dm/GETtzY+1 8ICHoi5akKmRYZ7tMjgajjRajWUCar8w6JEdA40cD7u4I8xFUiEcVYvZuWcaWOTiYrpl HSvl1DurHBiYo4tbyevDf6xx1Vke3qf1/RtGnhMjFjUabtIGMCTQ/P6OWzCx8WvJJ+Yu CpSA== 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=oKpViqrAhEkthnSU62i5WWJox6SprYvbE8wwsTxUXFE=; fh=JBH4xoAqU+QnblKa21BUCNwDoqYIhtDQiRUeFKc8nFo=; b=ff0jb6jmaKcnnPW01HGlY+NEDyrQyodfmmN8iA/4rHC0U6pqNxzmXCGT/IblFhoEUk 14en2PiZmJPiAODUX6fjxuEjbbJC8h7gUUgyp8yT17wzhBW+itDygBvPwRm/el9TxCvO NqY8CwZVmP8HB21sbg5FPVl+oVAaazerKwi2kkWmuUDQ4CVvrd5qRPaPmsERgF/mPnmi AydRm5ZvVQNcCMexYOdpz8KvVJtyaziNcAhJsCSEKCJcnRMNr3BUKd7twGVShhND5e/5 SHc6Qw74iNMh2oI0F3GR8ptfSj+uRP1ScstaSjpbJTEIZXjf8xswsWvzzBDn1V9pcFCv wseQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@candelatech.com header.s=default header.b=CTx6ZrRg; 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-4464-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-wireless+bounces-4464-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=candelatech.com Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id m76-20020a633f4f000000b005dc6576d8adsi14524633pga.386.2024.03.07.10.20.17 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Mar 2024 10:20:18 -0800 (PST) Received-SPF: pass (google.com: domain of linux-wireless+bounces-4464-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@candelatech.com header.s=default header.b=CTx6ZrRg; 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-4464-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-wireless+bounces-4464-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 sy.mirrors.kernel.org (Postfix) with ESMTPS id EE63BB2108E for ; Thu, 7 Mar 2024 18:11:09 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id DC5E81EB41; Thu, 7 Mar 2024 18:11:06 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=candelatech.com header.i=@candelatech.com header.b="CTx6ZrRg" X-Original-To: linux-wireless@vger.kernel.org Received: from dispatch1-us1.ppe-hosted.com (dispatch1-us1.ppe-hosted.com [148.163.129.52]) (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 84166131E21 for ; Thu, 7 Mar 2024 18:11:02 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=148.163.129.52 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709835066; cv=none; b=leBNODOjzmCnWGrExTc+TJyaVsSYuAYTJAQD1ZXw1/OhzaCIm9lD2pfHqavmKu0Ts7/p0hOJjj03N0f8Ym4pnbrVOw05aYw04VVWzmxCXyi7+AaKU1+WdOA+oRAcY1lBtHSXvwacmEppeOM8yUT+8B6sRy5C/vRXjpSn7iokHio= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709835066; c=relaxed/simple; bh=r8w0jxoIxEBMmPbvMRnvhHSdH7fEeRNFxJby4ghsCTE=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=MKfb9MQU76r0DO809W7eiFZSwqhjhPQXmKWtObqOTo/h0/bwohWp5CGIS4D7Y4hN7e82UOrFruiYFbZ1DsEpwqexVfnDl3ZXm2drfWBod0wggeJnrK/hY3OBJnUKIP7UzYZiP60tLkBWTHaP1ze/aGOwtWrYcLixN18+HEsjWZ0= 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=CTx6ZrRg; arc=none smtp.client-ip=148.163.129.52 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 19E3250007C for ; Thu, 7 Mar 2024 18:10:55 +0000 (UTC) Received: from ben-dt5.candelatech.com (unknown [50.251.239.81]) by mail3.candelatech.com (Postfix) with ESMTP id 8A5CE13C2B0; Thu, 7 Mar 2024 10:10:54 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.11.0 mail3.candelatech.com 8A5CE13C2B0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=candelatech.com; s=default; t=1709835054; bh=r8w0jxoIxEBMmPbvMRnvhHSdH7fEeRNFxJby4ghsCTE=; h=From:To:Cc:Subject:Date:From; b=CTx6ZrRgfk8R2pqKuzM64YUsMyqKHl8vgj2CUq576Ne4zk8rhRdr3pM/qckZXF8vH guQc79KnuXeoX3hLI9kNZqxKsjWFehslhfueaMtHzW5fq3ufnEW+J0QcEaBjez/dSq fBF4WGPEp/UFL0dbjROubm7j+b6psuWPeK2PAb0Q= From: greearb@candelatech.com To: linux-wireless@vger.kernel.org Cc: Ben Greear Subject: [PATCH] wifi: mac80211: Improve bss-color configuration. Date: Thu, 7 Mar 2024 10:10:39 -0800 Message-ID: <20240307181039.3219840-1-greearb@candelatech.com> X-Mailer: git-send-email 2.42.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: 1709835055-p8pEwi970ox3 X-MDID-O: us5;ut7;1709835055;p8pEwi970ox3;;f7146c1849a4b08a52804beb1c1cdf45 From: Ben Greear Always tell driver to apply bss color settings if beacon indicates the bss coloring has been set. And only enable bss coloring if beacon indicates bss color setting is valid and also enabled. Signed-off-by: Ben Greear --- net/mac80211/cfg.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c index 327682995c92..aaa62c05428c 100644 --- a/net/mac80211/cfg.c +++ b/net/mac80211/cfg.c @@ -1314,7 +1314,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) + if (params->beacon.he_bss_color_valid) changed |= BSS_CHANGED_HE_BSS_COLOR; } @@ -1494,6 +1494,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); @@ -1530,9 +1531,9 @@ static int ieee80211_change_beacon(struct wiphy *wiphy, struct net_device *dev, if (err < 0) return 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.42.0