summaryrefslogtreecommitdiff
path: root/net/ieee802154/6lowpan/tx.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/ieee802154/6lowpan/tx.c')
-rw-r--r--net/ieee802154/6lowpan/tx.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/net/ieee802154/6lowpan/tx.c b/net/ieee802154/6lowpan/tx.c
index 57363026ff22..62a21f6f021e 100644
--- a/net/ieee802154/6lowpan/tx.c
+++ b/net/ieee802154/6lowpan/tx.c
@@ -137,8 +137,8 @@ lowpan_xmit_fragment(struct sk_buff *skb, const struct ieee802154_hdr *wpan_hdr,
static int
lowpan_xmit_fragmented(struct sk_buff *skb, struct net_device *ldev,
- const struct ieee802154_hdr *wpan_hdr,
- unsigned int dgram_size, unsigned int dgram_offset)
+ const struct ieee802154_hdr *wpan_hdr, u16 dgram_size,
+ u16 dgram_offset)
{
__be16 frag_tag;
u8 frag_hdr[5];
@@ -203,7 +203,7 @@ err:
}
static int lowpan_header(struct sk_buff *skb, struct net_device *ldev,
- unsigned int *dgram_size, unsigned int *dgram_offset)
+ u16 *dgram_size, u16 *dgram_offset)
{
struct wpan_dev *wpan_dev = lowpan_dev_info(ldev)->wdev->ieee802154_ptr;
struct ieee802154_addr sa, da;
@@ -253,10 +253,12 @@ netdev_tx_t lowpan_xmit(struct sk_buff *skb, struct net_device *ldev)
{
struct ieee802154_hdr wpan_hdr;
int max_single, ret;
- unsigned int dgram_size, dgram_offset;
+ u16 dgram_size, dgram_offset;
pr_debug("package xmit\n");
+ WARN_ON_ONCE(skb->len > IPV6_MIN_MTU);
+
/* We must take a copy of the skb before we modify/replace the ipv6
* header as the header could be used elsewhere
*/