staging: rtl8712: used a better macro
authorJannik Becher <becher.jannik@gmail.com>
Tue, 20 Dec 2016 17:59:50 +0000 (18:59 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 3 Jan 2017 15:51:17 +0000 (16:51 +0100)
Fixed a sparse warning.
Using be16_to_cpus() to avoid double assignment.

Signed-off-by: Jannik Becher <becher.jannik@gmail.com>
Tested-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rtl8712/rtl871x_recv.c

index 35c721a..4388ddf 100644 (file)
@@ -258,7 +258,7 @@ union recv_frame *r8712_portctrl(struct _adapter *adapter,
                /* get ether_type */
                ptr = ptr + pfhdr->attrib.hdrlen + LLC_HEADER_SIZE;
                memcpy(&ether_type, ptr, 2);
-               ether_type = ntohs((unsigned short)ether_type);
+               be16_to_cpus(&ether_type);
 
                if ((psta != NULL) && (psta->ieee8021x_blocked)) {
                        /* blocked