rtl8xxxu: tx rate reported before set
authorBarry Day <briselec@gmail.com>
Sat, 26 Nov 2016 02:12:03 +0000 (12:12 +1000)
committerKalle Valo <kvalo@codeaurora.org>
Mon, 28 Nov 2016 15:37:07 +0000 (17:37 +0200)
Move the dev_info call that attempts to show the rate used before it is set.

Signed-off-by: Barry Day <briselec@gmail.com>
Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Barry Day <briselec@gmail.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c

index 04141e57b8ae7a24af4ffa5636b895287d4c94c1..a9137abc3ad93da69ec92050d7ff52d5b5cc066c 100644 (file)
@@ -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);