mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 03:27:44 -04:00
ieee802154: add iftypes capability
This patch adds capability flags for supported interface types. Signed-off-by: Alexander Aring <[email protected]> Signed-off-by: Marcel Holtmann <[email protected]>
This commit is contained in:
parent
edea8f7c75
commit
65318680c9
3 changed files with 9 additions and 2 deletions
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue