]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
ieee802154: add iftype to wpan_dev
authorAlexander Aring <alex.aring@gmail.com>
Sun, 9 Nov 2014 07:36:49 +0000 (08:36 +0100)
committerMarcel Holtmann <marcel@holtmann.org>
Sun, 9 Nov 2014 18:50:28 +0000 (19:50 +0100)
This patch adds an iftype argument to the wpan_dev. This is needed to
get the interface type from netdev ieee802154_ptr. The subif data struct
can only accessible in mac802154 branch.

Signed-off-by: Alexander Aring <alex.aring@gmail.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
include/net/cfg802154.h
net/mac802154/iface.c

index 72c4723a12065063d5b7139a65e2d5644e700641..7e1bc21423b048ea3a5fde408f211152e0d01796 100644 (file)
@@ -64,6 +64,7 @@ struct wpan_phy {
 
 struct wpan_dev {
        struct wpan_phy *wpan_phy;
+       int iftype;
 
        /* MAC PIB */
        __le16 pan_id;
index c0b96cf525d6695b18464eb960bb382a15ce3904..4630ceb25ad2280f606ebcdb69d647b60472083c 100644 (file)
@@ -404,6 +404,7 @@ ieee802154_setup_sdata(struct ieee802154_sub_if_data *sdata, int type)
 
        /* set some type-dependent values */
        sdata->vif.type = type;
+       sdata->wpan_dev.iftype = type;
 
        get_random_bytes(&wpan_dev->bsn, 1);
        get_random_bytes(&wpan_dev->dsn, 1);