Temat: Łatka do WR1043ND v2
Cześć
W jaki sposób włączyć łatkę dla WR1043ND v2 podaną przez nbd do kodu trunka? w jakim katalogu ze źródłami ją umieścić?
diff --git a/package/kernel/mac80211/patches/950-ar955x-wmac-reset.patch b/package/kernel/mac80211/patches/950-ar955x-wmac-reset.patch
new file mode 100644
index 0000000..6ce3875
--- /dev/null
+++ b/package/kernel/mac80211/patches/950-ar955x-wmac-reset.patch
@@ -0,0 +1,44 @@
+--- a/drivers/net/wireless/ath/ath9k/reg.h
++++ b/drivers/net/wireless/ath/ath9k/reg.h
+@@ -35,6 +35,7 @@
+ #define AR_CFG_AP_ADHOC_INDICATION 0x00000020
+ #define AR_CFG_PHOK 0x00000100
+ #define AR_CFG_CLK_GATE_DIS 0x00000400
++#define AR_CFG_DMA_HALT_REQ 0x00000800
+ #define AR_CFG_EEBS 0x00000200
+ #define AR_CFG_PCI_MASTER_REQ_Q_THRESH 0x00060000
+ #define AR_CFG_PCI_MASTER_REQ_Q_THRESH_S 17
+--- a/drivers/net/wireless/ath/ath9k/hw.c
++++ b/drivers/net/wireless/ath/ath9k/hw.c
+@@ -1274,6 +1274,7 @@ static bool ath9k_hw_set_reset(struct at
+ {
+ u32 rst_flags;
+ u32 tmpReg;
++ int i;
+
+ if (AR_SREV_9100(ah)) {
+ REG_RMW_FIELD(ah, AR_RTC_DERIVED_CLK,
+@@ -1291,6 +1292,23 @@ static bool ath9k_hw_set_reset(struct at
+ REG_WRITE(ah, AR_RTC_FORCE_WAKE, AR_RTC_FORCE_WAKE_EN |
+ AR_RTC_FORCE_WAKE_ON_INT);
+
++ if (AR_SREV_9550(ah)) {
++ REG_SET_BIT(ah, AR_CFG, AR_CFG_DMA_HALT_REQ);
++ for (i = 0; i < 10; i++) {
++ if (REG_READ(ah, AR_CFG) & AR_CFG_DMA_HALT_REQ)
++ break;
++ udelay(10);
++ }
++
++ if (ah->external_reset)
++ ah->external_reset();
++
++ REG_SET_BIT(ah, AR_RTC_RESET, AR_RTC_RESET_EN);
++ udelay(10);
++ REG_CLR_BIT(ah, AR_RTC_RESET, AR_RTC_RESET_EN);
++ udelay(10);
++ }
++
+ if (AR_SREV_9100(ah)) {
+ rst_flags = AR_RTC_RC_MAC_WARM | AR_RTC_RC_MAC_COLD |
+ AR_RTC_RC_COLD_RESET | AR_RTC_RC_WARM_RESET;
diff --git a/target/linux/ar71xx/patches-3.10/722-MIPS-ath79-add-ar955x-wmac-reset.patch b/target/linux/ar71xx/patches-3.10/722-MIPS-ath79-add-ar955x-wmac-reset.patch
new file mode 100644
index 0000000..ca539d35
--- /dev/null
+++ b/target/linux/ar71xx/patches-3.10/722-MIPS-ath79-add-ar955x-wmac-reset.patch
@@ -0,0 +1,28 @@
+--- a/arch/mips/ath79/dev-wmac.c
++++ b/arch/mips/ath79/dev-wmac.c
+@@ -169,6 +169,16 @@ static void qca953x_wmac_setup(void)
+ ath79_wmac_data.get_mac_revision = ar93xx_get_soc_revision;
+ }
+
++static int ar955x_wmac_reset(void)
++{
++ ath79_device_reset_set(QCA955X_RESET_RTC);
++ udelay(10);
++ ath79_device_reset_clear(QCA955X_RESET_RTC);
++ udelay(10);
++
++ return 0;
++}
++
+ static void qca955x_wmac_setup(void)
+ {
+ u32 t;
+@@ -185,6 +195,8 @@ static void qca955x_wmac_setup(void)
+ ath79_wmac_data.is_clk_25mhz = false;
+ else
+ ath79_wmac_data.is_clk_25mhz = true;
++
++ ath79_wmac_data.external_reset = ar955x_wmac_reset;
+ }
+
+ static bool __init