Advertisement
Guest User

neta gcc fixes

a guest
Sep 11th, 2017
18
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Diff 1.37 KB | None | 0 0
  1. diff --git a/sys/dev/neta/if_mvneta.c b/sys/dev/neta/if_mvneta.c
  2. index 010cdd5..83b9888 100644
  3. --- a/sys/dev/neta/if_mvneta.c
  4. +++ b/sys/dev/neta/if_mvneta.c
  5. @@ -97,16 +97,6 @@ __FBSDID("$FreeBSD$");
  6.  
  7.  #define    A3700_TCLK_250MHZ       250000000
  8.  
  9. -STATIC uint32_t
  10. -mvneta_get_clk()
  11. -{
  12. -#if defined(__aarch64__)
  13. -   return (A3700_TCLK_250MHZ);
  14. -#else
  15. -   return (get_tclk());
  16. -#endif
  17. -}
  18. -
  19.  /* Device Register Initialization */
  20.  STATIC int mvneta_initreg(struct ifnet *);
  21.  
  22. @@ -213,6 +203,9 @@ STATIC int mvneta_detach(device_t);
  23.  STATIC int mvneta_miibus_readreg(device_t, int, int);
  24.  STATIC int mvneta_miibus_writereg(device_t, int, int, int);
  25.  
  26. +/* Clock */
  27. +STATIC uint32_t mvneta_get_clk(void);
  28. +
  29.  static device_method_t mvneta_methods[] = {
  30.     /* Device interface */
  31.     DEVMETHOD(device_detach,    mvneta_detach),
  32. @@ -354,6 +347,16 @@ static struct {
  33.     { mvneta_rxtxth_intr, "MVNETA aggregated interrupt" },
  34.  };
  35.  
  36. +STATIC uint32_t
  37. +mvneta_get_clk()
  38. +{
  39. +#if defined(__aarch64__)
  40. +   return (A3700_TCLK_250MHZ);
  41. +#else
  42. +   return (get_tclk());
  43. +#endif
  44. +}
  45. +
  46.  static int
  47.  mvneta_set_mac_address(struct mvneta_softc *sc, uint8_t *addr)
  48.  {
  49. @@ -831,11 +834,9 @@ STATIC int
  50.  mvneta_detach(device_t dev)
  51.  {
  52.     struct mvneta_softc *sc;
  53. -   struct ifnet *ifp;
  54.     int q;
  55.  
  56.     sc = device_get_softc(dev);
  57. -   ifp = sc->ifp;
  58.  
  59.     mvneta_stop(sc);
  60.     /* Detach network interface */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement