Commit 1c9edb27 authored by Jes Sorensen's avatar Jes Sorensen Committed by Greg Kroah-Hartman

rtl8xxxu: Fix big-endian problem reporting mactime

commit 8a55698f upstream.

The full RX descriptor is converted so converting tsfl again would
return it to it's original endian value.
Signed-off-by: default avatarJes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: default avatarKalle Valo <kvalo@codeaurora.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent ece1b51a
...@@ -231,7 +231,7 @@ struct rtl8xxxu_rxdesc16 { ...@@ -231,7 +231,7 @@ struct rtl8xxxu_rxdesc16 {
u32 pattern1match:1; u32 pattern1match:1;
u32 pattern0match:1; u32 pattern0match:1;
#endif #endif
__le32 tsfl; u32 tsfl;
#if 0 #if 0
u32 bassn:12; u32 bassn:12;
u32 bavld:1; u32 bavld:1;
...@@ -361,7 +361,7 @@ struct rtl8xxxu_rxdesc24 { ...@@ -361,7 +361,7 @@ struct rtl8xxxu_rxdesc24 {
u32 ldcp:1; u32 ldcp:1;
u32 splcp:1; u32 splcp:1;
#endif #endif
__le32 tsfl; u32 tsfl;
}; };
struct rtl8xxxu_txdesc32 { struct rtl8xxxu_txdesc32 {
......
...@@ -5224,7 +5224,7 @@ int rtl8xxxu_parse_rxdesc16(struct rtl8xxxu_priv *priv, struct sk_buff *skb) ...@@ -5224,7 +5224,7 @@ int rtl8xxxu_parse_rxdesc16(struct rtl8xxxu_priv *priv, struct sk_buff *skb)
rtl8xxxu_rx_parse_phystats(priv, rx_status, phy_stats, rtl8xxxu_rx_parse_phystats(priv, rx_status, phy_stats,
rx_desc->rxmcs); rx_desc->rxmcs);
rx_status->mactime = le32_to_cpu(rx_desc->tsfl); rx_status->mactime = rx_desc->tsfl;
rx_status->flag |= RX_FLAG_MACTIME_START; rx_status->flag |= RX_FLAG_MACTIME_START;
if (!rx_desc->swdec) if (!rx_desc->swdec)
...@@ -5294,7 +5294,7 @@ int rtl8xxxu_parse_rxdesc24(struct rtl8xxxu_priv *priv, struct sk_buff *skb) ...@@ -5294,7 +5294,7 @@ int rtl8xxxu_parse_rxdesc24(struct rtl8xxxu_priv *priv, struct sk_buff *skb)
rtl8xxxu_rx_parse_phystats(priv, rx_status, phy_stats, rtl8xxxu_rx_parse_phystats(priv, rx_status, phy_stats,
rx_desc->rxmcs); rx_desc->rxmcs);
rx_status->mactime = le32_to_cpu(rx_desc->tsfl); rx_status->mactime = rx_desc->tsfl;
rx_status->flag |= RX_FLAG_MACTIME_START; rx_status->flag |= RX_FLAG_MACTIME_START;
if (!rx_desc->swdec) if (!rx_desc->swdec)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment