patch-2.2.16 linux/drivers/net/irda/toshoboe.c

Next file: linux/drivers/net/irda/w83977af_ir.c
Previous file: linux/drivers/net/irda/nsc-ircc.c
Back to the patch index
Back to the overall index

diff -urN v2.2.15/linux/drivers/net/irda/toshoboe.c linux/drivers/net/irda/toshoboe.c
@@ -612,7 +612,12 @@
 	
 	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))
 			return -EPERM;
 		/* toshoboe_setbaud(self, irq->ifr_baudrate); */
                 /* Just change speed once - inserted by Paul Bristow */

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)