ifa = ifnet_addrs[ifp->if_index - 1];
ifa = ifnet_addrs[ifp->if_index];
an_setdef(sc, areq)	struct an_softc		*sc;	struct an_req		*areq;{	struct sockaddr_dl	*sdl;	struct ifaddr		*ifa;	struct ifnet		*ifp;	struct an_ltv_genconfig	*cfg;	struct an_ltv_ssidlist	*ssid;	struct an_ltv_aplist	*ap;	struct an_ltv_gen	*sp;	extern struct ifaddr	**ifnet_addrs;	ifp = &sc->arpcom.ac_if;	switch (areq->an_type) {	case AN_RID_GENCONFIG:		cfg = (struct an_ltv_genconfig *)areq;		ifa = ifnet_addrs[ifp->if_index - 1];		sdl = (struct sockaddr_dl *)ifa->ifa_addr;		bcopy((char *)&cfg->an_macaddr, (char *)&sc->arpcom.ac_enaddr,		    ETHER_ADDR_LEN);		bcopy((char *)&cfg->an_macaddr, LLADDR(sdl), ETHER_ADDR_LEN);		bcopy((char *)cfg, (char *)&sc->an_config,			sizeof(struct an_ltv_genconfig));		break;	case AN_RID_SSIDLIST:		ssid = (struct an_ltv_ssidlist *)areq;		bcopy((char *)ssid, (char *)&sc->an_ssidlist,			sizeof(struct an_ltv_ssidlist));		break;	case AN_RID_APLIST:		ap = (struct an_ltv_aplist *)areq;		bcopy((char *)ap, (char *)&sc->an_aplist,			sizeof(struct an_ltv_aplist));		break;	case AN_RID_TX_SPEED:		sp = (struct an_ltv_gen *)areq;		sc->an_tx_rate = sp->an_val;		break;	default:		printf("%s: unknown RID: %x\n",		    sc->sc_dev.dv_xname, areq->an_type);		return;	}	/* Reinitialize the card. */	if (ifp->if_flags & IFF_UP)		an_init(sc);	return;}