if_ndis.c (125718) | if_ndis.c (126706) |
---|---|
1/* 2 * Copyright (c) 2003 3 * Bill Paul <wpaul@windriver.com>. All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 17 unchanged lines hidden (view full) --- 26 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 27 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 28 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 29 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF 30 * THE POSSIBILITY OF SUCH DAMAGE. 31 */ 32 33#include <sys/cdefs.h> | 1/* 2 * Copyright (c) 2003 3 * Bill Paul <wpaul@windriver.com>. All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 17 unchanged lines hidden (view full) --- 26 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 27 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 28 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 29 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF 30 * THE POSSIBILITY OF SUCH DAMAGE. 31 */ 32 33#include <sys/cdefs.h> |
34__FBSDID("$FreeBSD: head/sys/dev/if_ndis/if_ndis.c 125718 2004-02-11 21:53:40Z wpaul $"); | 34__FBSDID("$FreeBSD: head/sys/dev/if_ndis/if_ndis.c 126706 2004-03-07 02:49:06Z wpaul $"); |
35 36#include "opt_bdg.h" 37 38#include <sys/param.h> 39#include <sys/systm.h> 40#include <sys/sockio.h> 41#include <sys/mbuf.h> 42#include <sys/malloc.h> --- 27 unchanged lines hidden (view full) --- 70 71#include <compat/ndis/pe_var.h> 72#include <compat/ndis/resource_var.h> 73#include <compat/ndis/ntoskrnl_var.h> 74#include <compat/ndis/ndis_var.h> 75#include <compat/ndis/cfg_var.h> 76#include <dev/if_ndis/if_ndisvar.h> 77 | 35 36#include "opt_bdg.h" 37 38#include <sys/param.h> 39#include <sys/systm.h> 40#include <sys/sockio.h> 41#include <sys/mbuf.h> 42#include <sys/malloc.h> --- 27 unchanged lines hidden (view full) --- 70 71#include <compat/ndis/pe_var.h> 72#include <compat/ndis/resource_var.h> 73#include <compat/ndis/ntoskrnl_var.h> 74#include <compat/ndis/ndis_var.h> 75#include <compat/ndis/cfg_var.h> 76#include <dev/if_ndis/if_ndisvar.h> 77 |
78#define NDIS_IMAGE 79#define NDIS_REGVALS 80 |
|
78#include "ndis_driver_data.h" 79 | 81#include "ndis_driver_data.h" 82 |
80MODULE_DEPEND(ndis, pci, 1, 1, 1); 81MODULE_DEPEND(ndis, ether, 1, 1, 1); 82MODULE_DEPEND(ndis, wlan, 1, 1, 1); 83MODULE_DEPEND(ndis, ndisapi, 1, 1, 1); | 83int ndis_attach (device_t); 84int ndis_detach (device_t); 85int ndis_suspend (device_t); 86int ndis_resume (device_t); 87void ndis_shutdown (device_t); |
84 | 88 |
85/* 86 * Various supported device vendors/types and their names. 87 * These are defined in the ndis_driver_data.h file. 88 */ 89static struct ndis_type ndis_devs[] = { 90#ifdef NDIS_DEV_TABLE 91 NDIS_DEV_TABLE 92#endif 93 { 0, 0, 0, NULL } 94}; 95 96static int ndis_probe (device_t); 97static int ndis_attach (device_t); 98static int ndis_detach (device_t); 99static int ndis_suspend (device_t); 100static int ndis_resume (device_t); 101 | |
102static __stdcall void ndis_txeof (ndis_handle, 103 ndis_packet *, ndis_status); 104static __stdcall void ndis_rxeof (ndis_handle, 105 ndis_packet **, uint32_t); 106static __stdcall void ndis_linksts (ndis_handle, 107 ndis_status, void *, uint32_t); 108static __stdcall void ndis_linksts_done (ndis_handle); 109 --- 4 unchanged lines hidden (view full) --- 114static void ndis_start (struct ifnet *); 115static void ndis_starttask (void *); 116static int ndis_ioctl (struct ifnet *, u_long, caddr_t); 117static int ndis_wi_ioctl_get (struct ifnet *, u_long, caddr_t); 118static int ndis_wi_ioctl_set (struct ifnet *, u_long, caddr_t); 119static void ndis_init (void *); 120static void ndis_stop (struct ndis_softc *); 121static void ndis_watchdog (struct ifnet *); | 89static __stdcall void ndis_txeof (ndis_handle, 90 ndis_packet *, ndis_status); 91static __stdcall void ndis_rxeof (ndis_handle, 92 ndis_packet **, uint32_t); 93static __stdcall void ndis_linksts (ndis_handle, 94 ndis_status, void *, uint32_t); 95static __stdcall void ndis_linksts_done (ndis_handle); 96 --- 4 unchanged lines hidden (view full) --- 101static void ndis_start (struct ifnet *); 102static void ndis_starttask (void *); 103static int ndis_ioctl (struct ifnet *, u_long, caddr_t); 104static int ndis_wi_ioctl_get (struct ifnet *, u_long, caddr_t); 105static int ndis_wi_ioctl_set (struct ifnet *, u_long, caddr_t); 106static void ndis_init (void *); 107static void ndis_stop (struct ndis_softc *); 108static void ndis_watchdog (struct ifnet *); |
122static void ndis_shutdown (device_t); | |
123static int ndis_ifmedia_upd (struct ifnet *); 124static void ndis_ifmedia_sts (struct ifnet *, struct ifmediareq *); 125static int ndis_get_assoc (struct ndis_softc *, ndis_wlan_bssid_ex *); 126static int ndis_probe_offload (struct ndis_softc *); 127static int ndis_set_offload (struct ndis_softc *); 128static void ndis_getstate_80211 (struct ndis_softc *); 129static void ndis_setstate_80211 (struct ndis_softc *); 130static void ndis_media_status (struct ifnet *, struct ifmediareq *); 131 132static void ndis_setmulti (struct ndis_softc *); 133static void ndis_map_sclist (void *, bus_dma_segment_t *, 134 int, bus_size_t, int); 135 136extern struct mtx_pool *ndis_mtxpool; 137 | 109static int ndis_ifmedia_upd (struct ifnet *); 110static void ndis_ifmedia_sts (struct ifnet *, struct ifmediareq *); 111static int ndis_get_assoc (struct ndis_softc *, ndis_wlan_bssid_ex *); 112static int ndis_probe_offload (struct ndis_softc *); 113static int ndis_set_offload (struct ndis_softc *); 114static void ndis_getstate_80211 (struct ndis_softc *); 115static void ndis_setstate_80211 (struct ndis_softc *); 116static void ndis_media_status (struct ifnet *, struct ifmediareq *); 117 118static void ndis_setmulti (struct ndis_softc *); 119static void ndis_map_sclist (void *, bus_dma_segment_t *, 120 int, bus_size_t, int); 121 122extern struct mtx_pool *ndis_mtxpool; 123 |
138static device_method_t ndis_methods[] = { 139 /* Device interface */ 140 DEVMETHOD(device_probe, ndis_probe), 141 DEVMETHOD(device_attach, ndis_attach), 142 DEVMETHOD(device_detach, ndis_detach), 143 DEVMETHOD(device_shutdown, ndis_shutdown), 144 DEVMETHOD(device_suspend, ndis_suspend), 145 DEVMETHOD(device_resume, ndis_resume), 146 147 { 0, 0 } 148}; 149 150static driver_t ndis_driver = { 151#ifdef NDIS_DEVNAME 152 NDIS_DEVNAME, 153#else 154 "ndis", 155#endif 156 ndis_methods, 157 sizeof(struct ndis_softc) 158}; 159 160static devclass_t ndis_devclass; 161 162#ifdef NDIS_MODNAME 163#define NDIS_MODNAME_OVERRIDE_PCI(x) \ 164 DRIVER_MODULE(x, pci, ndis_driver, ndis_devclass, 0, 0) 165#define NDIS_MODNAME_OVERRIDE_CARDBUS(x) \ 166 DRIVER_MODULE(x, cardbus, ndis_driver, ndis_devclass, 0, 0) 167NDIS_MODNAME_OVERRIDE_PCI(NDIS_MODNAME); 168NDIS_MODNAME_OVERRIDE_CARDBUS(NDIS_MODNAME); 169#else 170DRIVER_MODULE(ndis, pci, ndis_driver, ndis_devclass, 0, 0); 171DRIVER_MODULE(ndis, cardbus, ndis_driver, ndis_devclass, 0, 0); 172#endif 173 | |
174/* 175 * Program the 64-bit multicast hash filter. 176 */ 177static void 178ndis_setmulti(sc) 179 struct ndis_softc *sc; 180{ 181 struct ifnet *ifp; --- 59 unchanged lines hidden (view full) --- 241 error = ndis_set_info(sc, OID_GEN_CURRENT_PACKET_FILTER, 242 &sc->ndis_filter, &len); 243 if (error) 244 device_printf (sc->ndis_dev, "set filter failed: %d\n", error); 245 246 return; 247} 248 | 124/* 125 * Program the 64-bit multicast hash filter. 126 */ 127static void 128ndis_setmulti(sc) 129 struct ndis_softc *sc; 130{ 131 struct ifnet *ifp; --- 59 unchanged lines hidden (view full) --- 191 error = ndis_set_info(sc, OID_GEN_CURRENT_PACKET_FILTER, 192 &sc->ndis_filter, &len); 193 if (error) 194 device_printf (sc->ndis_dev, "set filter failed: %d\n", error); 195 196 return; 197} 198 |
249/* 250 * Probe for an NDIS device. Check the PCI vendor and device 251 * IDs against our list and return a device name if we find a match. 252 */ | |
253static int | 199static int |
254ndis_probe(dev) 255 device_t dev; 256{ 257 struct ndis_type *t; 258 259 t = ndis_devs; 260 261 while(t->ndis_name != NULL) { 262 if ((pci_get_vendor(dev) == t->ndis_vid) && 263 (pci_get_device(dev) == t->ndis_did) && 264 ((pci_read_config(dev, PCIR_SUBVEND_0, 4) == 265 t->ndis_subsys) || t->ndis_subsys == 0)) { 266 device_set_desc(dev, t->ndis_name); 267 return(0); 268 } 269 t++; 270 } 271 272 return(ENXIO); 273} 274 275static int | |
276ndis_set_offload(sc) 277 struct ndis_softc *sc; 278{ 279 ndis_task_offload *nto; 280 ndis_task_offload_hdr *ntoh; 281 ndis_task_tcpip_csum *nttc; 282 struct ifnet *ifp; 283 int len, error; --- 139 unchanged lines hidden (view full) --- 423 free(ntoh, M_TEMP); 424 return(0); 425} 426 427/* 428 * Attach the interface. Allocate softc structures, do ifmedia 429 * setup and ethernet/BPF attach. 430 */ | 200ndis_set_offload(sc) 201 struct ndis_softc *sc; 202{ 203 ndis_task_offload *nto; 204 ndis_task_offload_hdr *ntoh; 205 ndis_task_tcpip_csum *nttc; 206 struct ifnet *ifp; 207 int len, error; --- 139 unchanged lines hidden (view full) --- 347 free(ntoh, M_TEMP); 348 return(0); 349} 350 351/* 352 * Attach the interface. Allocate softc structures, do ifmedia 353 * setup and ethernet/BPF attach. 354 */ |
431static int | 355int |
432ndis_attach(dev) 433 device_t dev; 434{ 435 u_char eaddr[ETHER_ADDR_LEN]; | 356ndis_attach(dev) 357 device_t dev; 358{ 359 u_char eaddr[ETHER_ADDR_LEN]; |
436 struct ndis_softc *sc; | 360 struct ndis_softc *sc; |
437 struct ifnet *ifp = NULL; | 361 struct ifnet *ifp = NULL; |
438 int unit, error = 0, rid, len; | |
439 void *img; | 362 void *img; |
440 struct ndis_type *t; 441 int i, devidx = 0, defidx = 0; 442 struct resource_list *rl; 443 struct resource_list_entry *rle; | 363 int error = 0, len; 364 int i; |
444 445 sc = device_get_softc(dev); | 365 366 sc = device_get_softc(dev); |
446 unit = device_get_unit(dev); 447 sc->ndis_dev = dev; | |
448 449 sc->ndis_mtx = mtx_pool_alloc(ndis_mtxpool); 450 sc->ndis_intrmtx = mtx_pool_alloc(ndis_mtxpool); 451 | 367 368 sc->ndis_mtx = mtx_pool_alloc(ndis_mtxpool); 369 sc->ndis_intrmtx = mtx_pool_alloc(ndis_mtxpool); 370 |
452 /* 453 * Map control/status registers. 454 */ 455 456 pci_enable_busmaster(dev); 457 458 rl = BUS_GET_RESOURCE_LIST(device_get_parent(dev), dev); 459 if (rl != NULL) { 460 SLIST_FOREACH(rle, rl, link) { 461 switch (rle->type) { 462 case SYS_RES_IOPORT: 463 sc->ndis_io_rid = rle->rid; 464 sc->ndis_res_io = bus_alloc_resource(dev, 465 SYS_RES_IOPORT, &sc->ndis_io_rid, 466 0, ~0, 1, RF_ACTIVE); 467 if (sc->ndis_res_io == NULL) { 468 device_printf(dev, 469 "couldn't map iospace\n"); 470 error = ENXIO; 471 goto fail; 472 } 473 break; 474 case SYS_RES_MEMORY: 475 if (sc->ndis_res_altmem != NULL && 476 sc->ndis_res_mem != NULL) { 477 device_printf(dev, 478 "too many memory resources\n"); 479 error = ENXIO; 480 goto fail; 481 } 482 if (rle->rid == PCIR_BAR(2)) { 483 sc->ndis_altmem_rid = rle->rid; 484 sc->ndis_res_altmem = 485 bus_alloc_resource(dev, 486 SYS_RES_MEMORY, 487 &sc->ndis_altmem_rid, 488 0, ~0, 1, RF_ACTIVE); 489 if (sc->ndis_res_altmem == NULL) { 490 device_printf(dev, 491 "couldn't map alt " 492 "memory\n"); 493 error = ENXIO; 494 goto fail; 495 } 496 } else { 497 sc->ndis_mem_rid = rle->rid; 498 sc->ndis_res_mem = 499 bus_alloc_resource(dev, 500 SYS_RES_MEMORY, 501 &sc->ndis_mem_rid, 502 0, ~0, 1, RF_ACTIVE); 503 if (sc->ndis_res_mem == NULL) { 504 device_printf(dev, 505 "couldn't map memory\n"); 506 error = ENXIO; 507 goto fail; 508 } 509 } 510 break; 511 case SYS_RES_IRQ: 512 rid = rle->rid; 513 sc->ndis_irq = bus_alloc_resource(dev, 514 SYS_RES_IRQ, &rid, 0, ~0, 1, 515 RF_SHAREABLE | RF_ACTIVE); 516 if (sc->ndis_irq == NULL) { 517 device_printf(dev, 518 "couldn't map interrupt\n"); 519 error = ENXIO; 520 goto fail; 521 } 522 break; 523 default: 524 break; 525 } 526 sc->ndis_rescnt++; 527 } 528 } 529 | |
530 /* 531 * Hook interrupt early, since calling the driver's 532 * init routine may trigger an interrupt. 533 */ 534 535 error = bus_setup_intr(dev, sc->ndis_irq, INTR_TYPE_NET, 536 ndis_intr, sc, &sc->ndis_intrhand); 537 538 if (error) { 539 device_printf(dev, "couldn't set up irq\n"); 540 goto fail; 541 } 542 | 371 /* 372 * Hook interrupt early, since calling the driver's 373 * init routine may trigger an interrupt. 374 */ 375 376 error = bus_setup_intr(dev, sc->ndis_irq, INTR_TYPE_NET, 377 ndis_intr, sc, &sc->ndis_intrhand); 378 379 if (error) { 380 device_printf(dev, "couldn't set up irq\n"); 381 goto fail; 382 } 383 |
543 /* 544 * Allocate the parent bus DMA tag appropriate for PCI. 545 */ 546#define NDIS_NSEG_NEW 32 547 error = bus_dma_tag_create(NULL, /* parent */ 548 1, 0, /* alignment, boundary */ 549 BUS_SPACE_MAXADDR_32BIT,/* lowaddr */ 550 BUS_SPACE_MAXADDR, /* highaddr */ 551 NULL, NULL, /* filter, filterarg */ 552 MAXBSIZE, NDIS_NSEG_NEW,/* maxsize, nsegments */ 553 BUS_SPACE_MAXSIZE_32BIT,/* maxsegsize */ 554 BUS_DMA_ALLOCNOW, /* flags */ 555 NULL, NULL, /* lockfunc, lockarg */ 556 &sc->ndis_parent_tag); 557 558 if (error) 559 goto fail; 560 561 img = drv_data; | |
562 sc->ndis_regvals = ndis_regvals; | 384 sc->ndis_regvals = ndis_regvals; |
563 sc->ndis_iftype = PCIBus; | |
564 | 385 |
565 /* Figure out exactly which device we matched. */ 566 567 t = ndis_devs; 568 569 while(t->ndis_name != NULL) { 570 if ((pci_get_vendor(dev) == t->ndis_vid) && 571 (pci_get_device(dev) == t->ndis_did)) { 572 if (t->ndis_subsys == 0) 573 defidx = devidx; 574 else { 575 if (t->ndis_subsys == 576 pci_read_config(dev, PCIR_SUBVEND_0, 4)) 577 break; 578 } 579 } 580 t++; 581 devidx++; 582 } 583 584 if (ndis_devs[devidx].ndis_name == NULL) 585 sc->ndis_devidx = defidx; 586 else 587 sc->ndis_devidx = devidx; 588 | |
589 sysctl_ctx_init(&sc->ndis_ctx); 590 591 /* Create sysctl registry nodes */ 592 ndis_create_sysctls(sc); 593 594 /* Set up driver image in memory. */ | 386 sysctl_ctx_init(&sc->ndis_ctx); 387 388 /* Create sysctl registry nodes */ 389 ndis_create_sysctls(sc); 390 391 /* Set up driver image in memory. */ |
392 img = drv_data; |
|
595 ndis_load_driver((vm_offset_t)img, sc); 596 597 /* Tell the user what version of the API the driver is using. */ 598 device_printf(dev, "NDIS API version: %d.%d\n", 599 sc->ndis_chars.nmc_version_major, 600 sc->ndis_chars.nmc_version_minor); 601 602 /* Do resource conversion. */ --- 14 unchanged lines hidden (view full) --- 617 ndis_reset_nic(sc); 618 619 /* 620 * Get station address from the driver. 621 */ 622 len = sizeof(eaddr); 623 ndis_get_info(sc, OID_802_3_CURRENT_ADDRESS, &eaddr, &len); 624 | 393 ndis_load_driver((vm_offset_t)img, sc); 394 395 /* Tell the user what version of the API the driver is using. */ 396 device_printf(dev, "NDIS API version: %d.%d\n", 397 sc->ndis_chars.nmc_version_major, 398 sc->ndis_chars.nmc_version_minor); 399 400 /* Do resource conversion. */ --- 14 unchanged lines hidden (view full) --- 415 ndis_reset_nic(sc); 416 417 /* 418 * Get station address from the driver. 419 */ 420 len = sizeof(eaddr); 421 ndis_get_info(sc, OID_802_3_CURRENT_ADDRESS, &eaddr, &len); 422 |
625 sc->ndis_unit = unit; | |
626 bcopy(eaddr, (char *)&sc->arpcom.ac_enaddr, ETHER_ADDR_LEN); 627 628 /* 629 * Figure out of we're allowed to use multipacket sends 630 * with this driver, and if so, how many. 631 */ 632 633 if (sc->ndis_chars.nmc_sendsingle_func && --- 261 unchanged lines hidden (view full) --- 895 896/* 897 * Shutdown hardware and free up resources. This can be called any 898 * time after the mutex has been initialized. It is called in both 899 * the error case in attach and the normal detach case so it needs 900 * to be careful about only freeing resources that have actually been 901 * allocated. 902 */ | 423 bcopy(eaddr, (char *)&sc->arpcom.ac_enaddr, ETHER_ADDR_LEN); 424 425 /* 426 * Figure out of we're allowed to use multipacket sends 427 * with this driver, and if so, how many. 428 */ 429 430 if (sc->ndis_chars.nmc_sendsingle_func && --- 261 unchanged lines hidden (view full) --- 692 693/* 694 * Shutdown hardware and free up resources. This can be called any 695 * time after the mutex has been initialized. It is called in both 696 * the error case in attach and the normal detach case so it needs 697 * to be careful about only freeing resources that have actually been 698 * allocated. 699 */ |
903static int | 700int |
904ndis_detach(dev) 905 device_t dev; 906{ 907 struct ndis_softc *sc; 908 struct ifnet *ifp; 909 910 sc = device_get_softc(dev); 911 KASSERT(mtx_initialized(sc->ndis_mtx), --- 30 unchanged lines hidden (view full) --- 942 bus_release_resource(dev, SYS_RES_MEMORY, 943 sc->ndis_altmem_rid, sc->ndis_res_altmem); 944 945 if (sc->ndis_sc) 946 ndis_destroy_dma(sc); 947 948 ndis_unload_driver((void *)ifp); 949 | 701ndis_detach(dev) 702 device_t dev; 703{ 704 struct ndis_softc *sc; 705 struct ifnet *ifp; 706 707 sc = device_get_softc(dev); 708 KASSERT(mtx_initialized(sc->ndis_mtx), --- 30 unchanged lines hidden (view full) --- 739 bus_release_resource(dev, SYS_RES_MEMORY, 740 sc->ndis_altmem_rid, sc->ndis_res_altmem); 741 742 if (sc->ndis_sc) 743 ndis_destroy_dma(sc); 744 745 ndis_unload_driver((void *)ifp); 746 |
950 bus_dma_tag_destroy(sc->ndis_parent_tag); | 747 if (sc->ndis_iftype == PCIBus) 748 bus_dma_tag_destroy(sc->ndis_parent_tag); |
951 952 sysctl_ctx_free(&sc->ndis_ctx); 953 954 return(0); 955} 956 | 749 750 sysctl_ctx_free(&sc->ndis_ctx); 751 752 return(0); 753} 754 |
957static int | 755int |
958ndis_suspend(dev) 959 device_t dev; 960{ 961 struct ndis_softc *sc; 962 struct ifnet *ifp; 963 964 sc = device_get_softc(dev); 965 ifp = &sc->arpcom.ac_if; 966 967#ifdef notdef 968 if (ifp->if_flags & IFF_UP) 969 ndis_stop(sc); 970#endif 971 972 return(0); 973} 974 | 756ndis_suspend(dev) 757 device_t dev; 758{ 759 struct ndis_softc *sc; 760 struct ifnet *ifp; 761 762 sc = device_get_softc(dev); 763 ifp = &sc->arpcom.ac_if; 764 765#ifdef notdef 766 if (ifp->if_flags & IFF_UP) 767 ndis_stop(sc); 768#endif 769 770 return(0); 771} 772 |
975static int | 773int |
976ndis_resume(dev) 977 device_t dev; 978{ 979 struct ndis_softc *sc; 980 struct ifnet *ifp; 981 982 sc = device_get_softc(dev); 983 ifp = &sc->arpcom.ac_if; --- 1252 unchanged lines hidden (view full) --- 2236 2237 return; 2238} 2239 2240/* 2241 * Stop all chip I/O so that the kernel's probe routines don't 2242 * get confused by errant DMAs when rebooting. 2243 */ | 774ndis_resume(dev) 775 device_t dev; 776{ 777 struct ndis_softc *sc; 778 struct ifnet *ifp; 779 780 sc = device_get_softc(dev); 781 ifp = &sc->arpcom.ac_if; --- 1252 unchanged lines hidden (view full) --- 2034 2035 return; 2036} 2037 2038/* 2039 * Stop all chip I/O so that the kernel's probe routines don't 2040 * get confused by errant DMAs when rebooting. 2041 */ |
2244static void | 2042void |
2245ndis_shutdown(dev) 2246 device_t dev; 2247{ 2248 struct ndis_softc *sc; 2249 2250 sc = device_get_softc(dev); 2251 ndis_shutdown_nic(sc); 2252 2253 return; 2254} | 2043ndis_shutdown(dev) 2044 device_t dev; 2045{ 2046 struct ndis_softc *sc; 2047 2048 sc = device_get_softc(dev); 2049 ndis_shutdown_nic(sc); 2050 2051 return; 2052} |