[Madwifi-cvs] revision 4165 committed
Status: Beta
Brought to you by:
otaku
From: Pavel R. <svn...@ma...> - 2011-08-15 19:10:27
|
Project : madwifi Revision : 4165 Author : proski (Pavel Roskin) Date : 2011-08-15 21:10:12 +0200 (Mon, 15 Aug 2011) Log Message : Fix compilation on Linux 3.1 broken by VLAN API changes Don't define IEEE80211_VLAN_TAG_USED on Linux 3.1 and newer. Don't use vlan_hwaccel_rx() if IEEE80211_VLAN_TAG_USED is not 1. Affected Files: * madwifi/branches/madwifi-0.9.4/net80211/ieee80211_input.c updated * madwifi/branches/madwifi-0.9.4/net80211/ieee80211_linux.h updated Modified: madwifi/branches/madwifi-0.9.4/net80211/ieee80211_input.c =================================================================== --- madwifi/branches/madwifi-0.9.4/net80211/ieee80211_input.c 2011-08-15 18:59:53 UTC (rev 4164) +++ madwifi/branches/madwifi-0.9.4/net80211/ieee80211_input.c 2011-08-15 19:10:12 UTC (rev 4165) @@ -1133,10 +1133,12 @@ #else skb->protocol = eth_type_trans(skb, dev); #endif +#if IEEE80211_VLAN_TAG_USED if (ni->ni_vlan != 0 && vap->iv_vlgrp != NULL) { /* attach vlan tag */ vlan_hwaccel_receive_skb(skb, vap->iv_vlgrp, ni->ni_vlan); } else +#endif netif_rx(skb); dev->last_rx = jiffies; } Modified: madwifi/branches/madwifi-0.9.4/net80211/ieee80211_linux.h =================================================================== --- madwifi/branches/madwifi-0.9.4/net80211/ieee80211_linux.h 2011-08-15 18:59:53 UTC (rev 4164) +++ madwifi/branches/madwifi-0.9.4/net80211/ieee80211_linux.h 2011-08-15 19:10:12 UTC (rev 4165) @@ -534,7 +534,8 @@ char *); void ieee80211_proc_cleanup(struct ieee80211vap *); -#if defined(CONFIG_VLAN_8021Q) || defined(CONFIG_VLAN_8021Q_MODULE) +#if LINUX_VERSION_CODE < KERNEL_VERSION(3,1,0) && \ + (defined(CONFIG_VLAN_8021Q) || defined(CONFIG_VLAN_8021Q_MODULE)) #define IEEE80211_VLAN_TAG_USED 1 #if LINUX_VERSION_CODE < KERNEL_VERSION(2,4,20) |