diff options
author | Alexandre Rames <arames@solarflare.com> | 2013-01-11 16:26:21 +0400 |
---|---|---|
committer | Ben Hutchings <bhutchings@solarflare.com> | 2013-03-08 00:21:57 +0400 |
commit | 97d48a10c670f87bba9e5b2241e32f2eccd3fef0 (patch) | |
tree | 49751747e27c3963e1bd1f788ea4005f9f5e964f /drivers/net/ethernet/sfc/ptp.c | |
parent | 9230451af9efcf5e3d60ce7f4fec2468e8ce54b1 (diff) | |
download | linux-97d48a10c670f87bba9e5b2241e32f2eccd3fef0.tar.xz |
sfc: Remove rx_alloc_method SKB
[bwh: Remove more dead code, and make efx_ptp_rx() pull the data it
needs into the header area.]
Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Diffstat (limited to 'drivers/net/ethernet/sfc/ptp.c')
-rw-r--r-- | drivers/net/ethernet/sfc/ptp.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/ethernet/sfc/ptp.c b/drivers/net/ethernet/sfc/ptp.c index d1858c0e0827..07f6baa15c0c 100644 --- a/drivers/net/ethernet/sfc/ptp.c +++ b/drivers/net/ethernet/sfc/ptp.c @@ -1000,7 +1000,7 @@ static bool efx_ptp_rx(struct efx_channel *channel, struct sk_buff *skb) /* Correct version? */ if (ptp->mode == MC_CMD_PTP_MODE_V1) { - if (skb->len < PTP_V1_MIN_LENGTH) { + if (!pskb_may_pull(skb, PTP_V1_MIN_LENGTH)) { return false; } version = ntohs(*(__be16 *)&skb->data[PTP_V1_VERSION_OFFSET]); @@ -1014,7 +1014,7 @@ static bool efx_ptp_rx(struct efx_channel *channel, struct sk_buff *skb) match_data_012 = skb->data + PTP_V1_UUID_OFFSET; match_data_345 = skb->data + PTP_V1_UUID_OFFSET + 3; } else { - if (skb->len < PTP_V2_MIN_LENGTH) { + if (!pskb_may_pull(skb, PTP_V2_MIN_LENGTH)) { return false; } version = skb->data[PTP_V2_VERSION_OFFSET]; |