From 4aa3a715551c93eda32d79bd52042ce500bd5383 Mon Sep 17 00:00:00 2001 From: Sebastian Poehn Date: Mon, 20 Jun 2011 13:57:59 -0700 Subject: gianfar v5: implement nfc This patch adds all missing functionalities for nfc except GRXFH. There is so much code because hardware has not a TCAM. Further hardware rule space is very limited. So I had to extensively use optimization features. Both reasons lead to the necessity to hold all online flows in a linked-list. Change-log: # Some suggestions by Joe Perches applied (thanks!) # Shorted some logs # Use memcmp() for comparing Signed-off-by: Sebastian Poehn Signed-off-by: David S. Miller --- drivers/net/gianfar.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'drivers/net/gianfar.c') diff --git a/drivers/net/gianfar.c b/drivers/net/gianfar.c index 0c748328ca7b..def7f7efc803 100644 --- a/drivers/net/gianfar.c +++ b/drivers/net/gianfar.c @@ -657,6 +657,11 @@ static int gfar_of_init(struct platform_device *ofdev, struct net_device **pdev) priv->num_rx_queues = num_rx_qs; priv->num_grps = 0x0; + /* Init Rx queue filer rule set linked list*/ + INIT_LIST_HEAD(&priv->rx_list.list); + priv->rx_list.count = 0; + mutex_init(&priv->rx_queue_access); + model = of_get_property(np, "model", NULL); for (i = 0; i < MAXGROUPS; i++) @@ -1150,9 +1155,8 @@ static int gfar_probe(struct platform_device *ofdev) priv->rx_queue[i]->rxic = DEFAULT_RXIC; } - /* enable filer if using multiple RX queues*/ - if(priv->num_rx_queues > 1) - priv->rx_filer_enable = 1; + /* always enable rx filer*/ + priv->rx_filer_enable = 1; /* Enable most messages by default */ priv->msg_enable = (NETIF_MSG_IFUP << 1 ) - 1; -- cgit v1.2.3