aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac802154
diff options
context:
space:
mode:
Diffstat (limited to 'net/mac802154')
-rw-r--r--net/mac802154/rx.c4
-rw-r--r--net/mac802154/tx.c4
2 files changed, 8 insertions, 0 deletions
diff --git a/net/mac802154/rx.c b/net/mac802154/rx.c
index d1c33c1d6b9b..42e96729dae6 100644
--- a/net/mac802154/rx.c
+++ b/net/mac802154/rx.c
@@ -87,6 +87,10 @@ ieee802154_subif_frame(struct ieee802154_sub_if_data *sdata,
87 87
88 skb->dev = sdata->dev; 88 skb->dev = sdata->dev;
89 89
90 /* TODO this should be moved after netif_receive_skb call, otherwise
91 * wireshark will show a mac header with security fields and the
92 * payload is already decrypted.
93 */
90 rc = mac802154_llsec_decrypt(&sdata->sec, skb); 94 rc = mac802154_llsec_decrypt(&sdata->sec, skb);
91 if (rc) { 95 if (rc) {
92 pr_debug("decryption failed: %i\n", rc); 96 pr_debug("decryption failed: %i\n", rc);
diff --git a/net/mac802154/tx.c b/net/mac802154/tx.c
index 5ee596e00a6d..b205bbec7bdf 100644
--- a/net/mac802154/tx.c
+++ b/net/mac802154/tx.c
@@ -129,6 +129,10 @@ ieee802154_subif_start_xmit(struct sk_buff *skb, struct net_device *dev)
129 struct ieee802154_sub_if_data *sdata = IEEE802154_DEV_TO_SUB_IF(dev); 129 struct ieee802154_sub_if_data *sdata = IEEE802154_DEV_TO_SUB_IF(dev);
130 int rc; 130 int rc;
131 131
132 /* TODO we should move it to wpan_dev_hard_header and dev_hard_header
133 * functions. The reason is wireshark will show a mac header which is
134 * with security fields but the payload is not encrypted.
135 */
132 rc = mac802154_llsec_encrypt(&sdata->sec, skb); 136 rc = mac802154_llsec_encrypt(&sdata->sec, skb);
133 if (rc) { 137 if (rc) {
134 netdev_warn(dev, "encryption failed: %i\n", rc); 138 netdev_warn(dev, "encryption failed: %i\n", rc);