#include <sys/socketvar.h>
#include <sys/malloc.h>
#include <sys/sockio.h>
+#include <vm/vm_kern.h> /* for kernel_map */
+
#include <net/if.h>
#include <net/if_types.h>
#include <netat/adsp.h>
#include <netat/adsp_internal.h>
+#include <sys/kern_event.h>
+
/* globals */
at_ifaddr_t at_interfaces[IF_TOTAL_MAX];
elapp->ifState = LAP_ONLINE_ZONELESS;
elapp->startup_inprogress = FALSE;
- thread_wakeup(&elapp->startup_inprogress);
+ wakeup(&elapp->startup_inprogress);
dPrintf(D_M_ELAP, D_L_STARTUP_INFO, ("elap_online: ack 3\n"));
return;
}
struct atp_state *atp, *atp_next;
CCB *sp, *sp_next;
gref_t *gref;
- int i, s,
- active_skts = 0; /* count of active pids for non-socketized
+ vm_offset_t temp_rcb_data, temp_state_data;
+ int i, s, active_skts = 0; /* count of active pids for non-socketized
AppleTalk protocols */
extern int aarp_sched_probe();
}
}
}
-
+
/* ADSP */
for (sp = ccb_used_list; sp ; ) {
sp_next = sp->otccbLink;
}
at_state.flags = 0; /* make sure inits are done on restart */
+
+ wakeup(&ifID_home->startup_inprogress); /* if rtmp_router_start still starting up */
/* from original ddp_shutdown() */
routershutdown();
CleanupGlobals();
adspInited = 0;
}
+
+
dPrintf(D_M_DDP, D_L_VERBOSE, ("DDP shutdown completed"));
/*
elap_offline(ifID);
}
ddp_start();
+
+ /* free buffers for large arrays used by atp.
+ * to prevent a race condition if the funnel is dropped
+ * while calling kmem_free, the fields are grabbed and
+ * zeroed first.
+ */
+ if (atp_rcb_data != NULL) {
+ temp_rcb_data = (vm_offset_t)atp_rcb_data;
+ atp_rcb_data = NULL;
+ atp_rcb_free_list = NULL;
+ } else
+ temp_rcb_data = NULL;
+ if (atp_state_data != NULL) {
+ temp_state_data = (vm_offset_t)atp_state_data;
+ atp_state_data = NULL;
+ atp_free_list = NULL;
+ } else
+ temp_state_data = NULL;
+
+ if (temp_rcb_data)
+ kmem_free(kernel_map, temp_rcb_data, sizeof(struct atp_rcb) * NATP_RCB);
+ if (temp_state_data)
+ kmem_free(kernel_map, temp_state_data, sizeof(struct atp_state) * NATP_STATE);
splx(s);
return(0);
switch (ZipError) {
case 0 : /* success */
elapp->ifState = LAP_ONLINE;
+
+ /* Send event with zone info. */
+ atalk_post_msg(elapp->aa_ifp, KEV_ATALK_ZONEUPDATED, 0, &(elapp->ifZoneName));
+
break;
case ZIP_RE_AARP :
/* instead of goto re_aarp; */
appletalk node addr */
if ((elapp->startup_error = re_aarp(elapp))) {
elapp->startup_inprogress = FALSE;
- thread_wakeup(&elapp->startup_inprogress);
+ wakeup(&elapp->startup_inprogress);
dPrintf(D_M_ELAP, D_L_STARTUP_INFO,
("elap_online: ack 2\n"));
}
if (ZipError != ZIP_RE_AARP) {
elapp->startup_error = error;
elapp->startup_inprogress = FALSE;
- thread_wakeup(&elapp->startup_inprogress);
+ wakeup(&elapp->startup_inprogress);
dPrintf(D_M_ELAP, D_L_STARTUP_INFO,
("elap_online: ifZipError=%d\n", error));
}
ddp_rem_if(elapp);
elapp->startup_error = EADDRNOTAVAIL;
elapp->startup_inprogress = FALSE;
- thread_wakeup(&elapp->startup_inprogress);
+ wakeup(&elapp->startup_inprogress);
dPrintf(D_M_ELAP, D_L_STARTUP_INFO, ("elap_online: ack 2\n"));
} else {
dPrintf(D_M_ELAP,D_L_STARTUP_INFO,