/* fc_plogi_get_maxframe() - Get the maximum payload from the common service parameters in a FLOGI frame @flp: The FLOGI payload @maxval: The maximum frame size upper limit; this may be less than what is in the service parameters  */
static unsigned int fc_plogi_get_maxframe(struct fc_els_flogi *flp, unsigned int maxval)
/* fc_plogi_get_maxframe() - Get the maximum payload from the common service parameters in a FLOGI frame @flp: The FLOGI payload @maxval: The maximum frame size upper limit; this may be less than what is in the service parameters  */
static unsigned int fc_plogi_get_maxframe(struct fc_els_flogi *flp, unsigned int maxval)
{
	unsigned int mfs;
	mfs = ntohs(flp->fl_csp.sp_bb_data) & FC_SP_BB_DATA_MASK;
	if (mfs >= FC_SP_MIN_MAX_PAYLOAD && mfs < maxval)
		maxval = mfs;
	mfs = ntohs(flp->fl_cssp[3 - 1].cp_rdfs);
	if (mfs >= FC_SP_MIN_MAX_PAYLOAD && mfs < maxval)
		maxval = mfs;
	return maxval;
}