提交 91f4aa97 编写于 作者: D Diogenes Pereira 提交者: Stefan Schmidt

mac802154: replace hardcoded value with macro

Use IEEE802154_SCF_SECLEVEL_NONE macro defined at ieee802154.h file.
Signed-off-by: NDiogenes Pereira <dvnp@cesar.org.br>
Signed-off-by: NStefan Schmidt <stefan@osg.samsung.com>
上级 8ca712c3
...@@ -713,7 +713,8 @@ int mac802154_llsec_encrypt(struct mac802154_llsec *sec, struct sk_buff *skb) ...@@ -713,7 +713,8 @@ int mac802154_llsec_encrypt(struct mac802154_llsec *sec, struct sk_buff *skb)
if (hlen < 0 || hdr.fc.type != IEEE802154_FC_TYPE_DATA) if (hlen < 0 || hdr.fc.type != IEEE802154_FC_TYPE_DATA)
return -EINVAL; return -EINVAL;
if (!hdr.fc.security_enabled || hdr.sec.level == 0) { if (!hdr.fc.security_enabled ||
(hdr.sec.level == IEEE802154_SCF_SECLEVEL_NONE)) {
skb_push(skb, hlen); skb_push(skb, hlen);
return 0; return 0;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册