summaryrefslogtreecommitdiffstats
path: root/net/mac802154/rx.c
diff options
context:
space:
mode:
authorAlexander Aring <alex.aring@gmail.com>2014-11-09 08:36:45 +0100
committerMarcel Holtmann <marcel@holtmann.org>2014-11-09 19:50:27 +0100
commit863e88f255dac0657e57d5f1a1f95ee8733f8c13 (patch)
treed1b5c0e373969cdd11c55e1fce9ba398cb05ae54 /net/mac802154/rx.c
parentBluetooth: 6lowpan: fix skb_unshare behaviour (diff)
downloadlinux-863e88f255dac0657e57d5f1a1f95ee8733f8c13.tar.xz
linux-863e88f255dac0657e57d5f1a1f95ee8733f8c13.zip
mac802154: move mac pib attributes into wpan_dev
This patch moves all mac pib attributes into the wpan_dev struct. Furthermore we can easier access these attributes over the netdev 802154_ptr pointer. Currently this is only possible over a complicated callback structure in mac802154 because subif data structure is accessable inside mac802154 only. Signed-off-by: Alexander Aring <alex.aring@gmail.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Diffstat (limited to 'net/mac802154/rx.c')
-rw-r--r--net/mac802154/rx.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/net/mac802154/rx.c b/net/mac802154/rx.c
index 4b54cf33e562..b18e755c38ce 100644
--- a/net/mac802154/rx.c
+++ b/net/mac802154/rx.c
@@ -42,6 +42,7 @@ static int
ieee802154_subif_frame(struct ieee802154_sub_if_data *sdata,
struct sk_buff *skb, const struct ieee802154_hdr *hdr)
{
+ struct wpan_dev *wpan_dev = &sdata->wpan_dev;
__le16 span, sshort;
int rc;
@@ -49,8 +50,8 @@ ieee802154_subif_frame(struct ieee802154_sub_if_data *sdata,
spin_lock_bh(&sdata->mib_lock);
- span = sdata->pan_id;
- sshort = sdata->short_addr;
+ span = wpan_dev->pan_id;
+ sshort = wpan_dev->short_addr;
switch (mac_cb(skb)->dest.mode) {
case IEEE802154_ADDR_NONE:
@@ -65,7 +66,7 @@ ieee802154_subif_frame(struct ieee802154_sub_if_data *sdata,
if (mac_cb(skb)->dest.pan_id != span &&
mac_cb(skb)->dest.pan_id != cpu_to_le16(IEEE802154_PANID_BROADCAST))
skb->pkt_type = PACKET_OTHERHOST;
- else if (mac_cb(skb)->dest.extended_addr == sdata->extended_addr)
+ else if (mac_cb(skb)->dest.extended_addr == wpan_dev->extended_addr)
skb->pkt_type = PACKET_HOST;
else
skb->pkt_type = PACKET_OTHERHOST;