[prev in list] [next in list] [prev in thread] [next in thread] 

List:       linux-wlan-devel
Subject:    [lwlan-devel] Nokia c110/c111 driver on 2.6
From:       Kliment Yanev <Kliment.Yanev () helsinki ! fi>
Date:       2004-03-13 10:55:05
Message-ID: 4052E889.2080606 () helsinki ! fi
[Download RAW message or body]

I have the nokia c110 802.11b card and I have been trying to get the 
driver to work on the 2.6 series kernels. I am not too familiar with c, 
but I know the basic syntax so I decided to try and modify the driver 
source and see if it will run. I compared the orinoco_cs driver in 2.4 
with the one in 2.6 to see what changes would be necessary, modified the 
makefile to run with kbuild and converted the binary-only part to be 
workable with kbuild. I then compiled the module and insmodded it, 
causing it to run quite happily. However, it doesn't seem to do 
anything. I think it fails to capture the card and associate with it. I 
am not at all familiar with the pcmcia subsystem in the kernel and 
thought that someone who has had experience with it would be on this 
list. Could you look at my changes to the code and see what might be wrong.

to reproduce situation:

1. Download nokia drivers from

http://www.nokia.com/nokia/0,5184,2718,00.html

(both binary and source parts)

2. Extract both files to same dir. Edit config.mk according to included 
instructions
3. Under src, extract the .a binary archive and rename all the .o files
there to .o_shipped.
4. Make a backup of src/Makefile as src/Makefile.bak
5. Apply the patch included here (ignore missing file errors)
6. run make in top-level dir
7. replace the original src/Makefile
8. Edit the now replaced makefile, removing $(MODULE) after install:
9. run make install in top-level dir
10. run make config_install in top-level dir
11. restart pcmcia and insert card

In my case, the driver gets inserted into the kernel, and nothing 
happens. Driver prints no messages. Even if you do not have the card, 
you can look at the code and see how badly I have messed it up (I have 
never before written any c code myself, nor am I familiar with the 
kernel pcmcia or the cardservices previously. I think that I have messed 
some function call to pcmcia.) I would be very grateful.


["nokia_patch.diff" (text/plain)]

