summaryrefslogtreecommitdiff
path: root/net/mac80211/iface.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/mac80211/iface.c')
-rw-r--r--net/mac80211/iface.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/net/mac80211/iface.c b/net/mac80211/iface.c
index 242a3c1..33ee381 100644
--- a/net/mac80211/iface.c
+++ b/net/mac80211/iface.c
@@ -1137,6 +1137,7 @@ static u16 ieee80211_netdev_select_queue(struct net_device *dev,
static void
ieee80211_get_stats64(struct net_device *dev, struct rtnl_link_stats64 *stats)
{
+#if LINUX_VERSION_IS_GEQ(3,14,0)
int i;
for_each_possible_cpu(i) {
@@ -1159,6 +1160,7 @@ ieee80211_get_stats64(struct net_device *dev, struct rtnl_link_stats64 *stats)
stats->rx_bytes += rx_bytes;
stats->tx_bytes += tx_bytes;
}
+#endif
}
static const struct net_device_ops ieee80211_dataif_ops = {
@@ -1232,7 +1234,11 @@ static void ieee80211_if_setup(struct net_device *dev)
static void ieee80211_if_setup_no_queue(struct net_device *dev)
{
ieee80211_if_setup(dev);
+#if LINUX_VERSION_IS_GEQ(4,3,0)
dev->priv_flags |= IFF_NO_QUEUE;
+#else
+ dev->tx_queue_len = 0;
+#endif
}
static void ieee80211_iface_work(struct work_struct *work)
@@ -1913,9 +1919,11 @@ int ieee80211_if_add(struct ieee80211_local *local, const char *name,
netdev_set_default_ethtool_ops(ndev, &ieee80211_ethtool_ops);
+#if LINUX_VERSION_IS_GEQ(4,10,0)
/* MTU range: 256 - 2304 */
ndev->min_mtu = 256;
ndev->max_mtu = IEEE80211_MAX_DATA_LEN;
+#endif
ret = register_netdevice(ndev);
if (ret) {