Răsfoiți Sursa

ieee802154: add iftype to wpan_dev

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>
Alexander Aring 10 ani în urmă
părinte
comite
190ac1ca33
2 a modificat fișierele cu 2 adăugiri și 0 ștergeri
  1. 1 0
      include/net/cfg802154.h
  2. 1 0
      net/mac802154/iface.c

+ 1 - 0
include/net/cfg802154.h

@@ -64,6 +64,7 @@ struct wpan_phy {
 
 struct wpan_dev {
 	struct wpan_phy *wpan_phy;
+	int iftype;
 
 	/* MAC PIB */
 	__le16 pan_id;

+ 1 - 0
net/mac802154/iface.c

@@ -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);