Skip to content

Commit a42e6ae

Browse files
logostdavem330
authored andcommitted
net: atlantic: fix ip dst and ipv6 address filters
This patch fixes ip dst and ipv6 address filters. There were 2 mistakes in the code, which led to the issue: * invalid register was used for ipv4 dst address; * incorrect write order of dwords for ipv6 addresses. Fixes: 23e7a71 ("net: aquantia: add rx-flow filter definitions") Signed-off-by: Dmitry Bogdanov <[email protected]> Signed-off-by: Mark Starovoytov <[email protected]> Signed-off-by: Alexander Lobakin <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 086c18f commit a42e6ae

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

drivers/net/ethernet/aquantia/atlantic/hw_atl/hw_atl_llh.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1700,7 +1700,7 @@ void hw_atl_rpfl3l4_ipv6_src_addr_set(struct aq_hw_s *aq_hw, u8 location,
17001700
for (i = 0; i < 4; ++i)
17011701
aq_hw_write_reg(aq_hw,
17021702
HW_ATL_RPF_L3_SRCA_ADR(location + i),
1703-
ipv6_src[i]);
1703+
ipv6_src[3 - i]);
17041704
}
17051705

17061706
void hw_atl_rpfl3l4_ipv6_dest_addr_set(struct aq_hw_s *aq_hw, u8 location,
@@ -1711,7 +1711,7 @@ void hw_atl_rpfl3l4_ipv6_dest_addr_set(struct aq_hw_s *aq_hw, u8 location,
17111711
for (i = 0; i < 4; ++i)
17121712
aq_hw_write_reg(aq_hw,
17131713
HW_ATL_RPF_L3_DSTA_ADR(location + i),
1714-
ipv6_dest[i]);
1714+
ipv6_dest[3 - i]);
17151715
}
17161716

17171717
u32 hw_atl_sem_ram_get(struct aq_hw_s *self)

drivers/net/ethernet/aquantia/atlantic/hw_atl/hw_atl_llh_internal.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1360,7 +1360,7 @@
13601360
*/
13611361

13621362
/* Register address for bitfield pif_rpf_l3_da0_i[31:0] */
1363-
#define HW_ATL_RPF_L3_DSTA_ADR(filter) (0x000053B0 + (filter) * 0x4)
1363+
#define HW_ATL_RPF_L3_DSTA_ADR(filter) (0x000053D0 + (filter) * 0x4)
13641364
/* Bitmask for bitfield l3_da0[1F:0] */
13651365
#define HW_ATL_RPF_L3_DSTA_MSK 0xFFFFFFFFu
13661366
/* Inverted bitmask for bitfield l3_da0[1F:0] */

0 commit comments

Comments
 (0)