From patchwork Sat Nov 26 02:12:03 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Barry Day X-Patchwork-Id: 9448225 X-Patchwork-Delegate: kvalo@adurom.com Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 78A2F60778 for ; Sat, 26 Nov 2016 02:17:42 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 59CCA27AB2 for ; Sat, 26 Nov 2016 02:17:42 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3DCCF27D5E; Sat, 26 Nov 2016 02:17:42 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_FROM, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id DA19D27AB2 for ; Sat, 26 Nov 2016 02:17:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752940AbcKZCPf (ORCPT ); Fri, 25 Nov 2016 21:15:35 -0500 Received: from mail-pg0-f67.google.com ([74.125.83.67]:35871 "EHLO mail-pg0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752810AbcKZCPd (ORCPT ); Fri, 25 Nov 2016 21:15:33 -0500 Received: by mail-pg0-f67.google.com with SMTP id x23so6865291pgx.3 for ; Fri, 25 Nov 2016 18:15:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:cc:subject:message-id:mime-version:content-disposition :user-agent; bh=mOyHac0MvryIjC9ITsDtQCk/Om/DR6aGMfdksw5RrHs=; b=FXavQXE9nXLJzGVagphR8Zy2M7RJzefk77Ba27FgGL4v7lb7IuUBjXiL5KoFi7jTcD YoxgMg3cre72EO2V7mg0ZgGNPQhmbVSdidHnpT52P6uA0z+25yQIwCdSfnf5CXvG7att nAUR9wVYbIua8zXvtdGcwHOOyWTI+Q4Q5wDDJjXFi3t073/tQUHbG7P3Mu71a5o0Ynf3 3+ncLgG4nApPxgYX9ylm6snrap2Ovjb7LpgkLZod1UCadtTORDauUy2ZuKdRJyS/jftl f18UYGMT6EtCe6xXapKU7W0JTvAFt/PXaLzIk4tAUKyEJyNiLrxpHC+fB0fzkd393fXA vnYg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:date:from:to:cc:subject:message-id:mime-version :content-disposition:user-agent; bh=mOyHac0MvryIjC9ITsDtQCk/Om/DR6aGMfdksw5RrHs=; b=DOcLNHbtUOUScCOhRKrIpTmXubbE4hSg4UDdUz6LaTYNWfwuWvC7Wu3/A/RpSiOqsv 8U8TU6xohPdKeGXscddmY3yc+5CWqjVgzBVSxtpydz2vNuypzBDz0drAWgLsDT2b/7+B abAbGsux07EsiLCY44nkmUjwyAvsWyihCpK2mzPBwqdv6Kh2r3kkrdzBoWusQ/iB+blG GXxG0qtupWuuU6Dh2FlcJsPf8rGO0vmDIUr70iKvmNg6BD9zTeY+aZWth70ubjWvyBfH 4J69Pjv/FLwsK44aIYxXK1nKNHH9IZG2CTCu99fzEshpJSqDSDKZhEjbMdAP5KKtxvvK DNlA== X-Gm-Message-State: AKaTC03PIhZcVqrm1xJ2LO0c2zu5AHi9CNfqoJolV+JzttV1Zqtkr+C2Dg8VGFOXZCbDmQ== X-Received: by 10.84.216.24 with SMTP id m24mr24244924pli.26.1480126532967; Fri, 25 Nov 2016 18:15:32 -0800 (PST) Received: from box64.home.org (182-239-181-56.ip.adam.com.au. [182.239.181.56]) by smtp.gmail.com with ESMTPSA id d197sm67254866pfd.38.2016.11.25.18.15.30 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 25 Nov 2016 18:15:32 -0800 (PST) Date: Sat, 26 Nov 2016 12:12:03 +1000 From: Barry Day To: Jes Sorensen Cc: linux-wireless@vger.kernel.org, Kalle Valo Subject: [PATCH] rtl8xxxu: tx rate reported before set Message-ID: <20161126021158.GA12838@box64.home.org> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.6.1 (2016-04-27) Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Move the dev_info call that attempts to show the rate used before it is set. Signed-off-by: Barry Day Reported-by: Stephen Rothwell Signed-off-by: Barry Day --- rtl8xxxu_core.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/rtl8xxxu_core.c b/rtl8xxxu_core.c index 04141e5..a9137ab 100644 --- a/rtl8xxxu_core.c +++ b/rtl8xxxu_core.c @@ -4844,16 +4844,16 @@ rtl8xxxu_fill_txdesc_v2(struct ieee80211_hw *hw, struct ieee80211_hdr *hdr, tx_desc40 = (struct rtl8xxxu_txdesc40 *)tx_desc32; - if (rtl8xxxu_debug & RTL8XXXU_DEBUG_TX) - dev_info(dev, "%s: TX rate: %d, pkt size %d\n", - __func__, rate, cpu_to_le16(tx_desc40->pkt_size)); - if (rate_flags & IEEE80211_TX_RC_MCS && !ieee80211_is_mgmt(hdr->frame_control)) rate = tx_info->control.rates[0].idx + DESC_RATE_MCS0; else rate = tx_rate->hw_value; + if (rtl8xxxu_debug & RTL8XXXU_DEBUG_TX) + dev_info(dev, "%s: TX rate: %d, pkt size %d\n", + __func__, rate, cpu_to_le16(tx_desc40->pkt_size)); + seq_number = IEEE80211_SEQ_TO_SN(le16_to_cpu(hdr->seq_ctrl)); tx_desc40->txdw4 = cpu_to_le32(rate);