Skip to content

Commit

Permalink
nl802154: fix cca mode wpan phy flag
Browse files Browse the repository at this point in the history
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: Alexander Aring <alex.aring@gmail.com>
Reported-by: Varka Bhadram <varkabhadram@gmail.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
  • Loading branch information
Alexander Aring authored and Marcel Holtmann committed May 26, 2015
1 parent 641459c commit fc4f805
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion net/ieee802154/nl802154.c
Original file line number Diff line number Diff line change
Expand Up @@ -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])
Expand Down

0 comments on commit fc4f805

Please sign in to comment.