Discussion:
patch for 2.6.23 (and 2.6.22?)
Martin Dauskardt
2007-09-14 13:20:54 UTC
Permalink
I tried to compile the trunk with a 2.6.23-rc5 and it failed. Although the
driver is announced to be for 2.6.22.x, there were some changes missing which
are necessary even for 2.6.22 (as far as I know).

With the following patch it compiles now without any error or warning, but I
can`t test it myself if it really works.

diff -ur linux-wlan-ng-trunk-130907-orig/src/prism2/driver/prism2_pci.c
linux-wlan-ng-trunk130907/src/prism2/driver/prism2_pci.c
--- linux-wlan-ng-trunk-130907-orig/src/prism2/driver/prism2_pci.c 2007-09-13
20:48:11.000000000 +0200
+++ linux-wlan-ng-trunk130907/src/prism2/driver/prism2_pci.c 2007-09-13
20:46:09.000000000 +0200
@@ -162,8 +162,13 @@
/* Shouldn't actually hook up the IRQ until we
* _know_ things are alright. A test routine would help.
*/
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,22)
request_irq(wlandev->netdev->irq, hfa384x_interrupt,
+ IRQF_SHARED, wlandev->name, wlandev);
+#else
+ request_irq(wlandev->netdev->irq, hfa384x_interrupt,
SA_SHIRQ, wlandev->name, wlandev);
+#endif

wlandev->msdstate = WLAN_MSD_HWPRESENT;

@@ -275,7 +280,11 @@
static int __init prism2pci_init(void)
{
WLAN_LOG_NOTICE("%s Loaded\n", version);
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,22)
+ return pci_register_driver(&prism2_pci_drv_id);
+#else
return pci_module_init(&prism2_pci_drv_id);
+#endif
};

static void __exit prism2pci_cleanup(void)
diff -ur linux-wlan-ng-trunk-130907-orig/src/prism2/driver/prism2_plx.c
linux-wlan-ng-trunk130907/src/prism2/driver/prism2_plx.c
--- linux-wlan-ng-trunk-130907-orig/src/prism2/driver/prism2_plx.c 2007-09-13
20:48:11.000000000 +0200
+++ linux-wlan-ng-trunk130907/src/prism2/driver/prism2_plx.c 2007-09-13
20:46:11.000000000 +0200
@@ -271,8 +271,13 @@
/* Shouldn't actually hook up the IRQ until we
* _know_ things are alright. A test routine would help.
*/
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,22)
request_irq(wlandev->netdev->irq, hfa384x_interrupt,
+ IRQF_SHARED, wlandev->name, wlandev);
+#else
+ request_irq(wlandev->netdev->irq, hfa384x_interrupt,
SA_SHIRQ, wlandev->name, wlandev);
+#endif

wlandev->msdstate = WLAN_MSD_HWPRESENT;

@@ -420,7 +425,12 @@
static int __init prism2plx_init(void)
{
WLAN_LOG_NOTICE("%s Loaded\n", version);
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,22)
+ return pci_register_driver(&prism2_plx_drv_id);
+#else
return pci_module_init(&prism2_plx_drv_id);
+#endif
+
};

static void __exit prism2plx_cleanup(void)

Loading...