mirror of
https://git.hardenedbsd.org/hardenedbsd/HardenedBSD.git
synced 2024-12-18 22:15:46 +01:00
Fix gcc compilation issues in the mvneta driver
Compiling mvneta driver with gcc unveiled two issues, that required fixing. Reported by: andrew Obtained from: Semihalf
This commit is contained in:
parent
43cc906f40
commit
40c2a6da0d
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=323983
@ -97,16 +97,6 @@ __FBSDID("$FreeBSD$");
|
||||
|
||||
#define A3700_TCLK_250MHZ 250000000
|
||||
|
||||
STATIC uint32_t
|
||||
mvneta_get_clk()
|
||||
{
|
||||
#if defined(__aarch64__)
|
||||
return (A3700_TCLK_250MHZ);
|
||||
#else
|
||||
return (get_tclk());
|
||||
#endif
|
||||
}
|
||||
|
||||
/* Device Register Initialization */
|
||||
STATIC int mvneta_initreg(struct ifnet *);
|
||||
|
||||
@ -213,6 +203,9 @@ STATIC int mvneta_detach(device_t);
|
||||
STATIC int mvneta_miibus_readreg(device_t, int, int);
|
||||
STATIC int mvneta_miibus_writereg(device_t, int, int, int);
|
||||
|
||||
/* Clock */
|
||||
STATIC uint32_t mvneta_get_clk(void);
|
||||
|
||||
static device_method_t mvneta_methods[] = {
|
||||
/* Device interface */
|
||||
DEVMETHOD(device_detach, mvneta_detach),
|
||||
@ -354,6 +347,16 @@ static struct {
|
||||
{ mvneta_rxtxth_intr, "MVNETA aggregated interrupt" },
|
||||
};
|
||||
|
||||
STATIC uint32_t
|
||||
mvneta_get_clk()
|
||||
{
|
||||
#if defined(__aarch64__)
|
||||
return (A3700_TCLK_250MHZ);
|
||||
#else
|
||||
return (get_tclk());
|
||||
#endif
|
||||
}
|
||||
|
||||
static int
|
||||
mvneta_set_mac_address(struct mvneta_softc *sc, uint8_t *addr)
|
||||
{
|
||||
@ -831,11 +834,9 @@ STATIC int
|
||||
mvneta_detach(device_t dev)
|
||||
{
|
||||
struct mvneta_softc *sc;
|
||||
struct ifnet *ifp;
|
||||
int q;
|
||||
|
||||
sc = device_get_softc(dev);
|
||||
ifp = sc->ifp;
|
||||
|
||||
mvneta_stop(sc);
|
||||
/* Detach network interface */
|
||||
|
Loading…
Reference in New Issue
Block a user