From: Jonas Gorski Date: Sun, 12 Jul 2015 11:57:04 +0000 (+0000) Subject: acx-mac80211: make it compile again against new compat-wireless X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=7c7695ab41427e391a5026effebd42ae81567de3;p=openwrt%2Fstaging%2Fansuel.git acx-mac80211: make it compile again against new compat-wireless Update to "latest" HEAD and update it to match latest API changes. Signed-off-by: Jonas Gorski SVN-Revision: 46305 --- diff --git a/package/kernel/acx-mac80211/Makefile b/package/kernel/acx-mac80211/Makefile index 1820e7abb3..84537de2a5 100644 --- a/package/kernel/acx-mac80211/Makefile +++ b/package/kernel/acx-mac80211/Makefile @@ -9,8 +9,8 @@ include $(TOPDIR)/rules.mk include $(INCLUDE_DIR)/kernel.mk PKG_NAME:=acx-mac80211 -PKG_REV:=v20130127 -PKG_VERSION:=20130909 +PKG_REV:=b6fc31491020cb01d2cd1acc170cfa03ced7e726 +PKG_VERSION:=20140216 PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 @@ -190,7 +190,7 @@ define Build/Compile CROSS_COMPILE="$(TARGET_CROSS)" \ SUBDIRS="$(PKG_BUILD_DIR)" \ $(PKG_EXTRA_KCONFIG) \ - EXTRA_CFLAGS="$(PKG_EXTRA_CFLAGS) -DCONFIG_ACX_MAC80211_VERSION=\"KERNEL_VERSION(3,14,0)\"" \ + EXTRA_CFLAGS="$(PKG_EXTRA_CFLAGS) -DCONFIG_ACX_MAC80211_VERSION=\"KERNEL_VERSION(4,2,0)\"" \ LINUXINCLUDE="-I$(STAGING_DIR)/usr/include/mac80211-backport/uapi -I$(STAGING_DIR)/usr/include/mac80211-backport \ -I$(STAGING_DIR)/usr/include/mac80211/uapi -I$(STAGING_DIR)/usr/include/mac80211 \ -I$(LINUX_DIR)/include -I$(LINUX_DIR)/include/$(LINUX_UAPI_DIR) \ diff --git a/package/kernel/acx-mac80211/patches/001-pci-mem-Fix-3.8-build.patch b/package/kernel/acx-mac80211/patches/001-pci-mem-Fix-3.8-build.patch deleted file mode 100644 index fa4a6be6ab..0000000000 --- a/package/kernel/acx-mac80211/patches/001-pci-mem-Fix-3.8-build.patch +++ /dev/null @@ -1,129 +0,0 @@ -From 8a0f5890019bf43f4bc95ef0754b062ddfcfa9cd Mon Sep 17 00:00:00 2001 -From: Oliver Winker -Date: Sun, 10 Mar 2013 21:04:23 +0100 -Subject: [PATCH 1/3] pci, mem: Fix 3.8 build - -__devexit and __devinit not used anymore in 3.8 - -Signed-off-by: Reinhard Karcher -Signed-off-by: Oliver Winker ---- - mem.c | 13 ++++++++++++- - pci.c | 26 +++++++++++++++++++++++++- - 2 files changed, 37 insertions(+), 2 deletions(-) - ---- a/mem.c -+++ b/mem.c -@@ -2216,7 +2216,11 @@ int acx100mem_ioctl_set_phy_amp_bias(str - * ================================================== - */ - -+#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 8, 0) - static int __devinit acxmem_probe(struct platform_device *pdev) -+#else -+static int acxmem_probe(struct platform_device *pdev) -+#endif - { - acx_device_t *adev = NULL; - const char *chip_name; -@@ -2392,7 +2396,11 @@ static int __devinit acxmem_probe(struct - * pdev - ptr to PCI device structure containing info about pci - * configuration - */ -+#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 8, 0) - static int __devexit acxmem_remove(struct platform_device *pdev) -+#else -+static int acxmem_remove(struct platform_device *pdev) -+#endif - { - struct ieee80211_hw *hw = (struct ieee80211_hw *) - platform_get_drvdata(pdev); -@@ -2594,8 +2602,11 @@ static struct platform_driver acxmem_dri - .name = "acx-mem", - }, - .probe = acxmem_probe, -+#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 8, 0) - .remove = __devexit_p(acxmem_remove), -- -+#else -+ .remove = acxmem_remove, -+#endif - #ifdef CONFIG_PM - .suspend = acxmem_e_suspend, - .resume = acxmem_e_resume ---- a/pci.c -+++ b/pci.c -@@ -1039,7 +1039,11 @@ int acx100pci_ioctl_set_phy_amp_bias(str - * id - ptr to the device id entry that matched this device - */ - #ifdef CONFIG_PCI -+#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 8, 0) - static int __devinit acxpci_probe(struct pci_dev *pdev, -+#else -+static int acxpci_probe(struct pci_dev *pdev, -+#endif - const struct pci_device_id *id) - { - unsigned long mem_region1 = 0; -@@ -1292,7 +1296,11 @@ static int __devinit acxpci_probe(struct - * - * pdev - ptr to PCI device structure containing info about pci configuration - */ -+#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 8, 0) - static void __devexit acxpci_remove(struct pci_dev *pdev) -+#else -+static void acxpci_remove(struct pci_dev *pdev) -+#endif - { - struct ieee80211_hw *hw - = (struct ieee80211_hw *) pci_get_drvdata(pdev); -@@ -1505,7 +1513,11 @@ static struct pci_driver acxpci_driver = - .name = "acx_pci", - .id_table = acxpci_id_tbl, - .probe = acxpci_probe, -+#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 8, 0) - .remove = __devexit_p(acxpci_remove), -+#else -+ .remove = acxpci_remove, -+#endif - #ifdef CONFIG_PM - .suspend = acxpci_e_suspend, - .resume = acxpci_e_resume -@@ -1603,8 +1615,12 @@ static struct vlynq_device_id acx_vlynq_ - }; - - -+#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 8, 0) - static __devinit int vlynq_probe(struct vlynq_device *vdev, -- struct vlynq_device_id *id) -+#else -+static int vlynq_probe(struct vlynq_device *vdev, -+#endif -+ struct vlynq_device_id *id) - { - int result = -EIO, i; - u32 addr; -@@ -1785,7 +1801,11 @@ static __devinit int vlynq_probe(struct - return result; - } - -+#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 8, 0) - static __devexit void vlynq_remove(struct vlynq_device *vdev) -+#else -+static void vlynq_remove(struct vlynq_device *vdev) -+#endif - { - struct ieee80211_hw *hw = vlynq_get_drvdata(vdev); - acx_device_t *adev = hw2adev(hw); -@@ -1851,7 +1871,11 @@ static struct vlynq_driver acxvlynq_driv - .name = "acx_vlynq", - .id_table = acx_vlynq_id, - .probe = vlynq_probe, -+#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 8, 0) - .remove = __devexit_p(vlynq_remove), -+#else -+ .remove = vlynq_remove, -+#endif - }; - #endif /* CONFIG_VLYNQ */ - diff --git a/package/kernel/acx-mac80211/patches/003-Fix-3.10-build.patch b/package/kernel/acx-mac80211/patches/003-Fix-3.10-build.patch deleted file mode 100644 index c73784465e..0000000000 --- a/package/kernel/acx-mac80211/patches/003-Fix-3.10-build.patch +++ /dev/null @@ -1,31 +0,0 @@ -From 1daf4bfdb072b08f3b4e412bbfa9645f88dc0a01 Mon Sep 17 00:00:00 2001 -From: Oliver Winker -Date: Tue, 3 Sep 2013 20:36:36 +0200 -Subject: [PATCH 3/3] Fix 3.10 build - -Signed-off-by: Reinhard Karcher -Signed-off-by: Oliver Winker ---- - main.c | 7 +++++++ - 1 file changed, 7 insertions(+) - ---- a/main.c -+++ b/main.c -@@ -682,10 +682,17 @@ int acx_op_config(struct ieee80211_hw *h - - if (changed & IEEE80211_CONF_CHANGE_CHANNEL) { - logf1(L_DEBUG, "IEEE80211_CONF_CHANGE_CHANNEL," -+#if CONFIG_ACX_MAC80211_VERSION >= KERNEL_VERSION(3, 10, 0) -+ "channel->hw_value=%i\n", conf->chandef.chan->hw_value); -+ -+ acx_set_channel(adev, conf->chandef.chan->hw_value, -+ conf->chandef.chan->center_freq); -+#else - "channel->hw_value=%i\n", conf->channel->hw_value); - - acx_set_channel(adev, conf->channel->hw_value, - conf->channel->center_freq); -+#endif - - changed_not_done &= ~IEEE80211_CONF_CHANGE_CHANNEL; - } diff --git a/package/kernel/acx-mac80211/patches/004-Fix-3.14-build.patch b/package/kernel/acx-mac80211/patches/004-Fix-3.14-build.patch deleted file mode 100644 index 847b573159..0000000000 --- a/package/kernel/acx-mac80211/patches/004-Fix-3.14-build.patch +++ /dev/null @@ -1,22 +0,0 @@ -From d17fcac710e629463591f6bd09d76b66ec591583 Mon Sep 17 00:00:00 2001 -From: Hauke Mehrtens -Date: Wed, 5 Feb 2014 20:57:07 +0100 -Subject: [PATCH] Fix 3.14 build - -Signed-off-by: Hauke Mehrtens ---- - main.c | 2 ++ - 1 file changed, 2 insertions(+) - ---- a/main.c -+++ b/main.c -@@ -500,7 +500,9 @@ int acx_init_ieee80211(acx_device_t *ade - hw->flags &= ~IEEE80211_HW_RX_INCLUDES_FCS; - hw->queues = 1; - hw->wiphy->max_scan_ssids = 1; -+#if CONFIG_ACX_MAC80211_VERSION < KERNEL_VERSION(3, 14, 0) - hw->channel_change_time = 10000; -+#endif - - /* OW TODO Check if RTS/CTS threshold can be included here */ - diff --git a/package/kernel/acx-mac80211/patches/300-kernel_4_2.patch b/package/kernel/acx-mac80211/patches/300-kernel_4_2.patch new file mode 100644 index 0000000000..ee92b943e5 --- /dev/null +++ b/package/kernel/acx-mac80211/patches/300-kernel_4_2.patch @@ -0,0 +1,67 @@ +diff --git a/main.c b/main.c +index bfec856..3c482d9 100644 +--- a/main.c ++++ b/main.c +@@ -497,7 +497,7 @@ int acx_free_mechanics(acx_device_t *adev) + + int acx_init_ieee80211(acx_device_t *adev, struct ieee80211_hw *hw) + { +- hw->flags &= ~IEEE80211_HW_RX_INCLUDES_FCS; ++ __clear_bit(IEEE80211_HW_RX_INCLUDES_FCS, hw->flags); + hw->queues = 1; + hw->wiphy->max_scan_ssids = 1; + +@@ -525,7 +525,7 @@ int acx_init_ieee80211(acx_device_t *adev, struct ieee80211_hw *hw) + /* We base signal quality on winlevel approach of previous driver + * TODO OW 20100615 This should into a common init code + */ +- hw->flags |= IEEE80211_HW_SIGNAL_UNSPEC; ++ __set_bit(IEEE80211_HW_SIGNAL_UNSPEC, hw->flags); + hw->max_signal = 100; + + if (IS_ACX100(adev)) { +@@ -945,8 +945,8 @@ void acx_op_configure_filter(struct ieee80211_hw *hw, + changed_flags, *total_flags); + + /* OWI TODO: Set also FIF_PROBE_REQ ? */ +- *total_flags &= (FIF_PROMISC_IN_BSS | FIF_ALLMULTI | FIF_FCSFAIL +- | FIF_CONTROL | FIF_OTHER_BSS); ++ *total_flags &= (FIF_ALLMULTI | FIF_FCSFAIL | FIF_CONTROL ++ | FIF_OTHER_BSS); + + logf1(L_DEBUG, "2: *total_flags=0x%08x\n", *total_flags); + +@@ -1045,9 +1045,10 @@ void acx_op_tx(struct ieee80211_hw *hw, struct ieee80211_tx_control *control, + } + + int acx_op_hw_scan(struct ieee80211_hw *hw, struct ieee80211_vif *vif, +- struct cfg80211_scan_request *req) ++ struct ieee80211_scan_request *hw_req) + { + acx_device_t *adev = hw2adev(hw); ++ struct cfg80211_scan_request *req = &hw_req->req; + struct sk_buff *skb; + size_t ssid_len = 0; + u8 *ssid = NULL; +@@ -1082,7 +1083,7 @@ int acx_op_hw_scan(struct ieee80211_hw *hw, struct ieee80211_vif *vif, + goto out; + } + #else +- skb = ieee80211_probereq_get(adev->hw, adev->vif, ssid, ssid_len, ++ skb = ieee80211_probereq_get(adev->hw, vif->addr, ssid, ssid_len, + req->ie_len); + if (!skb) { + ret = -ENOMEM; +diff --git a/main.h b/main.h +index 293f5c8..84ecb9a 100644 +--- a/main.h ++++ b/main.h +@@ -62,7 +62,7 @@ void acx_op_tx(struct ieee80211_hw *hw, struct ieee80211_tx_control *control, + #endif + + int acx_op_hw_scan(struct ieee80211_hw *hw, struct ieee80211_vif *vif, +- struct cfg80211_scan_request *req); ++ struct ieee80211_scan_request *req); + + int acx_recover_hw(acx_device_t *adev); +