Received: by 2002:a05:6a10:413:0:0:0:0 with SMTP id 19csp3883666pxp; Wed, 23 Mar 2022 07:33:42 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyHJxH8EvHSZgM1QroGhmvkNXZqmPvvDZb22zsbQ5jUuca4fpv3qkBi5VggWaa/UVZbORt5 X-Received: by 2002:a17:902:d2cd:b0:154:418d:e3a4 with SMTP id n13-20020a170902d2cd00b00154418de3a4mr173837plc.34.1648046022320; Wed, 23 Mar 2022 07:33:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1648046022; cv=none; d=google.com; s=arc-20160816; b=RDkW0g1EN6z5+6qVj5QB/pliqEsg1SCbYm+0W58ZkQdQrn8kMU8tBCi7DfDbtfugt3 yvWPULWSvQx8o/q04CExKE72ZVr69hpRIct26HCopJBkWDJ8wxqUfzWliV/3DPoQ0Cv3 hlMH/DRTndx5A2TV6smCfZtNSmasRUIj8SThkFgtQpDqRn7BD0Ro/g1oxX2BfwgyZsPv ArQmh5NPzTNsjLuHgApu96ogauEzA0BaWQZHpB1aw8Dw2q9UJJmMkxiTE3jAgg+fT+hS iRUVwhCkKL3uEgw58wU/0kyRekc6vA7OnZVbcuwX0jfIMGErRGq8GkmaSMvnRRIfsMCj 0/8g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:date:cc:to:from:subject :message-id:dkim-signature; bh=Z2yzTyOYASwEuQAelkSipCGrR3PaRyKe2/oJV4xXKLE=; b=nOPIpJ4ofqbbuWinYHynVSoHC3eH9gHCZGLt7FcIi3l8YOiL3e51o1Fg800yfyXd/q Nh+PpMcCCWnGcT1c3gNBJ+58vW6GgL5joadKMcgLCS7z2Q9bZtp7SX1kv0QKehf+BI2D +q0YCjAhIlt28PClyT0QLcbpzk4IoCLFzcA/eIDN/A/1nSP9gMpplCMh2mx1s6sYlJf2 sTmp6r24Xa7sm/x3BF8C61zH58mO/NKrI+0TJt2LgMAAD7wDjY5rkvPsQjlbIcesyp3W UDIY4hzNYnBdPe+vlZqitM598WYXB6raQ5A5yg9xPLCzle8xKUGNnGm4LHAZb0kVm/bx QJzg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sipsolutions.net header.s=mail header.b=NBEZFboK; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=REJECT dis=NONE) header.from=sipsolutions.net Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id j4-20020a170902c3c400b00153b2d16540si16177953plj.328.2022.03.23.07.33.24; Wed, 23 Mar 2022 07:33:42 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@sipsolutions.net header.s=mail header.b=NBEZFboK; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=REJECT dis=NONE) header.from=sipsolutions.net Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S244167AbiCWNME (ORCPT + 70 others); Wed, 23 Mar 2022 09:12:04 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33216 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S244147AbiCWNMD (ORCPT ); Wed, 23 Mar 2022 09:12:03 -0400 Received: from sipsolutions.net (s3.sipsolutions.net [IPv6:2a01:4f8:191:4433::2]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7DB5F5881C for ; Wed, 23 Mar 2022 06:10:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sipsolutions.net; s=mail; h=Content-Transfer-Encoding:MIME-Version: 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=Z2yzTyOYASwEuQAelkSipCGrR3PaRyKe2/oJV4xXKLE=; t=1648041032; x=1649250632; b=NBEZFboKyuUSaaaDQ+Jm5FKMs5Tu43/UF2qloVeas+snwDJ bqQvbvqPogM9kJL2BYpIOgXecj+kciBYvEft81lwTj2NQn7TkJK7JRv5aN/aFPqZC4TrnYjz+gzxU 5buvEAWnnmqcdVkD8FCR/2DPV32DjAwJwYY49ydfkAuxkc2twvuuUVJF0kbbJzUu8LPg7otH7PSvh kxpy8osNtKQLRymY1xKShkhpqgc3LP6w0YzTpIj7fknKKIj4SVjjrM32f9NYB0nnfCjWq2eLq/uoy UeReu3cmwJ1qtw+1aYiTO6SEpYlhV4T+RU8xAt/Fh60KPV0DqzwACs+atLQBolYg==; Received: by sipsolutions.net with esmtpsa (TLS1.3:ECDHE_SECP256R1__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.95) (envelope-from ) id 1nX0ku-00H5rF-Uj; Wed, 23 Mar 2022 14:10:29 +0100 Message-ID: <98a39edef048fef625cdec32030d62699f89d9e8.camel@sipsolutions.net> Subject: Re: [PATCH] mac80211: adjust the replace_state of ieee80211_find_chanctx() From: Johannes Berg To: Ryder Lee Cc: linux-wireless@vger.kernel.org, linux-mediatek@lists.infradead.org Date: Wed, 23 Mar 2022 14:10:28 +0100 In-Reply-To: <40aabb3e10302f1d7da92b7a4eb46577d5ed8e05.1647641256.git.ryder.lee@mediatek.com> References: <40aabb3e10302f1d7da92b7a4eb46577d5ed8e05.1647641256.git.ryder.lee@mediatek.com> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.42.4 (3.42.4-1.fc35) MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-malware-bazaar: not-scanned X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_PASS,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org On Sat, 2022-03-19 at 06:18 +0800, Ryder Lee wrote: > We observe that the condition of chanctx could not be back to > IEEE80211_CHANCTX_REPLACE_NONE occasionally while STA connection. Not sure I parse this correctly, can you elaborate? > In this case the state could be IEEE80211_CHANCTX_REPLACE_OTHER, which > fails the check and then creates another chanctx that leads to the next > round of chan_switch failure in cfg80211_check_combinations(). But if it's REPLACES_OTHER (note your typo), then it's not yet registered properly or anything. > So, modify state to just rule out IEEE80211_CHANCTX_WILL_BE_REPLACED. Therefore, that really doesn't seem right. A chanctx with IEEE80211_CHANCTX_REPLACES_OTHER needs to get used via ieee80211_vif_use_reserved_switch(). johannes