* [PATCH] Fix interrupt flag bug(s) in irtty.c (244-ac18)
@ 2001-05-27 20:00 Rasmus Andersen
0 siblings, 0 replies; only message in thread
From: Rasmus Andersen @ 2001-05-27 20:00 UTC (permalink / raw)
To: dag; +Cc: linux-kernel, linux-irda
Hi.
The following patch fixes an interrupt flag bug in irtty.c
as per the stanford team's report way back. Applies against
224-ac18.
--- linux-244-ac18-clean/drivers/net/irda/irtty.c Sat May 19 20:59:17 2001
+++ linux-244-ac18/drivers/net/irda/irtty.c Sun May 27 21:56:14 2001
@@ -971,13 +971,17 @@
switch (cmd) {
case SIOCSBANDWIDTH: /* Set bandwidth */
if (!capable(CAP_NET_ADMIN))
- return -EPERM;
- irda_task_execute(self, irtty_change_speed, NULL, NULL,
- (void *) irq->ifr_baudrate);
+ ret = -EPERM;
+ else
+ irda_task_execute(self, irtty_change_speed, NULL, NULL,
+ (void *) irq->ifr_baudrate);
break;
case SIOCSDONGLE: /* Set dongle */
- if (!capable(CAP_NET_ADMIN))
- return -EPERM;
+ if (!capable(CAP_NET_ADMIN)) {
+ ret = -EPERM;
+ break;
+ }
+
/* Initialize dongle */
dongle = irda_device_dongle_init(dev, irq->ifr_dongle);
if (!dongle)
@@ -999,21 +1003,24 @@
break;
case SIOCSMEDIABUSY: /* Set media busy */
if (!capable(CAP_NET_ADMIN))
- return -EPERM;
- irda_device_set_media_busy(self->netdev, TRUE);
+ ret = -EPERM;
+ else
+ irda_device_set_media_busy(self->netdev, TRUE);
break;
case SIOCGRECEIVING: /* Check if we are receiving right now */
irq->ifr_receiving = irtty_is_receiving(self);
break;
case SIOCSDTRRTS:
if (!capable(CAP_NET_ADMIN))
- return -EPERM;
- irtty_set_dtr_rts(dev, irq->ifr_dtr, irq->ifr_rts);
+ ret = -EPERM;
+ else
+ irtty_set_dtr_rts(dev, irq->ifr_dtr, irq->ifr_rts);
break;
case SIOCSMODE:
if (!capable(CAP_NET_ADMIN))
- return -EPERM;
- irtty_set_mode(dev, irq->ifr_mode);
+ ret = -EPERM;
+ else
+ irtty_set_mode(dev, irq->ifr_mode);
break;
default:
ret = -EOPNOTSUPP;
--
Regards,
Rasmus(rasmus@jaquet.dk)
Things are more like they are now than they ever were before.
-Former U.S. President Dwight D. Eisenhower
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2001-05-27 20:01 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-05-27 20:00 [PATCH] Fix interrupt flag bug(s) in irtty.c (244-ac18) Rasmus Andersen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox