mirror of
https://github.com/apache/nuttx.git
synced 2026-06-01 07:45:16 +08:00
Merge remote-tracking branch 'origin/master' into ieee802154
This commit is contained in:
@@ -304,12 +304,14 @@ static void kinetis_txavail_work(FAR void *arg);
|
|||||||
static int kinetis_txavail(struct net_driver_s *dev);
|
static int kinetis_txavail(struct net_driver_s *dev);
|
||||||
|
|
||||||
#ifdef CONFIG_NET_IGMP
|
#ifdef CONFIG_NET_IGMP
|
||||||
static int kinetis_addmac(struct net_driver_s *dev, FAR const uint8_t *mac);
|
static int kinetis_addmac(struct net_driver_s *dev,
|
||||||
|
FAR const uint8_t *mac);
|
||||||
static int kinetis_rmmac(struct net_driver_s *dev, FAR const uint8_t *mac);
|
static int kinetis_rmmac(struct net_driver_s *dev, FAR const uint8_t *mac);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef CONFIG_NETDEV_PHY_IOCTL
|
#ifdef CONFIG_NETDEV_PHY_IOCTL
|
||||||
static int kinetis_ioctl(struct net_driver_s *dev, int cmd, long arg);
|
static int kinetis_ioctl(struct net_driver_s *dev, int cmd,
|
||||||
|
unsigned long arg);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* PHY/MII support */
|
/* PHY/MII support */
|
||||||
@@ -1447,7 +1449,7 @@ static int kinetis_rmmac(struct net_driver_s *dev, FAR const uint8_t *mac)
|
|||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
#ifdef CONFIG_NETDEV_PHY_IOCTL
|
#ifdef CONFIG_NETDEV_PHY_IOCTL
|
||||||
static int kinetis_ioctl(struct net_driver_s *dev, int cmd, long arg)
|
static int kinetis_ioctl(struct net_driver_s *dev, int cmd, unsigned long arg)
|
||||||
{
|
{
|
||||||
int ret;
|
int ret;
|
||||||
FAR struct kinetis_driver_s *priv =
|
FAR struct kinetis_driver_s *priv =
|
||||||
|
|||||||
@@ -572,7 +572,8 @@ static void lpc43_checksetup(void);
|
|||||||
|
|
||||||
static void lpc43_initbuffer(FAR struct lpc43_ethmac_s *priv);
|
static void lpc43_initbuffer(FAR struct lpc43_ethmac_s *priv);
|
||||||
static inline uint8_t *lpc43_allocbuffer(FAR struct lpc43_ethmac_s *priv);
|
static inline uint8_t *lpc43_allocbuffer(FAR struct lpc43_ethmac_s *priv);
|
||||||
static inline void lpc43_freebuffer(FAR struct lpc43_ethmac_s *priv, uint8_t *buffer);
|
static inline void lpc43_freebuffer(FAR struct lpc43_ethmac_s *priv,
|
||||||
|
uint8_t *buffer);
|
||||||
static inline bool lpc43_isfreebuffer(FAR struct lpc43_ethmac_s *priv);
|
static inline bool lpc43_isfreebuffer(FAR struct lpc43_ethmac_s *priv);
|
||||||
|
|
||||||
/* Common TX logic */
|
/* Common TX logic */
|
||||||
@@ -583,8 +584,10 @@ static void lpc43_dopoll(FAR struct lpc43_ethmac_s *priv);
|
|||||||
|
|
||||||
/* Interrupt handling */
|
/* Interrupt handling */
|
||||||
|
|
||||||
static void lpc43_enableint(FAR struct lpc43_ethmac_s *priv, uint32_t ierbit);
|
static void lpc43_enableint(FAR struct lpc43_ethmac_s *priv,
|
||||||
static void lpc43_disableint(FAR struct lpc43_ethmac_s *priv, uint32_t ierbit);
|
uint32_t ierbit);
|
||||||
|
static void lpc43_disableint(FAR struct lpc43_ethmac_s *priv,
|
||||||
|
uint32_t ierbit);
|
||||||
|
|
||||||
static void lpc43_freesegment(FAR struct lpc43_ethmac_s *priv,
|
static void lpc43_freesegment(FAR struct lpc43_ethmac_s *priv,
|
||||||
FAR struct eth_rxdesc_s *rxfirst, int segments);
|
FAR struct eth_rxdesc_s *rxfirst, int segments);
|
||||||
@@ -619,7 +622,8 @@ static int lpc43_addmac(struct net_driver_s *dev, FAR const uint8_t *mac);
|
|||||||
static int lpc43_rmmac(struct net_driver_s *dev, FAR const uint8_t *mac);
|
static int lpc43_rmmac(struct net_driver_s *dev, FAR const uint8_t *mac);
|
||||||
#endif
|
#endif
|
||||||
#ifdef CONFIG_NETDEV_PHY_IOCTL
|
#ifdef CONFIG_NETDEV_PHY_IOCTL
|
||||||
static int lpc43_ioctl(struct net_driver_s *dev, int cmd, long arg);
|
static int lpc43_ioctl(struct net_driver_s *dev, int cmd,
|
||||||
|
unsigned long arg);
|
||||||
#endif
|
#endif
|
||||||
/* Descriptor Initialization */
|
/* Descriptor Initialization */
|
||||||
|
|
||||||
@@ -630,8 +634,10 @@ static void lpc43_rxdescinit(FAR struct lpc43_ethmac_s *priv);
|
|||||||
#if defined(CONFIG_NETDEV_PHY_IOCTL) && defined(CONFIG_ARCH_PHY_INTERRUPT)
|
#if defined(CONFIG_NETDEV_PHY_IOCTL) && defined(CONFIG_ARCH_PHY_INTERRUPT)
|
||||||
static int lpc43_phyintenable(FAR struct lpc43_ethmac_s *priv);
|
static int lpc43_phyintenable(FAR struct lpc43_ethmac_s *priv);
|
||||||
#endif
|
#endif
|
||||||
static int lpc43_phyread(uint16_t phydevaddr, uint16_t phyregaddr, uint16_t *value);
|
static int lpc43_phyread(uint16_t phydevaddr, uint16_t phyregaddr,
|
||||||
static int lpc43_phywrite(uint16_t phydevaddr, uint16_t phyregaddr, uint16_t value);
|
uint16_t *value);
|
||||||
|
static int lpc43_phywrite(uint16_t phydevaddr, uint16_t phyregaddr,
|
||||||
|
uint16_t value);
|
||||||
#ifdef CONFIG_ETH0_PHY_DM9161
|
#ifdef CONFIG_ETH0_PHY_DM9161
|
||||||
static inline int lpc43_dm9161(FAR struct lpc43_ethmac_s *priv);
|
static inline int lpc43_dm9161(FAR struct lpc43_ethmac_s *priv);
|
||||||
#endif
|
#endif
|
||||||
@@ -2739,7 +2745,7 @@ static void lpc43_rxdescinit(FAR struct lpc43_ethmac_s *priv)
|
|||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
#ifdef CONFIG_NETDEV_PHY_IOCTL
|
#ifdef CONFIG_NETDEV_PHY_IOCTL
|
||||||
static int lpc43_ioctl(struct net_driver_s *dev, int cmd, long arg)
|
static int lpc43_ioctl(struct net_driver_s *dev, int cmd, unsigned long arg)
|
||||||
{
|
{
|
||||||
#ifdef CONFIG_ARCH_PHY_INTERRUPT
|
#ifdef CONFIG_ARCH_PHY_INTERRUPT
|
||||||
FAR struct lpc43_ethmac_s *priv = (FAR struct lpc43_ethmac_s *)dev->d_private;
|
FAR struct lpc43_ethmac_s *priv = (FAR struct lpc43_ethmac_s *)dev->d_private;
|
||||||
|
|||||||
@@ -409,7 +409,7 @@ static int sam_rmmac(struct net_driver_s *dev, const uint8_t *mac);
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef CONFIG_NETDEV_PHY_IOCTL
|
#ifdef CONFIG_NETDEV_PHY_IOCTL
|
||||||
static int sam_ioctl(struct net_driver_s *dev, int cmd, long arg);
|
static int sam_ioctl(struct net_driver_s *dev, int cmd, unsigned long arg);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* PHY Initialization */
|
/* PHY Initialization */
|
||||||
@@ -2310,7 +2310,7 @@ static int sam_rmmac(struct net_driver_s *dev, const uint8_t *mac)
|
|||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
#ifdef CONFIG_NETDEV_PHY_IOCTL
|
#ifdef CONFIG_NETDEV_PHY_IOCTL
|
||||||
static int sam_ioctl(struct net_driver_s *dev, int cmd, long arg)
|
static int sam_ioctl(struct net_driver_s *dev, int cmd, unsigned long arg)
|
||||||
{
|
{
|
||||||
struct sam_emac_s *priv = (struct sam_emac_s *)dev->d_private;
|
struct sam_emac_s *priv = (struct sam_emac_s *)dev->d_private;
|
||||||
int ret;
|
int ret;
|
||||||
|
|||||||
@@ -414,7 +414,7 @@ static int sam_rmmac(struct net_driver_s *dev, const uint8_t *mac);
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef CONFIG_NETDEV_PHY_IOCTL
|
#ifdef CONFIG_NETDEV_PHY_IOCTL
|
||||||
static int sam_ioctl(struct net_driver_s *dev, int cmd, long arg);
|
static int sam_ioctl(struct net_driver_s *dev, int cmd, unsigned long arg);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* PHY Initialization */
|
/* PHY Initialization */
|
||||||
@@ -2346,7 +2346,7 @@ static int sam_rmmac(struct net_driver_s *dev, const uint8_t *mac)
|
|||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
#ifdef CONFIG_NETDEV_PHY_IOCTL
|
#ifdef CONFIG_NETDEV_PHY_IOCTL
|
||||||
static int sam_ioctl(struct net_driver_s *dev, int cmd, long arg)
|
static int sam_ioctl(struct net_driver_s *dev, int cmd, unsigned long arg)
|
||||||
{
|
{
|
||||||
struct sam_emac_s *priv = (struct sam_emac_s *)dev->d_private;
|
struct sam_emac_s *priv = (struct sam_emac_s *)dev->d_private;
|
||||||
int ret;
|
int ret;
|
||||||
|
|||||||
@@ -508,7 +508,7 @@ static int sam_rmmac(struct net_driver_s *dev, const uint8_t *mac);
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef CONFIG_NETDEV_PHY_IOCTL
|
#ifdef CONFIG_NETDEV_PHY_IOCTL
|
||||||
static int sam_ioctl(struct net_driver_s *dev, int cmd, long arg);
|
static int sam_ioctl(struct net_driver_s *dev, int cmd, unsigned long arg);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* PHY Initialization */
|
/* PHY Initialization */
|
||||||
@@ -2713,7 +2713,7 @@ static int sam_rmmac(struct net_driver_s *dev, const uint8_t *mac)
|
|||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
#ifdef CONFIG_NETDEV_PHY_IOCTL
|
#ifdef CONFIG_NETDEV_PHY_IOCTL
|
||||||
static int sam_ioctl(struct net_driver_s *dev, int cmd, long arg)
|
static int sam_ioctl(struct net_driver_s *dev, int cmd, unsigned long arg)
|
||||||
{
|
{
|
||||||
struct sam_emac_s *priv = (struct sam_emac_s *)dev->d_private;
|
struct sam_emac_s *priv = (struct sam_emac_s *)dev->d_private;
|
||||||
int ret;
|
int ret;
|
||||||
|
|||||||
@@ -339,7 +339,7 @@ static int sam_rmmac(struct net_driver_s *dev, const uint8_t *mac);
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef CONFIG_NETDEV_PHY_IOCTL
|
#ifdef CONFIG_NETDEV_PHY_IOCTL
|
||||||
static int sam_ioctl(struct net_driver_s *dev, int cmd, long arg);
|
static int sam_ioctl(struct net_driver_s *dev, int cmd, unsigned long arg);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* PHY Initialization */
|
/* PHY Initialization */
|
||||||
@@ -2301,7 +2301,7 @@ static int sam_rmmac(struct net_driver_s *dev, const uint8_t *mac)
|
|||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
#ifdef CONFIG_NETDEV_PHY_IOCTL
|
#ifdef CONFIG_NETDEV_PHY_IOCTL
|
||||||
static int sam_ioctl(struct net_driver_s *dev, int cmd, long arg)
|
static int sam_ioctl(struct net_driver_s *dev, int cmd, unsigned long arg)
|
||||||
{
|
{
|
||||||
struct sam_gmac_s *priv = (struct sam_gmac_s *)dev->d_private;
|
struct sam_gmac_s *priv = (struct sam_gmac_s *)dev->d_private;
|
||||||
int ret;
|
int ret;
|
||||||
|
|||||||
@@ -610,7 +610,7 @@ static int sam_rmmac(struct net_driver_s *dev, const uint8_t *mac);
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef CONFIG_NETDEV_PHY_IOCTL
|
#ifdef CONFIG_NETDEV_PHY_IOCTL
|
||||||
static int sam_ioctl(struct net_driver_s *dev, int cmd, long arg);
|
static int sam_ioctl(struct net_driver_s *dev, int cmd, unsigned long arg);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* PHY Initialization */
|
/* PHY Initialization */
|
||||||
@@ -3164,7 +3164,7 @@ static int sam_rmmac(struct net_driver_s *dev, const uint8_t *mac)
|
|||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
#ifdef CONFIG_NETDEV_PHY_IOCTL
|
#ifdef CONFIG_NETDEV_PHY_IOCTL
|
||||||
static int sam_ioctl(struct net_driver_s *dev, int cmd, long arg)
|
static int sam_ioctl(struct net_driver_s *dev, int cmd, unsigned long arg)
|
||||||
{
|
{
|
||||||
struct sam_emac_s *priv = (struct sam_emac_s *)dev->d_private;
|
struct sam_emac_s *priv = (struct sam_emac_s *)dev->d_private;
|
||||||
int ret;
|
int ret;
|
||||||
|
|||||||
@@ -635,7 +635,8 @@ static void stm32_checksetup(void);
|
|||||||
|
|
||||||
static void stm32_initbuffer(FAR struct stm32_ethmac_s *priv);
|
static void stm32_initbuffer(FAR struct stm32_ethmac_s *priv);
|
||||||
static inline uint8_t *stm32_allocbuffer(FAR struct stm32_ethmac_s *priv);
|
static inline uint8_t *stm32_allocbuffer(FAR struct stm32_ethmac_s *priv);
|
||||||
static inline void stm32_freebuffer(FAR struct stm32_ethmac_s *priv, uint8_t *buffer);
|
static inline void stm32_freebuffer(FAR struct stm32_ethmac_s *priv,
|
||||||
|
uint8_t *buffer);
|
||||||
static inline bool stm32_isfreebuffer(FAR struct stm32_ethmac_s *priv);
|
static inline bool stm32_isfreebuffer(FAR struct stm32_ethmac_s *priv);
|
||||||
|
|
||||||
/* Common TX logic */
|
/* Common TX logic */
|
||||||
@@ -646,8 +647,10 @@ static void stm32_dopoll(FAR struct stm32_ethmac_s *priv);
|
|||||||
|
|
||||||
/* Interrupt handling */
|
/* Interrupt handling */
|
||||||
|
|
||||||
static void stm32_enableint(FAR struct stm32_ethmac_s *priv, uint32_t ierbit);
|
static void stm32_enableint(FAR struct stm32_ethmac_s *priv,
|
||||||
static void stm32_disableint(FAR struct stm32_ethmac_s *priv, uint32_t ierbit);
|
uint32_t ierbit);
|
||||||
|
static void stm32_disableint(FAR struct stm32_ethmac_s *priv,
|
||||||
|
uint32_t ierbit);
|
||||||
|
|
||||||
static void stm32_freesegment(FAR struct stm32_ethmac_s *priv,
|
static void stm32_freesegment(FAR struct stm32_ethmac_s *priv,
|
||||||
FAR struct eth_rxdesc_s *rxfirst, int segments);
|
FAR struct eth_rxdesc_s *rxfirst, int segments);
|
||||||
@@ -682,7 +685,8 @@ static int stm32_addmac(struct net_driver_s *dev, FAR const uint8_t *mac);
|
|||||||
static int stm32_rmmac(struct net_driver_s *dev, FAR const uint8_t *mac);
|
static int stm32_rmmac(struct net_driver_s *dev, FAR const uint8_t *mac);
|
||||||
#endif
|
#endif
|
||||||
#ifdef CONFIG_NETDEV_PHY_IOCTL
|
#ifdef CONFIG_NETDEV_PHY_IOCTL
|
||||||
static int stm32_ioctl(struct net_driver_s *dev, int cmd, long arg);
|
static int stm32_ioctl(struct net_driver_s *dev, int cmd,
|
||||||
|
unsigned long arg);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Descriptor Initialization */
|
/* Descriptor Initialization */
|
||||||
@@ -697,9 +701,11 @@ static int stm32_phyintenable(FAR struct stm32_ethmac_s *priv);
|
|||||||
#endif
|
#endif
|
||||||
#if defined(CONFIG_STM32_AUTONEG) || defined(CONFIG_NETDEV_PHY_IOCTL) || \
|
#if defined(CONFIG_STM32_AUTONEG) || defined(CONFIG_NETDEV_PHY_IOCTL) || \
|
||||||
defined(CONFIG_ETH0_PHY_DM9161)
|
defined(CONFIG_ETH0_PHY_DM9161)
|
||||||
static int stm32_phyread(uint16_t phydevaddr, uint16_t phyregaddr, uint16_t *value);
|
static int stm32_phyread(uint16_t phydevaddr, uint16_t phyregaddr,
|
||||||
|
uint16_t *value);
|
||||||
#endif
|
#endif
|
||||||
static int stm32_phywrite(uint16_t phydevaddr, uint16_t phyregaddr, uint16_t value);
|
static int stm32_phywrite(uint16_t phydevaddr, uint16_t phyregaddr,
|
||||||
|
uint16_t value);
|
||||||
#ifdef CONFIG_ETH0_PHY_DM9161
|
#ifdef CONFIG_ETH0_PHY_DM9161
|
||||||
static inline int stm32_dm9161(FAR struct stm32_ethmac_s *priv);
|
static inline int stm32_dm9161(FAR struct stm32_ethmac_s *priv);
|
||||||
#endif
|
#endif
|
||||||
@@ -2805,7 +2811,7 @@ static void stm32_rxdescinit(FAR struct stm32_ethmac_s *priv)
|
|||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
#ifdef CONFIG_NETDEV_PHY_IOCTL
|
#ifdef CONFIG_NETDEV_PHY_IOCTL
|
||||||
static int stm32_ioctl(struct net_driver_s *dev, int cmd, long arg)
|
static int stm32_ioctl(struct net_driver_s *dev, int cmd, unsigned long arg)
|
||||||
{
|
{
|
||||||
#ifdef CONFIG_ARCH_PHY_INTERRUPT
|
#ifdef CONFIG_ARCH_PHY_INTERRUPT
|
||||||
FAR struct stm32_ethmac_s *priv = (FAR struct stm32_ethmac_s *)dev->d_private;
|
FAR struct stm32_ethmac_s *priv = (FAR struct stm32_ethmac_s *)dev->d_private;
|
||||||
|
|||||||
@@ -680,7 +680,8 @@ static void stm32_checksetup(void);
|
|||||||
static void stm32_initbuffer(struct stm32_ethmac_s *priv,
|
static void stm32_initbuffer(struct stm32_ethmac_s *priv,
|
||||||
uint8_t *txbuffer);
|
uint8_t *txbuffer);
|
||||||
static inline uint8_t *stm32_allocbuffer(struct stm32_ethmac_s *priv);
|
static inline uint8_t *stm32_allocbuffer(struct stm32_ethmac_s *priv);
|
||||||
static inline void stm32_freebuffer(struct stm32_ethmac_s *priv, uint8_t *buffer);
|
static inline void stm32_freebuffer(struct stm32_ethmac_s *priv,
|
||||||
|
uint8_t *buffer);
|
||||||
static inline bool stm32_isfreebuffer(struct stm32_ethmac_s *priv);
|
static inline bool stm32_isfreebuffer(struct stm32_ethmac_s *priv);
|
||||||
|
|
||||||
/* Common TX logic */
|
/* Common TX logic */
|
||||||
@@ -727,7 +728,8 @@ static int stm32_addmac(struct net_driver_s *dev, const uint8_t *mac);
|
|||||||
static int stm32_rmmac(struct net_driver_s *dev, const uint8_t *mac);
|
static int stm32_rmmac(struct net_driver_s *dev, const uint8_t *mac);
|
||||||
#endif
|
#endif
|
||||||
#ifdef CONFIG_NETDEV_PHY_IOCTL
|
#ifdef CONFIG_NETDEV_PHY_IOCTL
|
||||||
static int stm32_ioctl(struct net_driver_s *dev, int cmd, long arg);
|
static int stm32_ioctl(struct net_driver_s *dev, int cmd,
|
||||||
|
unsigned long arg);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Descriptor Initialization */
|
/* Descriptor Initialization */
|
||||||
@@ -735,16 +737,17 @@ static int stm32_ioctl(struct net_driver_s *dev, int cmd, long arg);
|
|||||||
static void stm32_txdescinit(struct stm32_ethmac_s *priv,
|
static void stm32_txdescinit(struct stm32_ethmac_s *priv,
|
||||||
union stm32_txdesc_u *txtable);
|
union stm32_txdesc_u *txtable);
|
||||||
static void stm32_rxdescinit(struct stm32_ethmac_s *priv,
|
static void stm32_rxdescinit(struct stm32_ethmac_s *priv,
|
||||||
union stm32_rxdesc_u *rxtable,
|
union stm32_rxdesc_u *rxtable, uint8_t *rxbuffer);
|
||||||
uint8_t *rxbuffer);
|
|
||||||
|
|
||||||
/* PHY Initialization */
|
/* PHY Initialization */
|
||||||
|
|
||||||
#if defined(CONFIG_NETDEV_PHY_IOCTL) && defined(CONFIG_ARCH_PHY_INTERRUPT)
|
#if defined(CONFIG_NETDEV_PHY_IOCTL) && defined(CONFIG_ARCH_PHY_INTERRUPT)
|
||||||
static int stm32_phyintenable(struct stm32_ethmac_s *priv);
|
static int stm32_phyintenable(struct stm32_ethmac_s *priv);
|
||||||
#endif
|
#endif
|
||||||
static int stm32_phyread(uint16_t phydevaddr, uint16_t phyregaddr, uint16_t *value);
|
static int stm32_phyread(uint16_t phydevaddr, uint16_t phyregaddr,
|
||||||
static int stm32_phywrite(uint16_t phydevaddr, uint16_t phyregaddr, uint16_t value);
|
uint16_t *value);
|
||||||
|
static int stm32_phywrite(uint16_t phydevaddr, uint16_t phyregaddr,
|
||||||
|
uint16_t value);
|
||||||
#ifdef CONFIG_ETH0_PHY_DM9161
|
#ifdef CONFIG_ETH0_PHY_DM9161
|
||||||
static inline int stm32_dm9161(struct stm32_ethmac_s *priv);
|
static inline int stm32_dm9161(struct stm32_ethmac_s *priv);
|
||||||
#endif
|
#endif
|
||||||
@@ -2938,7 +2941,7 @@ static void stm32_rxdescinit(struct stm32_ethmac_s *priv,
|
|||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
#ifdef CONFIG_NETDEV_PHY_IOCTL
|
#ifdef CONFIG_NETDEV_PHY_IOCTL
|
||||||
static int stm32_ioctl(struct net_driver_s *dev, int cmd, long arg)
|
static int stm32_ioctl(struct net_driver_s *dev, int cmd, unsigned long arg)
|
||||||
{
|
{
|
||||||
#ifdef CONFIG_ARCH_PHY_INTERRUPT
|
#ifdef CONFIG_ARCH_PHY_INTERRUPT
|
||||||
struct stm32_ethmac_s *priv = (struct stm32_ethmac_s *)dev->d_private;
|
struct stm32_ethmac_s *priv = (struct stm32_ethmac_s *)dev->d_private;
|
||||||
|
|||||||
@@ -685,7 +685,8 @@ static void tiva_checksetup(void);
|
|||||||
|
|
||||||
static void tiva_initbuffer(FAR struct tiva_ethmac_s *priv);
|
static void tiva_initbuffer(FAR struct tiva_ethmac_s *priv);
|
||||||
static inline uint8_t *tiva_allocbuffer(FAR struct tiva_ethmac_s *priv);
|
static inline uint8_t *tiva_allocbuffer(FAR struct tiva_ethmac_s *priv);
|
||||||
static inline void tiva_freebuffer(FAR struct tiva_ethmac_s *priv, uint8_t *buffer);
|
static inline void tiva_freebuffer(FAR struct tiva_ethmac_s *priv,
|
||||||
|
uint8_t *buffer);
|
||||||
static inline bool tiva_isfreebuffer(FAR struct tiva_ethmac_s *priv);
|
static inline bool tiva_isfreebuffer(FAR struct tiva_ethmac_s *priv);
|
||||||
|
|
||||||
/* Common TX logic */
|
/* Common TX logic */
|
||||||
@@ -697,7 +698,8 @@ static void tiva_dopoll(FAR struct tiva_ethmac_s *priv);
|
|||||||
/* Interrupt handling */
|
/* Interrupt handling */
|
||||||
|
|
||||||
static void tiva_enableint(FAR struct tiva_ethmac_s *priv, uint32_t ierbit);
|
static void tiva_enableint(FAR struct tiva_ethmac_s *priv, uint32_t ierbit);
|
||||||
static void tiva_disableint(FAR struct tiva_ethmac_s *priv, uint32_t ierbit);
|
static void tiva_disableint(FAR struct tiva_ethmac_s *priv,
|
||||||
|
uint32_t ierbit);
|
||||||
|
|
||||||
static void tiva_freesegment(FAR struct tiva_ethmac_s *priv,
|
static void tiva_freesegment(FAR struct tiva_ethmac_s *priv,
|
||||||
FAR struct emac_rxdesc_s *rxfirst, int segments);
|
FAR struct emac_rxdesc_s *rxfirst, int segments);
|
||||||
@@ -732,7 +734,8 @@ static int tiva_addmac(struct net_driver_s *dev, FAR const uint8_t *mac);
|
|||||||
static int tiva_rmmac(struct net_driver_s *dev, FAR const uint8_t *mac);
|
static int tiva_rmmac(struct net_driver_s *dev, FAR const uint8_t *mac);
|
||||||
#endif
|
#endif
|
||||||
#ifdef CONFIG_NETDEV_PHY_IOCTL
|
#ifdef CONFIG_NETDEV_PHY_IOCTL
|
||||||
static int tiva_ioctl(struct net_driver_s *dev, int cmd, long arg);
|
static int tiva_ioctl(struct net_driver_s *dev, int cmd,
|
||||||
|
unsigned long arg);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Descriptor Initialization */
|
/* Descriptor Initialization */
|
||||||
@@ -745,8 +748,10 @@ static void tiva_rxdescinit(FAR struct tiva_ethmac_s *priv);
|
|||||||
#ifdef CONFIG_TIVA_PHY_INTERRUPTS
|
#ifdef CONFIG_TIVA_PHY_INTERRUPTS
|
||||||
static void tiva_phy_intenable(bool enable);
|
static void tiva_phy_intenable(bool enable);
|
||||||
#endif
|
#endif
|
||||||
static int tiva_phyread(uint16_t phydevaddr, uint16_t phyregaddr, uint16_t *value);
|
static int tiva_phyread(uint16_t phydevaddr, uint16_t phyregaddr,
|
||||||
static int tiva_phywrite(uint16_t phydevaddr, uint16_t phyregaddr, uint16_t value);
|
uint16_t *value);
|
||||||
|
static int tiva_phywrite(uint16_t phydevaddr, uint16_t phyregaddr,
|
||||||
|
uint16_t value);
|
||||||
static int tiva_phyinit(FAR struct tiva_ethmac_s *priv);
|
static int tiva_phyinit(FAR struct tiva_ethmac_s *priv);
|
||||||
|
|
||||||
/* MAC/DMA Initialization */
|
/* MAC/DMA Initialization */
|
||||||
@@ -766,6 +771,7 @@ static int tive_emac_configure(FAR struct tiva_ethmac_s *priv);
|
|||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Private Functions
|
* Private Functions
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Name: tiva_getreg
|
* Name: tiva_getreg
|
||||||
*
|
*
|
||||||
@@ -2855,7 +2861,7 @@ static void tiva_rxdescinit(FAR struct tiva_ethmac_s *priv)
|
|||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
#ifdef CONFIG_NETDEV_PHY_IOCTL
|
#ifdef CONFIG_NETDEV_PHY_IOCTL
|
||||||
static int tiva_ioctl(struct net_driver_s *dev, int cmd, long arg)
|
static int tiva_ioctl(struct net_driver_s *dev, int cmd, unsigned long arg)
|
||||||
{
|
{
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
|
|||||||
@@ -182,16 +182,19 @@ static void skel_txavail_work(FAR void *arg);
|
|||||||
static int skel_txavail(FAR struct net_driver_s *dev);
|
static int skel_txavail(FAR struct net_driver_s *dev);
|
||||||
|
|
||||||
#if defined(CONFIG_NET_IGMP) || defined(CONFIG_NET_ICMPv6)
|
#if defined(CONFIG_NET_IGMP) || defined(CONFIG_NET_ICMPv6)
|
||||||
static int skel_addmac(FAR struct net_driver_s *dev, FAR const uint8_t *mac);
|
static int skel_addmac(FAR struct net_driver_s *dev,
|
||||||
|
FAR const uint8_t *mac);
|
||||||
#ifdef CONFIG_NET_IGMP
|
#ifdef CONFIG_NET_IGMP
|
||||||
static int skel_rmmac(FAR struct net_driver_s *dev, FAR const uint8_t *mac);
|
static int skel_rmmac(FAR struct net_driver_s *dev,
|
||||||
|
FAR const uint8_t *mac);
|
||||||
#endif
|
#endif
|
||||||
#ifdef CONFIG_NET_ICMPv6
|
#ifdef CONFIG_NET_ICMPv6
|
||||||
static void skel_ipv6multicast(FAR struct skel_driver_s *priv);
|
static void skel_ipv6multicast(FAR struct skel_driver_s *priv);
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
#ifdef CONFIG_NETDEV_IOCTL
|
#ifdef CONFIG_NETDEV_IOCTL
|
||||||
static int skel_ioctl(FAR struct net_driver_s *dev, int cmd, long arg);
|
static int skel_ioctl(FAR struct net_driver_s *dev, int cmd,
|
||||||
|
unsigned long arg);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
@@ -1095,7 +1098,8 @@ static void skel_ipv6multicast(FAR struct skel_driver_s *priv)
|
|||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
#ifdef CONFIG_NETDEV_IOCTL
|
#ifdef CONFIG_NETDEV_IOCTL
|
||||||
static int skel_ioctl(FAR struct net_driver_s *dev, int cmd, long arg)
|
static int skel_ioctl(FAR struct net_driver_s *dev, int cmd,
|
||||||
|
unsigned long arg)
|
||||||
{
|
{
|
||||||
FAR struct skel_driver_s *priv = (FAR struct skel_driver_s *)dev->d_private;
|
FAR struct skel_driver_s *priv = (FAR struct skel_driver_s *)dev->d_private;
|
||||||
int ret;
|
int ret;
|
||||||
|
|||||||
@@ -331,7 +331,8 @@ struct net_driver_s
|
|||||||
int (*d_rmmac)(FAR struct net_driver_s *dev, FAR const uint8_t *mac);
|
int (*d_rmmac)(FAR struct net_driver_s *dev, FAR const uint8_t *mac);
|
||||||
#endif
|
#endif
|
||||||
#ifdef CONFIG_NETDEV_IOCTL
|
#ifdef CONFIG_NETDEV_IOCTL
|
||||||
int (*d_ioctl)(FAR struct net_driver_s *dev, int cmd, long arg);
|
int (*d_ioctl)(FAR struct net_driver_s *dev, int cmd,
|
||||||
|
unsigned long arg);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Drivers may attached device-specific, private information */
|
/* Drivers may attached device-specific, private information */
|
||||||
|
|||||||
@@ -459,7 +459,7 @@ static int netdev_wifrioctl(FAR struct socket *psock, int cmd,
|
|||||||
{
|
{
|
||||||
/* Just forward the IOCTL to the wireless driver */
|
/* Just forward the IOCTL to the wireless driver */
|
||||||
|
|
||||||
ret = dev->d_ioctl(dev, cmd, ((long)(uintptr_t)req));
|
ret = dev->d_ioctl(dev, cmd, ((unsigned long)(uintptr_t)req));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -901,7 +901,7 @@ static int netdev_ifrioctl(FAR struct socket *psock, int cmd,
|
|||||||
if (dev && dev->d_ioctl)
|
if (dev && dev->d_ioctl)
|
||||||
{
|
{
|
||||||
struct mii_iotcl_notify_s *notify = &req->ifr_ifru.ifru_mii_notify;
|
struct mii_iotcl_notify_s *notify = &req->ifr_ifru.ifru_mii_notify;
|
||||||
ret = dev->d_ioctl(dev, cmd, ((long)(uintptr_t)notify));
|
ret = dev->d_ioctl(dev, cmd, ((unsigned long)(uintptr_t)notify));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@@ -915,7 +915,7 @@ static int netdev_ifrioctl(FAR struct socket *psock, int cmd,
|
|||||||
if (dev && dev->d_ioctl)
|
if (dev && dev->d_ioctl)
|
||||||
{
|
{
|
||||||
struct mii_ioctl_data_s *mii_data = &req->ifr_ifru.ifru_mii_data;
|
struct mii_ioctl_data_s *mii_data = &req->ifr_ifru.ifru_mii_data;
|
||||||
ret = dev->d_ioctl(dev, cmd, ((long)(uintptr_t)mii_data));
|
ret = dev->d_ioctl(dev, cmd, ((unsigned long)(uintptr_t)mii_data));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|||||||
@@ -161,7 +161,24 @@ static uint16_t send_interrupt(FAR struct net_driver_s *dev,
|
|||||||
|
|
||||||
ninfo("flags: %04x: %d\n", flags);
|
ninfo("flags: %04x: %d\n", flags);
|
||||||
|
|
||||||
/* Check if the IEEE802.15.4 went down */
|
#ifdef CONFIG_NET_MULTILINK
|
||||||
|
/* Verify that this is an IEEE802.15.4 network driver. */
|
||||||
|
|
||||||
|
if (dev->d_lltype != NET_LL_IEEE802154)
|
||||||
|
{
|
||||||
|
return flags;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef CONFIG_NET_MULTINIC
|
||||||
|
/* REVISIT: Verify that this is the correct IEEE802.15.4 network driver to
|
||||||
|
* route the outgoing frame(s). Chances are that there is only one
|
||||||
|
* IEEE802.15.4 network driver
|
||||||
|
*/
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* Check if the IEEE802.15.4 network driver went down */
|
||||||
|
|
||||||
if ((flags & NETDEV_DOWN) != 0)
|
if ((flags & NETDEV_DOWN) != 0)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user