Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp772847rwr; Fri, 5 May 2023 05:01:48 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ65UzeHysYYMbQZFBaW32lbMVOJRnGreAFX/PL6fW2gZb8B2wE7dLadCKEWF0+1Kwc7FxD/ X-Received: by 2002:a17:903:1110:b0:1ab:74c:bdf2 with SMTP id n16-20020a170903111000b001ab074cbdf2mr1329818plh.28.1683288107839; Fri, 05 May 2023 05:01:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1683288107; cv=none; d=google.com; s=arc-20160816; b=h91FI+4TORRnPs7vxnYMCykjl9/C5XXh0iRMUlYN6MnQF/szfGsF3eT0miBo5zPBOP Nl/Ck5qBUFbpdJtEjwy3icJ5KR0t9eG4r3ndIJdDKKkg652vYAQYhbyGqLoe00aAGjBk C5TvS35Gv6CkKB6yytUZWWEPb47H0l82KTllP6vzWiojJrYqEw9ElNx5mKWM917PaWC3 JPdo5LTiUfZhAPSisgYtqHMt8pnvN5qkJTJoQFxUALQLdOTL1iiSCq2VXuFX+zpZ/V6u ZxIAIDPTYozjZXZGi5TJ8gDk2h9QAs5hfFgnwBDVDxLtUy6T8cP8g2S9Ibi3oHOJGCK7 e68g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:date:message-id:user-agent:cc:to:references :in-reply-to:from:subject:content-transfer-encoding:mime-version :dkim-signature; bh=6s9AgieFyNTkjjAlUQuimMCTVjqE4V++TMGsm1zTNU8=; b=jI9vZra0JBTZEiqBVNPOpL3nzAK8+nVTYxjKHKzWU+mrKru/+chEkh0c1eMs/qBLlQ UGx2mJQPIKhmJX+uCWGz8NO7dWNH0m7oZ1xtnMOYLQJaf5eMe3PQZLlH4xTJ0Y4QPevP +olWvaFwOkj4lpu+cru2GCswN0HWsjZh4aZRGp+tApYZ6cRllWQfN7CbmUsiDPIN2G7z V2TADCUruTS3cW2lEobmKNJ/vcIBd6kyLvmffz8zeYfCt671YXktPKNfQy2V9PGO390u LyzuZbHQFUlPB5RAqDbAPvAPfQOZbq7KuN9h7uqw5YX7FPoPLtcSC7DctWV0M7D5p+5F sKRQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="sF9JY6p/"; 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=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id s10-20020a170902a50a00b001a216fddd03si1381979plq.649.2023.05.05.05.01.35; Fri, 05 May 2023 05:01:47 -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=@kernel.org header.s=k20201202 header.b="sF9JY6p/"; 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=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230245AbjEEMAQ (ORCPT + 61 others); Fri, 5 May 2023 08:00:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53132 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229591AbjEEMAP (ORCPT ); Fri, 5 May 2023 08:00:15 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0C9B21C0FC for ; Fri, 5 May 2023 04:59:52 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 969E563D84 for ; Fri, 5 May 2023 11:59:51 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 47141C433EF; Fri, 5 May 2023 11:59:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1683287991; bh=u7YjGOVJ51nC3ZY+Zve7cxEX8PTfX8jPvMJ5jhGl5YE=; h=Subject:From:In-Reply-To:References:To:Cc:Date:From; b=sF9JY6p/fIB1CePAWKqAKtdlol5uVEzAbhw2fJMeh6+eciQQGiPIplF2NH+jJzHkz RrSBmo4/TbZdASzASuORO8gPdWHU6VCf5HDejGpk5mqStMhvKknEwcrMnefpCBmwdQ x1k6KC6Bwen9F2LJEaiFP3Hh+DcdwGk3GaAlwM9LNBj/JeOhhpl//cLamGMJQ6ErhI cu1zqXBh9nqT4sug1urxsdmIpMqEBDZirVAql+CleQ+Xyt2pPg4H1MpAnbbDetSku9 pAyJIn7WqcYbs1Wd2nOVlQzEk/J0TrLzX/+e1PdE+wl7wJq7RoXGjOzdYJnuG3afrN Jgcm2tfsKsZ+Q== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: Re: [PATCH 1/5] wifi: rtw89: release bit in rtw89_fw_h2c_del_pkt_offload() From: Kalle Valo In-Reply-To: <8cf5d45c5b04e7b680d4eb9dda62056cdce14cec.camel@realtek.com> References: <8cf5d45c5b04e7b680d4eb9dda62056cdce14cec.camel@realtek.com> To: Ping-Ke Shih Cc: "linux-wireless@vger.kernel.org" , "Kevin Yang" User-Agent: pwcli/0.1.1-git (https://github.com/kvalo/pwcli/) Python/3.7.3 Message-ID: <168328798823.30117.8603596845633913823.kvalo@kernel.org> Date: Fri, 5 May 2023 11:59:50 +0000 (UTC) X-Spam-Status: No, score=-4.6 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,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 Ping-Ke Shih wrote: > From: Zong-Zhe Yang > > We have a pair of FW functions, rtw89_fw_h2c_add_pkt_offload() and > rtw89_fw_h2c_del_pkt_offload(). The rtw89_fw_h2c_add_pkt_offload() > acquires the bit itself, but the bit needs to be released by the > caller of rtw89_fw_h2c_del_pkt_offload(). This looks asymmetrical > and is not friendly to callers. > > Second, if callers always releases the bits, it might make driver > unaligned to bitmap status of FW after some failures of calling > rtw89_fw_h2c_del_pkt_offload(). So, this commit move bit release > into rtw89_fw_h2c_del_pkt_offload(). > > In general, driver will call rtw89_fw_h2c_add_pkt_offload() and > rtw89_fw_h2c_del_pkt_offload(), and then, SW bitmap can align > with FW one. There is one exception when notify_fw is false. > It happens when driver detects FW problems and is going to > reset FW. Only in this case, driver needs to release bits > outside rtw89_fw_h2c_del_pkt_offload(). > > Signed-off-by: Zong-Zhe Yang > Signed-off-by: Ping-Ke Shih 5 patches applied to wireless-next.git, thanks. 25a7e5072ef1 wifi: rtw89: release bit in rtw89_fw_h2c_del_pkt_offload() 3ea1cd8d027f wifi: rtw89: refine packet offload delete flow of 6 GHz probe 8febd68be526 wifi: rtw89: packet offload wait for FW response 32bb12eb73dc wifi: rtw89: mac: handle C2H receive/done ACK in interrupt context b9b632f43f1c wifi: rtw89: scan offload wait for FW done ACK -- https://patchwork.kernel.org/project/linux-wireless/patch/8cf5d45c5b04e7b680d4eb9dda62056cdce14cec.camel@realtek.com/ https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches