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: 101447 Delivered-To: patch@linaro.org Received: by 10.182.1.168 with SMTP id 8csp1907911obn; Mon, 28 Nov 2016 13:08:33 -0800 (PST) X-Received: by 10.98.92.133 with SMTP id q127mr23731316pfb.152.1480367313757; Mon, 28 Nov 2016 13:08:33 -0800 (PST) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b44si28005318pli.42.2016.11.28.13.08.33; Mon, 28 Nov 2016 13:08:33 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-wireless-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-wireless-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755319AbcK1VIc (ORCPT + 1 other); 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 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(-) -- 2.9.0 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);