015-ipw200-mtu.patch 945 B

12345678910111213141516171819202122232425262728293031323334
  1. --- a/drivers/net/wireless/intel/ipw2x00/ipw2200.c
  2. +++ b/drivers/net/wireless/intel/ipw2x00/ipw2200.c
  3. @@ -11499,6 +11499,15 @@ static const struct attribute_group ipw_
  4. .attrs = ipw_sysfs_entries,
  5. };
  6. +#if LINUX_VERSION_IS_LESS(4,10,0)
  7. +static int __change_mtu(struct net_device *ndev, int new_mtu){
  8. + if (new_mtu < 68 || new_mtu > LIBIPW_DATA_LEN)
  9. + return -EINVAL;
  10. + ndev->mtu = new_mtu;
  11. + return 0;
  12. +}
  13. +#endif
  14. +
  15. #ifdef CPTCFG_IPW2200_PROMISCUOUS
  16. static int ipw_prom_open(struct net_device *dev)
  17. {
  18. @@ -11547,15 +11556,6 @@ static netdev_tx_t ipw_prom_hard_start_x
  19. return NETDEV_TX_OK;
  20. }
  21. -#if LINUX_VERSION_IS_LESS(4,10,0)
  22. -static int __change_mtu(struct net_device *ndev, int new_mtu){
  23. - if (new_mtu < 68 || new_mtu > LIBIPW_DATA_LEN)
  24. - return -EINVAL;
  25. - ndev->mtu = new_mtu;
  26. - return 0;
  27. -}
  28. -#endif
  29. -
  30. static const struct net_device_ops ipw_prom_netdev_ops = {
  31. #if LINUX_VERSION_IS_LESS(4,10,0)
  32. .ndo_change_mtu = __change_mtu,