Search Linux Wireless

Re: [PATCH 1/3] compat-wireless: backport convert multicast list to list_head.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello, Hauke!

Thank you for doing this effort! I would prefer that we avoid patching as much as possible. Patches tend to break as the code changes. I think there are several cases where patching can be eliminated.

++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35))
+ 	struct netdev_hw_addr *ha;
++#else
++	struct dev_mc_list *ha;
++#endif

We could simply use this in some header:

#define dev_mc_list netdev_hw_addr

+ 	/* comoute mc addresses' hash value ,and put it into hash table */

Someone had a bout of dyslexia, and it will be fixed, breaking the patch :-)

+ 	netdev_for_each_mc_addr(ha, netdev) {
++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35))
+ 		hash_value = atl1c_hash_mc_addr(hw, ha->addr);
++#else
++		hash_value = atl1c_hash_mc_addr(hw, ha->dmi_addr);
++#endif

#define addr dmi_addr

OK, this is likely to break if done in a header, but maybe it could be done in the C code away from the rest of the code.

++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35))
+ 	__hw_addr_unsync(&local->mc_list, &dev->mc, dev->addr_len);
++#else
++	__dev_addr_unsync(&local->mc_list, &local->mc_count,
++			  &dev->mc_list, &dev->mc_count);
++#endif

Cannot we reimplement __hw_addr_unsync()?

++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35))
+
+ 	__hw_addr_init(&local->mc_list);
+
++#endif

That could be an empty function.

--
Regards,
Pavel Roskin
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux