diff options
author | Alexander Aring <alex.aring@gmail.com> | 2015-05-27 07:42:09 -0400 |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2015-05-27 13:29:42 -0400 |
commit | e4390592a4fc3ee10a8bc4742197fdbac3935f74 (patch) | |
tree | 4b10a9718dcb6a27002deccc0cdeeaab3eda0f79 /net/ieee802154 | |
parent | dec169eccc26b12a533856a7fea87a245c47c11d (diff) |
nl802154: add support for cca ed level info
This patch adds information about the current cca ed level when the phy
is dumped over nl802154.
Signed-off-by: Alexander Aring <alex.aring@gmail.com>
Reviewed-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.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/net/ieee802154/nl802154.c b/net/ieee802154/nl802154.c index 5c9d524ba02c..a89d9d024126 100644 --- a/net/ieee802154/nl802154.c +++ b/net/ieee802154/nl802154.c | |||
@@ -211,6 +211,7 @@ static const struct nla_policy nl802154_policy[NL802154_ATTR_MAX+1] = { | |||
211 | 211 | ||
212 | [NL802154_ATTR_CCA_MODE] = { .type = NLA_U32, }, | 212 | [NL802154_ATTR_CCA_MODE] = { .type = NLA_U32, }, |
213 | [NL802154_ATTR_CCA_OPT] = { .type = NLA_U32, }, | 213 | [NL802154_ATTR_CCA_OPT] = { .type = NLA_U32, }, |
214 | [NL802154_ATTR_CCA_ED_LEVEL] = { .type = NLA_S32, }, | ||
214 | 215 | ||
215 | [NL802154_ATTR_SUPPORTED_CHANNEL] = { .type = NLA_U32, }, | 216 | [NL802154_ATTR_SUPPORTED_CHANNEL] = { .type = NLA_U32, }, |
216 | 217 | ||
@@ -421,6 +422,12 @@ static int nl802154_send_wpan_phy(struct cfg802154_registered_device *rdev, | |||
421 | goto nla_put_failure; | 422 | goto nla_put_failure; |
422 | } | 423 | } |
423 | 424 | ||
425 | if (rdev->wpan_phy.flags & WPAN_PHY_FLAG_CCA_ED_LEVEL) { | ||
426 | if (nla_put_s32(msg, NL802154_ATTR_CCA_ED_LEVEL, | ||
427 | rdev->wpan_phy.cca_ed_level)) | ||
428 | goto nla_put_failure; | ||
429 | } | ||
430 | |||
424 | if (nl802154_put_capabilities(msg, rdev)) | 431 | if (nl802154_put_capabilities(msg, rdev)) |
425 | goto nla_put_failure; | 432 | goto nla_put_failure; |
426 | 433 | ||