|
@@ -65,7 +65,7 @@ static int stp_rx ( struct io_buffer *iobuf, struct net_device *netdev,
|
65
|
65
|
const void *ll_source __unused,
|
66
|
66
|
unsigned int flags __unused ) {
|
67
|
67
|
struct stp_bpdu *stp;
|
68
|
|
- unsigned int timeout;
|
|
68
|
+ unsigned int hello;
|
69
|
69
|
int rc;
|
70
|
70
|
|
71
|
71
|
/* Sanity check */
|
|
@@ -110,8 +110,8 @@ static int stp_rx ( struct io_buffer *iobuf, struct net_device *netdev,
|
110
|
110
|
"forwarding\n",
|
111
|
111
|
netdev->name, eth_ntoa ( stp->sender.mac ),
|
112
|
112
|
ntohs ( stp->port ), stp->flags );
|
113
|
|
- timeout = ( ntohs ( stp->hello ) * TICKS_PER_SEC * 2 );
|
114
|
|
- netdev_link_block ( netdev, timeout );
|
|
113
|
+ hello = ( ( ntohs ( stp->hello ) * TICKS_PER_SEC ) / 256 );
|
|
114
|
+ netdev_link_block ( netdev, ( hello * 2 ) );
|
115
|
115
|
rc = -ENETUNREACH;
|
116
|
116
|
goto done;
|
117
|
117
|
}
|