From patchwork Mon Nov 28 21:08:04 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 9450431 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 166216071C for ; Mon, 28 Nov 2016 21:08:34 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 09AEC27F46 for ; Mon, 28 Nov 2016 21:08:34 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id F125B27FA4; Mon, 28 Nov 2016 21:08:33 +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=-6.9 required=2.0 tests=BAYES_00,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 8105A27F46 for ; Mon, 28 Nov 2016 21:08:33 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755319AbcK1VIc (ORCPT ); Mon, 28 Nov 2016 16:08:32 -0500 Received: from mout.kundenserver.de ([212.227.17.10]:56995 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753647AbcK1VI3 (ORCPT ); Mon, 28 Nov 2016 16:08:29 -0500 Received: from wuerfel.lan ([78.43.21.235]) by mrelayeu.kundenserver.de (mreue101 [212.227.15.145]) with ESMTPA (Nemesis) id 0MOS0r-1c6DyB16rl-005mF9; Mon, 28 Nov 2016 22:08:18 +0100 From: Arnd Bergmann To: Jes Sorensen Cc: Arnd Bergmann , Kalle Valo , linux-wireless@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] rtl8xxxu: fix tx rate debug output Date: Mon, 28 Nov 2016 22:08:04 +0100 Message-Id: <20161128210815.2368509-1-arnd@arndb.de> X-Mailer: git-send-email 2.9.0 X-Provags-ID: V03:K0:QSdfPOT2fGLjVOgqoQMOq9Q7X/fIhwc6aTlVcl02p7UMEzGKZeO hk8TyHMClG5QnjVkLI7OSPSR7/15+iCBOp8nldXN8/1Jq6ghkNbPvHTau50a9ds6gnAPKgc hLHH7GICiXNL/Bf7Za3P0aaoERhgT3kcfLDA1y80HC0l0JpueMHRAnV5Z6rPyJEfVqfvOS1 HNKupBgfRYGWV7hp0n+FA== X-UI-Out-Filterresults: notjunk:1; V01:K0:92qDGXHGExQ=:K8V6lMkQnLHOPZAa39+yzw UiAKhNFgwHiGX19ErvKWIIchn+JVXdBKHY9AiJAax+Ohbp2kkaAzfdMU8AYhfRxr15OkRknwC y0C5a2MT3nD2poLNFCAvehdiK6GwRm6dEqsEnxxZOgsXWERgC0XfgJ3B43H3ywnPYilz66PNx ra0zJvoVGoINdy5k1UN/en2qmEjRTrDkExrtIRazsD5mbhVh9k6VLwBV/KAw/qL7qd+TWrW09 Q6pXAULDoHidzPilvr+Ax1Q+jewDgy1wuPZXuq2JoaCWc00RBZDSwKDUzk/KOwFFba+moMoJ1 691463CgPjDsCXL9w+qvauHo0PKoBXfK7HftvUkqEaCqH23lT9ucrH3b9O99RmPv5OHT0Yheq UOMb53wNxXTqn3wa3MoI4dHz2MTsv/jJ/5loR+/JY3kJU+JVPNAHUxTjQ20qiLMrYkNQmEHpE 0hlvfNIN1TM8DH8fRPMnWHYehmXcvqsXpjTUXY80VNjwpvDH6iHaq9EpqjKSGCPtCF5yFFGag F/BjPeA6C52dpnBn3qkiP3Y4LY4zBfJqXoJTB0W1l6VvcsfR8X8FbSXcAOESOvi0GV5gvnM2Z IEn09XSHS+mE2WTRGEFhalXMqL0/hwyL5CSsCqFprsifNT5jY3kGpgPyX72lteH3yoZ5oaD+T zSXz2w9DIBD8Pm+M54KMD1C92HJr/2MPF+8POnHEufgxq4S+KgADaRQVnwHydYWDuG9I= 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 We accidentally print the rate before we know it for txdesc_v2: wireless/realtek/rtl8xxxu/rtl8xxxu_core.c: In function 'rtl8xxxu_fill_txdesc_v2': wireless/realtek/rtl8xxxu/rtl8xxxu_core.c:4848:3: error: 'rate' may be used uninitialized in this function [-Werror=maybe-uninitialized] txdesc_v1 got it right, so let's do it the same way here. Fixes: b4c3d9cfb607 ("rtl8xxxu: Pass tx_info to fill_txdesc in order to have access to retry count") Signed-off-by: Arnd Bergmann --- drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c b/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c index 04141e57b8ae..a9137abc3ad9 100644 --- a/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c +++ b/drivers/net/wireless/realtek/rtl8xxxu/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);