[pxe] Create pxe_[de]activate() wrapper functions

Merge the pxe_set_netdev()+pxe_[un]hook_int1a() pattern into a single
pxe_[de]activate() call.
This commit is contained in:
Michael Brown
2009-06-28 20:08:58 +01:00
parent c2965b0fe7
commit 07b5be3341
4 changed files with 61 additions and 40 deletions

View File

@@ -296,11 +296,8 @@ PXENV_EXIT_t pxenv_start_undi ( struct s_PXENV_START_UNDI *start_undi ) {
}
DBG ( " using netdev %s", netdev->name );
/* Save as PXE net device */
pxe_set_netdev ( netdev );
/* Hook INT 1A */
pxe_hook_int1a();
/* Activate PXE */
pxe_activate ( netdev );
start_undi->Status = PXENV_STATUS_SUCCESS;
return PXENV_EXIT_SUCCESS;
@@ -313,11 +310,8 @@ PXENV_EXIT_t pxenv_start_undi ( struct s_PXENV_START_UNDI *start_undi ) {
PXENV_EXIT_t pxenv_stop_undi ( struct s_PXENV_STOP_UNDI *stop_undi ) {
DBG ( "PXENV_STOP_UNDI" );
/* Unhook INT 1A */
pxe_unhook_int1a();
/* Clear PXE net device */
pxe_set_netdev ( NULL );
/* Deactivate PXE */
pxe_deactivate();
/* Prepare for unload */
shutdown ( SHUTDOWN_BOOT );