BUG_ON(len > IW_ESSID_MAX_SIZE); 
static int orinoco_hw_get_essid(struct orinoco_private *priv, int *active,				char buf[IW_ESSID_MAX_SIZE+1]){	hermes_t *hw = &priv->hw;	int err = 0;	struct hermes_idstring essidbuf;	char *p = (char *)(&essidbuf.val);	int len;	unsigned long flags;	if (orinoco_lock(priv, &flags) != 0)		return -EBUSY;	if (strlen(priv->desired_essid) > 0) {		/* We read the desired SSID from the hardware rather		   than from priv->desired_essid, just in case the		   firmware is allowed to change it on us. I'm not		   sure about this */		/* My guess is that the OWNSSID should always be whatever		 * we set to the card, whereas CURRENT_SSID is the one that		 * may change... - Jean II */		u16 rid;		*active = 1;		rid = (priv->port_type == 3) ? HERMES_RID_CNFOWNSSID :			HERMES_RID_CNFDESIREDSSID;				err = hermes_read_ltv(hw, USER_BAP, rid, sizeof(essidbuf),				      NULL, &essidbuf);		if (err)			goto fail_unlock;	} else {		*active = 0;		err = hermes_read_ltv(hw, USER_BAP, HERMES_RID_CURRENTSSID,				      sizeof(essidbuf), NULL, &essidbuf);		if (err)			goto fail_unlock;	}	len = le16_to_cpu(essidbuf.len);	memset(buf, 0, IW_ESSID_MAX_SIZE+1);	memcpy(buf, p, len);	buf[len] = '\0'; fail_unlock:	orinoco_unlock(priv, &flags);	return err;       }
4520	/local/tlutelli/issta_data/temp/c/2005_temp/2005/4520/84d8a2fb56b1d3c915591a2c1aa321b783c7d00f/orinoco.c/clean/drivers/net/wireless/orinoco.c