summaryrefslogtreecommitdiffstats
path: root/drivers/staging/octeon
diff options
context:
space:
mode:
authorAaro Koskinen <aaro.koskinen@iki.fi>2016-08-31 23:57:40 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2016-09-02 14:46:53 +0200
commit785e9b7d3febcfeb461efe528320c753640d6fb4 (patch)
treeab5497a5ab7778074cbfd3db7631f31fe7c8d622 /drivers/staging/octeon
parentb7d7dee5bf136010fae44209daf6675dc4c5c4c6 (diff)
downloadlinux-785e9b7d3febcfeb461efe528320c753640d6fb4.tar.bz2
staging: octeon: create a struct for rx group specific data
Create a struct for RX group specific data. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/octeon')
-rw-r--r--drivers/staging/octeon/ethernet-rx.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/drivers/staging/octeon/ethernet-rx.c b/drivers/staging/octeon/ethernet-rx.c
index 140e8afb3dd3..65f60134ca60 100644
--- a/drivers/staging/octeon/ethernet-rx.c
+++ b/drivers/staging/octeon/ethernet-rx.c
@@ -43,7 +43,9 @@
#include <asm/octeon/cvmx-gmxx-defs.h>
-static struct napi_struct cvm_oct_napi;
+static struct oct_rx_group {
+ struct napi_struct napi;
+} oct_rx_group;
/**
* cvm_oct_do_interrupt - interrupt handler.
@@ -455,13 +457,14 @@ void cvm_oct_rx_initialize(void)
if (!dev_for_napi)
panic("No net_devices were allocated.");
- netif_napi_add(dev_for_napi, &cvm_oct_napi, cvm_oct_napi_poll,
+ netif_napi_add(dev_for_napi, &oct_rx_group.napi, cvm_oct_napi_poll,
rx_napi_weight);
- napi_enable(&cvm_oct_napi);
+ napi_enable(&oct_rx_group.napi);
/* Register an IRQ handler to receive POW interrupts */
i = request_irq(OCTEON_IRQ_WORKQ0 + pow_receive_group,
- cvm_oct_do_interrupt, 0, "Ethernet", &cvm_oct_napi);
+ cvm_oct_do_interrupt, 0, "Ethernet",
+ &oct_rx_group.napi);
if (i)
panic("Could not acquire Ethernet IRQ %d\n",
@@ -499,7 +502,7 @@ void cvm_oct_rx_initialize(void)
}
/* Schedule NAPI now. This will indirectly enable the interrupt. */
- napi_schedule(&cvm_oct_napi);
+ napi_schedule(&oct_rx_group.napi);
}
void cvm_oct_rx_shutdown(void)
@@ -513,5 +516,5 @@ void cvm_oct_rx_shutdown(void)
/* Free the interrupt handler */
free_irq(OCTEON_IRQ_WORKQ0 + pow_receive_group, cvm_oct_device);
- netif_napi_del(&cvm_oct_napi);
+ netif_napi_del(&oct_rx_group.napi);
}