diff options
author | Ben Hutchings <bhutchings@solarflare.com> | 2012-01-03 07:05:58 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2012-01-04 14:10:23 -0500 |
commit | 8db182f4a8a6e2dcb8b65905ea4af56210e65430 (patch) | |
tree | e993331e319d76308b58c09ae0a24d41cd2d24b4 /drivers/net/ethernet | |
parent | b2bb7b776a9b16508641a0854642d9737d7621eb (diff) |
sfc: Remove now-unused filter function
Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet')
-rw-r--r-- | drivers/net/ethernet/sfc/efx.h | 2 | ||||
-rw-r--r-- | drivers/net/ethernet/sfc/filter.c | 46 |
2 files changed, 0 insertions, 48 deletions
diff --git a/drivers/net/ethernet/sfc/efx.h b/drivers/net/ethernet/sfc/efx.h index f0a5b7c41a4e..a3541ac6ea01 100644 --- a/drivers/net/ethernet/sfc/efx.h +++ b/drivers/net/ethernet/sfc/efx.h | |||
@@ -64,8 +64,6 @@ extern void efx_remove_filters(struct efx_nic *efx); | |||
64 | extern s32 efx_filter_insert_filter(struct efx_nic *efx, | 64 | extern s32 efx_filter_insert_filter(struct efx_nic *efx, |
65 | struct efx_filter_spec *spec, | 65 | struct efx_filter_spec *spec, |
66 | bool replace); | 66 | bool replace); |
67 | extern int efx_filter_remove_filter(struct efx_nic *efx, | ||
68 | struct efx_filter_spec *spec); | ||
69 | extern int efx_filter_remove_id_safe(struct efx_nic *efx, | 67 | extern int efx_filter_remove_id_safe(struct efx_nic *efx, |
70 | enum efx_filter_priority priority, | 68 | enum efx_filter_priority priority, |
71 | u32 filter_id); | 69 | u32 filter_id); |
diff --git a/drivers/net/ethernet/sfc/filter.c b/drivers/net/ethernet/sfc/filter.c index 32eff5ef2ba7..1fbbbee7b1ae 100644 --- a/drivers/net/ethernet/sfc/filter.c +++ b/drivers/net/ethernet/sfc/filter.c | |||
@@ -680,52 +680,6 @@ int efx_filter_get_filter_safe(struct efx_nic *efx, | |||
680 | return rc; | 680 | return rc; |
681 | } | 681 | } |
682 | 682 | ||
683 | /** | ||
684 | * efx_filter_remove_filter - remove a filter by specification | ||
685 | * @efx: NIC from which to remove the filter | ||
686 | * @spec: Specification for the filter | ||
687 | * | ||
688 | * On success, return zero. | ||
689 | * On failure, return a negative error code. | ||
690 | */ | ||
691 | int efx_filter_remove_filter(struct efx_nic *efx, struct efx_filter_spec *spec) | ||
692 | { | ||
693 | struct efx_filter_state *state = efx->filter_state; | ||
694 | struct efx_filter_table *table = efx_filter_spec_table(state, spec); | ||
695 | struct efx_filter_spec *saved_spec; | ||
696 | efx_oword_t filter; | ||
697 | unsigned int filter_idx, depth; | ||
698 | u32 key; | ||
699 | int rc; | ||
700 | |||
701 | if (!table) | ||
702 | return -EINVAL; | ||
703 | |||
704 | key = efx_filter_build(&filter, spec); | ||
705 | |||
706 | spin_lock_bh(&state->lock); | ||
707 | |||
708 | rc = efx_filter_search(table, spec, key, false, &depth); | ||
709 | if (rc < 0) | ||
710 | goto out; | ||
711 | filter_idx = rc; | ||
712 | saved_spec = &table->spec[filter_idx]; | ||
713 | |||
714 | if (spec->priority < saved_spec->priority) { | ||
715 | rc = -EPERM; | ||
716 | goto out; | ||
717 | } | ||
718 | |||
719 | efx_filter_table_clear_entry(efx, table, filter_idx); | ||
720 | if (table->used == 0) | ||
721 | efx_filter_table_reset_search_depth(table); | ||
722 | rc = 0; | ||
723 | |||
724 | out: | ||
725 | spin_unlock_bh(&state->lock); | ||
726 | return rc; | ||
727 | } | ||
728 | |||
729 | static void efx_filter_table_clear(struct efx_nic *efx, | 683 | static void efx_filter_table_clear(struct efx_nic *efx, |
730 | enum efx_filter_table_id table_id, | 684 | enum efx_filter_table_id table_id, |
731 | enum efx_filter_priority priority) | 685 | enum efx_filter_priority priority) |