diff options
author | Sathya Perla <sathya.perla@emulex.com> | 2011-11-10 19:17:57 +0000 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-11-12 17:59:35 -0500 |
commit | 30128031d71741ef7d0e32c345e3bf02aa8a0704 (patch) | |
tree | 1ca0ba5c5c34c252c8bcfc8d53c82b19fa2e7d4c /drivers/net/ethernet/emulex/benet/be.h | |
parent | d826eb14ecef3574b6b3be55e5f4329f4a76fbf3 (diff) |
be2net: init (vf)_if_handle/vf_pmac_id to handle failure scenarios
Initialize if_handle, vf_if_handle and vf_pmac_id with "-1" so that in
failure cases when be_clear() is called, we can skip over
if_destroy/pmac_del cmds if they have not been created.
Signed-off-by: Sathya Perla <sathya.perla@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/emulex/benet/be.h')
-rw-r--r-- | drivers/net/ethernet/emulex/benet/be.h | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/drivers/net/ethernet/emulex/benet/be.h b/drivers/net/ethernet/emulex/benet/be.h index 644e8fed8364..4163980d6bcd 100644 --- a/drivers/net/ethernet/emulex/benet/be.h +++ b/drivers/net/ethernet/emulex/benet/be.h @@ -289,14 +289,12 @@ struct be_drv_stats { struct be_vf_cfg { unsigned char vf_mac_addr[ETH_ALEN]; - u32 vf_if_handle; - u32 vf_pmac_id; + int vf_if_handle; + int vf_pmac_id; u16 vf_vlan_tag; u32 vf_tx_rate; }; -#define BE_INVALID_PMAC_ID 0xffffffff - struct be_adapter { struct pci_dev *pdev; struct net_device *netdev; @@ -347,7 +345,7 @@ struct be_adapter { /* Ethtool knobs and info */ char fw_ver[FW_VER_LEN]; - u32 if_handle; /* Used to configure filtering */ + int if_handle; /* Used to configure filtering */ u32 pmac_id; /* MAC addr handle used by BE card */ u32 beacon_state; /* for set_phys_id */ |