diff options
author | Alexander Aring <alex.aring@gmail.com> | 2015-05-17 21:44:47 +0200 |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2015-05-19 11:44:42 +0200 |
commit | 65318680c97cca15e3678148b3a5acaa33e991ec (patch) | |
tree | 6a8a0e994ff76c44d6f0d6859885f6bd468f8f5e /net/ieee802154 | |
parent | edea8f7c75ec6c238130bd7e74d9f6f4c26e97b0 (diff) |
ieee802154: add iftypes capability
This patch adds capability flags for supported interface types.
Signed-off-by: Alexander Aring <alex.aring@gmail.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Diffstat (limited to 'net/ieee802154')
-rw-r--r-- | net/ieee802154/nl802154.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/net/ieee802154/nl802154.c b/net/ieee802154/nl802154.c index 40fb0be009b2..3afb20e43ff8 100644 --- a/net/ieee802154/nl802154.c +++ b/net/ieee802154/nl802154.c @@ -579,7 +579,8 @@ static int nl802154_new_interface(struct sk_buff *skb, struct genl_info *info) if (info->attrs[NL802154_ATTR_IFTYPE]) { type = nla_get_u32(info->attrs[NL802154_ATTR_IFTYPE]); - if (type > NL802154_IFTYPE_MAX) + if (type > NL802154_IFTYPE_MAX || + !(rdev->wpan_phy.supported.iftypes & BIT(type))) return -EINVAL; } |