Module: xenomai-gch
Branch: for-forge
Commit: 81881c582564ccaa909796062871cfceed40b123
URL:    
http://git.xenomai.org/?p=xenomai-gch.git;a=commit;h=81881c582564ccaa909796062871cfceed40b123

Author: Gilles Chanteperdrix <gilles.chanteperd...@xenomai.org>
Date:   Thu Nov 13 10:40:05 2014 +0100

rtnet: sanitize CONFIG_ symbols

---

 kernel/drivers/net/drivers/mpc8260_fcc_enet.c      |   40 +++++-----
 kernel/drivers/net/drivers/mpc8xx_fec.c            |   84 ++++++++++----------
 .../net/stack/include/rtcfg/rtcfg_conn_event.h     |    2 +-
 .../drivers/net/stack/include/rtcfg/rtcfg_event.h  |    2 +-
 .../drivers/net/stack/rtcfg/rtcfg_client_event.c   |    8 +-
 kernel/drivers/net/stack/rtcfg/rtcfg_conn_event.c  |    4 +-
 kernel/drivers/net/stack/rtcfg/rtcfg_event.c       |   10 +--
 kernel/drivers/net/stack/rtcfg/rtcfg_frame.c       |   16 ++--
 kernel/drivers/net/stack/rtcfg/rtcfg_proc.c        |    4 +-
 kernel/drivers/net/stack/rtdev.c                   |    1 +
 10 files changed, 86 insertions(+), 85 deletions(-)

diff --git a/kernel/drivers/net/drivers/mpc8260_fcc_enet.c 
b/kernel/drivers/net/drivers/mpc8260_fcc_enet.c
index a1449b2..939ce46 100644
--- a/kernel/drivers/net/drivers/mpc8260_fcc_enet.c
+++ b/kernel/drivers/net/drivers/mpc8260_fcc_enet.c
@@ -46,7 +46,7 @@
 #include <asm/uaccess.h>
 #include <asm/cpm_8260.h>
 
-#ifdef CONFIG_RTAI_RTNET_USE_MDIO
+#ifdef CONFIG_XENO_DRIVERS_NET_USE_MDIO
 #error "MDIO for PHY configuration is not yet supported!"
 #endif
 
