diff options
author | Antonio Quartulli <ordex@autistici.org> | 2013-04-02 22:28:44 +0200 |
---|---|---|
committer | Antonio Quartulli <ordex@autistici.org> | 2013-05-29 02:44:54 +0200 |
commit | 41ab6c4891ed4cdd855ae569924acb1da424a614 (patch) | |
tree | 073d8ba7befde0fb1965f0562f63dfb598d8210d /net/batman-adv/icmp_socket.c | |
parent | batman-adv: refactor batadv_tt_local_event() (diff) | |
download | linux-41ab6c4891ed4cdd855ae569924acb1da424a614.tar.xz linux-41ab6c4891ed4cdd855ae569924acb1da424a614.zip |
batman-adv: don't deal with NET_IP_ALIGN manually
Instead of dealing with NET_IP_ALIGN during allocation and
headroom reservation, it is possible to use
netdev_alloc_skb_ip_align() which transparently allocate
and reserve the correct amount of data
Signed-off-by: Antonio Quartulli <ordex@autistici.org>
Signed-off-by: Marek Lindner <lindner_marek@yahoo.de>
Diffstat (limited to 'net/batman-adv/icmp_socket.c')
-rw-r--r-- | net/batman-adv/icmp_socket.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/net/batman-adv/icmp_socket.c b/net/batman-adv/icmp_socket.c index 0ba6c899b2d3..b27508b8085c 100644 --- a/net/batman-adv/icmp_socket.c +++ b/net/batman-adv/icmp_socket.c @@ -177,13 +177,13 @@ static ssize_t batadv_socket_write(struct file *file, const char __user *buff, if (len >= sizeof(struct batadv_icmp_packet_rr)) packet_len = sizeof(struct batadv_icmp_packet_rr); - skb = dev_alloc_skb(packet_len + ETH_HLEN + NET_IP_ALIGN); + skb = netdev_alloc_skb_ip_align(NULL, packet_len + ETH_HLEN); if (!skb) { len = -ENOMEM; goto out; } - skb_reserve(skb, ETH_HLEN + NET_IP_ALIGN); + skb_reserve(skb, ETH_HLEN); icmp_packet = (struct batadv_icmp_packet_rr *)skb_put(skb, packet_len); if (copy_from_user(icmp_packet, buff, packet_len)) { |