summaryrefslogtreecommitdiffstats
path: root/drivers/net/benet/be.h
diff options
context:
space:
mode:
authorAjit Khaparde <ajit.khaparde@emulex.com>2011-04-06 18:08:30 +0000
committerDavid S. Miller <davem@davemloft.net>2011-04-07 15:04:45 -0700
commit48f5a19168c228e6533401c563d9fcbc152bc33f (patch)
tree5d9968910d64671a5719f198528419c5daf94299 /drivers/net/benet/be.h
parent81be8f0ab47db1171dac0eb8b062291603b57dd4 (diff)
downloadop-kernel-dev-48f5a19168c228e6533401c563d9fcbc152bc33f.zip
op-kernel-dev-48f5a19168c228e6533401c563d9fcbc152bc33f.tar.gz
be2net: dynamically allocate adapter->vf_cfg
Instead of a fixed sized array for vf_cfg, allocate the size dynamically depending on number of VFs the device supports. Signed-off-by: Ajit Khaparde <ajit.khaparde@emulex.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/benet/be.h')
-rw-r--r--drivers/net/benet/be.h4
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/net/benet/be.h b/drivers/net/benet/be.h
index 7e20400..d2c42f5 100644
--- a/drivers/net/benet/be.h
+++ b/drivers/net/benet/be.h
@@ -92,8 +92,6 @@ static inline char *nic_name(struct pci_dev *pdev)
#define FW_VER_LEN 32
-#define BE_MAX_VF 32
-
struct be_dma_mem {
void *va;
dma_addr_t dma;
@@ -336,7 +334,7 @@ struct be_adapter {
bool be3_native;
bool sriov_enabled;
- struct be_vf_cfg vf_cfg[BE_MAX_VF];
+ struct be_vf_cfg *vf_cfg;
u8 is_virtfn;
u32 sli_family;
u8 hba_port_num;
OpenPOWER on IntegriCloud