netback: remove dead code

Remove the xen_net_read_mac function since it's not used anymore.

Sponsored by: Citrix Systems R&D
This commit is contained in:
royger 2014-08-22 15:34:56 +00:00
parent 7c568a9796
commit 092b402d10

View File

@ -152,7 +152,6 @@ static void xnb_attach_failed(struct xnb_softc *xnb,
static int xnb_shutdown(struct xnb_softc *xnb);
static int create_netdev(device_t dev);
static int xnb_detach(device_t dev);
static int xen_net_read_mac(device_t dev, uint8_t mac[]);
static int xnb_ifmedia_upd(struct ifnet *ifp);
static void xnb_ifmedia_sts(struct ifnet *ifp, struct ifmediareq *ifmr);
static void xnb_intr(void *arg);
@ -2467,42 +2466,6 @@ xnb_ifinit(void *xsc)
mtx_unlock(&xnb->sc_lock);
}
/**
* Read the 'mac' node at the given device's node in the store, and parse that
* as colon-separated octets, placing result the given mac array. mac must be
* a preallocated array of length ETHER_ADDR_LEN ETH_ALEN (as declared in
* net/ethernet.h).
* Return 0 on success, or errno on error.
*/
static int
xen_net_read_mac(device_t dev, uint8_t mac[])
{
char *s, *e, *macstr;
const char *path;
int error = 0;
int i;
path = xenbus_get_node(dev);
error = xs_read(XST_NIL, path, "mac", NULL, (void **) &macstr);
if (error != 0) {
xenbus_dev_fatal(dev, error, "parsing %s/mac", path);
} else {
s = macstr;
for (i = 0; i < ETHER_ADDR_LEN; i++) {
mac[i] = strtoul(s, &e, 16);
if (s == e || (e[0] != ':' && e[0] != 0)) {
error = ENOENT;
break;
}
s = &e[1];
}
free(macstr, M_XENBUS);
}
return error;
}
/**
* Callback used by the generic networking code to tell us when our carrier
* state has changed. Since we don't have a physical carrier, we don't care