static int orinoco_ioctl_getiwencode(struct net_device *dev, struct iw_point *erq) 
static int orinoco_ioctl_getiwencode(struct net_device *dev, struct iw_request_info *info, struct iw_point *erq, char *keybuf) 
static int orinoco_ioctl_getiwencode(struct net_device *dev, struct iw_point *erq){	struct orinoco_private *priv = netdev_priv(dev);	int index = (erq->flags & IW_ENCODE_INDEX) - 1;	u16 xlen = 0;	char keybuf[ORINOCO_MAX_KEY_SIZE];	unsigned long flags;	if (! priv->has_wep)		return -EOPNOTSUPP;	if (orinoco_lock(priv, &flags) != 0)		return -EBUSY;	if ((index < 0) || (index >= ORINOCO_MAX_KEYS))		index = priv->tx_key;	erq->flags = 0;	if (! priv->wep_on)		erq->flags |= IW_ENCODE_DISABLED;	erq->flags |= index + 1;	if (priv->wep_restrict)		erq->flags |= IW_ENCODE_RESTRICTED;	else		erq->flags |= IW_ENCODE_OPEN;	xlen = le16_to_cpu(priv->keys[index].len);	erq->length = xlen;	memcpy(keybuf, priv->keys[index].data, ORINOCO_MAX_KEY_SIZE);	orinoco_unlock(priv, &flags);	if (erq->pointer) {		if (copy_to_user(erq->pointer, keybuf, xlen))			return -EFAULT;	}	return 0;}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/620554e406e3cc01434c658a1e597162d7e56fd6/orinoco.c/buggy/drivers/net/wireless/orinoco.c