aboutsummaryrefslogtreecommitdiffstats
path: root/target
diff options
context:
space:
mode:
authorJohn Crispin <john@phrozen.org>2019-01-07 15:45:51 +0100
committerJohn Crispin <john@phrozen.org>2019-01-07 15:45:51 +0100
commit93c35bfa21a4d8cd66a4fe9218ba08088cb27ad2 (patch)
treeeddd385896777aca3fd324f6d94712776c1e0ec0 /target
parent6b9bdbd4935d3a9c8f22dde5d84abd173a1573ce (diff)
downloadupstream-93c35bfa21a4d8cd66a4fe9218ba08088cb27ad2.tar.gz
upstream-93c35bfa21a4d8cd66a4fe9218ba08088cb27ad2.tar.bz2
upstream-93c35bfa21a4d8cd66a4fe9218ba08088cb27ad2.zip
ramips: whitespace cleanup inside hnat driver
Signed-off-by: John Crispin <john@phrozen.org>
Diffstat (limited to 'target')
-rw-r--r--target/linux/ramips/files-4.14/drivers/net/ethernet/mediatek/mtk_offload.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/target/linux/ramips/files-4.14/drivers/net/ethernet/mediatek/mtk_offload.c b/target/linux/ramips/files-4.14/drivers/net/ethernet/mediatek/mtk_offload.c
index d0d0790ad9..6e814ad72e 100644
--- a/target/linux/ramips/files-4.14/drivers/net/ethernet/mediatek/mtk_offload.c
+++ b/target/linux/ramips/files-4.14/drivers/net/ethernet/mediatek/mtk_offload.c
@@ -121,8 +121,9 @@ mtk_foe_set_mac(struct mtk_foe_entry *entry, u8 *smac, u8 *dmac)
static int
mtk_check_hashcollision(struct mtk_eth *eth, u32 hash)
{
- struct mtk_foe_entry entry = ((struct mtk_foe_entry *)eth->foe_table)[hash];
- return (entry.bfib1.state != BIND)? 0:1;
+ struct mtk_foe_entry entry = ((struct mtk_foe_entry *)eth->foe_table)[hash];
+
+ return (entry.bfib1.state != BIND)? 0:1;
}
static void
@@ -180,10 +181,11 @@ int mtk_flow_offload(struct mtk_eth *eth,
goto write;
}
- if(mtk_check_hashcollision(eth, ohash)) // Two-way hash: when hash collision occurs, the hash value will be shifted to the next position.
- ohash += 1;
- if(mtk_check_hashcollision(eth, rhash))
- rhash += 1;
+ /* Two-way hash: when hash collision occurs, the hash value will be shifted to the next position. */
+ if(mtk_check_hashcollision(eth, ohash))
+ ohash += 1;
+ if(mtk_check_hashcollision(eth, rhash))
+ rhash += 1;
mtk_foe_set_mac(&orig, dest->eth_src, dest->eth_dest);
mtk_foe_set_mac(&reply, src->eth_src, src->eth_dest);