You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by ac...@apache.org on 2023/05/24 16:08:09 UTC
[nuttx] branch master updated: S32K3XX EMAC MCAST support Fix compile warning when ioctl is not enabled
This is an automated email from the ASF dual-hosted git repository.
acassis pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx.git
The following commit(s) were added to refs/heads/master by this push:
new 0cadb0cf83 S32K3XX EMAC MCAST support Fix compile warning when ioctl is not enabled
0cadb0cf83 is described below
commit 0cadb0cf83c8d046dad8f0c61a4271e9e74495dd
Author: Peter van der Perk <pe...@nxp.com>
AuthorDate: Tue Apr 11 11:10:51 2023 +0200
S32K3XX EMAC MCAST support
Fix compile warning when ioctl is not enabled
---
arch/arm/src/s32k3xx/s32k3xx_emac.c | 12 +++++++-----
1 file changed, 7 insertions(+), 5 deletions(-)
diff --git a/arch/arm/src/s32k3xx/s32k3xx_emac.c b/arch/arm/src/s32k3xx/s32k3xx_emac.c
index 89a12f3067..a89234f263 100644
--- a/arch/arm/src/s32k3xx/s32k3xx_emac.c
+++ b/arch/arm/src/s32k3xx/s32k3xx_emac.c
@@ -301,7 +301,9 @@
# define BOARD_PHY_100BASET(s) 1 /* PHY only supports 100BASE-T1 */
# define BOARD_PHY_ISDUPLEX(s) 1 /* PHY only supports fullduplex */
-# define CLAUSE45 1
+# ifdef CONFIG_NETDEV_IOCTL
+# define CLAUSE45 1
+# endif
# define MMD1 1
# define MMD1_PMA_STATUS1 1
# 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)
if (hashindex > 31)
{
- registeraddress = S32K3XX_ENET_GAUR;
+ registeraddress = S32K3XX_EMAC_MAC_HASH_TABLE_REG1;
hashindex -= 32;
}
else
{
- registeraddress = S32K3XX_ENET_GALR;
+ registeraddress = S32K3XX_EMAC_MAC_HASH_TABLE_REG0;
}
temp = getreg32(registeraddress);
@@ -2324,12 +2326,12 @@ static int s32k3xx_rmmac(struct net_driver_s *dev, const uint8_t *mac)
if (hashindex > 31)
{
- registeraddress = S32K3XX_ENET_GAUR;
+ registeraddress = S32K3XX_EMAC_MAC_HASH_TABLE_REG1;
hashindex -= 32;
}
else
{
- registeraddress = S32K3XX_ENET_GALR;
+ registeraddress = S32K3XX_EMAC_MAC_HASH_TABLE_REG0;
}
temp = getreg32(registeraddress);