Only in nokia_c110/: LICENSE-BINARY
Only in nokia_c110/: README.BINARY
Only in nokia_c110/bin: smac113.bin
Only in nokia_c110_patched/: c110_linux_guide.pdf
Only in nokia_c110_patched/: config.mk
Only in nokia_c110_patched/src: .dllc.o.cmd
Only in nokia_c110_patched/src: .dmodule.ko.cmd
Only in nokia_c110_patched/src: .dmodule.mod.o.cmd
Only in nokia_c110_patched/src: .dmodule.o.cmd
Only in nokia_c110_patched/src: .dtools.o.cmd
Only in nokia_c110_patched/src: .nokia-cs.ko.cmd
Only in nokia_c110_patched/src: .nokia-cs.mod.o.cmd
Only in nokia_c110_patched/src: .nokia-cs.o.cmd
Only in nokia_c110_patched/src: .nokia_c110.ko.cmd
Only in nokia_c110_patched/src: .nokia_c110.mod.o.cmd
Only in nokia_c110_patched/src: .nokia_c110.o.cmd
diff -ru nokia_c110/src/Makefile nokia_c110_patched/src/Makefile
--- nokia_c110/src/Makefile	2002-10-30 13:21:12.000000000 +0200
+++ nokia_c110_patched/src/Makefile	2004-03-09 23:28:44.000000000 +0200
@@ -1,68 +1,12 @@
-#
-# Copyright (c) Nokia Mobile Phones 2001. All Rights Reserved. 
-#
-# Nokia is a registered trademark of Nokia Corporation.
-# Other product and company names mentioned herein may be
-# trademarks or tradenames of their respective owners. 
-
-include ../config.mk
-
-# Options
-# -DD_DEBUG enables debug messages
-
-#OPTIONS = -DD_DEBUG
-
-CFLAGS = -O2 -Wall -Wstrict-prototypes -fomit-frame-pointer -pipe
-
-MODFLAGS = -D__KERNEL__ -DMODULE
-
-INCDIRS  = -I../include -I$(LINUX)/include $(DBE) $(DBM) 
-
-L_TARGET := nokia_cs.a
-
-# Module settings
-
-MODULE = nokia_c110.o
-MODDIR = $(ROOTDIR)/lib/modules/$(OS_RELEASE)
-
-# Locations ##############################################
-
-srcs = dllc.c dmodule.c dtools.c
-hdrs = $(wildcard *.h)
-objs = dllc.o dmodule.o dtools.o
-
-D_SRC := dhw.c dap.c dmgr.c dcfg.c
-D_OBJ := dhw.o dap.o dmgr.o dcfg.o
-
-ALL_O := $(objs) $(L_TARGET)
-
-# helps ##################################################
-
-REALOPTS = $(CFLAGS) $(MODFLAGS) $(INCDIRS) $(OPTIONS)
-
-# Targets ################################################
-
-all : $(MODULE) 
-
-run : install
-	/etc/rc.d/init.d/pcmcia restart
-
-$(srcs) : $(hdrs)
-
-$(objs) : $(srcs)
-	$(CC) $(REALOPTS) -c $(patsubst %.o, %.c, $@)
-	chmod -x $@
-
-$(MODULE) : $(objs) $(L_TARGET)
-	$(LD) -r -o $@ $(ALL_O)
-	chmod -x $@
-
-install : $(MODULE)
-	echo "Installing module "$(MODULE)" to "$(MODDIR)"/pcmcia"
-	mkdir -p $(MODDIR)/pcmcia
-	cp -p $(MODULE) $(MODDIR)/pcmcia
-	mkdir -p $(ROOTDIR)/etc/pcmcia/bin
-	cp ../bin/$(SMAC) $(ROOTDIR)/etc/pcmcia/bin/smac.bin
-
-clean: 
-	rm -f core *.o *~
+    ifneq ($(KERNELRELEASE),)
+    obj-m	:= nokia_c110.o
+    nokia_c110-y := dhw.o dap.o dmgr.o dcfg.o
+    nokia_c110-y += dllc.o dtools.o 
+
+    else
+    KDIR	:= /lib/modules/$(shell uname -r)/build
+    PWD		:= $(shell pwd)
+
+    default:
+	$(MAKE) -C $(KDIR) SUBDIRS=$(PWD) modules
+    endif
\ No newline at end of file
Only in nokia_c110_patched/src: Makefile.bak~
Only in nokia_c110_patched/src: Makefile.kbuild~
diff -ru nokia_c110/src/dllc.c nokia_c110_patched/src/dllc.c
--- nokia_c110/src/dllc.c	2002-10-30 13:21:12.000000000 +0200
+++ nokia_c110_patched/src/dllc.c	2004-02-29 09:19:21.000000000 +0200
@@ -153,6 +153,7 @@
 
         netif_start_queue(dev);
     
+	/*if (!try_module_get(&dev)) return -1;*/
         MOD_INC_USE_COUNT;
     
         return 0;
@@ -166,7 +167,8 @@
 
         netif_stop_queue(dev);
   
-        MOD_DEC_USE_COUNT;
+        /*module_put(&dev);*/
+	MOD_DEC_USE_COUNT;
     
         return 0;
 }
diff -ru nokia_c110/src/dmodule.c nokia_c110_patched/src/dmodule.c
--- nokia_c110/src/dmodule.c	2002-10-30 13:21:12.000000000 +0200
+++ nokia_c110_patched/src/dmodule.c	2004-03-09 23:48:51.000000000 +0200
@@ -31,16 +31,17 @@
 
 #define D_MODULE_MAIN
 
