diff options
author | John Crispin <blogic@openwrt.org> | 2015-02-09 12:13:55 +0000 |
---|---|---|
committer | John Crispin <blogic@openwrt.org> | 2015-02-09 12:13:55 +0000 |
commit | d7139c52f2d1321b3fd2cc8987ac77b3c795c5e2 (patch) | |
tree | 63e8d6df938cb1086ba2ccbbb2d0cfada198e539 /target/linux/ramips/files/drivers/net | |
parent | d09e8adc85ecec168bc0e1eb926e7c160c9b906e (diff) | |
download | master-187ad058-d7139c52f2d1321b3fd2cc8987ac77b3c795c5e2.tar.gz master-187ad058-d7139c52f2d1321b3fd2cc8987ac77b3c795c5e2.tar.bz2 master-187ad058-d7139c52f2d1321b3fd2cc8987ac77b3c795c5e2.zip |
ralink: add 3.18 support
keep default as 3.14, mt7621 gic need to be ported to 3.18
Signed-off-by: John Crispin <blogic@openwrt.org>
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@44349 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux/ramips/files/drivers/net')
3 files changed, 11 insertions, 5 deletions
diff --git a/target/linux/ramips/files/drivers/net/ethernet/ralink/ralink_ethtool.c b/target/linux/ramips/files/drivers/net/ethernet/ralink/ralink_ethtool.c index df61963dc9..cbe5fadb1f 100644 --- a/target/linux/ramips/files/drivers/net/ethernet/ralink/ralink_ethtool.c +++ b/target/linux/ramips/files/drivers/net/ethernet/ralink/ralink_ethtool.c @@ -178,12 +178,12 @@ static void fe_get_ethtool_stats(struct net_device *dev, do { data_src = &hwstats->tx_bytes; data_dst = data; - start = u64_stats_fetch_begin_bh(&hwstats->syncp); + start = u64_stats_fetch_begin_irq(&hwstats->syncp); for (i = 0; i < ARRAY_SIZE(fe_gdma_str); i++) *data_dst++ = *data_src++; - } while (u64_stats_fetch_retry_bh(&hwstats->syncp, start)); + } while (u64_stats_fetch_retry_irq(&hwstats->syncp, start)); } static struct ethtool_ops fe_ethtool_ops = { diff --git a/target/linux/ramips/files/drivers/net/ethernet/ralink/ralink_soc_eth.c b/target/linux/ramips/files/drivers/net/ethernet/ralink/ralink_soc_eth.c index 12c6ccaf98..14a950a003 100644 --- a/target/linux/ramips/files/drivers/net/ethernet/ralink/ralink_soc_eth.c +++ b/target/linux/ramips/files/drivers/net/ethernet/ralink/ralink_soc_eth.c @@ -453,7 +453,7 @@ static struct rtnl_link_stats64 *fe_get_stats64(struct net_device *dev, } do { - start = u64_stats_fetch_begin_bh(&hwstats->syncp); + start = u64_stats_fetch_begin_irq(&hwstats->syncp); storage->rx_packets = hwstats->rx_packets; storage->tx_packets = hwstats->tx_packets; storage->rx_bytes = hwstats->rx_bytes; @@ -465,7 +465,7 @@ static struct rtnl_link_stats64 *fe_get_stats64(struct net_device *dev, storage->rx_crc_errors = hwstats->rx_fcs_errors; storage->rx_errors = hwstats->rx_checksum_errors; storage->tx_aborted_errors = hwstats->tx_skip; - } while (u64_stats_fetch_retry_bh(&hwstats->syncp, start)); + } while (u64_stats_fetch_retry_irq(&hwstats->syncp, start)); storage->tx_errors = priv->netdev->stats.tx_errors; storage->rx_dropped = priv->netdev->stats.rx_dropped; @@ -1414,7 +1414,7 @@ static int fe_probe(struct platform_device *pdev) else soc->reg_table = fe_reg_table; - fe_base = devm_request_and_ioremap(&pdev->dev, res); + fe_base = devm_ioremap_resource(&pdev->dev, res); if (!fe_base) { err = -EADDRNOTAVAIL; goto err_out; diff --git a/target/linux/ramips/files/drivers/net/ethernet/ralink/ralink_soc_eth.h b/target/linux/ramips/files/drivers/net/ethernet/ralink/ralink_soc_eth.h index 8c204768b7..a193a564c5 100644 --- a/target/linux/ramips/files/drivers/net/ethernet/ralink/ralink_soc_eth.h +++ b/target/linux/ramips/files/drivers/net/ethernet/ralink/ralink_soc_eth.h @@ -25,6 +25,12 @@ #include <linux/dma-mapping.h> #include <linux/phy.h> #include <linux/ethtool.h> +#include <linux/version.h> + +#if LINUX_VERSION_CODE < KERNEL_VERSION(3,15,0) +#define u64_stats_fetch_retry_irq u64_stats_fetch_retry_bh +#define u64_stats_fetch_begin_irq u64_stats_fetch_begin_bh +#endif enum fe_reg { FE_REG_PDMA_GLO_CFG = 0, |