patch-2.2.16 linux/drivers/net/irda/nsc-ircc.c
Next file: linux/drivers/net/irda/toshoboe.c
Previous file: linux/drivers/net/irda/irtty.c
Back to the patch index
Back to the overall index
- Lines: 34
- Date:
Wed Jun 7 14:26:43 2000
- Orig file:
v2.2.15/linux/drivers/net/irda/nsc-ircc.c
- Orig date:
Wed May 3 17:16:41 2000
diff -urN v2.2.15/linux/drivers/net/irda/nsc-ircc.c linux/drivers/net/irda/nsc-ircc.c
@@ -6,7 +6,7 @@
* Status: Stable.
* Author: Dag Brattli <dagb@cs.uit.no>
* Created at: Sat Nov 7 21:43:15 1998
- * Modified at: Fri Mar 10 11:53:26 2000
+ * Modified at: Tue Apr 25 21:19:12 2000
* Modified by: Dag Brattli <dagb@cs.uit.no>
*
* Copyright (c) 1998-2000 Dag Brattli <dagb@cs.uit.no>
@@ -56,6 +56,7 @@
#include <asm/io.h>
#include <asm/dma.h>
#include <asm/byteorder.h>
+#include <asm/hardirq.h>
#ifdef CONFIG_APM
#include <linux/apm_bios.h>
@@ -1969,8 +1970,15 @@
switch (cmd) {
case SIOCSBANDWIDTH: /* Set bandwidth */
- if (!capable(CAP_NET_ADMIN))
+ /*
+ * This function will also be used by IrLAP to change the
+ * speed, so we still must allow for speed change within
+ * interrupt context.
+ */
+ if (!in_interrupt() && !capable(CAP_NET_ADMIN)) {
+ IRDA_DEBUG(0, __FUNCTION__ "(), not capable sysadm\n");
return -EPERM;
+ }
nsc_ircc_change_speed(self, irq->ifr_baudrate);
break;
case SIOCSMEDIABUSY: /* Set media busy */
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)