aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/wfx/data_tx.c
diff options
context:
space:
mode:
authorJérôme Pouiller <jerome.pouiller@silabs.com>2020-05-12 17:04:03 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-05-13 13:49:43 +0200
commitea097de7ec4408fc952041da5560cf8a9ae65235 (patch)
tree13b635f1d298df5e5c8af4c15e1e020b15cef922 /drivers/staging/wfx/data_tx.c
parentstaging: wfx: fix output of rx_stats on big endian hosts (diff)
downloadlinux-dev-ea097de7ec4408fc952041da5560cf8a9ae65235.tar.xz
linux-dev-ea097de7ec4408fc952041da5560cf8a9ae65235.zip
staging: wfx: fix endianness of fields media_delay and tx_queue_delay
The struct hif_cnf_tx contains only little endian values. Thus, it is necessary to fix byte ordering before to use them. Especially, sparse detected wrong access to fields media_delay and tx_queue_delay. Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com> Link: https://lore.kernel.org/r/20200512150414.267198-7-Jerome.Pouiller@silabs.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/wfx/data_tx.c')
-rw-r--r--drivers/staging/wfx/data_tx.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/staging/wfx/data_tx.c b/drivers/staging/wfx/data_tx.c
index f64149ab0484..014fa36c8f78 100644
--- a/drivers/staging/wfx/data_tx.c
+++ b/drivers/staging/wfx/data_tx.c
@@ -562,7 +562,8 @@ void wfx_tx_confirm_cb(struct wfx_vif *wvif, const struct hif_cnf_tx *arg)
if (!arg->status) {
tx_info->status.tx_time =
- arg->media_delay - arg->tx_queue_delay;
+ le32_to_cpu(arg->media_delay) -
+ le32_to_cpu(arg->tx_queue_delay);
if (tx_info->flags & IEEE80211_TX_CTL_NO_ACK)
tx_info->flags |= IEEE80211_TX_STAT_NOACK_TRANSMITTED;
else