summaryrefslogtreecommitdiffstats
path: root/drivers/net/stmmac/stmmac_main.c
diff options
context:
space:
mode:
authorGiuseppe CAVALLARO2010-04-13 22:21:12 +0200
committerDavid S. Miller2010-04-14 13:49:50 +0200
commit56b106ae7b1f6b7cef4ef7e79a03b59cfc940923 (patch)
tree3bf4908dd7a31231480f7f7289e6660b49bd41e3 /drivers/net/stmmac/stmmac_main.c
parentstmmac: split core and dma for the mac10/100 (diff)
downloadkernel-qcow2-linux-56b106ae7b1f6b7cef4ef7e79a03b59cfc940923.tar.gz
kernel-qcow2-linux-56b106ae7b1f6b7cef4ef7e79a03b59cfc940923.tar.xz
kernel-qcow2-linux-56b106ae7b1f6b7cef4ef7e79a03b59cfc940923.zip
stmmac: rework normal and enhanced descriptors
Currently the driver assumes that the mac10/100 can only use the normal descriptor structure and the gmac can only use the enhanced structures. This patch removes the descriptor's code from the dma files and adds two new files just for handling the normal and enhanced descriptors. Signed-off-by: Giuseppe Cavallaro <peppe.cavallaro@st.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/stmmac/stmmac_main.c')
-rw-r--r--drivers/net/stmmac/stmmac_main.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/net/stmmac/stmmac_main.c b/drivers/net/stmmac/stmmac_main.c
index cbe2404223d7..dfeea96f681a 100644
--- a/drivers/net/stmmac/stmmac_main.c
+++ b/drivers/net/stmmac/stmmac_main.c
@@ -1581,10 +1581,13 @@ static int stmmac_mac_device_setup(struct net_device *dev)
struct mac_device_info *device;
- if (priv->is_gmac)
+ if (priv->is_gmac) {
device = dwmac1000_setup(ioaddr);
- else
+ device->desc = &enh_desc_ops;
+ } else {
device = dwmac100_setup(ioaddr);
+ device->desc = &ndesc_ops;
+ }
if (!device)
return -ENOMEM;