diff options
Diffstat (limited to 'drivers/net/team/team_mode_random.c')
-rw-r--r-- | drivers/net/team/team_mode_random.c | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/drivers/net/team/team_mode_random.c b/drivers/net/team/team_mode_random.c index 7f032e21134..cd2f692b807 100644 --- a/drivers/net/team/team_mode_random.c +++ b/drivers/net/team/team_mode_random.c @@ -13,20 +13,14 @@ #include <linux/module.h> #include <linux/init.h> #include <linux/skbuff.h> -#include <linux/reciprocal_div.h> #include <linux/if_team.h> -static u32 random_N(unsigned int N) -{ - return reciprocal_divide(prandom_u32(), N); -} - static bool rnd_transmit(struct team *team, struct sk_buff *skb) { struct team_port *port; int port_index; - port_index = random_N(team->en_port_count); + port_index = prandom_u32_max(team->en_port_count); port = team_get_port_by_index_rcu(team, port_index); if (unlikely(!port)) goto drop; |