Skip to contentSkip to conversation

rtl8xxxu: tx rate reported before set

PATCH In review Barry Day 3 participants 4 messages Nov 26, 2016 – Nov 28, 2016 1 message not in the archive

lore
Share & tools
lore

Barry Day

author
#0 lore raw

PATCH 1/1 rtl8xxxu: tx rate reported before set

Move the dev_info call that attempts to show the rate used before it is set.

---
 rtl8xxxu_core.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
rtl8xxxu_core.c +4 -4
index 04141e5..a9137ab 100644
@@ -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);
Signature · 1 line
2.9.2
#1 lore raw
Quoted 3 lines · Barry Day

Move the dev_info call that attempts to show the rate used before it is set.

Jes, I would like to take this directly to fix the compiler warning. Also I'll change the commit log to:

rtl8xxxu: tx rate reported before set

Move the dev_info call that attempts to show the rate used before it is set. Fixes a compiler warning:

drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c: In function 'rtl8xxxu_fill_txdesc_v2':
include/linux/device.h:1214:36: warning: 'rate' may be used uninitialized in this function [-Wmaybe-uninitialized]
#define dev_info(dev, fmt, arg...) _dev_info(dev, fmt, ##arg)

Fixes b4c3d9cfb607 ("rtl8xxxu: Pass tx_info to fill_txdesc in order to have access to retry count")
Signature · 6 lines
https://patchwork.kernel.org/patch/9448225/

Documentation about submitting wireless patches and checking status
from patchwork:

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
#3 lore raw
In reply to a message not in the archive
Quoted 7 lines · Kalle Valo
Quoted 3 lines · Barry Day

Move the dev_info call that attempts to show the rate used before it is set.

Jes, I would like to take this directly to fix the compiler warning. Also I'll change the commit log to:

Kalle,

I'm totally fine with this, please go ahead.

Barry thanks for fixing this.

Cheers,
Jes

Quoted 15 lines

rtl8xxxu: tx rate reported before set

Move the dev_info call that attempts to show the rate used before it is set. Fixes a compiler warning:

drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c: In function 'rtl8xxxu_fill_txdesc_v2':
include/linux/device.h:1214:36: warning: 'rate' may be used uninitialized in this function [-Wmaybe-uninitialized]
#define dev_info(dev, fmt, arg...) _dev_info(dev, fmt, ##arg)

Fixes b4c3d9cfb607 ("rtl8xxxu: Pass tx_info to fill_txdesc in order

to have access to retry count")

#4 lore raw
In reply to Barry Day
Quoted 5 lines · Barry Day

Move the dev_info call that attempts to show the rate used before it is set.

Patch applied to wireless-drivers-next.git, thanks.

c06696a95820 rtl8xxxu: tx rate reported before set

Signature · 6 lines
https://patchwork.kernel.org/patch/9448225/

Documentation about submitting wireless patches and checking status
from patchwork:

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches