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