aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHauke Mehrtens <hauke@hauke-m.de>2018-09-28 21:40:11 +0200
committerHauke Mehrtens <hauke@hauke-m.de>2018-09-28 21:40:11 +0200
commit92a96dd66232953482478b317f857f9475d85e50 (patch)
treea6a7f101cf6510780ab4660625328213c8d3248c
parentd8274451cb86021107b5efd99694857f869ae6a1 (diff)
downloadupstream-92a96dd66232953482478b317f857f9475d85e50.tar.gz
upstream-92a96dd66232953482478b317f857f9475d85e50.tar.bz2
upstream-92a96dd66232953482478b317f857f9475d85e50.zip
mac80211: fix ipw200 build with kernel < 4.10
The __change_mtu() function is only compiled when CPTCFG_IPW2200_PROMISCUOUS is set, more it to the general area. Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
-rw-r--r--package/kernel/mac80211/patches/build/015-ipw200-mtu.patch34
1 files changed, 34 insertions, 0 deletions
diff --git a/package/kernel/mac80211/patches/build/015-ipw200-mtu.patch b/package/kernel/mac80211/patches/build/015-ipw200-mtu.patch
new file mode 100644
index 0000000000..d57d821fea
--- /dev/null
+++ b/package/kernel/mac80211/patches/build/015-ipw200-mtu.patch
@@ -0,0 +1,34 @@
+--- a/drivers/net/wireless/intel/ipw2x00/ipw2200.c
++++ b/drivers/net/wireless/intel/ipw2x00/ipw2200.c
+@@ -11498,6 +11498,15 @@ static const struct attribute_group ipw_
+ .attrs = ipw_sysfs_entries,
+ };
+
++#if LINUX_VERSION_IS_LESS(4,10,0)
++static int __change_mtu(struct net_device *ndev, int new_mtu){
++ if (new_mtu < 68 || new_mtu > LIBIPW_DATA_LEN)
++ return -EINVAL;
++ ndev->mtu = new_mtu;
++ return 0;
++}
++#endif
++
+ #ifdef CPTCFG_IPW2200_PROMISCUOUS
+ static int ipw_prom_open(struct net_device *dev)
+ {
+@@ -11546,15 +11555,6 @@ static netdev_tx_t ipw_prom_hard_start_x
+ return NETDEV_TX_OK;
+ }
+
+-#if LINUX_VERSION_IS_LESS(4,10,0)
+-static int __change_mtu(struct net_device *ndev, int new_mtu){
+- if (new_mtu < 68 || new_mtu > LIBIPW_DATA_LEN)
+- return -EINVAL;
+- ndev->mtu = new_mtu;
+- return 0;
+-}
+-#endif
+-
+ static const struct net_device_ops ipw_prom_netdev_ops = {
+ #if LINUX_VERSION_IS_LESS(4,10,0)
+ .ndo_change_mtu = __change_mtu,