summaryrefslogtreecommitdiffstats
path: root/net/mac802154
diff options
context:
space:
mode:
authorDiogenes Pereira <dvnp@cesar.org.br>2017-08-09 18:19:24 +0200
committerStefan Schmidt <stefan@osg.samsung.com>2017-09-20 13:37:16 +0200
commit91f4aa977947f046dc144fa9e3b06f0ffb53be79 (patch)
treea727250f6cbaa96a0144faa9fb322d169e0dd8ae /net/mac802154
parentMerge branch 'net-speedup-netns-create-delete-time' (diff)
downloadlinux-91f4aa977947f046dc144fa9e3b06f0ffb53be79.tar.xz
linux-91f4aa977947f046dc144fa9e3b06f0ffb53be79.zip
mac802154: replace hardcoded value with macro
Use IEEE802154_SCF_SECLEVEL_NONE macro defined at ieee802154.h file. Signed-off-by: Diogenes Pereira <dvnp@cesar.org.br> Signed-off-by: Stefan Schmidt <stefan@osg.samsung.com>
Diffstat (limited to 'net/mac802154')
-rw-r--r--net/mac802154/llsec.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/net/mac802154/llsec.c b/net/mac802154/llsec.c
index 1e1c9b20bab7..edec2f9919d0 100644
--- a/net/mac802154/llsec.c
+++ b/net/mac802154/llsec.c
@@ -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)
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);
return 0;
}