Skip to contentSkip to conversation

nl802154: fix cca mode wpan phy flag

PATCH In review Alexander Aring 2 participants 2 messages May 26, 2015

Subsystems (2)
lore
Share & tools
lore

Alexander Aring

author maintainer
#0 lore raw

PATCH 1/1 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.

---
 net/ieee802154/nl802154.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
net/ieee802154/nl802154.c +1 -1
index 54f4959..212a795 100644
@@ -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])
Signature · 1 line
2.4.1