Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit fcaa42c7 authored by Matthias Beyer's avatar Matthias Beyer Committed by Greg Kroah-Hartman
Browse files

Staging: bcm: Qos.c: Line length / Whitespace cleanup in MatchProtocol()

parent 0144b84e
Loading
Loading
Loading
Loading
+17 −4
Original line number Diff line number Diff line
@@ -158,19 +158,32 @@ static bool MatchTos(struct bcm_classifier_rule *pstClassifierRule,
*
* Returns     - TRUE(If address matches) else FAIL.
****************************************************************************/
bool MatchProtocol(struct bcm_classifier_rule *pstClassifierRule, UCHAR ucProtocol)
bool MatchProtocol(struct bcm_classifier_rule *pstClassifierRule,
		   UCHAR ucProtocol)
{
	UCHAR ucLoopIndex = 0;
	struct bcm_mini_adapter *Adapter = GET_BCM_ADAPTER(gblpnetdev);

	if (0 == pstClassifierRule->ucProtocolLength)
		return TRUE;
	for (ucLoopIndex = 0; ucLoopIndex < pstClassifierRule->ucProtocolLength; ucLoopIndex++) {
		BCM_DEBUG_PRINT(Adapter, DBG_TYPE_TX, IPV4_DBG, DBG_LVL_ALL, "Protocol:0x%X Classification Protocol:0x%X", ucProtocol, pstClassifierRule->ucProtocol[ucLoopIndex]);
	for (ucLoopIndex = 0;
	     ucLoopIndex < pstClassifierRule->ucProtocolLength;
	     ucLoopIndex++) {
		BCM_DEBUG_PRINT(Adapter,
				DBG_TYPE_TX,
				IPV4_DBG,
				DBG_LVL_ALL,
				"Protocol:0x%X Classification Protocol:0x%X",
				ucProtocol,
				pstClassifierRule->ucProtocol[ucLoopIndex]);
		if (pstClassifierRule->ucProtocol[ucLoopIndex] == ucProtocol)
			return TRUE;
	}
	BCM_DEBUG_PRINT(Adapter, DBG_TYPE_TX, IPV4_DBG, DBG_LVL_ALL, "Protocol Not Matched");
	BCM_DEBUG_PRINT(Adapter,
			DBG_TYPE_TX,
			IPV4_DBG,
			DBG_LVL_ALL,
			"Protocol Not Matched");
	return false;
}