Commit fc4f8052 authored by Alexander Aring's avatar Alexander Aring Committed by Marcel Holtmann

nl802154: fix cca mode wpan phy flag

This patch fix the handling to call cca mode setting. If the phy isn't
flag then the driver doesn't support this setting.
Signed-off-by: default avatarAlexander Aring <alex.aring@gmail.com>
Reported-by: default avatarVarka Bhadram <varkabhadram@gmail.com>
Signed-off-by: default avatarMarcel Holtmann <marcel@holtmann.org>
parent 641459ca
......@@ -757,7 +757,7 @@ static int nl802154_set_cca_mode(struct sk_buff *skb, struct genl_info *info)
struct cfg802154_registered_device *rdev = info->user_ptr[0];
struct wpan_phy_cca cca;
if (rdev->wpan_phy.flags & WPAN_PHY_FLAG_CCA_MODE)
if (!(rdev->wpan_phy.flags & WPAN_PHY_FLAG_CCA_MODE))
return -EOPNOTSUPP;
if (!info->attrs[NL802154_ATTR_CCA_MODE])
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment