[Prism54-devel] handling of -EINPROGRESS

Denis Vlasenko vda@port.imtp.ilyichevsk.odessa.ua
Sun, 22 Feb 2004 20:43:05 +0200


With prism54-driven card in managed or master mode:

# strace iwconfig eth1 channel 5
ioctl(4, 0x8b04, 0xbffffbb0)            = 0
close(4)                                = 0
_exit(0)                                = ?

But in monitor mode it fails:

# strace iwconfig eth1 channel 5
ioctl(4, 0x8b04, 0xbffffbb0)            = -1 EIO (Input/output error)
write(2, "Error for wireless request \"Set "..., 52Error for wireless request "Set Frequency" (8B04) :
) = 52
write(2, "    SET failed on device eth1 ; "..., 52    SET failed on device eth1 ; Input/output error.
) = 52
close(4)                                = 0
_exit(-5)                               = ?

I thought that it's a driver/firmware fault, but this little printk
told me othervise:

static int
prism54_set_freq(struct net_device *ndev, struct iw_request_info *info,
                 struct iw_freq *fwrq, char *extra)
{
...
        rvalue = mgt_set_request(priv, DOT11_OID_CHANNEL, 0, &c);
        printk("%s: set_freq(%d): %d\n", ndev->name, (int)c, rvalue);
        /* Call commit handler */
        return (rvalue ? rvalue : -EINPROGRESS);
}

It says "set_freq(5): 0" in both cases! >>8(

I can't locate code which should "Call commit handler".
I tracked ioctl to wireless.c and dev.c, it seems to me it must
propagate error code all the way to userspace, but obviosly
it doesn't...

What am I missing here?
--
vda