msm_rmnet: merge support for RAWIP msm_rmnet device

Add to support for msm_rmnet device using ARPHRD_RAWIP.

Change-Id: Ie1e5433f440b26b644cccb18083ef325129f7942
Acked-by: Andrew Richardson <randrew@qualcomm.com>
Signed-off-by: Abhijeet Dharmapurikar <adharmap@codeaurora.org>
This commit is contained in:
Abhijeet Dharmapurikar
2010-09-15 13:08:00 -06:00
committed by Stephen Boyd
parent 50a332f764
commit 5cf8a4bc7f
2 changed files with 12 additions and 0 deletions

View File

@@ -59,6 +59,7 @@
#define ARPHRD_LAPB 516 /* LAPB */
#define ARPHRD_DDCMP 517 /* Digital's DDCMP protocol */
#define ARPHRD_RAWHDLC 518 /* Raw HDLC */
#define ARPHRD_RAWIP 530 /* Raw IP */
#define ARPHRD_TUNNEL 768 /* IPIP tunnel */
#define ARPHRD_TUNNEL6 769 /* IP6IP6 tunnel */

View File

@@ -1579,6 +1579,16 @@ static int ipv6_generate_eui64(u8 *eui, struct net_device *dev)
return addrconf_ifid_sit(eui, dev);
case ARPHRD_IPGRE:
return addrconf_ifid_gre(eui, dev);
case ARPHRD_RAWIP: {
struct in6_addr lladdr;
if (ipv6_get_lladdr(dev, &lladdr, IFA_F_TENTATIVE))
get_random_bytes(eui, 8);
else
memcpy(eui, lladdr.s6_addr + 8, 8);
return 0;
}
}
return -1;
}
@@ -2439,6 +2449,7 @@ static void addrconf_dev_config(struct net_device *dev)
(dev->type != ARPHRD_FDDI) &&
(dev->type != ARPHRD_IEEE802_TR) &&
(dev->type != ARPHRD_ARCNET) &&
(dev->type != ARPHRD_RAWIP) &&
(dev->type != ARPHRD_INFINIBAND)) {
/* Alas, we support only Ethernet autoconfiguration. */
return;