+/*#include <linux/init.h>*/
 #include "nokia_info.h"
 #include "nokia_priv.h"
 
 /* Static functions' declarations */
 static void d_free_nokia_cs (nokia_cs_t *);
 static int d_init_module (void);
-static void d_cleanup_module (void);
+static void d_exit_module (void);
 static dev_link_t * d_driver_attach (void);
 static void d_driver_detach (dev_link_t *dev_link );
-static void d_driver_release (UINT32 arg );
+static void d_driver_release (u_long arg );
 static int d_driver_event (event_t event , int priority , event_callback_args_t \
*args );  static void d_driver_config (dev_link_t *dev_link );
 static void d_driver_ISR (int irq , void * dev_id , struct pt_regs *regs );
@@ -52,12 +53,12 @@
 
 static dev_info_t dev_info = "nc110_cs";
 
-static void cs_error(client_handle_t handle, int func, int ret)
+static void cs_error_(client_handle_t handle, int func, int ret)
 {
         error_info_t error_info = { func, ret };
   
         DEBUG("CS_ERROR!\n");
-        CardServices(ReportError, handle, &error_info);
+        pcmcia_report_error(handle, &error_info);
 }
 
 static void d_free_nokia_cs(nokia_cs_t *nokia_cs)
@@ -96,11 +97,19 @@
         dfree(nokia_cs,sizeof(nokia_cs_t));
 }
 
-static int d_init_module(void)
+static struct pcmcia_driver nokia_driver = {
+	.owner		= THIS_MODULE,
+	.drv		= {
+		.name	= "nokia_c110",
+	},
+	.attach		= d_driver_attach,
+	.detach		= d_driver_detach,
+};
+/*static int d_init_module(void)
 {
-        servinfo_t servinfo;
+        servinfo_t servinfo;*/
 
-        EXPORT_NO_SYMBOLS;
+/*        EXPORT_NO_SYMBOLS;
 
         dmgr_print_version();
   
@@ -112,11 +121,34 @@
         }
 
         register_pcmcia_driver(&dev_info, &d_driver_attach, &d_driver_detach);
-  
+
+	pcmcia_register_driver(&nokia_driver);  
         return 0;
 }
+*/
+static int __init
+d_init_module(void)
+{ return pcmcia_register_driver(&nokia_driver);
+}
+
+static void __exit
+d_exit_module(void)
+{
+	pcmcia_unregister_driver(&nokia_driver);
+
+	if (dev_list)
+		DEBUG(0, "Nokia c110: Removing leftover devices.\n");
+	while (dev_list != NULL) {
+		if (dev_list->state & DEV_CONFIG)
+			d_driver_release((u_long) dev_list);
+		d_driver_detach(dev_list);
+	}
+}
+
+module_init(d_init_module);
+module_exit(d_exit_module);
 
