software/drivers/sd8887/src/wlan/mlan/mlan_wmm.c
/**
 *  @brief Evaluate whether or not an AC is to be downgraded
 *
 *  @param priv     Pointer to the mlan_private driver data struct
 *  @param eval_ac  AC to evaluate for downgrading
 *
 *  @return WMM AC  The eval_ac traffic is to be sent on.
 */
@brief Evaluate whether or not an AC is to be downgraded
@param priv     Pointer to the mlan_private driver data struct
@param eval_ac  AC to evaluate for downgrading

@return WMM AC  The eval_ac traffic is to be sent on.
@brief Evaluate whether or not an AC is to be downgraded @param priv Pointer to the mlan_private driver data struct @param eval_ac AC to evaluate for downgrading @return WMM AC The eval_ac traffic is to be sent on .
static mlan_wmm_ac_e
wlan_wmm_eval_downgrade_ac(pmlan_private priv, mlan_wmm_ac_e eval_ac)
{
	int down_ac;
	mlan_wmm_ac_e ret_ac;
	WmmAcStatus_t *pac_status;
	ENTER();
	pac_status = &priv->wmm.ac_status[eval_ac];
	if (pac_status->disabled == MFALSE) {
		LEAVE();
		return eval_ac;
	}
	ret_ac = WMM_AC_BK;
	for (down_ac = WMM_AC_BK; down_ac < eval_ac; down_ac++) {
		pac_status = &priv->wmm.ac_status[down_ac];
		if ((pac_status->disabled == MFALSE)
		    && (pac_status->flow_required == MFALSE))
			ret_ac = (mlan_wmm_ac_e)down_ac;
	}
	LEAVE();
	return ret_ac;
}
static mlan_wmm_ac_e wlan_wmm_eval_downgrade_ac ( pmlan_private priv , mlan_wmm_ac_e eval_ac ) { int down_ac ; mlan_wmm_ac_e ret_ac ; WmmAcStatus_t * pac_status ; ENTER ( ) ; pac_status = & priv -> wmm . ac_status [ eval_ac ] ; if ( pac_status -> disabled == MFALSE ) { LEAVE ( ) ; return eval_ac ; } ret_ac = WMM_AC_BK ; for ( down_ac = WMM_AC_BK ; down_ac < eval_ac ; down_ac ++ ) { pac_status = & priv -> wmm . ac_status [ down_ac ] ; if ( ( pac_status -> disabled == MFALSE ) && ( pac_status -> flow_required == MFALSE ) ) ret_ac = ( mlan_wmm_ac_e ) down_ac ; } LEAVE ( ) ; return ret_ac ; }
@brief Evaluate whether or not an AC is to be downgraded
  @param priv     Pointer to the mlan_private driver data struct
  @param eval_ac  AC to evaluate for downgrading
@brief Evaluate whether or not an AC is to be downgraded @param priv Pointer to the mlan_private driver data struct @param eval_ac AC to evaluate for downgrading
/* Okay to use this AC, its enabled */ /* Setup a default return value of the lowest priority */ /*
	 * Find the highest AC that is enabled and does not require admission
	 * control.  The spec disallows downgrading to an AC, which is enabled
	 * due to a completed admission control.  Unadmitted traffic is not
	 * to be sent on an AC with admitted traffic.
	 */ /* AC is enabled and does not require admission control */