Received: by 2002:ab2:3319:0:b0:1ef:7a0f:c32d with SMTP id i25csp722376lqc; Fri, 8 Mar 2024 09:44:14 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCW+34a9bU1EDYt3eD1RfrAjl0ggmmo+JUw2tVVKXJz5qx4cv+diC4mw9c/7BuOwvIwv5C6Ziz9HcLtVV2JBjyEMudiH5hZ5LU6ctpA88A== X-Google-Smtp-Source: AGHT+IFSBGYlM907gO6EGLDiKghcMdHYSG/VOrfB9UeeVbRRtxAsHRoSD8TivEOv13rJ4ANUCj/J X-Received: by 2002:a17:90a:fb57:b0:29a:bdee:bc69 with SMTP id iq23-20020a17090afb5700b0029abdeebc69mr926851pjb.8.1709919854472; Fri, 08 Mar 2024 09:44:14 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709919854; cv=pass; d=google.com; s=arc-20160816; b=s16loIzFydk0EbEYBEgbnGkeWigjyLqk+wNmzs7EMHW/zfss+uSnvQ3J2A5e5XUrt+ 1jeRXclPDYGLS5fTXSPeFaqbN7/kX4qHi89czk9QBzifrlhPsZbV1LGBfeXtZdSrG89H I3oIlNB02vNfWRdIkpGOtBXruNsw6R13MHGXG7L+yaQoP+7Dws8D/T+xEg2yiPT13KoL Xn4dMG7GYl60pzTvXtf8qyGNoqKOAFR6nl9jU8++UQmkno6hITh+/U4nhebgYhg06vM3 Vo3GtMEoG28odYRMXLcvs47mVk37Jhsu9QENmr7vvfSUyBG2wHLWmoSOv0Zce1uEtdOu arsg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:organization:from:references :to:content-language:subject:user-agent:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:date:message-id :dkim-signature:dkim-filter; bh=asd9g4ljitrtFmVX/nfTNQGgubR4/ZWPx2JSvpLR19I=; fh=Xw/nFqSGCb3heRfkzUlpYnN37bhp/aXhUZaeqJpq2Ck=; b=gjVL4D9qjIbpNTuQR3dCoYy4Pf9qRHjY41ONAeOkwiLopXGahxghqPxjSgt7hXq9ox jg3cUqj3QM3T998b0AP5KIdf7/cYWXJPq9nxh8Nd8P8jvt2np/t9NKSDNsQnbHTzYOnl 7zPmJ7Gzkrc6vosdGzj/H9r49uJWD9SNDsgyGQF2gfxl+NYT98VY3a+kFuusrIng3smh oJU8TIFztPkMt0t+bdaAj3ixtiC1GqojpItsNEMrkIKmP3lgQPvYm+adapydoxsrq5f7 zn98671nkhin0yer+CuSo+IdIL6V1OnbMPmy7PfYtjZrSUppDq4cnvNpRG9xMug4yf7A W4UA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@candelatech.com header.s=default header.b=AEjDaLVI; 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-4501-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-wireless+bounces-4501-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=candelatech.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id pm3-20020a17090b3c4300b0029bc3e9dd9esi26134pjb.104.2024.03.08.09.44.14 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 08 Mar 2024 09:44:14 -0800 (PST) Received-SPF: pass (google.com: domain of linux-wireless+bounces-4501-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@candelatech.com header.s=default header.b=AEjDaLVI; 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-4501-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-wireless+bounces-4501-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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 272F7281C6B for ; Fri, 8 Mar 2024 17:44:14 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 1EB118C1A; Fri, 8 Mar 2024 17:44:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=candelatech.com header.i=@candelatech.com header.b="AEjDaLVI" 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 227631E4A9 for ; Fri, 8 Mar 2024 17:44:08 +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=1709919851; cv=none; b=NBVywrjTD9876WYdutkB0NuEsxrlGd88bNzqBK3qN5MSA/9FZwl2HXObteLXYlXbpzQa79dMAKjLA89Rg91zTkgeQSnKOD9hU5kOH3b6AS+c/KSeW57mU8yaS3yoUHAJ/u16f+wtN5sAblcvm5DoFGd1pQeyOAbZu4+aGQ+mFHA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709919851; c=relaxed/simple; bh=LkeOnudSuWPolOTOChhjMlm5fRCbUIX7mTSVjYBlHA8=; h=Message-ID:Date:MIME-Version:Subject:To:References:From: In-Reply-To:Content-Type; b=LBeonq0QJQgMK4XxhKrzBHcPW7vnVmaVzG6RDFx/W96CUEikDsaRo/7e0tmpi+aUrmgqxTzO72RLOyi2FpeDMMsnB33dnKcqOuiEgl+LUxNZVLq1QVp71Go8VdjGpLr5OThanWHNKcCDzFN1X5vF/K3CrN0gVOIfwLqYcflPbFk= 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=AEjDaLVI; 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 37F0560006B; Fri, 8 Mar 2024 17:44:07 +0000 (UTC) Received: from [192.168.1.23] (unknown [98.97.34.142]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail3.candelatech.com (Postfix) with ESMTPSA id 4968513C2B0; Fri, 8 Mar 2024 09:44:05 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.11.0 mail3.candelatech.com 4968513C2B0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=candelatech.com; s=default; t=1709919845; bh=LkeOnudSuWPolOTOChhjMlm5fRCbUIX7mTSVjYBlHA8=; h=Date:Subject:To:References:From:In-Reply-To:From; b=AEjDaLVICTqsWVDL3oi3aXDhuZRjK2lStysNArsJU2viBe8N/XTljuHrbrnqLP0Yc As3SsTSo+DnnaYt7P9utyMCrjR5bkq2PvsSw/JRodLo8oR6owIwOQ7RQErUq2LXfcF 9jCX67tql6Q+2Okw4AkaEkDSRmIRk8KiYXovgSp4= Message-ID: <69b95f70-d43f-4ed5-9aa6-5a3f498700bf@candelatech.com> Date: Fri, 8 Mar 2024 09:44:04 -0800 Precedence: bulk X-Mailing-List: linux-wireless@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] wifi: mac80211: Improve bss-color configuration. Content-Language: en-MW To: Jeff Johnson , linux-wireless@vger.kernel.org References: <20240307181039.3219840-1-greearb@candelatech.com> <7ab9885b-5fb6-4686-b29b-d287e569293b@quicinc.com> From: Ben Greear Organization: Candela Technologies In-Reply-To: <7ab9885b-5fb6-4686-b29b-d287e569293b@quicinc.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-MDID: 1709919847-m8eLzND5mFx7 X-MDID-O: us5;ut7;1709919847;m8eLzND5mFx7;;4d73edfb1b11e4059731496ff152f6e4 On 3/8/24 09:40, Jeff Johnson wrote: > On 3/7/2024 10:10 AM, greearb@candelatech.com wrote: >> From: Ben Greear >> >> Always tell driver to apply bss color settings if beacon indicates >> the bss coloring has been set. > > why? please describe the problem you are fixing To ensure driver is set to known state. This does not fix any known bug, but seems appropriate, and I noticed driver wasn't being set to disabled when BSS color was disabled while debugging some other issues (the driver in question defaulted to disabled). >> And only enable bss coloring if beacon indicates bss color setting >> is valid and also enabled. This seems more correct behaviour to me. It does not fix any known problem. Thanks, Ben >> >> 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; >> } >> > -- Ben Greear Candela Technologies Inc http://www.candelatech.com