diff options
author | Ben Hutchings <bhutchings@solarflare.com> | 2010-06-25 11:05:43 +0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-06-26 08:03:31 +0400 |
commit | 5d3a6fca955c18b066f01233f9faeb351c0d966b (patch) | |
tree | 6cc1ea2cf88a058425d003aaa53fbcc2c228f2b2 /drivers/net/sfc/siena.c | |
parent | 604f6049ba2af86fe361d4cc320443d35b232df1 (diff) | |
download | linux-5d3a6fca955c18b066f01233f9faeb351c0d966b.tar.xz |
sfc: Move siena_nic_data::ipv6_rss_key to efx_nic::rx_hash_key
We will use this hash key for Toeplitz IPv4 hashing too.
Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/sfc/siena.c')
-rw-r--r-- | drivers/net/sfc/siena.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/drivers/net/sfc/siena.c b/drivers/net/sfc/siena.c index f1741b4af1b3..7fd258ce3c06 100644 --- a/drivers/net/sfc/siena.c +++ b/drivers/net/sfc/siena.c @@ -285,9 +285,6 @@ static int siena_probe_nic(struct efx_nic *efx) goto fail5; } - get_random_bytes(&nic_data->ipv6_rss_key, - sizeof(nic_data->ipv6_rss_key)); - return 0; fail5: @@ -307,7 +304,6 @@ fail1: */ static int siena_init_nic(struct efx_nic *efx) { - struct siena_nic_data *nic_data = efx->nic_data; efx_oword_t temp; int rc; @@ -336,16 +332,16 @@ static int siena_init_nic(struct efx_nic *efx) efx_writeo(efx, &temp, FR_AZ_RX_CFG); /* Enable IPv6 RSS */ - BUILD_BUG_ON(sizeof(nic_data->ipv6_rss_key) != + BUILD_BUG_ON(sizeof(efx->rx_hash_key) < 2 * sizeof(temp) + FRF_CZ_RX_RSS_IPV6_TKEY_HI_WIDTH / 8 || FRF_CZ_RX_RSS_IPV6_TKEY_HI_LBN != 0); - memcpy(&temp, nic_data->ipv6_rss_key, sizeof(temp)); + memcpy(&temp, efx->rx_hash_key, sizeof(temp)); efx_writeo(efx, &temp, FR_CZ_RX_RSS_IPV6_REG1); - memcpy(&temp, nic_data->ipv6_rss_key + sizeof(temp), sizeof(temp)); + memcpy(&temp, efx->rx_hash_key + sizeof(temp), sizeof(temp)); efx_writeo(efx, &temp, FR_CZ_RX_RSS_IPV6_REG2); EFX_POPULATE_OWORD_2(temp, FRF_CZ_RX_RSS_IPV6_THASH_ENABLE, 1, FRF_CZ_RX_RSS_IPV6_IP_THASH_ENABLE, 1); - memcpy(&temp, nic_data->ipv6_rss_key + 2 * sizeof(temp), + memcpy(&temp, efx->rx_hash_key + 2 * sizeof(temp), FRF_CZ_RX_RSS_IPV6_TKEY_HI_WIDTH / 8); efx_writeo(efx, &temp, FR_CZ_RX_RSS_IPV6_REG3); |