aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/cxgb4/l2t.c
diff options
context:
space:
mode:
authorstephen hemminger <shemminger@vyatta.com>2010-10-18 01:39:18 -0400
committerDavid S. Miller <davem@davemloft.net>2010-10-21 07:25:49 -0400
commit31b9c19bfe32bed7fdf80cd0b1aa9d0f0569844a (patch)
tree47ffbb9e16062bf88e713f0332f4e0e4e2c887a7 /drivers/net/cxgb4/l2t.c
parentb003f4e171304234eae9cc11c9fd7f1cbaaf0d6b (diff)
cxgb4: function namespace cleanup (v3)
Make functions only used in one file local. Remove lots of dead code, relating to unsupported functions in mainline driver like RSS, IPv6, and TCP offload. Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Acked-by: Dimitris Michailidis <dm@chelsio.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/cxgb4/l2t.c')
-rw-r--r--drivers/net/cxgb4/l2t.c34
1 files changed, 0 insertions, 34 deletions
diff --git a/drivers/net/cxgb4/l2t.c b/drivers/net/cxgb4/l2t.c
index e8f0f55e9d08..a2d323c473f8 100644
--- a/drivers/net/cxgb4/l2t.c
+++ b/drivers/net/cxgb4/l2t.c
@@ -481,40 +481,6 @@ void t4_l2t_update(struct adapter *adap, struct neighbour *neigh)
481 handle_failed_resolution(adap, arpq); 481 handle_failed_resolution(adap, arpq);
482} 482}
483 483
484/*
485 * Allocate an L2T entry for use by a switching rule. Such entries need to be
486 * explicitly freed and while busy they are not on any hash chain, so normal
487 * address resolution updates do not see them.
488 */
489struct l2t_entry *t4_l2t_alloc_switching(struct l2t_data *d)
490{
491 struct l2t_entry *e;
492
493 write_lock_bh(&d->lock);
494 e = alloc_l2e(d);
495 if (e) {
496 spin_lock(&e->lock); /* avoid race with t4_l2t_free */
497 e->state = L2T_STATE_SWITCHING;
498 atomic_set(&e->refcnt, 1);
499 spin_unlock(&e->lock);
500 }
501 write_unlock_bh(&d->lock);
502 return e;
503}
504
505/*
506 * Sets/updates the contents of a switching L2T entry that has been allocated
507 * with an earlier call to @t4_l2t_alloc_switching.
508 */
509int t4_l2t_set_switching(struct adapter *adap, struct l2t_entry *e, u16 vlan,
510 u8 port, u8 *eth_addr)
511{
512 e->vlan = vlan;
513 e->lport = port;
514 memcpy(e->dmac, eth_addr, ETH_ALEN);
515 return write_l2e(adap, e, 0);
516}
517
518struct l2t_data *t4_init_l2t(void) 484struct l2t_data *t4_init_l2t(void)
519{ 485{
520 int i; 486 int i;