mirror of https://github.com/hak5/openwrt.git
ar71xx: refresh 3.10 patches
Signed-off-by: Felix Fietkau <nbd@openwrt.org> SVN-Revision: 43051lede-17.01
parent
7004b79665
commit
2eb6b059ba
|
@ -170,7 +170,7 @@ Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
|
|||
struct ath79_spi {
|
||||
struct spi_bitbang bitbang;
|
||||
u32 ioc_base;
|
||||
@@ -69,6 +71,7 @@ static void ath79_spi_chipselect(struct
|
||||
@@ -69,6 +71,7 @@ static void ath79_spi_chipselect(struct
|
||||
{
|
||||
struct ath79_spi *sp = ath79_spidev_to_sp(spi);
|
||||
int cs_high = (spi->mode & SPI_CS_HIGH) ? is_active : !is_active;
|
||||
|
@ -178,7 +178,7 @@ Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
|
|||
|
||||
if (is_active) {
|
||||
/* set initial clock polarity */
|
||||
@@ -80,20 +83,24 @@ static void ath79_spi_chipselect(struct
|
||||
@@ -80,20 +83,24 @@ static void ath79_spi_chipselect(struct
|
||||
ath79_spi_wr(sp, AR71XX_SPI_REG_IOC, sp->ioc_base);
|
||||
}
|
||||
|
||||
|
|
|
@ -84,7 +84,7 @@
|
|||
mutex_unlock(&flash->lock);
|
||||
|
||||
return 0;
|
||||
@@ -1022,6 +1045,12 @@ static int m25p_probe(struct spi_device
|
||||
@@ -1022,6 +1045,12 @@ static int m25p_probe(struct spi_device
|
||||
flash->mtd._unlock = m25p80_unlock;
|
||||
}
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
--- a/drivers/mtd/devices/m25p80.c
|
||||
+++ b/drivers/mtd/devices/m25p80.c
|
||||
@@ -1122,7 +1122,9 @@ static int m25p_probe(struct spi_device
|
||||
@@ -1122,7 +1122,9 @@ static int m25p_probe(struct spi_device
|
||||
/* partitions should match sector boundaries; and it may be good to
|
||||
* use readonly partitions for writeprotected sectors (BP2..BP0).
|
||||
*/
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
--- a/drivers/mtd/devices/m25p80.c
|
||||
+++ b/drivers/mtd/devices/m25p80.c
|
||||
@@ -1072,6 +1072,7 @@ static int m25p_probe(struct spi_device
|
||||
@@ -1072,6 +1072,7 @@ static int m25p_probe(struct spi_device
|
||||
if (info->flags & M25P_NO_ERASE)
|
||||
flash->mtd.flags |= MTD_NO_ERASE;
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
--- a/drivers/net/phy/phy.c
|
||||
+++ b/drivers/net/phy/phy.c
|
||||
@@ -1009,6 +1009,12 @@ static int phy_read_mmd_indirect(struct
|
||||
@@ -1009,6 +1009,12 @@ static int phy_read_mmd_indirect(struct
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
--- a/arch/mips/ath79/early_printk.c
|
||||
+++ b/arch/mips/ath79/early_printk.c
|
||||
@@ -56,6 +56,46 @@ static void prom_putchar_dummy(unsigned
|
||||
@@ -56,6 +56,46 @@ static void prom_putchar_dummy(unsigned
|
||||
/* nothing to do */
|
||||
}
|
||||
|
||||
|
|
|
@ -29,11 +29,13 @@
|
|||
- u32 bootstrap;
|
||||
+ void __iomem *phy_reg;
|
||||
+ u32 t;
|
||||
+
|
||||
|
||||
- bootstrap = ath79_reset_rr(AR934X_RESET_REG_BOOTSTRAP);
|
||||
- if (bootstrap & AR934X_BOOTSTRAP_USB_MODE_DEVICE)
|
||||
+ phy_reg = ioremap(base, 4);
|
||||
+ if (!phy_reg)
|
||||
+ return;
|
||||
+
|
||||
return;
|
||||
|
||||
+ t = ioread32(phy_reg);
|
||||
+ t &= ~0xff;
|
||||
+ t |= 0x58;
|
||||
|
@ -41,14 +43,12 @@
|
|||
+
|
||||
+ iounmap(phy_reg);
|
||||
+}
|
||||
|
||||
- bootstrap = ath79_reset_rr(AR934X_RESET_REG_BOOTSTRAP);
|
||||
- if (bootstrap & AR934X_BOOTSTRAP_USB_MODE_DEVICE)
|
||||
+
|
||||
+static void ar934x_usb_reset_notifier(struct platform_device *pdev)
|
||||
+{
|
||||
+ if (pdev->id != -1)
|
||||
return;
|
||||
|
||||
+ return;
|
||||
+
|
||||
+ enable_tx_tx_idp_violation_fix(0x18116c94);
|
||||
+ dev_info(&pdev->dev, "TX-TX IDP fix enabled\n");
|
||||
+}
|
||||
|
|
|
@ -50,7 +50,7 @@
|
|||
#define PB44_GPIO_SW_RESET (PB44_GPIO_EXP_BASE + 6)
|
||||
#define PB44_GPIO_SW_JUMP (PB44_GPIO_EXP_BASE + 8)
|
||||
#define PB44_GPIO_LED_JUMP1 (PB44_GPIO_EXP_BASE + 9)
|
||||
@@ -92,21 +117,66 @@ static struct ath79_spi_controller_data
|
||||
@@ -92,21 +117,66 @@ static struct ath79_spi_controller_data
|
||||
.cs_line = 0,
|
||||
};
|
||||
|
||||
|
|
|
@ -209,13 +209,13 @@
|
|||
config ATH79_MACH_AP121
|
||||
bool "Atheros AP121 reference board"
|
||||
select SOC_AR933X
|
||||
@@ -9,64 +64,736 @@ config ATH79_MACH_AP121
|
||||
select ATH79_DEV_GPIO_BUTTONS
|
||||
select ATH79_DEV_LEDS_GPIO
|
||||
@@ -11,62 +66,734 @@ config ATH79_MACH_AP121
|
||||
select ATH79_DEV_M25P80
|
||||
- select ATH79_DEV_USB
|
||||
+ select ATH79_DEV_USB
|
||||
+ select ATH79_DEV_WMAC
|
||||
select ATH79_DEV_USB
|
||||
select ATH79_DEV_WMAC
|
||||
- help
|
||||
- Say 'Y' here if you want your kernel to support the
|
||||
- Atheros AP121 reference board.
|
||||
+ help
|
||||
+ Say 'Y' here if you want your kernel to support the
|
||||
+ Atheros AP121 reference board.
|
||||
|
@ -678,13 +678,8 @@
|
|||
+ select ATH79_DEV_GPIO_BUTTONS
|
||||
+ select ATH79_DEV_LEDS_GPIO
|
||||
+ select ATH79_DEV_M25P80
|
||||
select ATH79_DEV_WMAC
|
||||
- help
|
||||
- Say 'Y' here if you want your kernel to support the
|
||||
- Atheros AP121 reference board.
|
||||
|
||||
-config ATH79_MACH_AP136
|
||||
- bool "Atheros AP136/AP135 reference board"
|
||||
+ select ATH79_DEV_WMAC
|
||||
+
|
||||
+config ATH79_MACH_EAP7660D
|
||||
+ bool "Senao EAP7660D support"
|
||||
+ select SOC_AR71XX
|
||||
|
@ -695,7 +690,30 @@
|
|||
+
|
||||
+config ATH79_MACH_ARCHER_C7
|
||||
+ bool "TP-LINK Archer C7 board support"
|
||||
select SOC_QCA955X
|
||||
+ select SOC_QCA955X
|
||||
+ select ATH79_DEV_ETH
|
||||
+ select ATH79_DEV_GPIO_BUTTONS
|
||||
+ select ATH79_DEV_LEDS_GPIO
|
||||
+ select ATH79_DEV_M25P80
|
||||
+ select ATH79_DEV_USB
|
||||
+ select ATH79_DEV_WMAC
|
||||
+
|
||||
+config ATH79_MACH_TL_MR11U
|
||||
+ bool "TP-LINK TL-MR11U/TL-MR3040 support"
|
||||
+ select SOC_AR933X
|
||||
+ select ATH79_DEV_ETH
|
||||
+ select ATH79_DEV_GPIO_BUTTONS
|
||||
+ select ATH79_DEV_LEDS_GPIO
|
||||
+ select ATH79_DEV_M25P80
|
||||
+ select ATH79_DEV_USB
|
||||
+ select ATH79_DEV_WMAC
|
||||
|
||||
-config ATH79_MACH_AP136
|
||||
- bool "Atheros AP136/AP135 reference board"
|
||||
- select SOC_QCA955X
|
||||
+config ATH79_MACH_TL_MR13U
|
||||
+ bool "TP-LINK TL-MR13U support"
|
||||
+ select SOC_AR933X
|
||||
+ select ATH79_DEV_ETH
|
||||
select ATH79_DEV_GPIO_BUTTONS
|
||||
select ATH79_DEV_LEDS_GPIO
|
||||
|
@ -710,26 +728,6 @@
|
|||
|
||||
-config ATH79_MACH_AP81
|
||||
- bool "Atheros AP81 reference board"
|
||||
+config ATH79_MACH_TL_MR11U
|
||||
+ bool "TP-LINK TL-MR11U/TL-MR3040 support"
|
||||
+ select SOC_AR933X
|
||||
+ select ATH79_DEV_ETH
|
||||
+ select ATH79_DEV_GPIO_BUTTONS
|
||||
+ select ATH79_DEV_LEDS_GPIO
|
||||
+ select ATH79_DEV_M25P80
|
||||
+ select ATH79_DEV_USB
|
||||
+ select ATH79_DEV_WMAC
|
||||
+
|
||||
+config ATH79_MACH_TL_MR13U
|
||||
+ bool "TP-LINK TL-MR13U support"
|
||||
+ select SOC_AR933X
|
||||
+ select ATH79_DEV_ETH
|
||||
+ select ATH79_DEV_GPIO_BUTTONS
|
||||
+ select ATH79_DEV_LEDS_GPIO
|
||||
+ select ATH79_DEV_M25P80
|
||||
+ select ATH79_DEV_USB
|
||||
+ select ATH79_DEV_WMAC
|
||||
+
|
||||
+config ATH79_MACH_TL_MR3020
|
||||
+ bool "TP-LINK TL-MR3020 support"
|
||||
+ select SOC_AR933X
|
||||
|
@ -853,9 +851,10 @@
|
|||
+ bool "TP-LINK TL-WR841N v1 support"
|
||||
select SOC_AR71XX
|
||||
+ select ATH79_DEV_DSA
|
||||
+ select ATH79_DEV_ETH
|
||||
+ select ATH79_DEV_GPIO_BUTTONS
|
||||
+ select ATH79_DEV_LEDS_GPIO
|
||||
select ATH79_DEV_ETH
|
||||
select ATH79_DEV_GPIO_BUTTONS
|
||||
select ATH79_DEV_LEDS_GPIO
|
||||
- select ATH79_DEV_SPI
|
||||
+ select ATH79_DEV_M25P80
|
||||
+
|
||||
+config ATH79_MACH_TL_WR841N_V8
|
||||
|
@ -902,15 +901,11 @@
|
|||
+config ATH79_MACH_TL_WR1043ND_V2
|
||||
+ bool "TP-LINK TL-WR1043ND v2 support"
|
||||
+ select SOC_QCA955X
|
||||
select ATH79_DEV_ETH
|
||||
select ATH79_DEV_GPIO_BUTTONS
|
||||
select ATH79_DEV_LEDS_GPIO
|
||||
- select ATH79_DEV_SPI
|
||||
+ select ATH79_DEV_ETH
|
||||
+ select ATH79_DEV_GPIO_BUTTONS
|
||||
+ select ATH79_DEV_LEDS_GPIO
|
||||
+ select ATH79_DEV_M25P80
|
||||
select ATH79_DEV_USB
|
||||
- help
|
||||
- Say 'Y' here if you want your kernel to support the
|
||||
- Atheros PB44 reference board.
|
||||
+ select ATH79_DEV_USB
|
||||
+ select ATH79_DEV_WMAC
|
||||
+
|
||||
+config ATH79_MACH_TL_WR2543N
|
||||
|
@ -970,7 +965,10 @@
|
|||
+ select ATH79_DEV_GPIO_BUTTONS
|
||||
+ select ATH79_DEV_LEDS_GPIO
|
||||
+ select ATH79_DEV_M25P80
|
||||
+ select ATH79_DEV_USB
|
||||
select ATH79_DEV_USB
|
||||
- help
|
||||
- Say 'Y' here if you want your kernel to support the
|
||||
- Atheros PB44 reference board.
|
||||
|
||||
config ATH79_MACH_UBNT_XM
|
||||
bool "Ubiquiti Networks XM/UniFi boards"
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
+ ATH79_MACH_TUBE2H, /* Alfa Network Tube2H */
|
||||
ATH79_MACH_UBNT_AIRROUTER, /* Ubiquiti AirRouter */
|
||||
ATH79_MACH_UBNT_BULLET_M, /* Ubiquiti Bullet M */
|
||||
ATH79_MACH_UBNT_LSSR71, /* Ubiquiti LS-SR71 */
|
||||
ATH79_MACH_UBNT_LOCO_M_XW, /* Ubiquiti Loco M XW */
|
||||
--- a/arch/mips/ath79/Kconfig
|
||||
+++ b/arch/mips/ath79/Kconfig
|
||||
@@ -29,6 +29,15 @@ config ATH79_MACH_ALFA_NX
|
||||
|
@ -28,7 +28,7 @@
|
|||
select SOC_AR724X
|
||||
--- a/arch/mips/ath79/Makefile
|
||||
+++ b/arch/mips/ath79/Makefile
|
||||
@@ -116,6 +116,7 @@ obj-$(CONFIG_ATH79_MACH_TL_WR1043ND_V2)
|
||||
@@ -116,6 +116,7 @@ obj-$(CONFIG_ATH79_MACH_TL_WR1043ND_V2)
|
||||
obj-$(CONFIG_ATH79_MACH_TL_WR2543N) += mach-tl-wr2543n.o
|
||||
obj-$(CONFIG_ATH79_MACH_TL_WR703N) += mach-tl-wr703n.o
|
||||
obj-$(CONFIG_ATH79_MACH_TL_WR720N_V3) += mach-tl-wr720n-v3.o
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
#include "dev-ap9x-pci.h"
|
||||
#include "dev-eth.h"
|
||||
#include "dev-gpio-buttons.h"
|
||||
@@ -406,3 +408,65 @@ MIPS_MACHINE(ATH79_MACH_UBNT_NANO_M_XW,
|
||||
@@ -407,3 +409,65 @@ MIPS_MACHINE(ATH79_MACH_UBNT_NANO_M_XW,
|
||||
|
||||
MIPS_MACHINE(ATH79_MACH_UBNT_LOCO_M_XW, "UBNT-LOCO-XW", "Ubiquiti Loco M XW",
|
||||
ubnt_loco_m_xw_setup);
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
Index: linux-3.10.49/arch/mips/ath79/mach-rb2011.c
|
||||
===================================================================
|
||||
--- linux-3.10.49.orig/arch/mips/ath79/mach-rb2011.c
|
||||
+++ linux-3.10.49/arch/mips/ath79/mach-rb2011.c
|
||||
--- a/arch/mips/ath79/mach-rb2011.c
|
||||
+++ b/arch/mips/ath79/mach-rb2011.c
|
||||
@@ -323,7 +323,7 @@ MIPS_MACHINE_NONAME(ATH79_MACH_RB_2011US
|
||||
|
||||
static void __init rb2011r5_setup(void)
|
||||
|
@ -11,10 +9,8 @@ Index: linux-3.10.49/arch/mips/ath79/mach-rb2011.c
|
|||
}
|
||||
|
||||
MIPS_MACHINE_NONAME(ATH79_MACH_RB_2011R5, "2011r5", rb2011r5_setup);
|
||||
Index: linux-3.10.49/arch/mips/ath79/machtypes.h
|
||||
===================================================================
|
||||
--- linux-3.10.49.orig/arch/mips/ath79/machtypes.h
|
||||
+++ linux-3.10.49/arch/mips/ath79/machtypes.h
|
||||
--- a/arch/mips/ath79/machtypes.h
|
||||
+++ b/arch/mips/ath79/machtypes.h
|
||||
@@ -99,7 +99,7 @@ enum ath79_mach_type {
|
||||
ATH79_MACH_RB_2011G, /* Mikrotik RouterBOARD 2011UAS-2HnD */
|
||||
ATH79_MACH_RB_2011L, /* Mikrotik RouterBOARD 2011L */
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
--- a/arch/mips/ath79/Kconfig
|
||||
+++ b/arch/mips/ath79/Kconfig
|
||||
@@ -1034,6 +1034,17 @@
|
||||
@@ -1034,6 +1034,17 @@ config ATH79_MACH_BHU_BXU2000N2_A
|
||||
select ATH79_DEV_USB
|
||||
select ATH79_DEV_WMAC
|
||||
|
||||
|
@ -20,7 +20,7 @@
|
|||
config SOC_AR71XX
|
||||
--- a/arch/mips/ath79/machtypes.h
|
||||
+++ b/arch/mips/ath79/machtypes.h
|
||||
@@ -80,6 +80,7 @@
|
||||
@@ -80,6 +80,7 @@ enum ath79_mach_type {
|
||||
ATH79_MACH_OM5P, /* OpenMesh OM5P */
|
||||
ATH79_MACH_PB42, /* Atheros PB42 */
|
||||
ATH79_MACH_PB92, /* Atheros PB92 */
|
||||
|
@ -30,7 +30,7 @@
|
|||
ATH79_MACH_RB_433, /* MikroTik RouterBOARD 433/433AH */
|
||||
--- a/arch/mips/ath79/Makefile
|
||||
+++ b/arch/mips/ath79/Makefile
|
||||
@@ -85,6 +85,7 @@
|
||||
@@ -85,6 +85,7 @@ obj-$(CONFIG_ATH79_MACH_OM5P) += mach-o
|
||||
obj-$(CONFIG_ATH79_MACH_PB42) += mach-pb42.o
|
||||
obj-$(CONFIG_ATH79_MACH_PB44) += mach-pb44.o
|
||||
obj-$(CONFIG_ATH79_MACH_PB92) += mach-pb92.o
|
||||
|
|
|
@ -229,7 +229,7 @@
|
|||
#include <asm/uaccess.h>
|
||||
|
||||
#include <linux/proc_fs.h>
|
||||
@@ -763,10 +764,10 @@ static void tcp_v6_send_response(struct
|
||||
@@ -763,10 +764,10 @@ static void tcp_v6_send_response(struct
|
||||
topt = (__be32 *)(t1 + 1);
|
||||
|
||||
if (tsecr) {
|
||||
|
@ -380,7 +380,7 @@
|
|||
for (p = *head; p; p = p->next) {
|
||||
--- a/net/ipv4/route.c
|
||||
+++ b/net/ipv4/route.c
|
||||
@@ -461,7 +461,7 @@ static struct neighbour *ipv4_neigh_look
|
||||
@@ -462,7 +462,7 @@ static struct neighbour *ipv4_neigh_look
|
||||
else if (skb)
|
||||
pkey = &ip_hdr(skb)->daddr;
|
||||
|
||||
|
@ -662,7 +662,7 @@
|
|||
#include <linux/netdevice.h>
|
||||
--- a/include/net/inet_ecn.h
|
||||
+++ b/include/net/inet_ecn.h
|
||||
@@ -115,13 +115,13 @@ static inline int IP6_ECN_set_ce(struct
|
||||
@@ -115,13 +115,13 @@ static inline int IP6_ECN_set_ce(struct
|
||||
{
|
||||
if (INET_ECN_is_not_ect(ipv6_get_dsfield(iph)))
|
||||
return 0;
|
||||
|
@ -720,7 +720,7 @@
|
|||
return false;
|
||||
|
||||
return true;
|
||||
@@ -587,13 +591,13 @@ static inline void ipv6_addr_set_v4mappe
|
||||
@@ -592,13 +596,13 @@ static inline void ipv6_addr_set_v4mappe
|
||||
*/
|
||||
static inline int __ipv6_addr_diff32(const void *token1, const void *token2, int addrlen)
|
||||
{
|
||||
|
@ -736,7 +736,7 @@
|
|||
if (xb)
|
||||
return i * 32 + 31 - __fls(ntohl(xb));
|
||||
}
|
||||
@@ -657,12 +661,13 @@ extern void ipv6_select_ident(struct fra
|
||||
@@ -660,12 +664,13 @@ static inline int ipv6_addr_diff(const s
|
||||
static inline void ip6_flow_hdr(struct ipv6hdr *hdr, unsigned int tclass,
|
||||
__be32 flowlabel)
|
||||
{
|
||||
|
@ -760,8 +760,8 @@
|
|||
#include <linux/types.h>
|
||||
+#include <linux/in6.h>
|
||||
|
||||
extern __u32 secure_ip_id(__be32 daddr);
|
||||
extern __u32 secure_ipv6_id(const __be32 daddr[4]);
|
||||
extern u32 secure_ipv4_port_ephemeral(__be32 saddr, __be32 daddr, __be16 dport);
|
||||
extern u32 secure_ipv6_port_ephemeral(const __be32 *saddr, const __be32 *daddr,
|
||||
--- a/include/uapi/linux/in.h
|
||||
+++ b/include/uapi/linux/in.h
|
||||
@@ -55,7 +55,7 @@ enum {
|
||||
|
@ -803,7 +803,7 @@
|
|||
secret[4] = net_secret[4] + (__force u32)dport;
|
||||
for (i = 5; i < MD5_MESSAGE_BYTES / 4; i++)
|
||||
secret[i] = net_secret[i];
|
||||
@@ -185,11 +187,12 @@ u64 secure_dccpv6_sequence_number(__be32
|
||||
@@ -160,11 +162,12 @@ u64 secure_dccpv6_sequence_number(__be32
|
||||
u32 hash[MD5_DIGEST_WORDS];
|
||||
u64 seq;
|
||||
u32 i;
|
||||
|
@ -855,7 +855,7 @@
|
|||
ptr = ip6hoff + sizeof(struct ipv6hdr);
|
||||
--- a/net/xfrm/xfrm_input.c
|
||||
+++ b/net/xfrm/xfrm_input.c
|
||||
@@ -77,8 +77,8 @@ int xfrm_parse_spi(struct sk_buff *skb,
|
||||
@@ -77,8 +77,8 @@ int xfrm_parse_spi(struct sk_buff *skb,
|
||||
if (!pskb_may_pull(skb, hlen))
|
||||
return -EINVAL;
|
||||
|
||||
|
|
Loading…
Reference in New Issue