summaryrefslogtreecommitdiffstats
path: root/net/ieee802154
diff options
context:
space:
mode:
authorAlexander Aring <alex.aring@gmail.com>2015-05-26 23:11:31 +0200
committerMarcel Holtmann <marcel@holtmann.org>2015-05-26 23:45:15 +0200
commitfc4f80524368dbf3fa2eba639c7b79bb014aea0a (patch)
treea3377a94ed970ee87bd54fa4201b3aa2fe22cbf6 /net/ieee802154
parentmac802154: mac802154_mlme_start_req() optimisation. (diff)
downloadlinux-fc4f80524368dbf3fa2eba639c7b79bb014aea0a.tar.xz
linux-fc4f80524368dbf3fa2eba639c7b79bb014aea0a.zip
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: Alexander Aring <alex.aring@gmail.com> Reported-by: Varka Bhadram <varkabhadram@gmail.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Diffstat (limited to 'net/ieee802154')
-rw-r--r--net/ieee802154/nl802154.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/ieee802154/nl802154.c b/net/ieee802154/nl802154.c
index 54f4959fc9bb..212a795b33c9 100644
--- a/net/ieee802154/nl802154.c
+++ b/net/ieee802154/nl802154.c
@@ -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])