@@ -74,7 +74,7 @@ MODULE_PARM_DESC(rtnet_fcc, "FCCx port for RTnet 
(default=1)");
  */
 #define TX_TIMEOUT     (2*HZ)
 
-#ifdef CONFIG_RTAI_RTNET_USE_MDIO
+#ifdef CONFIG_XENO_DRIVERS_NET_USE_MDIO
 /* Forward declarations of some structures to support different PHYs */
 
 typedef struct {
@@ -122,7 +122,7 @@ typedef struct {
 #define PHY_STAT_10FDX 0x2000  /* 10 Mbit full duplex selected */
 #define PHY_STAT_100HDX        0x4000  /* 100 Mbit half duplex selected */
 #define PHY_STAT_100FDX        0x8000  /* 100 Mbit full duplex selected */
-#endif /* CONFIG_RTAI_RTNET_USE_MDIO */
+#endif /* CONFIG_XENO_DRIVERS_NET_USE_MDIO */
 
 /* The number of Tx and Rx buffers.  These are allocated from the page
  * pool.  The code may assume these are power of two, so it is best
@@ -390,7 +390,7 @@ struct fcc_enet_private {
        rtdm_lock_t lock;
        rtdm_irq_t irq_handle;
 
-#ifdef CONFIG_RTAI_RTNET_USE_MDIO
+#ifdef CONFIG_XENO_DRIVERS_NET_USE_MDIO
        uint    phy_id;
        uint    phy_id_done;
        uint    phy_status;
@@ -400,7 +400,7 @@ struct fcc_enet_private {
        uint    sequence_done;
 
        uint    phy_addr;
-#endif /* CONFIG_RTAI_RTNET_USE_MDIO */
+#endif /* CONFIG_XENO_DRIVERS_NET_USE_MDIO */
 
        int     link;
        int     old_link;
@@ -417,7 +417,7 @@ static void init_fcc_ioports(fcc_info_t *fip, volatile 
iop8260_t *io,
 static void init_fcc_param(fcc_info_t *fip, struct rtnet_device *rtdev,
        volatile immap_t *immap);
 
-#ifdef CONFIG_RTAI_RTNET_USE_MDIO
+#ifdef CONFIG_XENO_DRIVERS_NET_USE_MDIO
 static int     mii_queue(struct net_device *dev, int request, void 
(*func)(uint, struct net_device *));
 static uint    mii_send_receive(fcc_info_t *fip, uint cmd);
 
@@ -429,7 +429,7 @@ static void fcc_stop(struct net_device *dev);
 #define mk_mii_write(REG, VAL) (0x50020000 | ((REG & 0x1f) << 18) | \
                                                (VAL & 0xffff))
 #define mk_mii_end     0
-#endif /* CONFIG_RTAI_RTNET_USE_MDIO */
+#endif /* CONFIG_XENO_DRIVERS_NET_USE_MDIO */
 
 
 static int
@@ -815,7 +815,7 @@ static struct net_device_stats *fcc_enet_get_stats(struct 
rtnet_device *rtdev)
        return &cep->stats;
 }
 
-#ifdef CONFIG_RTAI_RTNET_USE_MDIO
+#ifdef CONFIG_XENO_DRIVERS_NET_USE_MDIO
 
 /* NOTE: Most of the following comes from the FEC driver for 860. The
  * overall structure of MII code has been retained (as it's proved stable
@@ -1505,7 +1505,7 @@ mii_link_interrupt(int irq, void * dev_id, struct pt_regs 
* regs)
 }
 #endif /* !CONFIG_PM826 */
 
-#endif /* CONFIG_RTAI_RTNET_USE_MDIO */
+#endif /* CONFIG_XENO_DRIVERS_NET_USE_MDIO */
 
 #ifdef ORIGINAL_VERSION
 /* Set or clear the multicast filter for this adaptor.
@@ -1684,13 +1684,13 @@ int __init fec_enet_init(void)
                       rtdev->dev_addr[0], rtdev->dev_addr[1], 
rtdev->dev_addr[2],
                       rtdev->dev_addr[3], rtdev->dev_addr[4], 
rtdev->dev_addr[5]);
 
-#ifdef CONFIG_RTAI_RTNET_USE_MDIO
+#ifdef CONFIG_XENO_DRIVERS_NET_USE_MDIO
                /* Queue up command to detect the PHY and initialize the
                 * remainder of the interface.
                 */
                cep->phy_addr = 0;
                mii_queue(dev, mk_mii_read(MII_REG_PHYIR1), mii_discover_phy);
-#endif /* CONFIG_RTAI_RTNET_USE_MDIO */
+#endif /* CONFIG_XENO_DRIVERS_NET_USE_MDIO */
        }
 
        return 0;
@@ -1763,7 +1763,7 @@ init_fcc_ioports(fcc_info_t *fip, volatile iop8260_t *io,
        io->iop_pdirc &= ~(fip->fc_trxclocks);
        io->iop_pparc |= fip->fc_trxclocks;
 
-#ifdef CONFIG_RTAI_RTNET_USE_MDIO
+#ifdef CONFIG_XENO_DRIVERS_NET_USE_MDIO
        /* ....and the MII serial clock/data.
        */
 #ifndef        CONFIG_PM826
@@ -1772,7 +1772,7 @@ init_fcc_ioports(fcc_info_t *fip, volatile iop8260_t *io,
 #endif /* CONFIG_PM826 */
        IOP_DIR(io,fip->fc_port) |= (fip->fc_mdio | fip->fc_mdck);
        IOP_PAR(io,fip->fc_port) &= ~(fip->fc_mdio | fip->fc_mdck);
-#endif /* CONFIG_RTAI_RTNET_USE_MDIO */
+#endif /* CONFIG_XENO_DRIVERS_NET_USE_MDIO */
 
        /* Configure Serial Interface clock routing.
         * First, clear all FCC bits to zero,
@@ -2037,14 +2037,14 @@ init_fcc_startup(fcc_info_t *fip, struct rtnet_device 
*rtdev)
        }
 
 
-#if defined (CONFIG_RTAI_RTNET_USE_MDIO) && !defined (CONFIG_PM826)
+#if defined (CONFIG_XENO_DRIVERS_NET_USE_MDIO) && !defined (CONFIG_PM826)
 # ifndef PHY_INTERRUPT
 #  error Want to use MDIO, but PHY_INTERRUPT not defined!
 # endif
        if (request_8xxirq(PHY_INTERRUPT, mii_link_interrupt, 0,
                                                        "mii", dev) < 0)
                printk("Can't get MII IRQ %d\n", PHY_INTERRUPT);
-#endif /* CONFIG_RTAI_RTNET_USE_MDIO, CONFIG_PM826 */
+#endif /* CONFIG_XENO_DRIVERS_NET_USE_MDIO, CONFIG_PM826 */
 
        /* Set GFMR to enable Ethernet operating mode.
         */
@@ -2071,7 +2071,7 @@ init_fcc_startup(fcc_info_t *fip, struct rtnet_device 
*rtdev)
        ads_csr_addr[1] &= ~BCSR1_FETHIEN;      /* Enable */
 #endif
 
-#if defined(CONFIG_RTAI_RTNET_USE_MDIO) || defined(CONFIG_TQM8260)
+#if defined(CONFIG_XENO_DRIVERS_NET_USE_MDIO) || defined(CONFIG_TQM8260)
        /* start in full duplex mode, and negotiate speed */
        fcc_restart (rtdev, 1);
 #else
@@ -2080,7 +2080,7 @@ init_fcc_startup(fcc_info_t *fip, struct rtnet_device 
*rtdev)
 #endif
 }
 
-#ifdef CONFIG_RTAI_RTNET_USE_MDIO
+#ifdef CONFIG_XENO_DRIVERS_NET_USE_MDIO
 /* MII command/status interface.
  * I'm not going to describe all of the details.  You can find the
  * protocol definition in many other places, including the data sheet
@@ -2187,7 +2187,7 @@ fcc_stop(struct net_device *dev)
        /* Disable transmit/receive */
        fccp->fcc_gfmr &= ~(FCC_GFMR_ENR | FCC_GFMR_ENT);
 }
-#endif /* CONFIG_RTAI_RTNET_USE_MDIO */
+#endif /* CONFIG_XENO_DRIVERS_NET_USE_MDIO */
 
 static void
 fcc_restart(struct rtnet_device *rtdev, int duplex)
@@ -2212,7 +2212,7 @@ fcc_enet_open(struct rtnet_device *rtdev)
 {
        struct fcc_enet_private *fep = rtdev->priv;
 
-#ifdef CONFIG_RTAI_RTNET_USE_MDIO
+#ifdef CONFIG_XENO_DRIVERS_NET_USE_MDIO
        fep->sequence_done = 0;
        fep->link = 0;
 
@@ -2237,7 +2237,7 @@ fcc_enet_open(struct rtnet_device *rtdev)
        fep->link = 1;
        rtnetif_start_queue(rtdev);
        return 0;                                       /* Always succeed */
-#endif /* CONFIG_RTAI_RTNET_USE_MDIO */
+#endif /* CONFIG_XENO_DRIVERS_NET_USE_MDIO */
 }
 
 static void __exit fcc_enet_cleanup(void)
diff --git a/kernel/drivers/net/drivers/mpc8xx_fec.c 
b/kernel/drivers/net/drivers/mpc8xx_fec.c
index 2dfbff2..1341d28 100644
--- a/kernel/drivers/net/drivers/mpc8xx_fec.c
+++ b/kernel/drivers/net/drivers/mpc8xx_fec.c
@@ -65,7 +65,7 @@
 #include <asm/uaccess.h>
 #include <asm/commproc.h>
 
-#ifdef CONFIG_RTAI_RTNET_USE_MDIO
+#ifdef CONFIG_XENO_DRIVERS_NET_USE_MDIO
 #error "MDIO for PHY configuration is not yet supported!"
 #endif
 
@@ -93,7 +93,7 @@ MODULE_PARM_DESC(rx_pool_size, "Receive buffer pool size");
  */
 #define FEC_CRC_POLY   0x04C11DB7
 
-#ifdef CONFIG_RTAI_RTNET_USE_MDIO
+#ifdef CONFIG_XENO_DRIVERS_NET_USE_MDIO
 /* Forward declarations of some structures to support different PHYs
 */
 
@@ -111,7 +111,7 @@ typedef struct {
        const phy_cmd_t *ack_int;
        const phy_cmd_t *shutdown;
 } phy_info_t;
-#endif /* CONFIG_RTAI_RTNET_USE_MDIO */
+#endif /* CONFIG_XENO_DRIVERS_NET_USE_MDIO */
 
 /* The number of Tx and Rx buffers.  These are allocated from the page
  * pool.  The code may assume these are power of two, so it is best
@@ -196,7 +196,7 @@ struct fec_enet_private {
        rtdm_lock_t lock;
        rtdm_irq_t irq_handle;
 
-#ifdef CONFIG_RTAI_RTNET_USE_MDIO
+#ifdef CONFIG_XENO_DRIVERS_NET_USE_MDIO
        uint    phy_id;
        uint    phy_id_done;
        uint    phy_status;
@@ -210,7 +210,7 @@ struct fec_enet_private {
 
        struct timer_list phy_timer_list;
        u16 old_status;
-#endif /* CONFIG_RTAI_RTNET_USE_MDIO */
+#endif /* CONFIG_XENO_DRIVERS_NET_USE_MDIO */
 
        int     link;
        int     old_link;
@@ -226,9 +226,9 @@ static int fec_enet_interrupt(rtdm_irq_t *irq_handle);
 static int  fec_enet_close(struct rtnet_device *dev);
 static void fec_restart(struct rtnet_device *rtdev, int duplex);
 static void fec_stop(struct rtnet_device *rtdev);
-#ifdef CONFIG_RTAI_RTNET_USE_MDIO
+#ifdef CONFIG_XENO_DRIVERS_NET_USE_MDIO
 static void fec_enet_mii(struct net_device *dev);
-#endif /* CONFIG_RTAI_RTNET_USE_MDIO */
+#endif /* CONFIG_XENO_DRIVERS_NET_USE_MDIO */
 static struct net_device_stats *fec_enet_get_stats(struct rtnet_device *rtdev);
 #ifdef ORIGINAL_VERSION
 static void set_multicast_list(struct net_device *dev);
@@ -238,7 +238,7 @@ static struct rtnet_device *rtdev_root = NULL; /* for 
cleanup */
 
 static ushort  my_enet_addr[3];
 
-#ifdef CONFIG_RTAI_RTNET_USE_MDIO
+#ifdef CONFIG_XENO_DRIVERS_NET_USE_MDIO
 static int fec_enet_ioctl(struct net_device *dev, struct ifreq *rq, int cmd);
 static int netdev_ethtool_ioctl(struct net_device *dev, void *useraddr);
 
@@ -281,13 +281,13 @@ static void mii_queue_relink(uint mii_reg, struct 
net_device *dev, uint data);
 #define mk_mii_write(REG, VAL) (0x50020000 | ((REG & 0x1f) << 18) | \
                                                (VAL & 0xffff))
 #define mk_mii_end     0
