projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6582c66
)
bnx2x: use prandom_bytes()
author
Akinobu Mita
<
[email protected]
>
Tue, 18 Dec 2012 00:04:28 +0000
(16:04 -0800)
committer
Linus Torvalds
<
[email protected]
>
Tue, 18 Dec 2012 01:15:26 +0000
(17:15 -0800)
Use prandom_bytes() to fill rss key with pseudo-random bytes.
Signed-off-by: Akinobu Mita <
[email protected]
>
Cc: Eilon Greenstein <
[email protected]
>
Cc: "Theodore Ts'o" <
[email protected]
>
Cc: Adrian Hunter <
[email protected]
>
Cc: Artem Bityutskiy <
[email protected]
>
Cc: David Laight <
[email protected]
>
Cc: David Woodhouse <
[email protected]
>
Cc: Michel Lespinasse <
[email protected]
>
Cc: Robert Love <
[email protected]
>
Cc: Valdis Kletnieks <
[email protected]
>
Signed-off-by: Andrew Morton <
[email protected]
>
Signed-off-by: Linus Torvalds <
[email protected]
>
drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c
patch
|
blob
|
history
diff --git
a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c
b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c
index a2998bea5d4b42690ca1334322d5ebe396ef0805..01588b66a38c0fea2d489b869d730fb8966c3419 100644
(file)
--- a/
drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c
+++ b/
drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c
@@
-1832,7
+1832,6
@@
int bnx2x_config_rss_pf(struct bnx2x *bp, struct bnx2x_rss_config_obj *rss_obj,
bool config_hash)
{
struct bnx2x_config_rss_params params = {NULL};
- int i;
/* Although RSS is meaningless when there is a single HW queue we
* still need it enabled in order to have HW Rx hash generated.
@@
-1864,9
+1863,7
@@
int bnx2x_config_rss_pf(struct bnx2x *bp, struct bnx2x_rss_config_obj *rss_obj,
if (config_hash) {
/* RSS keys */
- for (i = 0; i < sizeof(params.rss_key) / 4; i++)
- params.rss_key[i] = random32();
-
+ prandom_bytes(params.rss_key, sizeof(params.rss_key));
__set_bit(BNX2X_RSS_SET_SRCH, ¶ms.rss_flags);
}