diff --git a/drivers/net/via-velocity.c b/drivers/net/via-velocity.c
index 3356fd8de23a5822853e95b598aa3ab74a68d178..f053d2a9e4f2cc2066168769cd758480549f29b2 100644
--- a/drivers/net/via-velocity.c
+++ b/drivers/net/via-velocity.c
@@ -2892,7 +2892,7 @@ static int velocity_mii_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd
 	struct velocity_info *vptr = dev->priv;
 	struct mac_regs * regs = vptr->mac_regs;
 	unsigned long flags;
-	struct mii_ioctl_data *miidata = (struct mii_ioctl_data *) &(ifr->ifr_data);
+	struct mii_ioctl_data *miidata = if_mii(ifr);
 	int err;
 	
 	switch (cmd) {