-#endif /* CONFIG_RTAI_RTNET_USE_MDIO */
+#endif /* CONFIG_XENO_DRIVERS_NET_USE_MDIO */
 
 /* Transmitter timeout.
 */
 #define TX_TIMEOUT (2*HZ)
 
-#ifdef CONFIG_RTAI_RTNET_USE_MDIO
+#ifdef CONFIG_XENO_DRIVERS_NET_USE_MDIO
 /* Register definitions for the PHY.
 */
 
@@ -319,7 +319,7 @@ static void mii_queue_relink(uint mii_reg, struct 
net_device *dev, uint data);
 #define PHY_STAT_10FDX 0x2000  /* 10 Mbit full duplex selected */
 #define PHY_STAT_100HDX        0x4000  /* 100 Mbit half duplex selected */
 #define PHY_STAT_100FDX        0x8000  /* 100 Mbit full duplex selected */
-#endif /* CONFIG_RTAI_RTNET_USE_MDIO */
+#endif /* CONFIG_XENO_DRIVERS_NET_USE_MDIO */
 
 
 static int
@@ -515,12 +515,12 @@ static int fec_enet_interrupt(rtdm_irq_t *irq_handle)
                }
 
                if (int_events & FEC_ENET_MII) {
-#ifdef CONFIG_RTAI_RTNET_USE_MDIO
+#ifdef CONFIG_XENO_DRIVERS_NET_USE_MDIO
                        fec_enet_mii(dev);
 #else
                rtdm_printk("%s[%d] %s: unexpected FEC_ENET_MII event\n",
                        __FILE__,__LINE__,__FUNCTION__);
-#endif /* CONFIG_RTAI_RTNET_USE_MDIO */
+#endif /* CONFIG_XENO_DRIVERS_NET_USE_MDIO */
                }
 
        }
