Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 73302d7f authored by Larry Finger's avatar Larry Finger Committed by Greg Kroah-Hartman
Browse files

staging: r8723au: Fix sparse warning in os_dep/os_intfs.c



Sparse reports the following:

drivers/staging/rtl8723au/os_dep/os_intfs.c:321:14: warning: restricted __be16 degrades to integer

Signed-off-by: default avatarLarry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: default avatarJes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent fecb32d4
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -311,14 +311,14 @@ static u16 rtw_select_queue(struct net_device *dev, struct sk_buff *skb,
u16 rtw_recv_select_queue23a(struct sk_buff *skb)
{
	struct iphdr *piphdr;
	struct ethhdr *eth = (struct ethhdr *)skb->data;
	unsigned int dscp;
	u16 eth_type;
	u16 eth_type = get_unaligned_be16(&eth->h_proto);
	u32 priority;
	u8 *pdata = skb->data;

	memcpy(&eth_type, pdata + (ETH_ALEN << 1), 2);
	switch (eth_type) {
	case htons(ETH_P_IP):
	case ETH_P_IP:
		piphdr = (struct iphdr *)(pdata + ETH_HLEN);
		dscp = piphdr->tos & 0xfc;
		priority = dscp >> 5;