[RFC PATCH 2/5] net: lorawan: Remove unused lrw_dev_hard_header function

From: Jian-Hong Pan
Date: Wed Jan 16 2019 - 09:25:37 EST


The lorawan module is an abastraction layer over the LoRaWAN soft and
hard MAC. It passes the original buffer to the real MAC layer. So,
this patch removes the lrw_dev_hard_header function.

Signed-off-by: Jian-Hong Pan <starnight@xxxxxxxxxxxx>
---
net/lorawan/socket.c | 12 ------------
1 file changed, 12 deletions(-)

diff --git a/net/lorawan/socket.c b/net/lorawan/socket.c
index 0ec2d2bf1682..9c0722379e25 100644
--- a/net/lorawan/socket.c
+++ b/net/lorawan/socket.c
@@ -115,14 +115,6 @@ dgram_bind(struct sock *sk, struct sockaddr *uaddr, int len)
return ret;
}

-static int
-lrw_dev_hard_header(struct sk_buff *skb, struct net_device *ndev,
- const u32 src_devaddr, size_t len)
-{
- /* TODO: Prepare the LoRaWAN sending header here */
- return 0;
-}
-
static int
dgram_sendmsg(struct sock *sk, struct msghdr *msg, size_t size)
{
@@ -176,10 +168,6 @@ dgram_sendmsg(struct sock *sk, struct msghdr *msg, size_t size)
skb_reserve(skb, hlen);
skb_reset_network_header(skb);

- ret = lrw_dev_hard_header(skb, ndev, 0, size);
- if (ret < 0)
- goto dgram_sendmsg_no_skb;
-
ret = memcpy_from_msg(skb_put(skb, size), msg, size);
if (ret > 0)
goto dgram_sendmsg_err_skb;
--
2.20.1