@@ -727,7 +727,7 @@ rx_processing_done:
 }
 
 
-#ifdef CONFIG_RTAI_RTNET_USE_MDIO
+#ifdef CONFIG_XENO_DRIVERS_NET_USE_MDIO
 static void
 fec_enet_mii(struct net_device *dev)
 {
@@ -1513,9 +1513,9 @@ mii_discover_phy(uint mii_reg, struct net_device *dev, 
uint data)
                }
        }
 }
-#endif /* CONFIG_RTAI_RTNET_USE_MDIO */
+#endif /* CONFIG_XENO_DRIVERS_NET_USE_MDIO */
 
-#ifdef CONFIG_RTAI_RTNET_USE_MDIO
+#ifdef CONFIG_XENO_DRIVERS_NET_USE_MDIO
 /* This interrupt occurs when the PHY detects a link change.
 */
 static void
@@ -1555,7 +1555,7 @@ mii_link_interrupt(int irq, void * dev_id, struct pt_regs 
* regs)
        }
 
 }
-#endif /* CONFIG_RTAI_RTNET_USE_MDIO */
+#endif /* CONFIG_XENO_DRIVERS_NET_USE_MDIO */
 
 static int
 fec_enet_open(struct rtnet_device *rtdev)
@@ -1566,7 +1566,7 @@ fec_enet_open(struct rtnet_device *rtdev)
         * a simple way to do that.
         */
 
-#ifdef CONFIG_RTAI_RTNET_USE_MDIO
+#ifdef CONFIG_XENO_DRIVERS_NET_USE_MDIO
        fep->sequence_done = 0;
        fep->link = 0;
 
@@ -1578,7 +1578,7 @@ fec_enet_open(struct rtnet_device *rtdev)
 
                mii_do_cmd(dev, fep->phy->startup);
 
-#if defined(CONFIG_RTAI_RTNET_USE_MDIO) && defined(CONFIG_FEC_DP83846A)
+#if defined(CONFIG_XENO_DRIVERS_NET_USE_MDIO) && defined(CONFIG_FEC_DP83846A)
                if(fep->phy == &phy_info_dp83846a)
                {
                        /* Initializing timers
@@ -1603,18 +1603,18 @@ fec_enet_open(struct rtnet_device *rtdev)
        }
 #endif /* CONFIG_IP_PNP */
 
-#endif /* CONFIG_RTAI_RTNET_USE_MDIO && CONFIG_FEC_DP83846A */
+#endif /* CONFIG_XENO_DRIVERS_NET_USE_MDIO && CONFIG_FEC_DP83846A */
 
                netif_start_queue(dev);
                return 0;               /* Success */
        }
        return -ENODEV;         /* No PHY we understand */
-#else  /* !CONFIG_RTAI_RTNET_USE_MDIO */
+#else  /* !CONFIG_XENO_DRIVERS_NET_USE_MDIO */
        fep->link = 1;
        rtnetif_start_queue(rtdev);
 
        return 0;       /* Success */
-#endif /* CONFIG_RTAI_RTNET_USE_MDIO */
+#endif /* CONFIG_XENO_DRIVERS_NET_USE_MDIO */
 
 }
 
@@ -1637,7 +1637,7 @@ static struct net_device_stats *fec_enet_get_stats(struct 
rtnet_device *rtdev)
        return &fep->stats;
 }
 
-#ifdef CONFIG_RTAI_RTNET_USE_MDIO
+#ifdef CONFIG_XENO_DRIVERS_NET_USE_MDIO
 
 #if defined(CONFIG_FEC_DP83846A)
 /* Execute the ack_int command set and schedules next timer call back.  */
@@ -1768,7 +1768,7 @@ static int netdev_ethtool_ioctl (struct net_device *dev, 
void *useraddr)
        return -EOPNOTSUPP;
 }
 
-#endif /* CONFIG_RTAI_RTNET_USE_MDIO */
+#endif /* CONFIG_XENO_DRIVERS_NET_USE_MDIO */
 
 
 #ifdef ORIGINAL_VERSION
@@ -2061,7 +2061,7 @@ int __init fec_enet_init(void)
 /* If MDIO is disabled the PHY should not be allowed to
  * generate interrupts telling us to read the PHY.
  */
-# ifdef CONFIG_RTAI_RTNET_USE_MDIO
+# ifdef CONFIG_XENO_DRIVERS_NET_USE_MDIO
        /* Make Port C, bit 15 an input that causes interrupts.
        */
        immap->im_ioport.iop_pcpar &= ~0x0001;
@@ -2069,14 +2069,14 @@ int __init fec_enet_init(void)
        immap->im_ioport.iop_pcso  &= ~0x0001;
        immap->im_ioport.iop_pcint |=  0x0001;
        cpm_install_handler(CPMVEC_PIO_PC15, mii_link_interrupt, dev);
-# endif        /* CONFIG_RTAI_RTNET_USE_MDIO */
+# endif        /* CONFIG_XENO_DRIVERS_NET_USE_MDIO */
 
        /* Make LEDS reflect Link status.
        */
        *((uint *) RPX_CSR_ADDR) &= ~BCSR2_FETHLEDMODE;
 #endif /* CONFIG_RPXCLASSIC */
 
-#ifdef CONFIG_RTAI_RTNET_USE_MDIO
+#ifdef CONFIG_XENO_DRIVERS_NET_USE_MDIO
 # ifndef PHY_INTERRUPT
 #  error Want to use MII, but PHY_INTERRUPT not defined!
 # endif
@@ -2085,7 +2085,7 @@ int __init fec_enet_init(void)
 
        if (request_8xxirq(PHY_INTERRUPT, mii_link_interrupt, 0, "mii", dev) != 
0)
                panic("Could not allocate MII IRQ!");
