| .. | .. |
|---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-only |
|---|
| 1 | 2 | /* |
|---|
| 2 | 3 | * 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, |
|---|
| 9 | | - * but WITHOUT ANY WARRANTY; without even the implied warranty of |
|---|
| 10 | | - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|---|
| 11 | | - * GNU General Public License for more details. |
|---|
| 12 | 4 | * |
|---|
| 13 | 5 | * Written by: |
|---|
| 14 | 6 | * Pavel Smolenskiy <pavel.smolenskiy@gmail.com> |
|---|
| .. | .. |
|---|
| 52 | 44 | |
|---|
| 53 | 45 | switch (mac_cb(skb)->dest.mode) { |
|---|
| 54 | 46 | case IEEE802154_ADDR_NONE: |
|---|
| 55 | | - if (mac_cb(skb)->dest.mode != IEEE802154_ADDR_NONE) |
|---|
| 47 | + if (hdr->source.mode != IEEE802154_ADDR_NONE) |
|---|
| 56 | 48 | /* FIXME: check if we are PAN coordinator */ |
|---|
| 57 | 49 | skb->pkt_type = PACKET_OTHERHOST; |
|---|
| 58 | 50 | else |
|---|
| .. | .. |
|---|
| 140 | 132 | ieee802154_parse_frame_start(struct sk_buff *skb, struct ieee802154_hdr *hdr) |
|---|
| 141 | 133 | { |
|---|
| 142 | 134 | int hlen; |
|---|
| 143 | | - struct ieee802154_mac_cb *cb = mac_cb_init(skb); |
|---|
| 135 | + struct ieee802154_mac_cb *cb = mac_cb(skb); |
|---|
| 144 | 136 | |
|---|
| 145 | 137 | skb_reset_mac_header(skb); |
|---|
| 146 | 138 | |
|---|
| .. | .. |
|---|
| 302 | 294 | ieee802154_rx_irqsafe(struct ieee802154_hw *hw, struct sk_buff *skb, u8 lqi) |
|---|
| 303 | 295 | { |
|---|
| 304 | 296 | struct ieee802154_local *local = hw_to_local(hw); |
|---|
| 297 | + struct ieee802154_mac_cb *cb = mac_cb_init(skb); |
|---|
| 305 | 298 | |
|---|
| 306 | | - mac_cb(skb)->lqi = lqi; |
|---|
| 299 | + cb->lqi = lqi; |
|---|
| 307 | 300 | skb->pkt_type = IEEE802154_RX_MSG; |
|---|
| 308 | 301 | skb_queue_tail(&local->skb_queue, skb); |
|---|
| 309 | 302 | tasklet_schedule(&local->tasklet); |
|---|