-static void d_cleanup_module(void)
+/*static void d_cleanup_module(void)
 {
         NOTE("Unloading Nokia C110 WLAN module.\n");
   
@@ -137,7 +169,7 @@
                 ERROR("Nokia C110/C111 instances remain when unloading module.\n");
         }
 }
-
+*/
 static dev_link_t *d_driver_attach(void)
 {
         nokia_cs_t *nokia_cs;
@@ -147,7 +179,7 @@
         dev_node_t *dev_node = NULL;
         char mac_addr[MAC_ADDR_SIZE] = { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff};
       
-        NOTE("Card Inserted. Initializing...\n");
+        printk(KERN_ERR "Card Inserted. Initializing...\n");
   
         /* Do the basic structure */
   
@@ -177,10 +209,10 @@
         dev_node= &nokia_cs->node;
   
         /* Initialize the dev_link structure */
-
+/*	d_driver_release((u_long)dev_link);
         dev_link->release.function = &d_driver_release;
         dev_link->release.data = (UINT32) dev_link;
-          
+*/          
         /* Interrupt setup */
   
         dev_link->irq.Attributes = IRQ_TYPE_EXCLUSIVE | IRQ_HANDLE_PRESENT;
@@ -241,9 +273,9 @@
         strcpy(dev_node->dev_name, nokia_cs->driver_priv->llc->dev->name);
   
         /* Now register to PCMCIA */
-        ret = CardServices(RegisterClient, &dev_link->handle, &client_reg);
+        ret = pcmcia_register_client(&dev_link->handle, &client_reg);
         if (ret != CS_SUCCESS) {
-                cs_error(dev_link->handle, RegisterClient, ret);
+                cs_error_(dev_link->handle, RegisterClient, ret);
                 d_driver_detach(dev_link);
                 return NULL;
         }
@@ -323,10 +355,12 @@
   
         /* Break the link with Card Services */
   
-        if ((UINT32)dev_link->handle>0xffff){
+/*        if ((UINT32)dev_link->handle>0xffff){
                 CardServices(DeregisterClient, dev_link->handle);
-                DEBUG ("Client deregistered\n");
-        }
+                DEBUG ("Client deregistered\n");*/
+	  if (dev_link->handle)
+	  	pcmcia_deregister_client(dev_link->handle);
+
         dev_link->handle = 0;
   
         DEBUG("Card services freed.\n");
@@ -334,7 +368,15 @@
         /* Unlink device structure, and free it */
   
         *dev_linkp = dev_link->next;
-  
+	
+	struct net_device *dev = dev_link->priv;
+	if (dev_link->dev) {
+
+		DEBUG(0, "nokia_cs: About to unregister net device %p\n",
+		      dev);
+		unregister_netdev(dev);
+	}
+  	free_netdev(dev);
         /* Free Nokia_c110 specific things */
   
         DEBUG("Freeing Nokia_C110...\n");
@@ -347,9 +389,10 @@
         DEBUG("Detach complete!\n");
 }
 
-void d_driver_release(UINT32 arg)
+void d_driver_release(u_long arg)
 {
         dev_link_t *dev_link = (dev_link_t *)arg;
+      	/*dev_link_t *dev_link = arg*/
   
         DEBUG("d_driver_release called.\n");
   
@@ -365,14 +408,14 @@
         dev_link->dev = NULL;
   
         if (dev_link->win) {
-                CardServices(ReleaseWindow, dev_link->win);
+                pcmcia_release_window(dev_link->win);
         }
-        CardServices(ReleaseConfiguration, dev_link->handle);
+        pcmcia_release_configuration(dev_link->handle);
         if (dev_link->io.NumPorts1) {
-                CardServices(ReleaseIO, dev_link->handle, &dev_link->io);
+                pcmcia_release_io(dev_link->handle, &dev_link->io);
         }
         if (dev_link->irq.AssignedIRQ) {
-                CardServices(ReleaseIRQ, dev_link->handle, &dev_link->irq);
+                pcmcia_release_irq(dev_link->handle, &dev_link->irq);
         }  
         dev_link->state &= ~DEV_CONFIG;
         if (dev_link->state & DEV_STALE_LINK) {
@@ -397,13 +440,14 @@
                     dev_link->state &= ~DEV_PRESENT;
                     if (dev_link->state & DEV_CONFIG) {
                             nokia_cs->driver_priv->stop = 1;
-                            dev_link->release.expires = jiffies + HZ/20;
-                            add_timer(&dev_link->release);
+                           /* dev_link->release.expires = jiffies + HZ/20;
+                            add_timer(&dev_link->release);*/
+                            d_driver_release((u_long)dev_link);
                     }
                     break;
             case CS_EVENT_CARD_INSERTION:
                     dev_link->state |= DEV_PRESENT | DEV_CONFIG_PENDING;
-                    nokia_cs->bus = args->bus;
+                    /*nokia_cs->bus = args->bus;*/
                     d_driver_config(dev_link);
                     break;
             case CS_EVENT_PM_SUSPEND:
@@ -411,14 +455,14 @@
             case CS_EVENT_RESET_PHYSICAL:
                     nokia_cs->driver_priv->stop = 1;
                     if (dev_link->state & DEV_CONFIG) {
-                            CardServices(ReleaseConfiguration, dev_link->handle);
+                            pcmcia_release_configuration(dev_link->handle);
                     }    
                     break;
             case CS_EVENT_PM_RESUME:
                     dev_link->state &= ~DEV_SUSPEND;
             case CS_EVENT_CARD_RESET:
                     if (dev_link->state & DEV_CONFIG) {
-                            CardServices(RequestConfiguration, dev_link->handle, \
&dev_link->conf); +                            \
pcmcia_request_configuration(dev_link->handle, &dev_link->conf);  }
                     nokia_cs->driver_priv->stop = 0;
                     dmgr_pcmcia_action(nokia_cs->driver_priv, CARD_RESET);
@@ -428,12 +472,12 @@
 }
 
 
-#define CS_CHECK(fn, args...) \
-while ((last_ret=CardServices(last_fn=(fn),args))!=0) goto error
+/*#define CS_CHECK(fn, args...) \
+while ((last_ret=pcmcia_fn(args))!=0) goto error
 
 #define CFG_CHECK(fn, args...) \
-if (CardServices(fn, args) != 0) goto next
-
+if (pcmcia_fn(args) != 0) goto next
+*/
 static void d_driver_config(dev_link_t *dev_link)
 {
         client_handle_t client_handle;
@@ -462,9 +506,12 @@
         tuple.TupleDataMax  = sizeof(buf);
         tuple.TupleOffset   = 0;
 
-        CS_CHECK(GetFirstTuple, client_handle, &tuple);
-        CS_CHECK(GetTupleData, client_handle, &tuple);
-        CS_CHECK(ParseTuple, client_handle, &tuple, &cisparse);
+        /* CS_CHECK(GetFirstTuple, pcmcia_get_first_tuple(client_handle, &tuple));*/
+        while ((last_ret=pcmcia_get_first_tuple(client_handle, &tuple))!=0) goto \
error; +        /* CS_CHECK(GetTupleData, pcmcia_get_tuple_data(client_handle, \
&tuple));*/ +        while ((last_ret=pcmcia_get_tuple_data(client_handle, \
&tuple))!=0) goto error; +        /* CS_CHECK(ParseTuple, \
pcmcia_parse_tuple(client_handle, &tuple, &cisparse));*/ +        while \
((last_ret=pcmcia_parse_tuple(client_handle, &tuple, &cisparse))!=0) goto error;  
         dev_link->conf.ConfigBase = cisparse.config.base;
         dev_link->conf.Present = cisparse.config.rmask[0];
@@ -473,9 +520,13 @@
 
         /* Lookup manfid */
         tuple.DesiredTuple = CISTPL_MANFID;
-        CS_CHECK(GetFirstTuple, client_handle, &tuple);
-        CS_CHECK(GetTupleData, client_handle, &tuple);
-        CS_CHECK(ParseTuple, client_handle, &tuple, &cisparse);
+        /* CS_CHECK(GetFirstTuple, pcmcia_get_first_tuple(client_handle, &tuple));*/
+        while ((last_ret=pcmcia_get_first_tuple(client_handle, &tuple))!=0) goto \
error; +        /* CS_CHECK(GetTupleData, pcmcia_get_tuple_data(client_handle, \
&tuple));*/ +        while ((last_ret=pcmcia_get_tuple_data(client_handle, \
&tuple))!=0) goto error; +        /* CS_CHECK(ParseTuple, \
pcmcia_parse_tuple(client_handle, &tuple, &cisparse));*/ +        while \
((last_ret=pcmcia_parse_tuple(client_handle, &tuple, &cisparse))!=0) goto error; +    \
  if (cisparse.manfid.manf != MANFID_NOKIA){
                 ERROR("Unknown manufacturer 0x%hX\n", cisparse.manfid.manf);
                 goto error;
@@ -491,19 +542,23 @@
   
         /* Look up the Vcc */
   
-        CS_CHECK(GetConfigurationInfo, client_handle, &config_info);
+        /* CS_CHECK(GetConfigurationInfo, \
pcmcia_get_configuration_info(client_handle, &config_info));*/ +        while \
((last_ret=pcmcia_get_configuration_info(client_handle, &config_info))!=0) goto \
error;  dev_link->conf.Vcc = config_info.Vcc;
   
         tuple.DesiredTuple = CISTPL_CFTABLE_ENTRY;
-        CS_CHECK(GetFirstTuple, client_handle, &tuple);
+        /* CS_CHECK(GetFirstTuple, pcmcia_get_first_tuple(client_handle, &tuple));*/
+        while ((last_ret=pcmcia_get_first_tuple(client_handle, &tuple))!=0) goto \
error;  
         while (TRUE) {
     
                 cistpl_cftable_entry_t cftable_entry= { 0 };
                 cistpl_cftable_entry_t *cft = &(cisparse.cftable_entry);
     
-                CFG_CHECK(GetTupleData, client_handle, &tuple);
-                CFG_CHECK(ParseTuple, client_handle, &tuple, &cisparse);
+                /*CFG_CHECK(GetTupleData, client_handle, &tuple);*/
+		if (pcmcia_get_tuple_data(client_handle, &tuple) != 0) goto next;
+                /* CFG_CHECK(ParseTuple, client_handle, &tuple, &cisparse);*/
+		if (pcmcia_parse_tuple(client_handle, &tuple, &cisparse) != 0) goto next;
     
                 if (cft->flags & CISTPL_CFTABLE_DEFAULT) 
                         cftable_entry = *cft;
@@ -549,17 +604,21 @@
                         }
                 }
     
-                CFG_CHECK(RequestIO, dev_link->handle, &dev_link->io);
+                /*CFG_CHECK(RequestIO, dev_link->handle, &dev_link->io);*/
+		if (pcmcia_request_io(dev_link->handle, &dev_link->io) != 0) goto next;
 
                 break;
           next:
-                CS_CHECK(GetNextTuple, client_handle, &tuple);
+                /*CS_CHECK(GetNextTuple, pcmcia_get_next_tuple(client_handle, \
&tuple));*/ +		while ((last_ret=pcmcia_get_next_tuple(client_handle, &tuple))!=0) \
goto error;  }
   
         if (dev_link->conf.Attributes & CONF_ENABLE_IRQ)
-                CS_CHECK(RequestIRQ, dev_link->handle, &dev_link->irq);
-  
-        CS_CHECK(RequestConfiguration, dev_link->handle, &dev_link->conf);
+                /*CS_CHECK(RequestIRQ, pcmcia_request_irq(dev_link->handle, \
&dev_link->irq));*/ +  		while ((last_ret=pcmcia_request_irq(dev_link->handle, \
&dev_link->irq))!=0) goto error; +        /*CS_CHECK(RequestConfiguration, \
pcmcia_request_configuration(dev_link->handle, &dev_link->conf));*/ +	while \
((last_ret=pcmcia_request_configuration(dev_link->handle, &dev_link->conf))!=0) goto \
error; +	
   
         nokia_cs->node.major = nokia_cs->node.minor = 0;
         dev_link->dev = &nokia_cs->node;
@@ -584,7 +643,7 @@
   
   error:
   
-        cs_error(dev_link->handle, last_fn, last_ret);
+        cs_error_(dev_link->handle, last_fn, last_ret);
         d_driver_release((UINT32)dev_link);
   
         return;
@@ -619,9 +678,6 @@
 
   exit:
         DEBUG("Interrupt handling problem!!\n");
-//        CardServices(ReleaseIRQ, ((dev_link_t *) dev_id)->handle, &((dev_link_t *) \
dev_id)->irq); +//        pcmcia_release_irq(((dev_link_t *) dev_id)->handle, \
&((dev_link_t *) dev_id)->irq));  return;
 }