-#endif /* CONFIG_RTAI_RTNET_USE_MDIO */
+#endif /* CONFIG_XENO_DRIVERS_NET_USE_MDIO */
 
        rtdev->base_addr = (unsigned long)fecp;
 
@@ -2103,13 +2103,13 @@ int __init fec_enet_init(void)
                return i;
        }
 
-#ifdef CONFIG_RTAI_RTNET_USE_MDIO
+#ifdef CONFIG_XENO_DRIVERS_NET_USE_MDIO
        dev->do_ioctl = fec_enet_ioctl;
 
        for (i=0; i<NMII-1; i++)
                mii_cmds[i].mii_next = &mii_cmds[i+1];
        mii_free = mii_cmds;
-#endif /* CONFIG_RTAI_RTNET_USE_MDIO */
+#endif /* CONFIG_XENO_DRIVERS_NET_USE_MDIO */
 
 #ifndef CONFIG_ICU862
        /* Configure all of port D for MII.
@@ -2138,10 +2138,10 @@ int __init fec_enet_init(void)
                immap->im_ioport.utmode |= 0x80;
        }
 
-# ifdef        CONFIG_RTAI_RTNET_USE_MDIO
+# ifdef        CONFIG_XENO_DRIVERS_NET_USE_MDIO
        /* Now configure MII_MDC pin */
        immap->im_ioport.iop_pdpar |= (0x8000 >> 8);
-# endif        /* CONFIG_RTAI_RTNET_USE_MDIO */
+# endif        /* CONFIG_XENO_DRIVERS_NET_USE_MDIO */
 #endif  /* CONFIG_ICU862 */
 
        /* Bits moved from Rev. D onward.
@@ -2151,14 +2151,14 @@ int __init fec_enet_init(void)
        else
                immap->im_ioport.iop_pddir = 0x1fff;    /* Rev. D and later */
 
-#ifdef CONFIG_RTAI_RTNET_USE_MDIO
+#ifdef CONFIG_XENO_DRIVERS_NET_USE_MDIO
        /* Set MII speed to 2.5 MHz
        */
        fecp->fec_mii_speed = fep->phy_speed =
            ((((bd->bi_intfreq + 4999999) / 2500000) / 2 ) & 0x3F ) << 1;
 #else
        fecp->fec_mii_speed = 0;        /* turn off MDIO */
-#endif /* CONFIG_RTAI_RTNET_USE_MDIO */
+#endif /* CONFIG_XENO_DRIVERS_NET_USE_MDIO */
 
 #ifndef ORIGINAL_VERSION
        printk("%s: FEC ENET Version 0.3, irq %d, addr 
%02x:%02x:%02x:%02x:%02x:%02x\n",
@@ -2167,7 +2167,7 @@ int __init fec_enet_init(void)
               rtdev->dev_addr[3], rtdev->dev_addr[4], rtdev->dev_addr[5]);
 #else
        printk ("%s: FEC ENET Version 0.3, FEC irq %d"
-#ifdef CONFIG_RTAI_RTNET_USE_MDIO
+#ifdef CONFIG_XENO_DRIVERS_NET_USE_MDIO
                ", with MDIO"
 #endif
 #ifdef PHY_INTERRUPT
@@ -2183,13 +2183,13 @@ int __init fec_enet_init(void)
                printk("%02x%c", rtdev->dev_addr[i], (i==5) ? '\n' : ':');
 #endif /* ORIGINAL_VERSION */
 
-#ifdef CONFIG_RTAI_RTNET_USE_MDIO      /* start in full duplex mode, and 
negotiate speed */
+#ifdef CONFIG_XENO_DRIVERS_NET_USE_MDIO        /* start in full duplex mode, 
and negotiate speed */
        fec_restart (dev, 1);
 #else                  /* always use half duplex mode only */
        fec_restart (rtdev, 0);
 #endif
 
-#ifdef CONFIG_RTAI_RTNET_USE_MDIO
+#ifdef CONFIG_XENO_DRIVERS_NET_USE_MDIO
        /* Queue up command to detect the PHY and initialize the
         * remainder of the interface.
         */
@@ -2198,7 +2198,7 @@ int __init fec_enet_init(void)
        mii_queue(dev, mk_mii_read(MII_REG_PHYIR1), mii_discover_phy, 0);
 
        fep->old_status = 0;
-#endif /* CONFIG_RTAI_RTNET_USE_MDIO */
+#endif /* CONFIG_XENO_DRIVERS_NET_USE_MDIO */
 
        return 0;
 }
@@ -2317,11 +2317,11 @@ fec_restart(struct rtnet_device *rtdev, int duplex)
        */
        fecp->fec_fun_code = 0x78000000;
 
-#ifdef CONFIG_RTAI_RTNET_USE_MDIO
+#ifdef CONFIG_XENO_DRIVERS_NET_USE_MDIO
        /* Set MII speed.
        */
        fecp->fec_mii_speed = fep->phy_speed;
-#endif /* CONFIG_RTAI_RTNET_USE_MDIO */
+#endif /* CONFIG_XENO_DRIVERS_NET_USE_MDIO */
 
        /* Clear any outstanding interrupt.
        */
@@ -2385,11 +2385,11 @@ fec_stop(struct rtnet_device *rtdev)
        fecp->fec_ivec = (FEC_INTERRUPT/2) << 29;
        fecp->fec_imask = FEC_ENET_MII;
 
-#ifdef CONFIG_RTAI_RTNET_USE_MDIO
+#ifdef CONFIG_XENO_DRIVERS_NET_USE_MDIO
        /* Set MII speed.
        */
        fecp->fec_mii_speed = fep->phy_speed;
-#endif /* CONFIG_RTAI_RTNET_USE_MDIO */
+#endif /* CONFIG_XENO_DRIVERS_NET_USE_MDIO */
 
        /* Disable FEC
        */
