Skip to content

Commit 0cadb0c

Browse files
PetervdPerk-NXPAlan Carvalho de Assis
authored andcommitted
S32K3XX EMAC MCAST support
Fix compile warning when ioctl is not enabled
1 parent 24f4216 commit 0cadb0c

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

arch/arm/src/s32k3xx/s32k3xx_emac.c

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -301,7 +301,9 @@
301301
# define BOARD_PHY_100BASET(s) 1 /* PHY only supports 100BASE-T1 */
302302
# define BOARD_PHY_ISDUPLEX(s) 1 /* PHY only supports fullduplex */
303303

304-
# define CLAUSE45 1
304+
# ifdef CONFIG_NETDEV_IOCTL
305+
# define CLAUSE45 1
306+
# endif
305307
# define MMD1 1
306308
# define MMD1_PMA_STATUS1 1
307309
# define MMD1_PS1_RECEIVE_LINK_STATUS (1 << 2)
@@ -2276,12 +2278,12 @@ static int s32k3xx_addmac(struct net_driver_s *dev, const uint8_t *mac)
22762278

22772279
if (hashindex > 31)
22782280
{
2279-
registeraddress = S32K3XX_ENET_GAUR;
2281+
registeraddress = S32K3XX_EMAC_MAC_HASH_TABLE_REG1;
22802282
hashindex -= 32;
22812283
}
22822284
else
22832285
{
2284-
registeraddress = S32K3XX_ENET_GALR;
2286+
registeraddress = S32K3XX_EMAC_MAC_HASH_TABLE_REG0;
22852287
}
22862288

22872289
temp = getreg32(registeraddress);
@@ -2324,12 +2326,12 @@ static int s32k3xx_rmmac(struct net_driver_s *dev, const uint8_t *mac)
23242326

23252327
if (hashindex > 31)
23262328
{
2327-
registeraddress = S32K3XX_ENET_GAUR;
2329+
registeraddress = S32K3XX_EMAC_MAC_HASH_TABLE_REG1;
23282330
hashindex -= 32;
23292331
}
23302332
else
23312333
{
2332-
registeraddress = S32K3XX_ENET_GALR;
2334+
registeraddress = S32K3XX_EMAC_MAC_HASH_TABLE_REG0;
23332335
}
23342336

23352337
temp = getreg32(registeraddress);

0 commit comments

Comments
 (0)