summaryrefslogtreecommitdiff
path: root/linux/pcmcia-cs/wireless/orinoco.c
diff options
context:
space:
mode:
authorThomas Schwinge <tschwinge@gnu.org>2006-07-26 23:04:47 +0000
committerThomas Schwinge <tschwinge@gnu.org>2009-06-18 00:26:38 +0200
commit253d524b348018470c53c8f8382f6d367daede24 (patch)
tree00dfb230e5be6fea4faf1cfa7a9d8a7b0da6c656 /linux/pcmcia-cs/wireless/orinoco.c
parentaffb871b497129f7f191cfaf7bd458342b22c05f (diff)
2006-07-27 Stefan Siegl <stesie@brokenpipe.de>
* linux/pcmcia-cs/clients/xirc2ps_cs.c (busy_loop): Replace the code by a call to __udelay. * linux/pcmcia-cs/include/linux/init.h: Adapt to our Linux environment. * linux/pcmcia-cs/include/linux/slab.h: Use `#include', not `#include_next'. * linux/pcmcia-cs/include/pcmcia/mem_op.h: Adapt to our Linux environment and fix GCC 4.0 complaints. * linux/pcmcia-cs/include/pcmcia/version.h: Always assume that CONFIG_PCMCIA is not defined. * linux/pcmcia-cs/modules/cs.c (init_pcmcia_cs): Don't make it static. * linux/pcmcia-cs/modules/ds.c: Use some magic to avoid duplicate definition `io_req_t'. (ds_open, ds_release, ds_read, ds_write, ds_select, ds_poll, ds_fops): Hide functions if MACH is defined. Likewise for the module handling code. (ds_ioctl): Use plain `memcpy' if MACH is defined. (init_pcmcia_ds): Don't register charcater devices if MACH is defined. Include "../glue/ds.c". * linux/pcmcia-cs/modules/i82365.c (test_irq): Adapt to GNU Mach. (init_i82365): Don't make it static. * linux/pcmcia-cs/modules/pci_fixup.c (pci_devices): Don't define if MACH is defined. * linux/pcmcia-cs/wireless/orinoco.c: Adapt to our Linux environment.
Diffstat (limited to 'linux/pcmcia-cs/wireless/orinoco.c')
-rw-r--r--linux/pcmcia-cs/wireless/orinoco.c25
1 files changed, 22 insertions, 3 deletions
diff --git a/linux/pcmcia-cs/wireless/orinoco.c b/linux/pcmcia-cs/wireless/orinoco.c
index ed7bb83..1f70b6e 100644
--- a/linux/pcmcia-cs/wireless/orinoco.c
+++ b/linux/pcmcia-cs/wireless/orinoco.c
@@ -506,6 +506,20 @@ MODULE_PARM(suppress_linkstatus, "i");
HERMES_MAX_MULTICAST : 0)*/
#define MAX_MULTICAST(priv) (HERMES_MAX_MULTICAST)
+/*
+ * MACH related stuff...
+ */
+
+#ifdef MACH
+
+#undef copy_to_user
+#define copy_to_user(a,b,c) (memcpy(a,b,c), 0)
+
+#define verify_area(a,b,c) (0)
+#define copy_from_user(a,b,c) (memcpy(a,b,c), 0)
+
+#endif
+
/********************************************************************/
/* Data tables */
/********************************************************************/
@@ -1805,7 +1819,6 @@ static void __orinoco_ev_rx(struct net_device *dev, hermes_t *hw)
/* Pass the packet to the networking stack */
netif_rx(skb);
stats->rx_packets++;
- stats->rx_bytes += length;
return;
@@ -2357,7 +2370,7 @@ orinoco_xmit(struct sk_buff *skb, struct net_device *dev)
safest approach). */
stats->tx_errors++;
orinoco_unlock(priv, &flags);
- dev_kfree_skb(skb);
+ dev_kfree_skb(skb, FREE_WRITE);
TRACE_EXIT(dev->name);
return 0;
}
@@ -2435,7 +2448,6 @@ orinoco_xmit(struct sk_buff *skb, struct net_device *dev)
}
dev->trans_start = jiffies;
- stats->tx_bytes += data_off + data_len;
orinoco_unlock(priv, &flags);
@@ -2956,6 +2968,13 @@ static int orinoco_ioctl_getnick(struct net_device *dev, struct iw_point *nrq)
nrq->length = strlen(nickbuf)+1;
+#ifdef MACH
+ if(! nrq->pointer) {
+ printk(KERN_INFO "orinoco_ioctl_getnick: no nrq pointer.\n");
+ return -EFAULT;
+ }
+#endif
+
if (copy_to_user(nrq->pointer, nickbuf, sizeof(nickbuf)))
return -EFAULT;