|
@@ -219,8 +219,8 @@ ieee802154_check_concurrent_iface(struct ieee802154_sub_if_data *sdata,
|
|
* exist really an use case if we need to support
|
|
* exist really an use case if we need to support
|
|
* multiple node types at the same time.
|
|
* multiple node types at the same time.
|
|
*/
|
|
*/
|
|
- if (sdata->vif.type == NL802154_IFTYPE_NODE &&
|
|
|
|
- nsdata->vif.type == NL802154_IFTYPE_NODE)
|
|
|
|
|
|
+ if (wpan_dev->iftype == NL802154_IFTYPE_NODE &&
|
|
|
|
+ nsdata->wpan_dev.iftype == NL802154_IFTYPE_NODE)
|
|
return -EBUSY;
|
|
return -EBUSY;
|
|
|
|
|
|
/* check all phy mac sublayer settings are the same.
|
|
/* check all phy mac sublayer settings are the same.
|
|
@@ -243,7 +243,7 @@ static int mac802154_wpan_open(struct net_device *dev)
|
|
struct ieee802154_local *local = sdata->local;
|
|
struct ieee802154_local *local = sdata->local;
|
|
struct wpan_dev *wpan_dev = &sdata->wpan_dev;
|
|
struct wpan_dev *wpan_dev = &sdata->wpan_dev;
|
|
|
|
|
|
- rc = ieee802154_check_concurrent_iface(sdata, sdata->vif.type);
|
|
|
|
|
|
+ rc = ieee802154_check_concurrent_iface(sdata, wpan_dev->iftype);
|
|
if (rc < 0)
|
|
if (rc < 0)
|
|
return rc;
|
|
return rc;
|
|
|
|
|
|
@@ -467,7 +467,6 @@ ieee802154_setup_sdata(struct ieee802154_sub_if_data *sdata,
|
|
u8 tmp;
|
|
u8 tmp;
|
|
|
|
|
|
/* set some type-dependent values */
|
|
/* set some type-dependent values */
|
|
- sdata->vif.type = type;
|
|
|
|
sdata->wpan_dev.iftype = type;
|
|
sdata->wpan_dev.iftype = type;
|
|
|
|
|
|
get_random_bytes(&tmp, sizeof(tmp));
|
|
get_random_bytes(&tmp, sizeof(tmp));
|
|
@@ -523,7 +522,7 @@ ieee802154_if_add(struct ieee802154_local *local, const char *name,
|
|
|
|
|
|
ASSERT_RTNL();
|
|
ASSERT_RTNL();
|
|
|
|
|
|
- ndev = alloc_netdev(sizeof(*sdata) + local->hw.vif_data_size, name,
|
|
|
|
|
|
+ ndev = alloc_netdev(sizeof(*sdata), name,
|
|
name_assign_type, ieee802154_if_setup);
|
|
name_assign_type, ieee802154_if_setup);
|
|
if (!ndev)
|
|
if (!ndev)
|
|
return ERR_PTR(-ENOMEM);
|
|
return ERR_PTR(-ENOMEM);
|