diff -ur b/qf9700.c a/qf9700.c--- b/qf9700.c 2011-01-21 17:59:58.000000000 +0800+++ a/qf9700.c 2014-04-15 18:37:50.000000000 +0800@@ -353,14 +353,13 @@
if (net->flags & IFF_PROMISC) {
rx_ctl |= 0x02;
- } else if (net->flags & IFF_ALLMULTI || net->mc_count > QF_MCAST_MAX) {+ } else if (net->flags & IFF_ALLMULTI || netdev_mc_count(net) > QF_MCAST_MAX) { rx_ctl |= 0x04;
- } else if (net->mc_count) {
- struct dev_mc_list *mc_list = net->mc_list;
- int i;+ } else if (netdev_mc_count(net)) {
+ struct netdev_hw_addr *hw_addr;
- for (i = 0; i < net->mc_count; i++, mc_list = mc_list->next) {
- u32 crc = ether_crc(ETH_ALEN, mc_list->dmi_addr) >> 26;+ netdev_for_each_mc_addr(hw_addr, net) {
+ u32 crc = ether_crc(ETH_ALEN, hw_addr->addr) >> 26; hashes[crc >> 3] |= 1 << (crc & 0x7);
}
}
@@ -413,9 +412,9 @@
/* power up and reset phy */
qf_write_reg(dev, PRR, 1);
- udelay(20 * 1000); // at least 10ms, here 20ms for safe+ mdelay(20); // at least 10ms, here 20ms for safe qf_write_reg(dev, PRR, 0);
- udelay(2 * 1000); // at least 1ms, here 2ms for reading right register+ mdelay(2); // at least 1ms, here 2ms for reading right register
/* receive broadcast packets */
qf9700_set_multicast(dev->net);
diff -ur b/qf9700.h a/qf9700.h--- b/qf9700.h 2010-10-09 16:51:00.000000000 +0800+++ a/qf9700.h 2014-04-15 17:20:23.000000000 +0800@@ -150,4 +150,21 @@ #define QF_TX_OVERHEAD 2 // 2bytes header
#define QF_RX_OVERHEAD 7 // 3bytes header + 4crc tail
+#ifdef DEBUG
+#define devdbg(usbnet, fmt, arg...)
+ printk(KERN_DEBUG "%s: " fmt "n" , (usbnet)->net->name , ## arg)
+#else
+#define devdbg(usbnet, fmt, arg...)
+ ({ if (0) printk(KERN_DEBUG "%s: " fmt "n" , (usbnet)->net->name ,
+ ## arg); 0; })
+#endif
+
+#define deverr(usbnet, fmt, arg...)
+ printk(KERN_ERR "%s: " fmt "n" , (usbnet)->net->name , ## arg)
+#define devwarn(usbnet, fmt, arg...)
+ printk(KERN_WARNING "%s: " fmt "n" , (usbnet)->net->name , ## arg)
+
+#define devinfo(usbnet, fmt, arg...)
+ printk(KERN_INFO "%s: " fmt "n" , (usbnet)->net->name , ## arg);
+ /*----------------------------------------------------------------------------------------------*/