diff --git a/kernel/drivers/net/stack/include/rtcfg/rtcfg_conn_event.h 
b/kernel/drivers/net/stack/include/rtcfg/rtcfg_conn_event.h
index 4e054cc..88a1593 100644
--- a/kernel/drivers/net/stack/include/rtcfg/rtcfg_conn_event.h
+++ b/kernel/drivers/net/stack/include/rtcfg/rtcfg_conn_event.h
@@ -47,7 +47,7 @@ struct rtcfg_connection {
        u8                                              mac_addr[MAX_ADDR_LEN];
        unsigned int                    addr_type;
        union {
-#ifdef CONFIG_XENO_DRIVERS_NET_RTIPV4
+#if IS_ENABLED(CONFIG_XENO_DRIVERS_NET_RTIPV4)
                u32                                     ip_addr;
 #endif
        } addr;
diff --git a/kernel/drivers/net/stack/include/rtcfg/rtcfg_event.h 
b/kernel/drivers/net/stack/include/rtcfg/rtcfg_event.h
index cba6dc0..44c9bbb 100644
--- a/kernel/drivers/net/stack/include/rtcfg/rtcfg_event.h
+++ b/kernel/drivers/net/stack/include/rtcfg/rtcfg_event.h
@@ -76,7 +76,7 @@ struct rtcfg_device {
        struct {
            unsigned int            addr_type;
            union {
-#ifdef CONFIG_XENO_DRIVERS_NET_RTIPV4
+#if IS_ENABLED(CONFIG_XENO_DRIVERS_NET_RTIPV4)
                u32                 ip_addr;
 #endif
            } srv_addr;
diff --git a/kernel/drivers/net/stack/rtcfg/rtcfg_client_event.c 
b/kernel/drivers/net/stack/rtcfg/rtcfg_client_event.c
index 7a41091..561fef2 100644
--- a/kernel/drivers/net/stack/rtcfg/rtcfg_client_event.c
+++ b/kernel/drivers/net/stack/rtcfg/rtcfg_client_event.c
@@ -586,7 +586,7 @@ static void rtcfg_client_recv_stage_1(int ifindex, struct 
rtskb *rtskb)
     addr_type = stage_1_cfg->addr_type;
 
     switch (stage_1_cfg->addr_type) {
-#ifdef CONFIG_XENO_DRIVERS_NET_RTIPV4
+#if IS_ENABLED(CONFIG_XENO_DRIVERS_NET_RTIPV4)
         case RTCFG_ADDR_IP: {
             struct rtnet_device *rtdev, *tmp;
             u32                 daddr, saddr, mask, bcast;
@@ -758,7 +758,7 @@ static int rtcfg_client_recv_announce(int ifindex, struct 
rtskb *rtskb)
     }
 
     switch (announce_frm->addr_type) {
-#ifdef CONFIG_XENO_DRIVERS_NET_RTIPV4
+#if IS_ENABLED(CONFIG_XENO_DRIVERS_NET_RTIPV4)
         case RTCFG_ADDR_IP:
             if (rtskb->len < sizeof(struct rtcfg_frm_announce) +
                     RTCFG_ADDRSIZE_IP) {
@@ -1029,7 +1029,7 @@ static void rtcfg_client_recv_dead_station(int ifindex, 
struct rtskb *rtskb)
     }
 
     switch (dead_station_frm->addr_type) {
-#ifdef CONFIG_XENO_DRIVERS_NET_RTIPV4
+#if IS_ENABLED(CONFIG_XENO_DRIVERS_NET_RTIPV4)
         case RTCFG_ADDR_IP: {
             u32 ip;
 
@@ -1109,7 +1109,7 @@ static void rtcfg_client_update_server(int ifindex, 
struct rtskb *rtskb)
     __rtskb_pull(rtskb, sizeof(struct rtcfg_frm_stage_1_cfg));
 
     switch (stage_1_cfg->addr_type) {
-#ifdef CONFIG_XENO_DRIVERS_NET_RTIPV4
+#if IS_ENABLED(CONFIG_XENO_DRIVERS_NET_RTIPV4)
         case RTCFG_ADDR_IP: {
             struct rtnet_device *rtdev;
             u32                 daddr, saddr;
diff --git a/kernel/drivers/net/stack/rtcfg/rtcfg_conn_event.c 
b/kernel/drivers/net/stack/rtcfg/rtcfg_conn_event.c
index 42418d0..ad5181f 100644
--- a/kernel/drivers/net/stack/rtcfg/rtcfg_conn_event.c
+++ b/kernel/drivers/net/stack/rtcfg/rtcfg_conn_event.c
@@ -336,7 +336,7 @@ static void rtcfg_conn_check_cfg_timeout(struct 
rtcfg_connection *conn)
         conn->cfg_offs = 0;
         conn->flags    = 0;
 
-#ifdef CONFIG_XENO_DRIVERS_NET_RTIPV4
+#if IS_ENABLED(CONFIG_XENO_DRIVERS_NET_RTIPV4)
         if (conn->addr_type == RTCFG_ADDR_IP) {
             struct rtnet_device *rtdev;
 
@@ -376,7 +376,7 @@ static void rtcfg_conn_check_heartbeat(struct 
rtcfg_connection *conn)
         conn->cfg_offs = 0;
         conn->flags    = 0;
 
-#ifdef CONFIG_XENO_DRIVERS_NET_RTIPV4
+#if IS_ENABLED(CONFIG_XENO_DRIVERS_NET_RTIPV4)
         if ((conn->addr_type & RTCFG_ADDR_MASK) == RTCFG_ADDR_IP) {
             struct rtnet_device *rtdev = rtdev_get_by_index(conn->ifindex);
 
diff --git a/kernel/drivers/net/stack/rtcfg/rtcfg_event.c 
b/kernel/drivers/net/stack/rtcfg/rtcfg_event.c
index 2565e41..f60fc52 100644
--- a/kernel/drivers/net/stack/rtcfg/rtcfg_event.c
+++ b/kernel/drivers/net/stack/rtcfg/rtcfg_event.c
@@ -311,7 +311,7 @@ static int rtcfg_server_add(struct rtcfg_cmd *cmd_event)
     new_conn->ifindex      = cmd_event->internal.data.ifindex;
     new_conn->state        = RTCFG_CONN_SEARCHING;
     new_conn->addr_type    = cmd_event->args.add.addr_type;
-#ifdef CONFIG_XENO_DRIVERS_NET_RTIPV4
+#if IS_ENABLED(CONFIG_XENO_DRIVERS_NET_RTIPV4)
     new_conn->addr.ip_addr = cmd_event->args.add.ip_addr;
 #endif
     new_conn->stage1_data  = cmd_event->args.add.stage1_data;
@@ -320,7 +320,7 @@ static int rtcfg_server_add(struct rtcfg_cmd *cmd_event)
     new_conn->cfg_timeout  = ((u64)cmd_event->args.add.timeout) * 1000000;
 
     if (cmd_event->args.add.addr_type == RTCFG_ADDR_IP) {
-#ifdef CONFIG_XENO_DRIVERS_NET_RTIPV4
+#if IS_ENABLED(CONFIG_XENO_DRIVERS_NET_RTIPV4)
        struct rtnet_device *rtdev;
 
        /* MAC address yet unknown -> use broadcast address */
@@ -358,7 +358,7 @@ static int rtcfg_server_add(struct rtcfg_cmd *cmd_event)
        conn = list_entry(entry, struct rtcfg_connection, entry);
 
        if (
-#ifdef CONFIG_XENO_DRIVERS_NET_RTIPV4
+#if IS_ENABLED(CONFIG_XENO_DRIVERS_NET_RTIPV4)
            ((addr_type == RTCFG_ADDR_IP) &&
             (conn->addr.ip_addr == cmd_event->args.add.ip_addr)) ||
 #endif /* CONFIG_XENO_DRIVERS_NET_RTIPV4 */
@@ -413,7 +413,7 @@ static int rtcfg_server_del(struct rtcfg_cmd *cmd_event)
        conn = list_entry(entry, struct rtcfg_connection, entry);
 
        if ((addr_type == conn->addr_type) && (
-#ifdef CONFIG_XENO_DRIVERS_NET_RTIPV4
+#if IS_ENABLED(CONFIG_XENO_DRIVERS_NET_RTIPV4)
             ((addr_type == RTCFG_ADDR_IP) &&
              (conn->addr.ip_addr == cmd_event->args.add.ip_addr)) ||
 #endif /* CONFIG_XENO_DRIVERS_NET_RTIPV4 */
@@ -521,7 +521,7 @@ static int rtcfg_server_recv_announce(int ifindex, 
RTCFG_EVENT event_id,
        conn = list_entry(entry, struct rtcfg_connection, entry);
 
        switch (announce->addr_type) {
-#ifdef CONFIG_XENO_DRIVERS_NET_RTIPV4
+#if IS_ENABLED(CONFIG_XENO_DRIVERS_NET_RTIPV4)
            u32 announce_addr;
            case RTCFG_ADDR_IP:
                memcpy(&announce_addr, announce->addr, 4);
diff --git a/kernel/drivers/net/stack/rtcfg/rtcfg_frame.c 
b/kernel/drivers/net/stack/rtcfg/rtcfg_frame.c
index 71f39e5..7ca775d 100644
--- a/kernel/drivers/net/stack/rtcfg/rtcfg_frame.c
+++ b/kernel/drivers/net/stack/rtcfg/rtcfg_frame.c
@@ -139,7 +139,7 @@ int rtcfg_send_stage_1(struct rtcfg_connection *conn)
 
     rtskb_size = rtdev->hard_header_len +
        sizeof(struct rtcfg_frm_stage_1_cfg) + conn->stage1_size +
-#ifdef CONFIG_XENO_DRIVERS_NET_RTIPV4
+#if IS_ENABLED(CONFIG_XENO_DRIVERS_NET_RTIPV4)
        (((conn->addr_type & RTCFG_ADDR_MASK) == RTCFG_ADDR_IP) ?
        2*RTCFG_ADDRSIZE_IP : 0);
 #else /* !CONFIG_XENO_DRIVERS_NET_RTIPV4 */
@@ -161,7 +161,7 @@ int rtcfg_send_stage_1(struct rtcfg_connection *conn)
     stage_1_frm->head.version = 0;
     stage_1_frm->addr_type    = conn->addr_type & RTCFG_ADDR_MASK;
 
-#ifdef CONFIG_XENO_DRIVERS_NET_RTIPV4
+#if IS_ENABLED(CONFIG_XENO_DRIVERS_NET_RTIPV4)
     if (stage_1_frm->addr_type == RTCFG_ADDR_IP) {
        rtskb_put(rtskb, 2*RTCFG_ADDRSIZE_IP);
 
@@ -301,7 +301,7 @@ int rtcfg_send_announce_new(int ifindex)
        return -ENODEV;
 
     rtskb_size = rtdev->hard_header_len + sizeof(struct rtcfg_frm_announce) +
-#ifdef CONFIG_XENO_DRIVERS_NET_RTIPV4
+#if IS_ENABLED(CONFIG_XENO_DRIVERS_NET_RTIPV4)
        (((rtcfg_dev->spec.clt.addr_type & RTCFG_ADDR_MASK) == RTCFG_ADDR_IP) ?
        RTCFG_ADDRSIZE_IP : 0);
 #else /* !CONFIG_XENO_DRIVERS_NET_RTIPV4 */
@@ -323,7 +323,7 @@ int rtcfg_send_announce_new(int ifindex)
     announce_new->head.version = 0;
     announce_new->addr_type    = rtcfg_dev->spec.clt.addr_type;
 
-#ifdef CONFIG_XENO_DRIVERS_NET_RTIPV4
+#if IS_ENABLED(CONFIG_XENO_DRIVERS_NET_RTIPV4)
     if (announce_new->addr_type == RTCFG_ADDR_IP) {
        rtskb_put(rtskb, RTCFG_ADDRSIZE_IP);
 
@@ -357,7 +357,7 @@ int rtcfg_send_announce_reply(int ifindex, u8 
*dest_mac_addr)
 
     rtskb_size = rtdev->hard_header_len +
        sizeof(struct rtcfg_frm_announce) +
-#ifdef CONFIG_XENO_DRIVERS_NET_RTIPV4
+#if IS_ENABLED(CONFIG_XENO_DRIVERS_NET_RTIPV4)
        ((rtcfg_dev->spec.clt.addr_type == RTCFG_ADDR_IP) ?
        RTCFG_ADDRSIZE_IP : 0);
 #else /* !CONFIG_XENO_DRIVERS_NET_RTIPV4 */
@@ -379,7 +379,7 @@ int rtcfg_send_announce_reply(int ifindex, u8 
*dest_mac_addr)
     announce_rpl->head.version = 0;
     announce_rpl->addr_type    = rtcfg_dev->spec.clt.addr_type;
 
-#ifdef CONFIG_XENO_DRIVERS_NET_RTIPV4
+#if IS_ENABLED(CONFIG_XENO_DRIVERS_NET_RTIPV4)
     if (announce_rpl->addr_type == RTCFG_ADDR_IP) {
        rtskb_put(rtskb, RTCFG_ADDRSIZE_IP);
 
@@ -481,7 +481,7 @@ int rtcfg_send_dead_station(struct rtcfg_connection *conn)
 
     rtskb_size = rtdev->hard_header_len +
        sizeof(struct rtcfg_frm_dead_station) +
-#ifdef CONFIG_XENO_DRIVERS_NET_RTIPV4
+#if IS_ENABLED(CONFIG_XENO_DRIVERS_NET_RTIPV4)
        (((conn->addr_type & RTCFG_ADDR_MASK) == RTCFG_ADDR_IP) ?
        RTCFG_ADDRSIZE_IP : 0);
 #else /* !CONFIG_XENO_DRIVERS_NET_RTIPV4 */
@@ -503,7 +503,7 @@ int rtcfg_send_dead_station(struct rtcfg_connection *conn)
     dead_station_frm->head.version = 0;
     dead_station_frm->addr_type    = conn->addr_type & RTCFG_ADDR_MASK;
 
-#ifdef CONFIG_XENO_DRIVERS_NET_RTIPV4
+#if IS_ENABLED(CONFIG_XENO_DRIVERS_NET_RTIPV4)
     if (dead_station_frm->addr_type == RTCFG_ADDR_IP) {
        rtskb_put(rtskb, RTCFG_ADDRSIZE_IP);
 
diff --git a/kernel/drivers/net/stack/rtcfg/rtcfg_proc.c 
b/kernel/drivers/net/stack/rtcfg/rtcfg_proc.c
index 7e00837..a7a6b23 100644
--- a/kernel/drivers/net/stack/rtcfg/rtcfg_proc.c
+++ b/kernel/drivers/net/stack/rtcfg/rtcfg_proc.c
@@ -156,7 +156,7 @@ rtnet_rtcfg_dev_conn_state_show(struct 
xnvfile_regular_iterator *it, void *d)
                                conn->mac_addr[2], conn->mac_addr[3],
                                conn->mac_addr[4], conn->mac_addr[5]);
 
-#ifdef CONFIG_XENO_DRIVERS_NET_RTIPV4
+#if IS_ENABLED(CONFIG_XENO_DRIVERS_NET_RTIPV4)
        if ((conn->addr_type & RTCFG_ADDR_MASK) == RTCFG_ADDR_IP)
                xnvfile_printf(it, "ip:\t\t\t%u.%u.%u.%u\n",
                                        NIPQUAD(conn->addr.ip_addr));
@@ -180,7 +180,7 @@ void rtcfg_update_conn_proc_entries(int ifindex)
 
        list_for_each_entry(conn, &dev->spec.srv.conn_list, entry) {
                switch (conn->addr_type & RTCFG_ADDR_MASK) {
-#ifdef CONFIG_XENO_DRIVERS_NET_RTIPV4
+#if IS_ENABLED(CONFIG_XENO_DRIVERS_NET_RTIPV4)
                case RTCFG_ADDR_IP:
                        snprintf(name_buf, 64, "CLIENT_%u.%u.%u.%u",
                                        NIPQUAD(conn->addr.ip_addr));
diff --git a/kernel/drivers/net/stack/rtdev.c b/kernel/drivers/net/stack/rtdev.c
index 539de88..69de645 100644
--- a/kernel/drivers/net/stack/rtdev.c
+++ b/kernel/drivers/net/stack/rtdev.c
@@ -61,6 +61,7 @@ int rtdev_reference(struct rtnet_device *rtdev)
     }
     return 1;
 }
+EXPORT_SYMBOL_GPL(rtdev_reference);
 
 struct rtskb *rtnetdev_alloc_rtskb(struct rtnet_device *rtdev, unsigned int 
size)
 {


_______________________________________________
Xenomai-git mailing list
Xenomai-git@xenomai.org
http://www.xenomai.org/mailman/listinfo/xenomai-git

Reply via email to