Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp229273iob; Wed, 18 May 2022 00:30:17 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxIQ5H8NFDQVzG39TCUy+Ii/q5RiJ10veGasGhjqifo2aOPjzvI0e2dhWdUbadESid+n3lz X-Received: by 2002:a17:90b:1752:b0:1df:2f90:87ee with SMTP id jf18-20020a17090b175200b001df2f9087eemr19496120pjb.94.1652859017625; Wed, 18 May 2022 00:30:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1652859017; cv=none; d=google.com; s=arc-20160816; b=cZaDiA3BTkGoJ6sz3fwKz25u304xCx7I5WOOkv+A2eK468PJ9HYBRBEoXSdyyutB6V 5cKrA4icSMPOs0oxVjoGCa9xl2WvoReoy2IHgTCWdhvPvHDlJhUVqsPPMVzJ2JSt9ZB+ 7wAazaEXOl+1ApZaAhy403gpLkOkxx6b1NEC9boIJyymOw/t/6UYfSlEC3UJjRXcYG9t FaEFyAPbHILJiFbZ6Xwq8+Q+Mn8tY1/LJ23msKjVlxE2kxZapESXDGaWI1v1dLoTnQnY T9raBWeZHefY/qimRBV7S1GLZ7eKc3OgqFXOgrjcF8vDg/QTNmpO/SrE5wJ8w4JSuP4/ B+gQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent:message-id:in-reply-to :date:references:subject:cc:to:from:dkim-signature; bh=WqPtX4Vz2RWTLbixd1TwzzgYlnco/x/NU+OaA5R3sPM=; b=PEmBjqXCznU3EglSuu0AnpO9eyshy7TEiQ9b7B1HP+v77OhRKmbwyNaZQBHd8oznGD jgFWz2QCnnYnxMo1X9n5YiLK4UIPtdhKgETQyRF5WdOVUn0NDPgjfBVAvXsDuNdzXOPG 2RvySr5m9IpLqEO9GhXKTCGYvGXVOyTu4LqwJSgRwKZrp9BvFfh/Tfl2/LRPYKcBlh9b TkPz0Txz7UkC4lx7hCY7cAhDbd3wXRzBVaoRp4BwrpBDGu4Kgxgcm4CR2RaKdqEKIuD4 c+l0IBugxOP+3JBuCTbO3YJHskEe58scttC4z2bL/7yzIyz2HpLaW+1RZypgYuh2C9oO 95NA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=BQgKbMW8; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:18 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 lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id j17-20020a170902da9100b0015d1ad56d59si1927493plx.317.2022.05.18.00.30.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 18 May 2022 00:30:17 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=BQgKbMW8; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id E3D8A3BC; Wed, 18 May 2022 00:30:15 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232120AbiERHaO (ORCPT + 71 others); Wed, 18 May 2022 03:30:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40352 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232127AbiERHaL (ORCPT ); Wed, 18 May 2022 03:30:11 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3C7A55D1B9 for ; Wed, 18 May 2022 00:30:10 -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 ams.source.kernel.org (Postfix) with ESMTPS id E685EB81EB1 for ; Wed, 18 May 2022 07:30:08 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id A6157C34113; Wed, 18 May 2022 07:30:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1652859007; bh=+zhe42QWlOeLYawRxZmuopv435lwPm0NJK4t2EQvtbg=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=BQgKbMW8o5UfMeC9g0Wy8YBi41Mm8ZMQDmvfkL6RtWo+DLlC7i3aLFZcsWxFJ9VbC PECKIZCsG0fRgoHVE8f8NPhzdaAJaiDq22hXbm/hF1QaRVkmyrrK7Rts7kfTeGL7lc jk/NpzPwU/KeJe/cxbr4qKBt7lMKcKIAqOJFqiJtFElu0ekLc4u9U+sXtWf2/IKdlE A1UTZYy8XGdc3rruRVBw4KOpt6+0scBxhGbSFh87zwaBO88xXWAJ7IByoPgNhsMt1i gQDQ6VfaTRo+iHU2G0rLXlMJjkUoYCpeJJLPAhd+fA827K0Rc4W480+iyD86l1KEWn E0HN9Ebf6CwXQ== From: Kalle Valo To: Sergey Ryazanov Cc: ath10k@lists.infradead.org, linux-wireless@vger.kernel.org, Edward Matijevic , John Crispin , =?utf-8?Q?Old=C5=99ich_Jedli=C4=8Dka?= , Tom Psyborg , Vasanthakumar Thiagarajan , Zhijun You Subject: Re: [PATCH 1/4] ath10k: improve tx status reporting References: <20220516032519.29831-1-ryazanov.s.a@gmail.com> <20220516032519.29831-2-ryazanov.s.a@gmail.com> Date: Wed, 18 May 2022 10:30:01 +0300 In-Reply-To: (Sergey Ryazanov's message of "Mon, 16 May 2022 23:57:34 +0300") Message-ID: <87tu9n2t8m.fsf@kernel.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Status: No, score=-2.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=unavailable 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 Sergey Ryazanov writes: > On Mon, May 16, 2022 at 6:25 AM Sergey Ryazanov wrote: > >> --- a/drivers/net/wireless/ath/ath10k/txrx.c >> +++ b/drivers/net/wireless/ath/ath10k/txrx.c >> @@ -43,6 +43,7 @@ static void ath10k_report_offchan_tx(struct ath10k *ar, struct sk_buff *skb) >> int ath10k_txrx_tx_unref(struct ath10k_htt *htt, >> const struct htt_tx_done *tx_done) >> { >> + struct ieee80211_tx_status status; >> struct ath10k *ar = htt->ar; >> struct device *dev = ar->dev; >> struct ieee80211_tx_info *info; >> @@ -128,7 +129,16 @@ int ath10k_txrx_tx_unref(struct ath10k_htt *htt, >> info->status.flags |= IEEE80211_TX_STATUS_ACK_SIGNAL_VALID; >> } >> >> - ieee80211_tx_status(htt->ar->hw, msdu); >> + memset(&status, 0, sizeof(status)); >> + status.skb = msdu; >> + status.info = info; >> + >> + rcu_read_lock(); >> + if (txq && txq->sta) >> + status.sta = txq->sta; > > Just noticed that since we do not dereference the txq->sta pointer > here, the above code can be simplified to: > > if (txq) > status.sta = txq->sta; > > Kalle, should I send V2 or can you change this in your tree? I changed this in the pending branch, please check my changes: https://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git/commit/?h=pending&id=1bd0c16e10229683fab1dd8adf8c4339992688b7 -- https://patchwork.kernel.org/project/linux-wireless/list/ https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches