Received: by 2002:a05:7412:3b8b:b0:fc:a2b0:25d7 with SMTP id nd11csp364038rdb; Thu, 8 Feb 2024 08:04:45 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCUCpovkQZNnej1l6xqNGAuhCv1OPNNJPN2oiYA5aZRk4NKiCt5PQbbKNCd02uBRpKxNWbap0ZOSYnlW4V6nWzzyXiGjh+j+NRDlEYHAQg== X-Google-Smtp-Source: AGHT+IHBc1wgSVpA+eRsVeZDADhdaF+I82gZ3LxwsvH/Z8LZp4DzY+FyP04brb5Lt9JxyBUc9O74 X-Received: by 2002:a05:6a00:14c2:b0:6dd:c23c:ea4f with SMTP id w2-20020a056a0014c200b006ddc23cea4fmr4951761pfu.5.1707408284521; Thu, 08 Feb 2024 08:04:44 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707408284; cv=pass; d=google.com; s=arc-20160816; b=MNqjRXGlK9gzZ8GfU8V+33QpjDDGQmuDwV0OH2bUyWtvSP0xoBlHIV4pfuFl7aGXHd UF8Bg1mRIBxgfp8rNlGEe68QkE64XT106g3By5Y33w1VHhDi9ufee80J8ux4x3wiQd3R VxFHJlRTlTB5gksrfw/D5MHeuil52J4xW8RfCm3TudFsNih7ZwaQR7DeQPi81gs3lbq5 /TDrx0MfnClPxM5HUP7f7gowcsp/m8tXZRDWh/Vj3CPokeK4f8/c0sgDkhuj4Sf8GPRY 3ma+q7LpgeqXPly5jw8jjc4IbwQ6iKSPwMcwVNcyp0hQnIO9KZ0nj8smJuBCMBlANssU onZw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=pFumlpnhsDgvQxR4NouUMcq0v7wx1kfUqMlKEdXz9a4=; fh=5OfnlhzjCrlVb/EI9XpeUk5fBZ7lH1pZBObmFDG0vgk=; b=khQDqdB0yhZQj6Le3Czw3YMmMNMTlhKIVAqs0fhHljcPwBJ6OP1liUqoYtJe4eGvSV nSZZB3PuLE/WdlEW9htmHDBFi8b2wlzpNX++jU416LEgWM+UeXTr/kxFDHp/nFaEl0mc ow4V29rRwLae8Ulrxte30tHWi33X6d13X+zfvDE6Ds8koOTy9xr3p7jrgcI6eBaEM8Ne w9cDfSyUn2hr0hqnHpM3/Az+pBD/I7QzfFfyeHoduIlCAbGKd/TNagkcM4YguxLeQsYS 85UixUkKihoELiDpjwyvYCs2qH4hIGNiKle3MDlqgl7uQQyGwIllj26UPr46NBVUgSIJ tYUw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=MlKCy6o5; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-wireless+bounces-3342-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-wireless+bounces-3342-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org X-Forwarded-Encrypted: i=2; AJvYcCXEOocmZgol+Ij3rKSxbdaAqkNSKqoct85ZK79Yxu5rAz3t75y/Ctdym6IbQt18D9/n9+Ch3Ez/140I0jUbr69xICUpNIyD8snNmYBgVw== Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id z28-20020a62d11c000000b006e03c0c53d6si4140768pfg.206.2024.02.08.08.04.43 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 08 Feb 2024 08:04:44 -0800 (PST) Received-SPF: pass (google.com: domain of linux-wireless+bounces-3342-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=@kernel.org header.s=k20201202 header.b=MlKCy6o5; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-wireless+bounces-3342-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-wireless+bounces-3342-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org 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 34D90B23158 for ; Thu, 8 Feb 2024 15:56:01 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 4E6C07C6CF; Thu, 8 Feb 2024 15:55:57 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="MlKCy6o5" X-Original-To: linux-wireless@vger.kernel.org Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 2B6656BFA7 for ; Thu, 8 Feb 2024 15:55:56 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707407757; cv=none; b=Z6m+bvOA64h4qeEQB1JJesNgLk+RVU84nbjZgFmTPem78Q2uF7cm3obD4cWXNoYblowD36c44OpLOvczw5QNCwqrg1RwikIXhCU4h+yNN/cI+iOUrk2PlrY+Bv5TDOb8eBiYCfwkRwIQhzRBCe+Vsh09/2D0b4lRvK2S5/LKeMQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707407757; c=relaxed/simple; bh=k2Pspga8vvvkKgGQS46NRSyUq8KK4BiZsk/7oXLkJOo=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=ElW+VsCShnqC1NZeRSzzHZmVdZFg//28jVcgqjpV0v2B+H2yGHlNj5mfX0DOBp2U0ZHP3SqdUbJLz0LuO+DweFaUvm+vrLI0xDUd07UJQl5OFPbuPofKhKhLPY/aZEhXM2Lc6Ne/AlPgM3uLY5ki5hN8P0GBNVV8njNHZgBFWqI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=MlKCy6o5; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6AFBCC433C7; Thu, 8 Feb 2024 15:55:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1707407756; bh=k2Pspga8vvvkKgGQS46NRSyUq8KK4BiZsk/7oXLkJOo=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=MlKCy6o5wJ6e7YJw6DU1f7+CI5lKK2fhAbdtxw/5Ih6xXJVgIUoUT9Xuhhx9NtuMJ NPpkj3QyL8swygoQ7ydQZ0L3yEVh96x1HFmCXnefJNjUKnU7H7Sds83l3ZkFpDFvWW fgN4rr0LVyqu4e0bRkNX4bdY5G7iHgnLoG9IeHXEfw/oFa0OhWUP9gUe6qv0prZ14k SZPGZwxm0OaTBVe0SiStFpP4W7GrS5Yer1aKdPOgi1ctviuvt3lXeJYeBEIHdX9UuJ PVx0ETSldOZ1Y7PegLq2x4Ku/f6Yq6XI6AmPFb9jxUV3MvbxND7r1A93rJ0LhB4yVV Y1iDziltSyi0Q== Date: Thu, 8 Feb 2024 16:55:53 +0100 From: Lorenzo Bianconi To: Ben Greear Cc: Johannes Berg , linux-wireless@vger.kernel.org Subject: Re: [PATCH] mac80211: Ensure bss-coloring is always configured Message-ID: References: <20240130180848.776867-1-greearb@candelatech.com> <7c2721f79c1d6c0aa914db4f4d6148c8efce4b85.camel@sipsolutions.net> <48e6ced8-b138-36a8-6c8b-b56127952bf9@candelatech.com> Precedence: bulk X-Mailing-List: linux-wireless@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="CeqolN0Vm+RT5wDe" Content-Disposition: inline In-Reply-To: <48e6ced8-b138-36a8-6c8b-b56127952bf9@candelatech.com> --CeqolN0Vm+RT5wDe Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable > On 2/8/24 7:28 AM, Lorenzo Bianconi wrote: > > > On Tue, 2024-01-30 at 10:08 -0800, greearb@candelatech.com wrote: > > > > From: Ben Greear > > > >=20 > > > > 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. > > >=20 > > > Arguably, the current behaviour is in line with the documentation of > > > BSS_CHANGED_HE_BSS_COLOR ... but I would tend to agree that > > > enabling/disabling coloring should be covered by it as well. Lorenzo? > > >=20 > > > > And I think the beacon-change logic was slightly wrong, so adjust > > > > that as well. > > >=20 > > > That's not a great thing for a commit message to say ... > > >=20 > > > > Signed-off-by: Ben Greear > > > > --- > > > > net/mac80211/cfg.c | 10 +++++----- > > > > 1 file changed, 5 insertions(+), 5 deletions(-) > > > >=20 > > > > 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 *w= iphy, struct net_device *dev, > > > > IEEE80211_HE_OPERATION_RTS_THRESHOLD_MASK); > > > > changed |=3D BSS_CHANGED_HE_OBSS_PD; > > > > - if (params->beacon.he_bss_color.enabled) > > > > - changed |=3D BSS_CHANGED_HE_BSS_COLOR; > > > > + changed |=3D BSS_CHANGED_HE_BSS_COLOR; > >=20 > > I think we should use beacon->he_bss_color_valid here instead of > > params->beacon.he_bss_color.enabled, agree? >=20 > Either way, the value changed from un-set/un-known to some value, so why = not just > mark it changed and flush to the driver? IIUC what you mean here, if bss color changes from an un-set/un-known to a configured (valid) value, beacon->he_bss_color_valid will be true (he_bss_color_valid is used to indicate userspace provided a proper color f= or beacons). What is the difference? The other way around ("undo" some leftover color from a previous run), it seems a driver/fw bug, and it must be fixed there. Don't you think? Regards, Lorenzo >=20 > Thanks, > Ben >=20 > >=20 > > > > } > > > > if (params->he_cap) { > > > > @@ -1512,6 +1511,7 @@ static int ieee80211_change_beacon(struct wip= hy *wiphy, struct net_device *dev, > > > > int err; > > > > struct ieee80211_bss_conf *link_conf; > > > > u64 changed =3D 0; > > > > + bool color_en; > > > > lockdep_assert_wiphy(wiphy); > > > > @@ -1549,9 +1549,9 @@ static int ieee80211_change_beacon(struct wip= hy *wiphy, struct net_device *dev, > > > > return err; > > > > changed |=3D err; > > > > - if (beacon->he_bss_color_valid && > > > > - beacon->he_bss_color.enabled !=3D link_conf->he_bss_color.ena= bled) { > > > > - link_conf->he_bss_color.enabled =3D beacon->he_bss_color.enabled; > > > > + color_en =3D beacon->he_bss_color.enabled && beacon->he_bss_color= _valid; > > > > + if (color_en !=3D link_conf->he_bss_color.enabled) { > > > > + link_conf->he_bss_color.enabled =3D color_en; > > > > changed |=3D BSS_CHANGED_HE_BSS_COLOR; > > > > } > >=20 > > this seems fine to me. > > > Regards, > > Lorenzo > >=20 > > > >=20 > > >=20 > > > Not sure how this isn't updating the color itself, Lorenzo? > > >=20 > > > johannes > > >=20 >=20 >=20 > --=20 > Ben Greear > Candela Technologies Inc http://www.candelatech.com --CeqolN0Vm+RT5wDe Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEABYKAB0WIQTquNwa3Txd3rGGn7Y6cBh0uS2trAUCZcT5iQAKCRA6cBh0uS2t rBtAAQDS9Ja4f7sD4kFT1T1VSCaPxZUq6qgwaxqKPGL9IC+UJgD+K3f+pYsYn3wZ KK6F50+Wr6k9BiQ4XcKsZv204uNvHwk= =OOeI -----END PGP SIGNATURE----- --CeqolN0Vm+RT5wDe--