i2c.c (d58ff35122847a83ba55394e2ae3a1527b6febf5) i2c.c (634fef61076d644b989b86abc2f560d81a089a31)
1/* -------------------------------------------------------------------------
2 * Copyright (C) 2014-2016, Intel Corporation
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 2 of the License, or
7 * (at your option) any later version.
8 *

--- 72 unchanged lines hidden (view full) ---

81 len = skb->len;
82 *(u8 *)skb_push(skb, 1) = len & 0xff;
83 *(u8 *)skb_push(skb, 1) = len >> 8;
84
85 /* Compute and add lrc */
86 for (i = 0; i < len + 2; i++)
87 lrc ^= skb->data[i];
88
1/* -------------------------------------------------------------------------
2 * Copyright (C) 2014-2016, Intel Corporation
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 2 of the License, or
7 * (at your option) any later version.
8 *

--- 72 unchanged lines hidden (view full) ---

81 len = skb->len;
82 *(u8 *)skb_push(skb, 1) = len & 0xff;
83 *(u8 *)skb_push(skb, 1) = len >> 8;
84
85 /* Compute and add lrc */
86 for (i = 0; i < len + 2; i++)
87 lrc ^= skb->data[i];
88
89 *(u8 *)skb_put(skb, 1) = lrc;
89 skb_put_u8(skb, lrc);
90}
91
92static void fdp_nci_i2c_remove_len_lrc(struct sk_buff *skb)
93{
94 skb_pull(skb, FDP_FRAME_HEADROOM);
95 skb_trim(skb, skb->len - FDP_FRAME_TAILROOM);
96}
97

--- 291 unchanged lines hidden ---
90}
91
92static void fdp_nci_i2c_remove_len_lrc(struct sk_buff *skb)
93{
94 skb_pull(skb, FDP_FRAME_HEADROOM);
95 skb_trim(skb, skb->len - FDP_FRAME_TAILROOM);
96}
97

--- 291 unchanged lines hidden ---