From 7fc94810d3cbe8770b2edbcb8a3c59a9dcf9ad83 Mon Sep 17 00:00:00 2001 From: florian Date: Sun, 14 Oct 2012 15:41:16 +0000 Subject: attitude_adjustment: backport ar7 changes r33744 to r33756 changes git-svn-id: svn://svn.openwrt.org/openwrt/branches/attitude_adjustment@33764 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- package/acx-mac80211/Makefile | 5 ++-- .../001-make-compatible-with-recent-mac80211.patch | 27 +++++------------ .../patches/004-ratelimit_compile_fix.patch | 10 ------- .../acx-mac80211/patches/200-initial-macaddr.patch | 31 ++++++++++++++++++++ package/ar7-atm/Makefile | 1 + .../patches-D7.04.03.00/160-module-params.patch | 34 +++++++++++++++------- .../patches-D7.05.01.00/160-module-params.patch | 30 +++++++++++++------ 7 files changed, 86 insertions(+), 52 deletions(-) delete mode 100644 package/acx-mac80211/patches/004-ratelimit_compile_fix.patch create mode 100644 package/acx-mac80211/patches/200-initial-macaddr.patch (limited to 'package') diff --git a/package/acx-mac80211/Makefile b/package/acx-mac80211/Makefile index 40b3ce5ed..80e52820e 100644 --- a/package/acx-mac80211/Makefile +++ b/package/acx-mac80211/Makefile @@ -9,8 +9,8 @@ include $(TOPDIR)/rules.mk include $(INCLUDE_DIR)/kernel.mk PKG_NAME:=acx-mac80211 -PKG_REV:=v20120607 -PKG_VERSION:=20120607 +PKG_REV:=v2012-09-23-WIP +PKG_VERSION:=20121004 PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 @@ -28,6 +28,7 @@ define KernelPackage/acx-mac80211 DEPENDS:=@(PCI_SUPPORT||TARGET_ar7) @mipsel +kmod-mac80211 FILES:=$(PKG_BUILD_DIR)/acx-mac80211.ko AUTOLOAD:=$(call AutoLoad,50,acx-mac80211) + MAINTAINER:=Florian Fainelli MENU:=1 endef diff --git a/package/acx-mac80211/patches/001-make-compatible-with-recent-mac80211.patch b/package/acx-mac80211/patches/001-make-compatible-with-recent-mac80211.patch index 34ecf6d4a..3b1afee41 100644 --- a/package/acx-mac80211/patches/001-make-compatible-with-recent-mac80211.patch +++ b/package/acx-mac80211/patches/001-make-compatible-with-recent-mac80211.patch @@ -1,22 +1,7 @@ ---- a/acx_func.h -+++ b/acx_func.h -@@ -335,8 +335,11 @@ void acx_process_rxbuf(acx_device_t *ade - */ - #if CONFIG_ACX_MAC80211_VERSION < KERNEL_VERSION(2, 6, 39) - int acx_op_tx(struct ieee80211_hw *hw, struct sk_buff *skb); --#else -+#elif CONFIG_ACX_MAC80211_VERSION < KERNEL_VERSION(3, 7, 0) - void acx_op_tx(struct ieee80211_hw *hw, struct sk_buff *skb); -+#else -+void acx_op_tx(struct ieee80211_hw *hw, struct ieee80211_tx_control *control, -+ struct sk_buff *skb); - #endif +--- a/main.h ++++ b/main.h +@@ -44,8 +44,11 @@ void acx_process_rxbuf(acx_device_t *ade - void acx_tx_work(struct work_struct *work); ---- a/common.c -+++ b/common.c -@@ -232,8 +232,11 @@ static void acx_rx(acx_device_t *adev, r - /* Tx Path */ #if CONFIG_ACX_MAC80211_VERSION < KERNEL_VERSION(2, 6, 39) int acx_op_tx(struct ieee80211_hw *hw, struct sk_buff *skb); -#else @@ -27,8 +12,10 @@ + struct sk_buff *skb); #endif - //-void acx_tx_work(struct work_struct *work); -@@ -5183,7 +5186,12 @@ out: + +--- a/main.c ++++ b/main.c +@@ -1024,7 +1024,12 @@ out: * acx_compat, and hiding this #if/else. OTOH, inclusion doesnt care * about old kernels */ diff --git a/package/acx-mac80211/patches/004-ratelimit_compile_fix.patch b/package/acx-mac80211/patches/004-ratelimit_compile_fix.patch deleted file mode 100644 index 56110eab0..000000000 --- a/package/acx-mac80211/patches/004-ratelimit_compile_fix.patch +++ /dev/null @@ -1,10 +0,0 @@ ---- a/common.c -+++ b/common.c -@@ -34,6 +34,7 @@ - #include - #include - #include -+#include - - #include - diff --git a/package/acx-mac80211/patches/200-initial-macaddr.patch b/package/acx-mac80211/patches/200-initial-macaddr.patch new file mode 100644 index 000000000..498c72dd8 --- /dev/null +++ b/package/acx-mac80211/patches/200-initial-macaddr.patch @@ -0,0 +1,31 @@ +--- a/cardsetting.c 2012-07-03 16:21:25.934102662 -0700 ++++ b/cardsetting.c 2012-07-03 16:49:26.910438174 -0700 +@@ -710,12 +710,27 @@ + u8 stationID[4 + acx_ie_descs[ACX1xx_IE_DOT11_STATION_ID].len]; + const u8 *paddr; + int i, res; ++ const char *prom_addr; ++ char *prom_getenv(const char *name); + + + + res = acx_interrogate(adev, &stationID, ACX1xx_IE_DOT11_STATION_ID); + paddr = &stationID[4]; +- for (i = 0; i < ETH_ALEN; i++) { ++ prom_addr = NULL; ++#ifdef CONFIG_VLYNQ ++ prom_addr = prom_getenv("macwlan"); ++ if (prom_addr == NULL) ++ prom_addr = prom_getenv("mac_ap"); ++#endif ++ if (prom_addr) ++ sscanf(prom_addr, "%hhx:%hhx:%hhx:%hhx:%hhx:%hhx", adev->dev_addr, ++ adev->dev_addr + 1, ++ adev->dev_addr + 2, ++ adev->dev_addr + 3, ++ adev->dev_addr + 4, ++ adev->dev_addr + 5); ++ else for (i = 0; i < ETH_ALEN; i++) { + /* we copy the MAC address (reversed in the card) to + * the netdevice's MAC address, and on ifup it will be + * copied into iwadev->dev_addr */ diff --git a/package/ar7-atm/Makefile b/package/ar7-atm/Makefile index 9568cce13..e9c386487 100644 --- a/package/ar7-atm/Makefile +++ b/package/ar7-atm/Makefile @@ -42,6 +42,7 @@ define KernelPackage/sangam-atm/Default TITLE:=AR7 ADSL driver FILES:=$(PKG_BUILD_DIR)/tiatm.ko AUTOLOAD:=$(call AutoLoad,50,tiatm) + MAINTAINER:=Florian Fainelli MENU:=1 endef diff --git a/package/ar7-atm/patches-D7.04.03.00/160-module-params.patch b/package/ar7-atm/patches-D7.04.03.00/160-module-params.patch index 5b3dcbfe3..67802ae1e 100644 --- a/package/ar7-atm/patches-D7.04.03.00/160-module-params.patch +++ b/package/ar7-atm/patches-D7.04.03.00/160-module-params.patch @@ -147,7 +147,7 @@ #endif #ifndef TRUE -@@ -655,9 +795,9 @@ static int __init tn7atm_irq_request (st +@@ -655,9 +795,9 @@ * interrupt pacing */ ptr = prom_getenv ("sar_ipacemax"); @@ -159,16 +159,28 @@ } /* avalanche_request_pacing (priv->sar_irq, ATM_SAR_INT_PACING_BLOCK_NUM, def_sar_inter_pace);*/ -@@ -797,7 +937,7 @@ static int __init tn7atm_get_ESI (struct +@@ -795,9 +935,18 @@ + { + int i; char esi_addr[ESI_LEN] = { 0x00, 0x00, 0x11, 0x22, 0x33, 0x44 }; - char *esiaddr_str = NULL; +- char *esiaddr_str = NULL; ++ char *esiaddr_str = mp_macc; - esiaddr_str = prom_getenv ("maca"); -+ esiaddr_str = mp_macc ? mp_macc : prom_getenv ("maca"); ++ if (esiaddr_str == NULL) ++ esiaddr_str = prom_getenv ("macdsl"); ++ if (esiaddr_str == NULL) ++ esiaddr_str = prom_getenv ("macc"); ++ if (esiaddr_str == NULL) ++ esiaddr_str = prom_getenv ("HWA_1"); ++ if (esiaddr_str == NULL) ++ esiaddr_str = prom_getenv ("macb"); ++ if (esiaddr_str == NULL) ++ esiaddr_str = prom_getenv ("maca"); if (!esiaddr_str) { -@@ -1930,15 +2070,15 @@ static int tn7atm_autoDetectDspBoost (vo +@@ -1930,15 +2079,15 @@ //UR8_MERGE_END CQ10450* cp = prom_getenv ("dsp_noboost"); @@ -188,7 +200,7 @@ if (dspfreq == 250) { boostDsp = 1; -@@ -2187,8 +2327,9 @@ static int __init tn7atm_init (struct at +@@ -2187,8 +2336,9 @@ // Inter-Op DSL phy Control // Note the setting of _dsl_Feature_0 and _dsl_Feature_1 must before // dslhal_api_dslStartup (in tn7dsl_init()). @@ -199,7 +211,7 @@ if ((ptr[0] == '0') && (ptr[1] == 'x')) // skip 0x before pass to // os_atoh ptr += 2; -@@ -2196,8 +2337,9 @@ static int __init tn7atm_init (struct at +@@ -2196,8 +2346,9 @@ _dsl_Feature_0_defined = 1; } @@ -210,7 +222,7 @@ if ((ptr[0] == '0') && (ptr[1] == 'x')) // skip 0x before pass to // os_atoh ptr += 2; -@@ -2209,8 +2351,9 @@ static int __init tn7atm_init (struct at +@@ -2209,8 +2360,9 @@ // DSL phy Feature Control // Note the setting of _dsl_PhyControl_0 and _dsl_PhyControl_1 must before // dslhal_api_dslStartup (in tn7dsl_init()). @@ -221,7 +233,7 @@ if ((ptr[0] == '0') && (ptr[1] == 'x')) // skip 0x before pass to // os_atoh ptr += 2; -@@ -2218,8 +2361,9 @@ static int __init tn7atm_init (struct at +@@ -2218,8 +2370,9 @@ _dsl_PhyControl_0_defined = 1; } @@ -232,7 +244,7 @@ if ((ptr[0] == '0') && (ptr[1] == 'x')) // skip 0x before pass to // os_atoh ptr += 2; -@@ -2247,9 +2391,9 @@ static int __init tn7atm_init (struct at +@@ -2247,9 +2400,9 @@ priv->bTurboDsl = 1; // read config for turbo dsl ptr = prom_getenv ("TurboDSL"); @@ -244,7 +256,7 @@ } // @Added to make Rx buffer number & Service max configurable through -@@ -2257,30 +2401,30 @@ static int __init tn7atm_init (struct at +@@ -2257,30 +2410,30 @@ priv->sarRxBuf = RX_BUFFER_NUM; ptr = NULL; ptr = prom_getenv ("SarRxBuf"); diff --git a/package/ar7-atm/patches-D7.05.01.00/160-module-params.patch b/package/ar7-atm/patches-D7.05.01.00/160-module-params.patch index 6e7d9de18..75a41d1e3 100644 --- a/package/ar7-atm/patches-D7.05.01.00/160-module-params.patch +++ b/package/ar7-atm/patches-D7.05.01.00/160-module-params.patch @@ -147,7 +147,7 @@ #endif #ifndef TRUE -@@ -728,9 +868,9 @@ static int __init tn7atm_irq_request (st +@@ -728,9 +868,9 @@ * interrupt pacing */ ptr = prom_getenv ("sar_ipacemax"); @@ -159,16 +159,28 @@ } /* avalanche_request_pacing (priv->sar_irq, ATM_SAR_INT_PACING_BLOCK_NUM, def_sar_inter_pace); */ -@@ -880,7 +1020,7 @@ static int __init tn7atm_get_ESI (struct +@@ -878,9 +1018,18 @@ + { + int i; char esi_addr[ESI_LEN] = { 0x00, 0x00, 0x11, 0x22, 0x33, 0x44 }; - char *esiaddr_str = NULL; +- char *esiaddr_str = NULL; ++ char *esiaddr_str = mp_macc; - esiaddr_str = prom_getenv ("macc"); -+ esiaddr_str = mp_macc ? mp_macc : prom_getenv ("maca"); ++ if (esiaddr_str == NULL) ++ esiaddr_str = prom_getenv ("macdsl"); ++ if (esiaddr_str == NULL) ++ esiaddr_str = prom_getenv ("macc"); ++ if (esiaddr_str == NULL) ++ esiaddr_str = prom_getenv ("HWA_1"); ++ if (esiaddr_str == NULL) ++ esiaddr_str = prom_getenv ("macb"); ++ if (esiaddr_str == NULL) ++ esiaddr_str = prom_getenv ("maca"); if (!esiaddr_str) { -@@ -2139,15 +2279,15 @@ static int tn7atm_autoDetectDspBoost (vo +@@ -2139,15 +2288,15 @@ //UR8_MERGE_END CQ10450* cp = prom_getenv ("dsp_noboost"); @@ -188,7 +200,7 @@ if (dspfreq == 250) { boostDsp = 1; -@@ -2396,15 +2536,17 @@ static int __init tn7atm_init (struct at +@@ -2396,15 +2545,17 @@ // Inter-Op DSL phy Control // Note the setting of _dsl_Feature_0 and _dsl_Feature_1 must before // dslhal_api_dslStartup (in tn7dsl_init()). @@ -210,7 +222,7 @@ _dsl_Feature_1_defined = 1; } -@@ -2412,15 +2554,17 @@ static int __init tn7atm_init (struct at +@@ -2412,15 +2563,17 @@ // DSL phy Feature Control // Note the setting of _dsl_PhyControl_0 and _dsl_PhyControl_1 must before // dslhal_api_dslStartup (in tn7dsl_init()). @@ -232,7 +244,7 @@ _dsl_PhyControl_1_defined = 1; } -@@ -2440,12 +2584,12 @@ static int __init tn7atm_init (struct at +@@ -2440,12 +2593,12 @@ // read config for turbo dsl ptr = prom_getenv ("TurboDSL"); @@ -247,7 +259,7 @@ #endif } else -@@ -2459,33 +2603,33 @@ static int __init tn7atm_init (struct at +@@ -2459,33 +2612,33 @@ priv->sarRxBuf = RX_BUFFER_NUM; ptr = NULL; ptr = prom_getenv ("SarRxBuf"); -- cgit v1.2.3