Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6E0D8C74A44 for ; Tue, 14 Mar 2023 08:41:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230520AbjCNIlq (ORCPT ); Tue, 14 Mar 2023 04:41:46 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51462 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230165AbjCNIlY (ORCPT ); Tue, 14 Mar 2023 04:41:24 -0400 Received: from sipsolutions.net (s3.sipsolutions.net [IPv6:2a01:4f8:191:4433::2]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3415E44AD for ; Tue, 14 Mar 2023 01:40:58 -0700 (PDT) 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=dVb4gAO71J8MtLsBZxF7wSZshBDUDV57ylAGv5kkjak=; t=1678783258; x=1679992858; b=vWR3aFsBWfk6LpEV17uk9Ev/sDO9lxAuuH3abTnCoy4Axh2 ujSoeLUVueqnIOrh+NExggKdAOrMd1WohW3MSHiX0TgPUPAUgAD4aCyFTlOykE1zw6kAao2/1hPUV eYNrOTdzPwof5NAMlQY0zKRhGKnocqu5RyWu4bCZl1FodPg92HSZghrkBuEgu7xXuZnfAGsn5L2Pv yZZLAaEK7/l5Ne1TiRCiv8FnTFe9KBqwM3qM7bvy/rzdbwt1D6uxUkTf2Gn0dDpgesFFqvavCnEdN Hqoy/2HMg7lZf4dWOHTBLQSLd+SUrdwiPGUhi++OKccpjVnJaEv6mBPC0aP5kFwg==; Received: by sipsolutions.net with esmtpsa (TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.96) (envelope-from ) id 1pc0DF-0034dy-2g; Tue, 14 Mar 2023 09:40:53 +0100 Message-ID: <6528ceb761b7be9862dfc5e404031e832f086cb3.camel@sipsolutions.net> Subject: Re: [PATCH] wifi: mac80211: check the control channel before downgrading the bandwidth 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: Evelyn Tsai =?UTF-8?Q?=28=E8=94=A1=E7=8F=8A=E9=88=BA=29?= , "linux-mediatek@lists.infradead.org" , Shayne Chen =?UTF-8?Q?=28=E9=99=B3=E8=BB=92=E4=B8=9E=29?= , "nbd@nbd.name" , Money Wang =?UTF-8?Q?=28=E7=8E=8B=E4=BF=A1=E5=AE=89=29?= , "lorenzo@kernel.org" , Ryder Lee Date: Tue, 14 Mar 2023 09:40:52 +0100 In-Reply-To: References: <20221222091354.14050-1-michael-cy.lee@mediatek.com> <277f8db1f790931aaac0f94ba0ea69efcb6ba3ac.camel@sipsolutions.net> <70f19f86043750c8f164c316496a8690709fc062.camel@mediatek.com> <386c21d475215c95966bbac6b0853e2715081789.camel@sipsolutions.net> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.46.4 (3.46.4-1.fc37) MIME-Version: 1.0 X-malware-bazaar: not-scanned Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org Hi, > It matters because Extender's STA interface's ifmgd->flags is changed > during bandwidth downgrading and remains changed to the next > association. OK but then _that_ seems like the problem here, no? > Since there is no way to reset ifmgd->flags after bandwidth > downgrading, we check the control channel before downgrading the > bandwidth. If the control channels are different, we directly fail the > association. >=20 Right, but what if you had an association to some other AP, or two chanctxes were allowed, or something else? I feel we should probably instead just reset these ifmgd->flags before association, or so? johannes