Commit 82e7627f authored by Andrew Lunn's avatar Andrew Lunn Committed by David S. Miller

net: phy: dp83640: Fixup cast to restricted __be16 warning

ntohs() expects to be passed a __be16. Correct the type of the
variable holding the sequence ID.

Cc: Richard Cochran <richardcochran@gmail.com>
Acked-by: default avatarRichard Cochran <richardcochran@gmail.com>
Reviewed-by: default avatarFlorian Fainelli <f.fainelli@gmail.com>
Signed-off-by: default avatarAndrew Lunn <andrew@lunn.ch>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 4f2b38e3
......@@ -803,9 +803,10 @@ static int decode_evnt(struct dp83640_private *dp83640,
static int match(struct sk_buff *skb, unsigned int type, struct rxts *rxts)
{
u16 *seqid, hash;
unsigned int offset = 0;
u8 *msgtype, *data = skb_mac_header(skb);
__be16 *seqid;
u16 hash;
/* check sequenceID, messageType, 12 bit hash of offset 20-29 */
......@@ -836,7 +837,7 @@ static int match(struct sk_buff *skb, unsigned int type, struct rxts *rxts)
if (rxts->msgtype != (*msgtype & 0xf))
return 0;
seqid = (u16 *)(data + offset + OFF_PTP_SEQUENCE_ID);
seqid = (__be16 *)(data + offset + OFF_PTP_SEQUENCE_ID);
if (rxts->seqid != ntohs(*seqid))
return 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment