Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 203682
b: refs/heads/master
c: 9cd9000
h: refs/heads/master
v: v3
  • Loading branch information
Ajit Khaparde authored and David S. Miller committed Jul 23, 2010
1 parent be94696 commit bbab5ca
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 37773e8b2da813045d79b38e973cb07b5df788dd
refs/heads/master: 9cd9000bdee9131ffd2ce92ca6ef9c86467edd25
1 change: 1 addition & 0 deletions trunk/drivers/net/benet/be.h
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,7 @@ struct be_rx_obj {
};

#define BE_NUM_MSIX_VECTORS 2 /* 1 each for Tx and Rx */
#define BE_INVALID_PMAC_ID 0xffffffff
struct be_adapter {
struct pci_dev *pdev;
struct net_device *netdev;
Expand Down
6 changes: 4 additions & 2 deletions trunk/drivers/net/benet/be_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -656,8 +656,9 @@ static int be_set_vf_mac(struct net_device *netdev, int vf, u8 *mac)
if (!is_valid_ether_addr(mac) || (vf >= num_vfs))
return -EINVAL;

status = be_cmd_pmac_del(adapter, adapter->vf_if_handle[vf],
adapter->vf_pmac_id[vf]);
if (adapter->vf_pmac_id[vf] != BE_INVALID_PMAC_ID)
status = be_cmd_pmac_del(adapter, adapter->vf_if_handle[vf],
adapter->vf_pmac_id[vf]);

status = be_cmd_pmac_add(adapter, mac, adapter->vf_if_handle[vf],
&adapter->vf_pmac_id[vf]);
Expand Down Expand Up @@ -1910,6 +1911,7 @@ static int be_setup(struct be_adapter *adapter)
"Interface Create failed for VF %d\n", vf);
goto if_destroy;
}
adapter->vf_pmac_id[vf] = BE_INVALID_PMAC_ID;
vf++;
}
} else if (!be_physfn(adapter)) {
Expand Down

0 comments on commit bbab5ca

Please sign in to comment.