static int orinoco_ioctl_getrate(struct net_device *dev, struct iw_param *rrq) 
static int orinoco_ioctl_getrate(struct net_device *dev, struct iw_request_info *info, struct iw_param *rrq, char *extra) 
static int orinoco_ioctl_getrate(struct net_device *dev, struct iw_param *rrq){	struct orinoco_private *priv = netdev_priv(dev);	hermes_t *hw = &priv->hw;	int err = 0;	int ratemode;	int i;	u16 val;	unsigned long flags;	if (orinoco_lock(priv, &flags) != 0)		return -EBUSY;	ratemode = priv->bitratemode;	BUG_ON((ratemode < 0) || (ratemode >= BITRATE_TABLE_SIZE));	rrq->value = bitrate_table[ratemode].bitrate * 100000;	rrq->fixed = ! bitrate_table[ratemode].automatic;	rrq->disabled = 0;	/* If the interface is running we try to find more about the	   current mode */	if (netif_running(dev)) {		err = hermes_read_wordrec(hw, USER_BAP,					  HERMES_RID_CURRENTTXRATE, &val);		if (err)			goto out;				switch (priv->firmware_type) {		case FIRMWARE_TYPE_AGERE: /* Lucent style rate */			/* Note : in Lucent firmware, the return value of			 * HERMES_RID_CURRENTTXRATE is the bitrate in Mb/s,			 * and therefore is totally different from the			 * encoding of HERMES_RID_CNFTXRATECONTROL.			 * Don't forget that 6Mb/s is really 5.5Mb/s */			if (val == 6)				rrq->value = 5500000;			else				rrq->value = val * 1000000;			break;		case FIRMWARE_TYPE_INTERSIL: /* Intersil style rate */		case FIRMWARE_TYPE_SYMBOL: /* Symbol style rate */			for (i = 0; i < BITRATE_TABLE_SIZE; i++)				if (bitrate_table[i].intersil_txratectrl == val) {					ratemode = i;					break;				}			if (i >= BITRATE_TABLE_SIZE)				printk(KERN_INFO "%s: Unable to determine current bitrate (0x%04hx)\n",				       dev->name, val);			rrq->value = bitrate_table[ratemode].bitrate * 100000;			break;		default:			BUG();		}	} out:	orinoco_unlock(priv, &flags);	return err;}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/620554e406e3cc01434c658a1e597162d7e56fd6/orinoco.c/buggy/drivers/net/wireless/orinoco.c