summaryrefslogtreecommitdiffstats
path: root/target/linux
diff options
context:
space:
mode:
Diffstat (limited to 'target/linux')
-rw-r--r--target/linux/ar71xx/config-3.32
-rw-r--r--target/linux/ar71xx/files/arch/mips/ath79/mach-rb750.c44
-rw-r--r--target/linux/ar71xx/patches-3.3/610-MIPS-ath79-openwrt-machines.patch11
-rw-r--r--target/linux/ar71xx/patches-3.3/611-TEW-712BR-support.patch2
4 files changed, 17 insertions, 42 deletions
diff --git a/target/linux/ar71xx/config-3.3 b/target/linux/ar71xx/config-3.3
index 3b3ace506..117e847b0 100644
--- a/target/linux/ar71xx/config-3.3
+++ b/target/linux/ar71xx/config-3.3
@@ -188,7 +188,7 @@ CONFIG_PCI_DOMAINS=y
CONFIG_PERF_USE_VMALLOC=y
CONFIG_PHYLIB=y
# CONFIG_PREEMPT_RCU is not set
-# CONFIG_RLE_DECOMPRESS is not set
+CONFIG_RLE_DECOMPRESS=y
CONFIG_RTL8306_PHY=y
CONFIG_RTL8366RB_PHY=y
CONFIG_RTL8366S_PHY=y
diff --git a/target/linux/ar71xx/files/arch/mips/ath79/mach-rb750.c b/target/linux/ar71xx/files/arch/mips/ath79/mach-rb750.c
index b180621c2..305fa2f87 100644
--- a/target/linux/ar71xx/files/arch/mips/ath79/mach-rb750.c
+++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-rb750.c
@@ -14,6 +14,7 @@
#include <linux/platform_device.h>
#include <linux/phy.h>
#include <linux/ar8216_platform.h>
+#include <linux/rle.h>
#include <asm/mach-ath79/ar71xx_regs.h>
#include <asm/mach-ath79/ath79.h>
@@ -276,45 +277,16 @@ static void __init rb750gr3_setup(void)
MIPS_MACHINE(ATH79_MACH_RB_750G_R3, "750Gr3", "MikroTik RouterBOARD 750GL",
rb750gr3_setup);
-static int decode_rle(char *output, int len, char *in)
-{
- char *ptr = output;
- char *end = output + len;
-
- if (!output || !in)
- return -EINVAL;
-
- while (*in) {
- if (*in < 0) {
- int i = -*in++;
- while (i-- > 0) {
- if (ptr >= end)
- return -EINVAL;
- *ptr++ = *in++;
- }
- } else if (*in > 0) {
- int i = *in++;
- while (i-- > 0) {
- if (ptr >= end)
- return -EINVAL;
- *ptr++ = *in;
- }
- in++;
- }
- }
-
- return ptr - output;
-}
-
#define RB751_HARDCONFIG 0x1f00b000
#define RB751_MAC_ADDRESS_OFFSET 0xE80
#define RB751_CALDATA_OFFSET 0x27C
+#define RB751_CALDATA_SIZE 0xc00
static void __init rb751_wlan_setup(void)
{
u8 *hardconfig = (u8 *) KSEG1ADDR(RB751_HARDCONFIG);
struct ath9k_platform_data *wmac_data;
- int dec_size;
+ int err;
wmac_data = ap9x_pci_get_wmac_data(0);
if (!wmac_data) {
@@ -324,10 +296,12 @@ static void __init rb751_wlan_setup(void)
ap9x_pci_setup_wmac_led_pin(0, 9);
- dec_size = decode_rle((char *) wmac_data->eeprom_data,
- sizeof(wmac_data->eeprom_data),
- hardconfig + RB751_CALDATA_OFFSET);
- if (dec_size != sizeof(wmac_data->eeprom_data)) {
+ err = rle_decode(hardconfig + RB751_CALDATA_OFFSET,
+ RB751_CALDATA_SIZE,
+ (unsigned char *) wmac_data->eeprom_data,
+ sizeof(wmac_data->eeprom_data),
+ NULL, NULL);
+ if (err) {
pr_err("rb75x: unable to decode wlan eeprom data\n");
return;
}
diff --git a/target/linux/ar71xx/patches-3.3/610-MIPS-ath79-openwrt-machines.patch b/target/linux/ar71xx/patches-3.3/610-MIPS-ath79-openwrt-machines.patch
index 10fefd067..0efdee15a 100644
--- a/target/linux/ar71xx/patches-3.3/610-MIPS-ath79-openwrt-machines.patch
+++ b/target/linux/ar71xx/patches-3.3/610-MIPS-ath79-openwrt-machines.patch
@@ -189,7 +189,7 @@
config ATH79_MACH_PB44
bool "Atheros PB44 reference board"
select SOC_AR71XX
-@@ -66,6 +137,427 @@ config ATH79_MACH_PB44
+@@ -66,6 +137,428 @@ config ATH79_MACH_PB44
Say 'Y' here if you want your kernel to support the
Atheros PB44 reference board.
@@ -379,6 +379,7 @@
+ select ATH79_DEV_ETH
+ select ATH79_DEV_AP9X_PCI if PCI
+ select ATH79_DEV_USB
++ select RLE_DECOMPRESS
+
+config ATH79_MACH_WNDR3700
+ bool "NETGEAR WNDR3700 board support"
@@ -617,7 +618,7 @@
config ATH79_MACH_UBNT_XM
bool "Ubiquiti Networks XM (rev 1.0) board"
select SOC_AR724X
-@@ -79,6 +571,24 @@ config ATH79_MACH_UBNT_XM
+@@ -79,6 +572,24 @@ config ATH79_MACH_UBNT_XM
Say 'Y' here if you want your kernel to support the
Ubiquiti Networks XM (rev 1.0) board.
@@ -642,7 +643,7 @@
endmenu
config SOC_AR71XX
-@@ -114,10 +624,6 @@ config SOC_QCA955X
+@@ -114,10 +625,6 @@ config SOC_QCA955X
select PCI_AR724X if PCI
def_bool n
@@ -653,7 +654,7 @@
config ATH79_DEV_AP9X_PCI
select ATH79_PCI_ATH9K_FIXUP
def_bool n
-@@ -128,7 +634,14 @@ config ATH79_DEV_DSA
+@@ -128,7 +635,14 @@ config ATH79_DEV_DSA
config ATH79_DEV_ETH
def_bool n
@@ -669,7 +670,7 @@
def_bool n
config ATH79_DEV_GPIO_BUTTONS
-@@ -153,4 +666,7 @@ config ATH79_NVRAM
+@@ -153,4 +667,7 @@ config ATH79_NVRAM
config ATH79_PCI_ATH9K_FIXUP
def_bool n
diff --git a/target/linux/ar71xx/patches-3.3/611-TEW-712BR-support.patch b/target/linux/ar71xx/patches-3.3/611-TEW-712BR-support.patch
index 994e1c3eb..94a056aa5 100644
--- a/target/linux/ar71xx/patches-3.3/611-TEW-712BR-support.patch
+++ b/target/linux/ar71xx/patches-3.3/611-TEW-712BR-support.patch
@@ -1,6 +1,6 @@
--- a/arch/mips/ath79/Kconfig
+++ b/arch/mips/ath79/Kconfig
-@@ -549,6 +549,16 @@ config ATH79_MACH_TEW_673GRU
+@@ -550,6 +550,16 @@ config ATH79_MACH_TEW_673GRU
select ATH79_DEV_USB
select ATH79_NVRAM