diff options
author | Gabor Juhos <juhosg@openwrt.org> | 2013-12-20 11:41:17 +0000 |
---|---|---|
committer | Gabor Juhos <juhosg@openwrt.org> | 2013-12-20 11:41:17 +0000 |
commit | c52c793ce1ea54b92622608cff26c1fb93d9451c (patch) | |
tree | cfd97477879cece55ef44fc29d18e33194020317 /target/linux/ar71xx/files/drivers | |
parent | 121c26751ee7e4f6495843824e70e5026318eaa8 (diff) | |
download | upstream-c52c793ce1ea54b92622608cff26c1fb93d9451c.tar.gz upstream-c52c793ce1ea54b92622608cff26c1fb93d9451c.tar.bz2 upstream-c52c793ce1ea54b92622608cff26c1fb93d9451c.zip |
ar71xx: ag71xx: get max_frame_len and desc_pktlen_mask from platform data
This will allow to use SoC specific values for both.
Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@39145 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux/ar71xx/files/drivers')
-rw-r--r-- | target/linux/ar71xx/files/drivers/net/ethernet/atheros/ag71xx/ag71xx_main.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/target/linux/ar71xx/files/drivers/net/ethernet/atheros/ag71xx/ag71xx_main.c b/target/linux/ar71xx/files/drivers/net/ethernet/atheros/ag71xx/ag71xx_main.c index a129a6f291..9df27ff1a9 100644 --- a/target/linux/ar71xx/files/drivers/net/ethernet/atheros/ag71xx/ag71xx_main.c +++ b/target/linux/ar71xx/files/drivers/net/ethernet/atheros/ag71xx/ag71xx_main.c @@ -1124,6 +1124,9 @@ static int ag71xx_probe(struct platform_device *pdev) goto err_out; } + if (!pdata->max_frame_len || !pdata->desc_pktlen_mask) + return -EINVAL; + SET_NETDEV_DEV(dev, &pdev->dev); ag = netdev_priv(dev); @@ -1169,8 +1172,8 @@ static int ag71xx_probe(struct platform_device *pdev) ag->tx_ring.size = AG71XX_TX_RING_SIZE_DEFAULT; ag->rx_ring.size = AG71XX_RX_RING_SIZE_DEFAULT; - ag->max_frame_len = AG71XX_TX_MTU_LEN; - ag->desc_pktlen_mask = DESC_PKTLEN_MASK; + ag->max_frame_len = pdata->max_frame_len; + ag->desc_pktlen_mask = pdata->desc_pktlen_mask; ag->stop_desc = dma_alloc_coherent(NULL, sizeof(struct ag71xx_desc), &ag->stop_desc_dma, GFP_KERNEL); |