sch_htb: Avoid grafting on htb_destroy_class_offload when destroying htb
[platform/kernel/linux-rpi.git] / net / mac802154 / rx.c
index b8ce846..726b47a 100644 (file)
@@ -44,7 +44,7 @@ ieee802154_subif_frame(struct ieee802154_sub_if_data *sdata,
 
        switch (mac_cb(skb)->dest.mode) {
        case IEEE802154_ADDR_NONE:
-               if (mac_cb(skb)->dest.mode != IEEE802154_ADDR_NONE)
+               if (hdr->source.mode != IEEE802154_ADDR_NONE)
                        /* FIXME: check if we are PAN coordinator */
                        skb->pkt_type = PACKET_OTHERHOST;
                else
@@ -132,7 +132,7 @@ static int
 ieee802154_parse_frame_start(struct sk_buff *skb, struct ieee802154_hdr *hdr)
 {
        int hlen;
-       struct ieee802154_mac_cb *cb = mac_cb_init(skb);
+       struct ieee802154_mac_cb *cb = mac_cb(skb);
 
        skb_reset_mac_header(skb);
 
@@ -294,8 +294,9 @@ void
 ieee802154_rx_irqsafe(struct ieee802154_hw *hw, struct sk_buff *skb, u8 lqi)
 {
        struct ieee802154_local *local = hw_to_local(hw);
+       struct ieee802154_mac_cb *cb = mac_cb_init(skb);
 
-       mac_cb(skb)->lqi = lqi;
+       cb->lqi = lqi;
        skb->pkt_type = IEEE802154_RX_MSG;
        skb_queue_tail(&local->skb_queue, skb);
        tasklet_schedule(&local->tasklet);