diff options
author | Felix Fietkau <nbd@openwrt.org> | 2012-03-29 12:52:16 +0000 |
---|---|---|
committer | Felix Fietkau <nbd@openwrt.org> | 2012-03-29 12:52:16 +0000 |
commit | 04d8267cf05b3feb43c487c2a315197263c0ef81 (patch) | |
tree | b97cb408922649b9c5d8df0dea0d30131f121337 /package/madwifi | |
parent | e83f30306c167b63011fed3f0e611c1170444ad2 (diff) | |
download | mtk-20170518-04d8267cf05b3feb43c487c2a315197263c0ef81.zip mtk-20170518-04d8267cf05b3feb43c487c2a315197263c0ef81.tar.gz mtk-20170518-04d8267cf05b3feb43c487c2a315197263c0ef81.tar.bz2 |
madwifi: fix compile issues with linux 3.1/3.2
SVN-Revision: 31138
Diffstat (limited to 'package/madwifi')
-rw-r--r-- | package/madwifi/Makefile | 2 | ||||
-rw-r--r-- | package/madwifi/patches/477-3.2_fixes.patch | 45 | ||||
-rw-r--r-- | package/madwifi/patches/478-remove_vlan_code.patch | 21 |
3 files changed, 67 insertions, 1 deletions
diff --git a/package/madwifi/Makefile b/package/madwifi/Makefile index fd81e3f..e7c8a0c 100644 --- a/package/madwifi/Makefile +++ b/package/madwifi/Makefile @@ -161,7 +161,7 @@ define KernelPackage/madwifi SUBMENU:=Wireless Drivers TITLE:=Driver for Atheros wireless chipsets URL:=http://madwifi-project.org/ - DEPENDS:=+wireless-tools @PCI_SUPPORT @(!(TARGET_avr32||TARGET_cobalt||TARGET_ep93xx||TARGET_etrax||TARGET_octeon||TARGET_pxcab||TARGET_sibyte||LINUX_3_1||LINUX_3_2)||BROKEN) +@DRIVER_WEXT_SUPPORT + DEPENDS:=+wireless-tools @PCI_SUPPORT @(!(TARGET_avr32||TARGET_cobalt||TARGET_ep93xx||TARGET_etrax||TARGET_octeon||TARGET_pxcab||TARGET_sibyte)||BROKEN) +@DRIVER_WEXT_SUPPORT FILES:=$(MADWIFI_FILES) AUTOLOAD:=$(call AutoLoad,50,$(MADWIFI_AUTOLOAD)) MENU:=1 diff --git a/package/madwifi/patches/477-3.2_fixes.patch b/package/madwifi/patches/477-3.2_fixes.patch new file mode 100644 index 0000000..89cdfc6 --- /dev/null +++ b/package/madwifi/patches/477-3.2_fixes.patch @@ -0,0 +1,45 @@ +--- a/ath/if_ath.c ++++ b/ath/if_ath.c +@@ -569,7 +569,11 @@ static const struct net_device_ops ath_n + .ndo_stop = ath_stop, + .ndo_start_xmit = ath_hardstart, + .ndo_tx_timeout = ath_tx_timeout, ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,2,0) ++ .ndo_set_rx_mode = ath_mode_init, ++#else + .ndo_set_multicast_list = ath_mode_init, ++#endif + .ndo_do_ioctl = ath_ioctl, + .ndo_get_stats = ath_getstats, + .ndo_set_mac_address = ath_set_mac_address, +--- a/net80211/ieee80211.c ++++ b/net80211/ieee80211.c +@@ -461,7 +461,11 @@ static const struct net_device_ops ieee8 + .ndo_open = ieee80211_open, + .ndo_stop = ieee80211_stop, + .ndo_start_xmit = ieee80211_hardstart, ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,2,0) ++ .ndo_set_rx_mode = ieee80211_set_multicast_list, ++#else + .ndo_set_multicast_list = ieee80211_set_multicast_list, ++#endif + .ndo_change_mtu = ieee80211_change_mtu, + .ndo_do_ioctl = ieee80211_ioctl, + .ndo_validate_addr = eth_validate_addr, +@@ -1847,10 +1851,14 @@ ieee80211_set_multicast_list(struct net_ + IEEE80211_UNLOCK_IRQ(ic); + + /* XXX: Merge multicast list into parent device */ +-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,29) +- parent->set_multicast_list(ic->ic_dev); ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,2,0) ++ parent->netdev_ops->ndo_set_rx_mode(ic->ic_dev); + #else ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,29) + parent->netdev_ops->ndo_set_multicast_list(ic->ic_dev); ++#else ++ parent->set_multicast_list(ic->ic_dev); ++#endif + #endif + } + diff --git a/package/madwifi/patches/478-remove_vlan_code.patch b/package/madwifi/patches/478-remove_vlan_code.patch new file mode 100644 index 0000000..9ceda4a --- /dev/null +++ b/package/madwifi/patches/478-remove_vlan_code.patch @@ -0,0 +1,21 @@ +--- a/net80211/ieee80211_input.c ++++ b/net80211/ieee80211_input.c +@@ -1223,6 +1223,7 @@ ieee80211_deliver_data(struct ieee80211_ + #endif + vap->iv_devstats.rx_packets++; + vap->iv_devstats.rx_bytes += skb->len; ++#if IEEE80211_VLAN_TAG_USED + if (ni->ni_vlan != 0 && vap->iv_vlgrp != NULL) { + /* attach vlan tag */ + struct ieee80211_node *ni_tmp = SKB_CB(skb)->ni; +@@ -1236,7 +1237,9 @@ ieee80211_deliver_data(struct ieee80211_ + vap->iv_devstats.rx_dropped++; + } + skb = NULL; /* SKB is no longer ours */ +- } else { ++ } else ++#endif ++ { + struct ieee80211_node *ni_tmp = SKB_CB(skb)->ni; + if (netif_receive_skb(skb) == NET_RX_DROP) { + /* If netif_receive_skb dropped the packet because |