aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSandeep Paulraj <s-paulraj@ti.com>2012-09-13 11:32:04 -0400
committerCyril Chemparathy <cyril@ti.com>2012-09-21 10:44:13 -0400
commit0c9a8df26a4ded7bd16d8101e8c2b1d9d58baa07 (patch)
tree106cae6a37d7561f7e91b2edf75167b787a75344
parente8657cd42b5b42a283d9e6915669d8a5976d099e (diff)
downloadlinux-keystone-0c9a8df26a4ded7bd16d8101e8c2b1d9d58baa07.tar.gz
net:ti-cpsw: update driver with vlan support
The existing ti cpsw driver is used in DaVinci and OMAP SOC's. The address lookup engine driver was enhanced to add support for vlan's. This required a change in the ale api's. The driver is being modified to call the api's with updated arguments. Signed-off-by: Sandeep Paulraj <s-paulraj@ti.com>
-rw-r--r--drivers/net/ethernet/ti/cpsw.c16
1 files changed, 11 insertions, 5 deletions
diff --git a/drivers/net/ethernet/ti/cpsw.c b/drivers/net/ethernet/ti/cpsw.c
index 1e5d85b06e71b1..cf251b02fd5377 100644
--- a/drivers/net/ethernet/ti/cpsw.c
+++ b/drivers/net/ethernet/ti/cpsw.c
@@ -34,6 +34,8 @@
#include "cpsw_ale.h"
#include "davinci_cpdma.h"
+#define CPSW_NON_VLAN_ADDR -1
+
#define CPSW_DEBUG (NETIF_MSG_HW | NETIF_MSG_WOL | \
NETIF_MSG_DRV | NETIF_MSG_LINK | \
NETIF_MSG_IFUP | NETIF_MSG_INTR | \
@@ -399,7 +401,7 @@ static void _cpsw_adjust_link(struct cpsw_slave *slave,
slave->mac_control = mac_control;
}
-static void cpsw_adjust_link(struct net_device *ndev)
+static void cpsw_adjust_link(struct net_device *ndev, void *context)
{
struct cpsw_priv *priv = netdev_priv(ndev);
bool link = false;
@@ -449,10 +451,12 @@ static void cpsw_slave_open(struct cpsw_slave *slave, struct cpsw_priv *priv)
slave_port = cpsw_get_slave_port(priv, slave->slave_num);
cpsw_ale_add_mcast(priv->ale, priv->ndev->broadcast,
- 1 << slave_port, 0, ALE_MCAST_FWD_2);
+ 1 << slave_port, 0,
+ ALE_MCAST_FWD_2, CPSW_NON_VLAN_ADDR);
slave->phy = phy_connect(priv->ndev, slave->data->phy_id,
- &cpsw_adjust_link, 0, slave->data->phy_if);
+ &cpsw_adjust_link, 0,
+ slave->data->phy_if, NULL);
if (IS_ERR(slave->phy)) {
dev_err(priv->dev, "phy %s not found on slave %d\n",
slave->data->phy_id, slave->slave_num);
@@ -481,9 +485,11 @@ static void cpsw_init_host_port(struct cpsw_priv *priv)
cpsw_ale_control_set(priv->ale, priv->host_port,
ALE_PORT_STATE, ALE_PORT_STATE_FORWARD);
- cpsw_ale_add_ucast(priv->ale, priv->mac_addr, priv->host_port, 0);
+ cpsw_ale_add_ucast(priv->ale, priv->mac_addr, priv->host_port,
+ 0, CPSW_NON_VLAN_ADDR);
cpsw_ale_add_mcast(priv->ale, priv->ndev->broadcast,
- 1 << priv->host_port, 0, ALE_MCAST_FWD_2);
+ 1 << priv->host_port, 0,
+ ALE_MCAST_FWD_2, CPSW_NON_VLAN_ADDR);
}
static int cpsw_ndo_open(struct net_device *ndev)