/* Returns: -EINVAL if the buffer does not contain lpfc_soft_wwn_key length of buf indicates success  */
static ssize_t lpfc_soft_wwn_enable_store(struct device *dev, struct device_attribute *attr, const char *buf, size_t count)
/* Returns: -EINVAL if the buffer does not contain lpfc_soft_wwn_key length of buf indicates success  */
static ssize_t lpfc_soft_wwn_enable_store(struct device *dev, struct device_attribute *attr, const char *buf, size_t count)
{
	struct Scsi_Host  *shost = class_to_shost(dev);
	struct lpfc_vport *vport = (struct lpfc_vport *) shost->hostdata;
	struct lpfc_hba   *phba = vport->phba;
	unsigned int cnt = count;
	if (buf[cnt-1] == '\n')
		cnt--;
	if ((cnt != strlen(lpfc_soft_wwn_key)) ||
	    (strncmp(buf, lpfc_soft_wwn_key, strlen(lpfc_soft_wwn_key)) != 0))
		return -EINVAL;
	phba->soft_wwn_enable = 1;
	return count;
}