|
@@ -966,6 +966,8 @@ static int yam_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd)
|
|
|
sizeof(struct yamdrv_ioctl_mcs));
|
|
sizeof(struct yamdrv_ioctl_mcs));
|
|
|
if (IS_ERR(ym))
|
|
if (IS_ERR(ym))
|
|
|
return PTR_ERR(ym);
|
|
return PTR_ERR(ym);
|
|
|
|
|
+ if (ym->cmd != SIOCYAMSMCS)
|
|
|
|
|
+ return -EINVAL;
|
|
|
if (ym->bitrate > YAM_MAXBITRATE) {
|
|
if (ym->bitrate > YAM_MAXBITRATE) {
|
|
|
kfree(ym);
|
|
kfree(ym);
|
|
|
return -EINVAL;
|
|
return -EINVAL;
|
|
@@ -981,6 +983,8 @@ static int yam_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd)
|
|
|
if (copy_from_user(&yi, ifr->ifr_data, sizeof(struct yamdrv_ioctl_cfg)))
|
|
if (copy_from_user(&yi, ifr->ifr_data, sizeof(struct yamdrv_ioctl_cfg)))
|
|
|
return -EFAULT;
|
|
return -EFAULT;
|
|
|
|
|
|
|
|
|
|
+ if (yi.cmd != SIOCYAMSCFG)
|
|
|
|
|
+ return -EINVAL;
|
|
|
if ((yi.cfg.mask & YAM_IOBASE) && netif_running(dev))
|
|
if ((yi.cfg.mask & YAM_IOBASE) && netif_running(dev))
|
|
|
return -EINVAL; /* Cannot change this parameter when up */
|
|
return -EINVAL; /* Cannot change this parameter when up */
|
|
|
if ((yi.cfg.mask & YAM_IRQ) && netif_running(dev))
|
|
if ((yi.cfg.mask & YAM_IRQ) && netif_running(dev))
|