]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - include/net/ip.h
usb: renesas_usbhs: don't re-allocation pipe buffer
[karo-tx-linux.git] / include / net / ip.h
index a4f631108c54eec5e80b4cb6c44b69fc0f984e6f..7c416583b71049cbc15b5492e5f2aa1a85254dd0 100644 (file)
@@ -339,6 +339,14 @@ static inline void ip_ib_mc_map(__be32 naddr, const unsigned char *broadcast, ch
        buf[16] = addr & 0x0f;
 }
 
+static inline void ip_ipgre_mc_map(__be32 naddr, const unsigned char *broadcast, char *buf)
+{
+       if ((broadcast[0] | broadcast[1] | broadcast[2] | broadcast[3]) != 0)
+               memcpy(buf, broadcast, 4);
+       else
+               memcpy(buf, &naddr, sizeof(naddr));
+}
+
 #if defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE)
 #include <linux/ipv6.h>
 #endif