[Madwifi-cvs] madwifi/ath if_ath_pci.c,1.5,1.6 if_ath_pci.h,1.1,1.2 version.h,1.16,1.17
Status: Beta
Brought to you by:
otaku
From: Sam L. <sam...@us...> - 2004-12-29 05:38:23
|
Update of /cvsroot/madwifi/madwifi/ath In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27511 Modified Files: if_ath_pci.c if_ath_pci.h version.h Log Message: Add support for 2.6.10: o add write-arounds for pci api changes o finesse pci_register_driver api change Submitted by: many (looks like Olivier Fauchon was the first) Index: if_ath_pci.c =================================================================== RCS file: /cvsroot/madwifi/madwifi/ath/if_ath_pci.c,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** if_ath_pci.c 15 Nov 2004 03:53:27 -0000 1.5 --- if_ath_pci.c 29 Dec 2004 05:38:07 -0000 1.6 *************** *** 59,62 **** --- 59,63 ---- #include "if_athvar.h" + #include "if_ath_pci.h" #if (LINUX_VERSION_CODE < KERNEL_VERSION(2,4,0)) *************** *** 240,247 **** { struct net_device *dev = pci_get_drvdata(pdev); - struct ath_pci_softc *sc = dev->priv; ath_suspend(dev); ! pci_save_state(pdev, sc->aps_pmstate); pci_disable_device(pdev); pci_set_power_state(pdev, 3); --- 241,248 ---- { struct net_device *dev = pci_get_drvdata(pdev); ath_suspend(dev); ! PCI_SAVE_STATE(pdev, ! ((struct ath_pci_softc *)dev->priv)->aps_pmstate); pci_disable_device(pdev); pci_set_power_state(pdev, 3); *************** *** 254,262 **** { struct net_device *dev = pci_get_drvdata(pdev); - struct ath_pci_softc *sc = dev->priv; u32 val; pci_enable_device(pdev); ! pci_restore_state(pdev, sc->aps_pmstate); /* * Suspend/Resume resets the PCI configuration space, so we have to --- 255,263 ---- { struct net_device *dev = pci_get_drvdata(pdev); u32 val; pci_enable_device(pdev); ! PCI_RESTORE_STATE(pdev, ! ((struct ath_pci_softc *)dev->priv)->aps_pmstate); /* * Suspend/Resume resets the PCI configuration space, so we have to *************** *** 329,333 **** printk(KERN_INFO "%s: %s\n", dev_info, version); ! if (pci_register_driver(&ath_pci_drv_id) <= 0) { printk("ath_pci: No devices found, driver not installed.\n"); pci_unregister_driver(&ath_pci_drv_id); --- 330,334 ---- printk(KERN_INFO "%s: %s\n", dev_info, version); ! if (pci_register_driver(&ath_pci_drv_id) < 0) { printk("ath_pci: No devices found, driver not installed.\n"); pci_unregister_driver(&ath_pci_drv_id); Index: if_ath_pci.h =================================================================== RCS file: /cvsroot/madwifi/madwifi/ath/if_ath_pci.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** if_ath_pci.h 20 Aug 2004 21:30:29 -0000 1.1 --- if_ath_pci.h 29 Dec 2004 05:38:07 -0000 1.2 *************** *** 42,52 **** #include <linux/pci.h> ! #define bus_map_single pci_map_single ! #define bus_unmap_single pci_unmap_single ! #define bus_dma_sync_single pci_dma_sync_single ! #define bus_alloc_consistent pci_alloc_consistent ! #define bus_free_consistent pci_free_consistent ! #define BUS_DMA_FROMDEVICE PCI_DMA_FROMDEVICE ! #define BUS_DMA_TODEVICE PCI_DMA_TODEVICE #endif /* _DEV_ATH_PCI_H_ */ --- 42,60 ---- #include <linux/pci.h> ! #define bus_map_single pci_map_single ! #define bus_unmap_single pci_unmap_single ! #if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,9) ! #define bus_dma_sync_single pci_dma_sync_single_for_cpu ! #define PCI_SAVE_STATE(a,b) pci_save_state(a) ! #define PCI_RESTORE_STATE(a,b) pci_restore_state(a) ! #else ! #define bus_dma_sync_single pci_dma_sync_single ! #define PCI_SAVE_STATE(a,b) pci_save_state(a,b) ! #define PCI_RESTORE_STATE(a,b) pci_restore_state(a,b) ! #endif ! #define bus_alloc_consistent pci_alloc_consistent ! #define bus_free_consistent pci_free_consistent ! #define BUS_DMA_FROMDEVICE PCI_DMA_FROMDEVICE ! #define BUS_DMA_TODEVICE PCI_DMA_TODEVICE #endif /* _DEV_ATH_PCI_H_ */ Index: version.h =================================================================== RCS file: /cvsroot/madwifi/madwifi/ath/version.h,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** version.h 22 Oct 2004 20:03:45 -0000 1.16 --- version.h 29 Dec 2004 05:38:07 -0000 1.17 *************** *** 36,38 **** * $Id$ */ ! #define ATH_PCI_VERSION "0.9.4.11" --- 36,38 ---- * $Id$ */ ! #define ATH_PCI_VERSION "0.9.4.12" |