aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/myri10ge
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/myri10ge')
-rw-r--r--drivers/net/myri10ge/myri10ge.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/net/myri10ge/myri10ge.c b/drivers/net/myri10ge/myri10ge.c
index d0cc122fa3f0..e1732c164a40 100644
--- a/drivers/net/myri10ge/myri10ge.c
+++ b/drivers/net/myri10ge/myri10ge.c
@@ -60,6 +60,7 @@
60#include <linux/crc32.h> 60#include <linux/crc32.h>
61#include <linux/moduleparam.h> 61#include <linux/moduleparam.h>
62#include <linux/io.h> 62#include <linux/io.h>
63#include <linux/log2.h>
63#include <net/checksum.h> 64#include <net/checksum.h>
64#include <asm/byteorder.h> 65#include <asm/byteorder.h>
65#include <asm/io.h> 66#include <asm/io.h>
@@ -1804,7 +1805,7 @@ static int myri10ge_open(struct net_device *dev)
1804 */ 1805 */
1805 big_pow2 = dev->mtu + ETH_HLEN + VLAN_HLEN + MXGEFW_PAD; 1806 big_pow2 = dev->mtu + ETH_HLEN + VLAN_HLEN + MXGEFW_PAD;
1806 if (big_pow2 < MYRI10GE_ALLOC_SIZE / 2) { 1807 if (big_pow2 < MYRI10GE_ALLOC_SIZE / 2) {
1807 while ((big_pow2 & (big_pow2 - 1)) != 0) 1808 while (!is_power_of_2(big_pow2))
1808 big_pow2++; 1809 big_pow2++;
1809 mgp->big_bytes = dev->mtu + ETH_HLEN + VLAN_HLEN + MXGEFW_PAD; 1810 mgp->big_bytes = dev->mtu + ETH_HLEN + VLAN_HLEN + MXGEFW_PAD;
1810 } else { 1811 } else {