-
-module_init(d_init_module);
-module_exit(d_cleanup_module);
diff -ru nokia_c110/src/dtools.c nokia_c110_patched/src/dtools.c
--- nokia_c110/src/dtools.c	2002-10-30 13:21:12.000000000 +0200
+++ nokia_c110_patched/src/dtools.c	2004-03-09 23:26:02.000000000 +0200
@@ -301,7 +301,7 @@
         struct timer_list* timer_list;
         timer_list = kmalloc(sizeof(struct timer_list), GFP_ATOMIC);
         if (!timer_list){
-                ERROR (__FUNCTION__ "timer_list NULL\n");
+                printk(KERN_ERR "timer_list NULL\n");
                 return NULL;
         }
         memset(timer_list, 0, sizeof(struct timer_list));
@@ -314,7 +314,7 @@
 // Mod timer
 int dt_mod_timer(void* timer_list, unsigned long expires) {
         if (!timer_list){
-                ERROR (__FUNCTION__ "timer_list NULL\n");
+                printk(KERN_ERR "timer_list NULL\n");
                 return 0;
         }
         return mod_timer((struct timer_list *) timer_list, expires);
@@ -323,7 +323,7 @@
 // Del Timer
 int dt_del_timer(void* timer_list) {
         if (!timer_list){
-                ERROR (__FUNCTION__ "timer_list NULL\n");
+                printk(KERN_ERR "timer_list NULL\n");
                 return 0;
         }
         return del_timer((struct timer_list *) timer_list);
@@ -333,7 +333,7 @@
 int dt_free_timer(void* timer_list) {
         int ret = 0;
         if (!timer_list){
-                ERROR (__FUNCTION__ "timer_list NULL\n");
+                printk(KERN_ERR "timer_list NULL\n");
                 return 0;
         }
         ret = del_timer((struct timer_list *) timer_list);
@@ -345,7 +345,7 @@
         spinlock_t *lock;
         lock = kmalloc(sizeof(spinlock_t), GFP_ATOMIC);
         if (!lock){
-                ERROR (__FUNCTION__ "lock NULL\n");
+                printk(KERN_ERR "lock NULL\n");
                 return NULL;
         }
         spin_lock_init(lock);
@@ -354,7 +354,7 @@
 
 void dt_lock (void* lock){
         if (!lock){
-                ERROR (__FUNCTION__ "lock NULL\n");
+                printk(KERN_ERR "lock NULL\n");
                 return;
         }
         spin_lock((spinlock_t*) lock);
@@ -362,7 +362,7 @@
 
 int dt_is_locked (void* lock){
         if (!lock){
-                ERROR (__FUNCTION__ "lock NULL\n");
+                printk(KERN_ERR "lock NULL\n");
                 return 0;
         }
         return spin_is_locked((spinlock_t*) lock);
@@ -370,7 +370,7 @@
 
 void dt_unlock (void* lock){
         if (!lock){
-                ERROR (__FUNCTION__ "lock NULL\n");
+                printk(KERN_ERR "lock NULL\n");
                 return;
         }
         spin_unlock((spinlock_t*) lock);
@@ -378,7 +378,7 @@
 
 void dt_lock_bh (void* lock){
         if (!lock){
-                ERROR (__FUNCTION__ "lock NULL\n");
+                printk(KERN_ERR "lock NULL\n");
                 return;
         }
         spin_lock_bh((spinlock_t*) lock);
@@ -386,7 +386,7 @@
 
 void dt_unlock_bh (void* lock){
         if (!lock){
-                ERROR (__FUNCTION__ "lock NULL\n");
+                printk(KERN_ERR "lock NULL\n");
                 return;
         }
         spin_unlock_bh((spinlock_t*) lock);
@@ -394,7 +394,7 @@
 
 void dt_lock_irqsave (void* lock, unsigned long *flags){
         if (!lock){
-                ERROR (__FUNCTION__ "lock NULL\n");
+                printk(KERN_ERR "lock NULL\n");
                 return;
         }
                 local_irq_save(*flags);
@@ -403,7 +403,7 @@
 
 void dt_unlock_irqrestore (void* lock, unsigned long *flags){
         if (!lock){
-                ERROR (__FUNCTION__ "lock NULL\n");
+                printk(KERN_ERR "lock NULL\n");
                 return;
         }
         spin_unlock((spinlock_t*) lock);
@@ -412,7 +412,7 @@
 
 void dt_del_lock (void* lock){
         if (!lock){
-                ERROR (__FUNCTION__ "lock NULL\n");
+                printk(KERN_ERR "lock NULL\n");
                 return;
         }
         kfree (lock);
@@ -469,7 +469,7 @@
         struct tasklet_struct *tasklet;
         tasklet = kmalloc(sizeof(struct tasklet_struct), GFP_ATOMIC);
         if (!tasklet){
-                ERROR (__FUNCTION__ "tasklet NULL\n");
+                printk(KERN_ERR "tasklet NULL\n");
                 return NULL;
         }
         tasklet_init(tasklet, function, data);
@@ -479,7 +479,7 @@
 /* Schedule tasklet */
 void dt_schedule_tasklet(void* tasklet) {
         if (!tasklet){
-                ERROR (__FUNCTION__ "tasklet NULL\n");
+                printk(KERN_ERR "tasklet NULL\n");
                 return;
         }
         return tasklet_schedule((struct tasklet_struct*) tasklet);
@@ -488,7 +488,7 @@
 /* Enable tasklet */
 void dt_enable_tasklet(void* tasklet) {
         if (!tasklet){
-                ERROR (__FUNCTION__ "tasklet NULL\n");
+                printk(KERN_ERR "tasklet NULL\n");
                 return;
         }
         return tasklet_enable((struct tasklet_struct*) tasklet);
@@ -497,7 +497,7 @@
 /* Disable tasklet */
 void dt_disable_tasklet(void* tasklet) {
         if (!tasklet){
-                ERROR (__FUNCTION__ "tasklet NULL\n");
+                printk(KERN_ERR "tasklet NULL\n");
                 return;
         }
         return tasklet_disable((struct tasklet_struct*) tasklet);
@@ -506,7 +506,7 @@
 // Kill Tasklet
 void dt_kill_tasklet(void* tasklet) {
         if (!tasklet){
-                ERROR (__FUNCTION__ "tasklet NULL\n");
+                printk(KERN_ERR "tasklet NULL\n");
                 return;
         }
         tasklet_kill((struct tasklet_struct*) tasklet);
Only in nokia_c110_patched/src: nokia-cs.c
Only in nokia_c110_patched/src: nokia-cs.mod.c
Only in nokia_c110_patched/src: nokia_c110.mod.c
diff -ru nokia_c110/src/nokia_priv.h nokia_c110_patched/src/nokia_priv.h
--- nokia_c110/src/nokia_priv.h	2002-10-30 13:21:12.000000000 +0200
+++ nokia_c110_patched/src/nokia_priv.h	2004-03-08 14:13:34.000000000 +0200
@@ -40,7 +40,7 @@
 #define MANFID_NOKIA           0x0124
 #define MANFID_NOKIA_CARD_C110 0x1110
 
-#define HZ 100
+/* #define HZ 100*/
 extern unsigned long volatile jiffies;
 
 #define CARD_RESET 1



_______________________________________________
Linux-wlan-devel mailing list
Linux-wlan-devel@lists.linux-wlan.com
http://lists.linux-wlan.com/mailman/listinfo/linux-wlan-devel


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic