Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 256291
b: refs/heads/master
c: 973e574
h: refs/heads/master
i:
  256289: ea10b2c
  256287: 0858330
v: v3
  • Loading branch information
Michael Chan authored and David S. Miller committed Jul 14, 2011
1 parent c532851 commit 86019af
Show file tree
Hide file tree
Showing 2 changed files with 4 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: 10d1e8ca8d7136111641472e9800775205ef5a0f
refs/heads/master: 973e574e26cc8f4704e5d7f112fd566386e37f04
5 changes: 3 additions & 2 deletions trunk/drivers/net/cnic.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
#include <linux/ethtool.h>
#include <linux/if_vlan.h>
#include <linux/prefetch.h>
#include <linux/random.h>
#if defined(CONFIG_VLAN_8021Q) || defined(CONFIG_VLAN_8021Q_MODULE)
#define BCM_VLAN 1
#endif
Expand Down Expand Up @@ -3830,7 +3831,7 @@ static int cnic_cm_alloc_mem(struct cnic_dev *dev)
if (!cp->csk_tbl)
return -ENOMEM;

get_random_bytes(&port_id, sizeof(port_id));
port_id = random32();
port_id %= CNIC_LOCAL_PORT_RANGE;
if (cnic_init_id_tbl(&cp->csk_port_tbl, CNIC_LOCAL_PORT_RANGE,
CNIC_LOCAL_PORT_MIN, port_id)) {
Expand Down Expand Up @@ -3890,7 +3891,7 @@ static int cnic_cm_init_bnx2_hw(struct cnic_dev *dev)
{
u32 seed;

get_random_bytes(&seed, 4);
seed = random32();
cnic_ctx_wr(dev, 45, 0, seed);
return 0;
}
Expand Down

0 comments on commit 86019af

Please sign in to comment.