summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorChuhong Yuan <hslester96@gmail.com>2019-07-19 10:09:22 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-07-25 10:48:14 +0300
commitec2b26f712610a85aab933c9cb4dfa3250aa4f58 (patch)
tree4c18e918b2797fa55125a4ded39bf9310f150fbf /drivers
parent814b75b4ed9c1a7633bfec7bab33c96db87a39db (diff)
downloadlinux-ec2b26f712610a85aab933c9cb4dfa3250aa4f58.tar.xz
staging: rtl8712: Merge memcpy + be16_to_cpus to get_unaligned_be16
Merge the combo of memcpy and be16_to_cpus. Use get_unaligned_be16 instead. This simplifies the code. Signed-off-by: Chuhong Yuan <hslester96@gmail.com> Link: https://lore.kernel.org/r/20190719070921.27749-1-hslester96@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/staging/rtl8712/rtl871x_recv.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/staging/rtl8712/rtl871x_recv.c b/drivers/staging/rtl8712/rtl871x_recv.c
index 5298fe603437..9969e5265a40 100644
--- a/drivers/staging/rtl8712/rtl871x_recv.c
+++ b/drivers/staging/rtl8712/rtl871x_recv.c
@@ -245,8 +245,7 @@ union recv_frame *r8712_portctrl(struct _adapter *adapter,
if (auth_alg == 2) {
/* get ether_type */
ptr = ptr + pfhdr->attrib.hdrlen + LLC_HEADER_SIZE;
- memcpy(&ether_type, ptr, 2);
- be16_to_cpus(&ether_type);
+ ether_type = get_unaligned_be16(ptr);
if ((psta != NULL) && (psta->ieee8021x_blocked)) {
/* blocked