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.


git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@4163 0192ed92-7a03-0410-a25b-9323aeb14dbd
This commit is contained in:
proski 2011-08-15 18:59:22 +00:00
parent e9c7901f6e
commit 2774fa543e
3 changed files with 6 additions and 1 deletions

View File

@ -1194,11 +1194,13 @@ ieee80211_deliver_data(struct ieee80211_node *ni, struct sk_buff *skb)
skb->protocol = eth_type_trans(skb, dev);
#endif
tni = SKB_NI(skb);
#if IEEE80211_VLAN_TAG_USED
if ((ni->ni_vlan != 0) && (vap->iv_vlgrp != NULL))
/* Attach VLAN tag. */
ret = vlan_hwaccel_rx(skb,
vap->iv_vlgrp, ni->ni_vlan);
else
#endif
ret = netif_rx(skb);
if (ret == NET_RX_DROP)
vap->iv_devstats.rx_dropped++;

View File

@ -615,7 +615,8 @@ int ieee80211_proc_vcreate(struct ieee80211vap *, struct file_operations *,
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
#ifndef VLAN_GROUP_ARRAY_PART_LEN

View File

@ -570,6 +570,7 @@ ieee80211_skb_references(void) {
#ifdef IEEE80211_DEBUG_REFCNT
#if IEEE80211_VLAN_TAG_USED
int vlan_hwaccel_rx_debug(struct sk_buff *skb,
struct vlan_group *grp, unsigned short vlan_tag,
const char *func, int line) {
@ -577,6 +578,7 @@ int vlan_hwaccel_rx_debug(struct sk_buff *skb,
untrack_skb(skb, 0, __func__, __LINE__),
grp, vlan_tag);
}
#endif
int netif_rx_debug(struct sk_buff *skb, const char *func, int line) {
return netif_rx(untrack_skb(skb, 0, __func__, __LINE__));