summaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/sfc/ef10.c
diff options
context:
space:
mode:
authorAndrew Rybchenko2016-06-15 18:43:00 +0200
committerDavid S. Miller2016-06-16 07:26:24 +0200
commitb071c3a222db465b32bb6f04ba07264a1556a17c (patch)
treee3204603f12409858512c47704bf26827c9aa293 /drivers/net/ethernet/sfc/ef10.c
parentsfc: Define macro with EF10 offload feature (diff)
downloadkernel-qcow2-linux-b071c3a222db465b32bb6f04ba07264a1556a17c.tar.gz
kernel-qcow2-linux-b071c3a222db465b32bb6f04ba07264a1556a17c.tar.xz
kernel-qcow2-linux-b071c3a222db465b32bb6f04ba07264a1556a17c.zip
sfc: Move last mc_promisc flag to EF10 filter table state
It is used for EF10 only and logically belongs to EF10 filter table state. It is OK that it is reset to false on filter table recreation since all filters are removed on destruction. Signed-off-by: Edward Cree <ecree@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/sfc/ef10.c')
-rw-r--r--drivers/net/ethernet/sfc/ef10.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/net/ethernet/sfc/ef10.c b/drivers/net/ethernet/sfc/ef10.c
index 89c88ca22457..ebe35496b294 100644
--- a/drivers/net/ethernet/sfc/ef10.c
+++ b/drivers/net/ethernet/sfc/ef10.c
@@ -83,6 +83,8 @@ struct efx_ef10_filter_table {
u16 ucdef_id;
u16 bcast_id;
u16 mcdef_id;
+/* Whether in multicast promiscuous mode when last changed */
+ bool mc_promisc_last;
};
/* An arbitrary search limit for the software hash table */
@@ -3778,6 +3780,7 @@ static int efx_ef10_filter_table_probe(struct efx_nic *efx)
table->ucdef_id = EFX_EF10_FILTER_ID_INVALID;
table->bcast_id = EFX_EF10_FILTER_ID_INVALID;
table->mcdef_id = EFX_EF10_FILTER_ID_INVALID;
+ table->mc_promisc_last = false;
efx->filter_state = table;
init_waitqueue_head(&table->waitq);
@@ -4243,7 +4246,7 @@ static void efx_ef10_filter_sync_rx_mode(struct efx_nic *efx)
/* If changing promiscuous state with cascaded multicast filters, remove
* old filters first, so that packets are dropped rather than duplicated
*/
- if (nic_data->workaround_26807 && efx->mc_promisc != mc_promisc)
+ if (nic_data->workaround_26807 && table->mc_promisc_last != mc_promisc)
efx_ef10_filter_remove_old(efx);
if (mc_promisc) {
if (nic_data->workaround_26807) {
@@ -4278,7 +4281,7 @@ static void efx_ef10_filter_sync_rx_mode(struct efx_nic *efx)
}
efx_ef10_filter_remove_old(efx);
- efx->mc_promisc = mc_promisc;
+ table->mc_promisc_last = mc_promisc;
}
static int efx_ef10_set_mac_address(struct efx_nic *efx)