diff options
Diffstat (limited to 'drivers/net/hamradio/yam.c')
-rw-r--r-- | drivers/net/hamradio/yam.c | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/drivers/net/hamradio/yam.c b/drivers/net/hamradio/yam.c index 08f27119a807..ee3ea4fa729f 100644 --- a/drivers/net/hamradio/yam.c +++ b/drivers/net/hamradio/yam.c | |||
@@ -50,6 +50,7 @@ | |||
50 | #include <linux/slab.h> | 50 | #include <linux/slab.h> |
51 | #include <linux/errno.h> | 51 | #include <linux/errno.h> |
52 | #include <linux/bitops.h> | 52 | #include <linux/bitops.h> |
53 | #include <linux/random.h> | ||
53 | #include <asm/io.h> | 54 | #include <asm/io.h> |
54 | #include <asm/system.h> | 55 | #include <asm/system.h> |
55 | #include <linux/interrupt.h> | 56 | #include <linux/interrupt.h> |
@@ -566,14 +567,6 @@ static void yam_start_tx(struct net_device *dev, struct yam_port *yp) | |||
566 | ptt_on(dev); | 567 | ptt_on(dev); |
567 | } | 568 | } |
568 | 569 | ||
569 | static unsigned short random_seed; | ||
570 | |||
571 | static inline unsigned short random_num(void) | ||
572 | { | ||
573 | random_seed = 28629 * random_seed + 157; | ||
574 | return random_seed; | ||
575 | } | ||
576 | |||
577 | static void yam_arbitrate(struct net_device *dev) | 570 | static void yam_arbitrate(struct net_device *dev) |
578 | { | 571 | { |
579 | struct yam_port *yp = netdev_priv(dev); | 572 | struct yam_port *yp = netdev_priv(dev); |
@@ -600,7 +593,7 @@ static void yam_arbitrate(struct net_device *dev) | |||
600 | yp->slotcnt = yp->slot / 10; | 593 | yp->slotcnt = yp->slot / 10; |
601 | 594 | ||
602 | /* is random > persist ? */ | 595 | /* is random > persist ? */ |
603 | if ((random_num() % 256) > yp->pers) | 596 | if ((random32() % 256) > yp->pers) |
604 | return; | 597 | return; |
605 | 598 | ||
606 | yam_start_tx(dev, yp); | 599 | yam_start_tx(dev, yp); |