mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-23 23:32:14 +00:00
ieee802154: setting extended address while iface add
This patch adds support for setting an extended address while registration a new interface. If ieee802154_is_valid_extended_addr getting as parameter and invalid extended address then the perm address is fallback. This is useful to make some default handling while for example default registration of a wpan interface while phy registration. Signed-off-by: Alexander Aring <alex.aring@gmail.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
This commit is contained in:
parent
f3ea5e4423
commit
0e57547eb7
7 changed files with 27 additions and 13 deletions
|
@ -28,7 +28,8 @@ ieee802154_add_iface_deprecated(struct wpan_phy *wpan_phy,
|
|||
struct net_device *dev;
|
||||
|
||||
rtnl_lock();
|
||||
dev = ieee802154_if_add(local, name, type);
|
||||
dev = ieee802154_if_add(local, name, type,
|
||||
cpu_to_le64(0x0000000000000000ULL));
|
||||
rtnl_unlock();
|
||||
|
||||
return dev;
|
||||
|
@ -44,12 +45,12 @@ static void ieee802154_del_iface_deprecated(struct wpan_phy *wpan_phy,
|
|||
|
||||
static int
|
||||
ieee802154_add_iface(struct wpan_phy *phy, const char *name,
|
||||
enum nl802154_iftype type)
|
||||
enum nl802154_iftype type, __le64 extended_addr)
|
||||
{
|
||||
struct ieee802154_local *local = wpan_phy_priv(phy);
|
||||
struct net_device *err;
|
||||
|
||||
err = ieee802154_if_add(local, name, type);
|
||||
err = ieee802154_if_add(local, name, type, extended_addr);
|
||||
if (IS_ERR(err))
|
||||
return PTR_ERR(err);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue