Received: by 2002:a05:7412:419a:b0:f3:1519:9f41 with SMTP id i26csp2914601rdh; Mon, 27 Nov 2023 02:02:41 -0800 (PST) X-Google-Smtp-Source: AGHT+IGPbz8srGdiVqlYyDiBoEPVRobzXmmL5kwP5mQ5hErOnAbVN1smfhkFmqMv3mE+IEgMHzG7 X-Received: by 2002:a05:620a:4486:b0:77d:8be4:dcbb with SMTP id x6-20020a05620a448600b0077d8be4dcbbmr8895738qkp.37.1701079361122; Mon, 27 Nov 2023 02:02:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701079361; cv=none; d=google.com; s=arc-20160816; b=OMvw2jy9sc1yt/r3+qheW6E7A3G28sIvBG8mNAx2sigsgbYo7A2KwpHbQHos4h8sCF ke8Wc8RDemBymwEFIvbGRjHCwe2BflfjYgbbFTpFaYhYcMq3CgB1TMUtditKdJruNpxk PZa1rJ6a+weTPd3dP1DfMJq54KQgWYk0aovRB/rp4Z4rqxgEWpzTm40euHn7Wl70z66I UoV8nT2Fh3YFDTlnxJQR4Tu3RcSHbOWinCMv+lrMZ8A/vggerks+1CArQIulEvIVvrar /qoIGf0urWem4y6eXgVhvpgzMKudgWS+J5DBQT+BAOWbqewoBn1rDKXZOXfrPaO3ceFi eCbg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:list-unsubscribe:list-subscribe:list-id:precedence :user-agent:content-transfer-encoding:references:in-reply-to:date:cc :to:from:subject:message-id:dkim-signature; bh=0OCQkreozwY1trDAvVl49hOYJhbSKGMOBxd56W0AJzw=; fh=5srrNW9LvMuk71SZ2sZzLIKLqK+GXla83v9FtJnr2mY=; b=FJfEhvvKVIEc8QKs0SK1uZ5nWLtrUi3m+5aXGjDYNhbZuBvP4OnsK53viWdFrJFJ+6 y5M3SXBv5BmYIcB9T0gD09Xs5htlD75RHeetA6N6PRGBlTtzpqPBDUQJN/d8YcJzzXdX e0lEkQlHWI8kJp1yzOYBY0hEStYDFj9+Owf9T2Kamf7z6vj/TH2rmahUbF2ZLucQEpU6 CNh4xHCb1itUWrpnPvC6bOG4VzitRgA3436ahKdE/Hrzr2BA7k/FhZdsDakDqvPZQtzh EjxD1bHtXtgNiExVnwe4xop2GIgDS7qZE2yZYbdiMwDimkN3d5tSdY2xeMUWHewkKnfp Uc2A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sipsolutions.net header.s=mail header.b=HwPCEOEi; spf=pass (google.com: domain of linux-wireless+bounces-96-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-wireless+bounces-96-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=REJECT dis=NONE) header.from=sipsolutions.net Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id x13-20020ae9e64d000000b00768064b6b5bsi8792328qkl.755.2023.11.27.02.02.40 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Nov 2023 02:02:41 -0800 (PST) Received-SPF: pass (google.com: domain of linux-wireless+bounces-96-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=@sipsolutions.net header.s=mail header.b=HwPCEOEi; spf=pass (google.com: domain of linux-wireless+bounces-96-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-wireless+bounces-96-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=REJECT dis=NONE) header.from=sipsolutions.net 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 7B9911C209D4 for ; Mon, 27 Nov 2023 10:02:40 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id CE5E517734; Mon, 27 Nov 2023 10:02:37 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=sipsolutions.net header.i=@sipsolutions.net header.b="HwPCEOEi" X-Original-To: linux-wireless@vger.kernel.org Received: from sipsolutions.net (s3.sipsolutions.net [IPv6:2a01:4f8:242:246e::2]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3B58EE1 for ; Mon, 27 Nov 2023 02:02:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sipsolutions.net; s=mail; h=MIME-Version:Content-Transfer-Encoding: Content-Type:References:In-Reply-To:Date:Cc:To:From:Subject:Message-ID:Sender :Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-To: Resent-Cc:Resent-Message-ID; bh=0OCQkreozwY1trDAvVl49hOYJhbSKGMOBxd56W0AJzw=; t=1701079352; x=1702288952; b=HwPCEOEiRD5bVI9lvEX6SsJeoQj8OKx7ZonD+mhhWuUzLV7 OndFqHiG1/gcORPlJ+ZjHwdO/nngRn4PEQWV1sgBdBRm6W7EvHlJbddQUlV3L2BG3ADrtdn2qcsgG svOgtTz4LdcMrg007pF0DUgtLEFAuiBPMWVut6kVB47CmVot8/8JlIN21p1XgeAmK9XV02bheULSq nYGP9DoOnSyXhmXOwcBey5aMxWxEYezVm/k5ouuux/5n7USgLhc/+RoYQ7J0+LpFzvSSG6ntZoWgi 1L5iGGcquDOmW4cf3nr0MJPeeLbkyKXqxx5kP/DzSIum3P+IiI8XvO+opzmCePog==; Received: by sipsolutions.net with esmtpsa (TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.97) (envelope-from ) id 1r7YRe-000000065ei-34cP; Mon, 27 Nov 2023 11:02:26 +0100 Message-ID: Subject: Re: [PATCH v2,2/2] wifi: mac80211: Refactor STA CSA parsing flow From: Johannes Berg To: Michael-cy Lee =?UTF-8?Q?=28=E6=9D=8E=E5=B3=BB=E5=AE=87=29?= , "linux-wireless@vger.kernel.org" Cc: "linux-mediatek@lists.infradead.org" , "nbd@nbd.name" , Evelyn Tsai =?UTF-8?Q?=28=E8=94=A1=E7=8F=8A=E9=88=BA=29?= , "lorenzo@kernel.org" , Money Wang =?UTF-8?Q?=28=E7=8E=8B=E4=BF=A1=E5=AE=89=29?= Date: Mon, 27 Nov 2023 11:02:25 +0100 In-Reply-To: References: <20231113021107.13110-1-michael-cy.lee@mediatek.com> <20231113021107.13110-2-michael-cy.lee@mediatek.com> <9dd37c008572bb0938bd0d0a0fa207dd70aa8b98.camel@sipsolutions.net> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.48.4 (3.48.4-1.fc38) Precedence: bulk X-Mailing-List: linux-wireless@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-malware-bazaar: not-scanned Hi, > The old flow also converted the Element to operation elements first, > then it used ieee80211_chandef_vht_oper() to build the new chandef from > operation elements. >=20 > We think it's necessary for the case that AP is trying to switch to a > 160 MHz bandwidth, while the STA doesn't support the 160 MHz bandwidth. Yeah, you're right, it did before and I suppose it's still easier than managing two conversions, since some formats are the same. > Just like what had been done during the association, > ieee80211_chandef_vht_oper() checks the STA's capabilities and builds a > valid chandef for the STA. However, even if the STA doesn't support the > 160 MHz bandwidth, ieee80211_chandef_vht_oper() doesn't mark the > conn_flags as IEEE80211_CONN_DISABLE_160MHZ, so the same check is > necessary when handling CSA. Right. > Like we had discussed in previous mail, we expected the patch will be > simplified. Yeah I just circled back to it for stupid reasons (I guess mostly forgot to mark in patchwork that you were going to make changes) and looked again after having looked at all the other code in the series I posted late last week. > In summary, the steps for STA to handling CSA are,=20 > 1. parse the new channel information from either operating class or > WBCS Element. > 2. convert the channel information into corresponding operation Element > (HT/VHT in 5 GHz band and HE/EHT in 6 GHz band) > 3. Build a valid chandef from the operation Element. >=20 Sounds good. johannes