summaryrefslogtreecommitdiff
path: root/drivers/staging/bcm
diff options
context:
space:
mode:
authorMatthias Beyer <mail@beyermatthias.de>2014-07-29 18:52:14 +0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2014-07-31 04:14:22 +0400
commite6afae38544a969b0db3bd746972aa5da18a218c (patch)
tree0c11d010951ddea834524157b7909f3c4f552286 /drivers/staging/bcm
parent7966988088f97b3643adf08f5c781806d55f5799 (diff)
downloadlinux-e6afae38544a969b0db3bd746972aa5da18a218c.tar.xz
Staging: bcm: Qos.c: Replaced member accessing with variable in MatchDestIpAddress()
Signed-off-by: Matthias Beyer <mail@beyermatthias.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/bcm')
-rw-r--r--drivers/staging/bcm/Qos.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/staging/bcm/Qos.c b/drivers/staging/bcm/Qos.c
index 769adb7b32de..817d1151aaf3 100644
--- a/drivers/staging/bcm/Qos.c
+++ b/drivers/staging/bcm/Qos.c
@@ -77,15 +77,16 @@ static bool MatchDestIpAddress(struct bcm_classifier_rule *pstClassifierRule, UL
{
UCHAR ucLoopIndex = 0;
struct bcm_mini_adapter *Adapter = GET_BCM_ADAPTER(gblpnetdev);
+ union u_ip_address *dest_addr = &pstClassifierRule->stDestIpAddress;
ulDestIP = ntohl(ulDestIP);
if (0 == pstClassifierRule->ucIPDestinationAddressLength)
return TRUE;
- BCM_DEBUG_PRINT(Adapter, DBG_TYPE_TX, IPV4_DBG, DBG_LVL_ALL, "Destination Ip Address 0x%x 0x%x 0x%x ", (UINT)ulDestIP, (UINT)pstClassifierRule->stDestIpAddress.ulIpv4Mask[ucLoopIndex], (UINT)pstClassifierRule->stDestIpAddress.ulIpv4Addr[ucLoopIndex]);
+ BCM_DEBUG_PRINT(Adapter, DBG_TYPE_TX, IPV4_DBG, DBG_LVL_ALL, "Destination Ip Address 0x%x 0x%x 0x%x ", (UINT)ulDestIP, (UINT)dest_addr->ulIpv4Mask[ucLoopIndex], (UINT)dest_addr->ulIpv4Addr[ucLoopIndex]);
for (ucLoopIndex = 0; ucLoopIndex < (pstClassifierRule->ucIPDestinationAddressLength); ucLoopIndex++) {
- if ((pstClassifierRule->stDestIpAddress.ulIpv4Mask[ucLoopIndex] & ulDestIP) ==
- (pstClassifierRule->stDestIpAddress.ulIpv4Addr[ucLoopIndex] & pstClassifierRule->stDestIpAddress.ulIpv4Mask[ucLoopIndex]))
+ if ((dest_addr->ulIpv4Mask[ucLoopIndex] & ulDestIP) ==
+ (dest_addr->ulIpv4Addr[ucLoopIndex] & dest_addr->ulIpv4Mask[ucLoopIndex]))
return TRUE;
}
BCM_DEBUG_PRINT(Adapter, DBG_TYPE_TX, IPV4_DBG, DBG_LVL_ALL, "Destination Ip Address Not Matched");