projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
df8e1af
)
wifi: cw1200: use get_unaligned_le64()
author
Johannes Berg
<johannes.berg@intel.com>
Sun, 4 Sep 2022 19:29:11 +0000
(21:29 +0200)
committer
Kalle Valo
<kvalo@kernel.org>
Wed, 7 Sep 2022 08:03:00 +0000
(11:03 +0300)
Instead of the code here that copies into a variable
first and then flips endianness, which confuses sparse,
just directly use get_unaligned_le64().
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Kalle Valo <kvalo@kernel.org>
Link:
https://lore.kernel.org/r/20220904212910.a5c9ea122f0f.If786a66f8fd9d45659cd5a2532cf395e21334453@changeid
drivers/net/wireless/st/cw1200/txrx.c
patch
|
blob
|
history
diff --git
a/drivers/net/wireless/st/cw1200/txrx.c
b/drivers/net/wireless/st/cw1200/txrx.c
index ab19e0403dc2b10b2f12ea57f8326293f4a27912..6894b919ff94b563fc437b3c2b23b51987c6fde1 100644
(file)
--- a/
drivers/net/wireless/st/cw1200/txrx.c
+++ b/
drivers/net/wireless/st/cw1200/txrx.c
@@
-1142,8
+1142,7
@@
void cw1200_rx_cb(struct cw1200_common *priv,
/* Remove TSF from the end of frame */
if (arg->flags & WSM_RX_STATUS_TSF_INCLUDED) {
- memcpy(&hdr->mactime, skb->data + skb->len - 8, 8);
- hdr->mactime = le64_to_cpu(hdr->mactime);
+ hdr->mactime = get_unaligned_le64(skb->data + skb->len - 8);
if (skb->len >= 8)
skb_trim(skb, skb->len - 8);
} else {