rx.c (a5e1ec538f54c4cb8ec9ce30867cfbab57225280) | rx.c (60741361c3ca229a1dbb18e05d11e97b7ea75d69) |
---|---|
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, --- 35 unchanged lines hidden (view full) --- 44 struct work_struct work; 45 struct ieee802154_hw *hw; 46 u8 lqi; 47}; 48 49static void 50mac802154_subif_rx(struct ieee802154_hw *hw, struct sk_buff *skb, u8 lqi) 51{ | 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, --- 35 unchanged lines hidden (view full) --- 44 struct work_struct work; 45 struct ieee802154_hw *hw; 46 u8 lqi; 47}; 48 49static void 50mac802154_subif_rx(struct ieee802154_hw *hw, struct sk_buff *skb, u8 lqi) 51{ |
52 struct ieee802154_local *local = mac802154_to_priv(hw); | 52 struct ieee802154_local *local = hw_to_local(hw); |
53 54 mac_cb(skb)->lqi = lqi; 55 skb->protocol = htons(ETH_P_IEEE802154); 56 skb_reset_mac_header(skb); 57 58 if (!(local->hw.flags & IEEE802154_HW_OMIT_CKSUM)) { 59 u16 crc; 60 --- 24 unchanged lines hidden (view full) --- 85 86 mac802154_subif_rx(rw->hw, rw->skb, rw->lqi); 87 kfree(rw); 88} 89 90void 91ieee802154_rx_irqsafe(struct ieee802154_hw *hw, struct sk_buff *skb, u8 lqi) 92{ | 53 54 mac_cb(skb)->lqi = lqi; 55 skb->protocol = htons(ETH_P_IEEE802154); 56 skb_reset_mac_header(skb); 57 58 if (!(local->hw.flags & IEEE802154_HW_OMIT_CKSUM)) { 59 u16 crc; 60 --- 24 unchanged lines hidden (view full) --- 85 86 mac802154_subif_rx(rw->hw, rw->skb, rw->lqi); 87 kfree(rw); 88} 89 90void 91ieee802154_rx_irqsafe(struct ieee802154_hw *hw, struct sk_buff *skb, u8 lqi) 92{ |
93 struct ieee802154_local *local = mac802154_to_priv(hw); | 93 struct ieee802154_local *local = hw_to_local(hw); |
94 struct rx_work *work; 95 96 if (!skb) 97 return; 98 99 work = kzalloc(sizeof(*work), GFP_ATOMIC); 100 if (!work) 101 return; 102 103 INIT_WORK(&work->work, mac802154_rx_worker); 104 work->skb = skb; 105 work->hw = hw; 106 work->lqi = lqi; 107 108 queue_work(local->dev_workqueue, &work->work); 109} 110EXPORT_SYMBOL(ieee802154_rx_irqsafe); | 94 struct rx_work *work; 95 96 if (!skb) 97 return; 98 99 work = kzalloc(sizeof(*work), GFP_ATOMIC); 100 if (!work) 101 return; 102 103 INIT_WORK(&work->work, mac802154_rx_worker); 104 work->skb = skb; 105 work->hw = hw; 106 work->lqi = lqi; 107 108 queue_work(local->dev_workqueue, &work->work); 109} 110EXPORT_SYMBOL(ieee802154_rx_irqsafe); |