rx.c (879f99ef2c4c05d9a7f0a67a05f1415663119825) | rx.c (32edc40ae65cf84e1ab69f6f8316ce81559e115d) |
---|---|
1/* 2 * Copyright (C) 2007-2012 Siemens AG 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 version 2 6 * as published by the Free Software Foundation. 7 * 8 * This program is distributed in the hope that it will be useful, --- 45 unchanged lines hidden (view full) --- 54mac802154_subif_rx(struct ieee802154_dev *hw, struct sk_buff *skb, u8 lqi) 55{ 56 struct mac802154_priv *priv = mac802154_to_priv(hw); 57 58 mac_cb(skb)->lqi = lqi; 59 skb->protocol = htons(ETH_P_IEEE802154); 60 skb_reset_mac_header(skb); 61 | 1/* 2 * Copyright (C) 2007-2012 Siemens AG 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 version 2 6 * as published by the Free Software Foundation. 7 * 8 * This program is distributed in the hope that it will be useful, --- 45 unchanged lines hidden (view full) --- 54mac802154_subif_rx(struct ieee802154_dev *hw, struct sk_buff *skb, u8 lqi) 55{ 56 struct mac802154_priv *priv = mac802154_to_priv(hw); 57 58 mac_cb(skb)->lqi = lqi; 59 skb->protocol = htons(ETH_P_IEEE802154); 60 skb_reset_mac_header(skb); 61 |
62 BUILD_BUG_ON(sizeof(struct ieee802154_mac_cb) > sizeof(skb->cb)); 63 | |
64 if (!(priv->hw.flags & IEEE802154_HW_OMIT_CKSUM)) { 65 u16 crc; 66 67 if (skb->len < 2) { 68 pr_debug("got invalid frame\n"); 69 goto out; 70 } 71 crc = crc_ccitt(0, skb->data, skb->len); --- 43 unchanged lines hidden --- | 62 if (!(priv->hw.flags & IEEE802154_HW_OMIT_CKSUM)) { 63 u16 crc; 64 65 if (skb->len < 2) { 66 pr_debug("got invalid frame\n"); 67 goto out; 68 } 69 crc = crc_ccitt(0, skb->data, skb->len); --- 43 unchanged lines hidden --- |