aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/firewire/net.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/firewire/net.c')
-rw-r--r--drivers/firewire/net.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/drivers/firewire/net.c b/drivers/firewire/net.c
index 03a7a85d0424..d1fad1fb17e2 100644
--- a/drivers/firewire/net.c
+++ b/drivers/firewire/net.c
@@ -502,11 +502,7 @@ static struct fwnet_peer *fwnet_peer_find_by_node_id(struct fwnet_device *dev,
502static unsigned fwnet_max_payload(unsigned max_rec, unsigned speed) 502static unsigned fwnet_max_payload(unsigned max_rec, unsigned speed)
503{ 503{
504 max_rec = min(max_rec, speed + 8); 504 max_rec = min(max_rec, speed + 8);
505 max_rec = min(max_rec, 0xbU); /* <= 4096 */ 505 max_rec = clamp(max_rec, 8U, 11U); /* 512...4096 */
506 if (max_rec < 8) {
507 fw_notify("max_rec %x out of range\n", max_rec);
508 max_rec = 8;
509 }
510 506
511 return (1 << (max_rec + 1)) - RFC2374_FRAG_HDR_SIZE; 507 return (1 << (max_rec + 1)) - RFC2374_FRAG_HDR_SIZE;
512} 508}