I cannot this to apply.. Is it because of the spaces instead of tabs?

$ patch -p0 -i dir825-led-fix.diff 
patching file target/linux/ar71xx/files/include/linux/ath9k_platform.h
patch: **** malformed patch at line 10: };

On Sep 7, 2010, at 11:38 PM, Leonid Protasov wrote:

> Signed-off-by: Leonid Protasov <[email protected]>
> 
> Index: target/linux/ar71xx/files/include/linux/ath9k_platform.h
> ===================================================================
> --- target/linux/ar71xx/files/include/linux/ath9k_platform.h    (revision 
> 22968)
> +++ target/linux/ar71xx/files/include/linux/ath9k_platform.h    (working copy)
> @@ -18,6 +18,7 @@
>        u8 *macaddr;
> 
>        unsigned long quirk_wndr3700:1;
> +       unsigned long quirk_dir825:1;
> };
> 
> #endif /* _LINUX_ATH9K_PLATFORM_H */
> Index: target/linux/ar71xx/files/arch/mips/ar71xx/mach-dir-825-b1.c
> ===================================================================
> --- target/linux/ar71xx/files/arch/mips/ar71xx/mach-dir-825-b1.c        
> (revision 22968)
> +++ target/linux/ar71xx/files/arch/mips/ar71xx/mach-dir-825-b1.c        
> (working copy)
> @@ -178,6 +178,7 @@
> 
>        platform_device_register(&dir825b1_rtl8366s_device);
> 
> +       ap94_pci_enable_quirk_dir825();
>        ap94_pci_init((u8 *) KSEG1ADDR(DIR825B1_CAL_LOCATION_0),
>                      (u8 *) KSEG1ADDR(DIR825B1_MAC_LOCATION_0),
>                      (u8 *) KSEG1ADDR(DIR825B1_CAL_LOCATION_1),
> Index: target/linux/ar71xx/files/arch/mips/ar71xx/dev-ap94-pci.c
> ===================================================================
> --- target/linux/ar71xx/files/arch/mips/ar71xx/dev-ap94-pci.c   (revision 
> 22968)
> +++ target/linux/ar71xx/files/arch/mips/ar71xx/dev-ap94-pci.c   (working copy)
> @@ -131,6 +131,12 @@
>        ap94_wmac1_data.quirk_wndr3700 = 1;
> }
> 
> +void __init ap94_pci_enable_quirk_dir825(void)
> +{
> +       ap94_wmac0_data.quirk_dir825 = 1;
> +       ap94_wmac1_data.quirk_dir825 = 1;
> +}
> +
> void __init ap94_pci_init(u8 *cal_data0, u8 *mac_addr0,
>                          u8 *cal_data1, u8 *mac_addr1)
> {
> Index: target/linux/ar71xx/files/arch/mips/ar71xx/dev-ap94-pci.h
> ===================================================================
> --- target/linux/ar71xx/files/arch/mips/ar71xx/dev-ap94-pci.h   (revision 
> 22968)
> +++ target/linux/ar71xx/files/arch/mips/ar71xx/dev-ap94-pci.h   (working copy)
> @@ -17,11 +17,14 @@
> 
> void ap94_pci_enable_quirk_wndr3700(void) __init;
> 
> +void ap94_pci_enable_quirk_dir825(void) __init;
> +
> #else
> static inline void ap94_pci_init(u8 *cal_data0, u8 *mac_addr0,
>                                 u8 *cal_data1, u8 *mac_addr1) {}
> 
> static inline void ap94_pci_enable_quirk_wndr3700(void) {}
> +static inline void ap94_pci_enable_quirk_dir825(void) {}
> #endif
> 
> #endif /* _AR71XX_DEV_AP94_PCI_H */
> Index: package/mac80211/patches/411-ath9k-dir825-led-pin-fix.patch
> ===================================================================
> --- package/mac80211/patches/411-ath9k-dir825-led-pin-fix.patch (revision 0)
> +++ package/mac80211/patches/411-ath9k-dir825-led-pin-fix.patch (revision 0)
> @@ -0,0 +1,56 @@
> +--- a/drivers/net/wireless/ath/ath9k/gpio.c
> ++++ b/drivers/net/wireless/ath/ath9k/gpio.c
> +@@ -149,6 +149,8 @@
> + 
> +       if (sc->quirk_wndr3700)
> +               sc->sc_ah->led_pin = ATH_LED_PIN_WNDR3700;
> ++      else if (sc->quirk_dir825)
> ++              sc->sc_ah->led_pin = ATH_LED_PIN_DIR825;
> +       else if (AR_SREV_9287(sc->sc_ah))
> +               sc->sc_ah->led_pin = ATH_LED_PIN_9287;
> +       else
> +
> +--- a/drivers/net/wireless/ath/ath9k/ath9k.h
> ++++ b/drivers/net/wireless/ath/ath9k/ath9k.h
> +@@ -461,6 +461,7 @@
> + #define ATH_LED_PIN_DEF               1
> + #define ATH_LED_PIN_9287              8
> + #define ATH_LED_PIN_WNDR3700          5
> ++#define ATH_LED_PIN_DIR825            5
> + #define ATH_LED_ON_DURATION_IDLE      350     /* in msecs */
> + #define ATH_LED_OFF_DURATION_IDLE     250     /* in msecs */
> + 
> +@@ -591,6 +592,7 @@
> +       int beacon_interval;
> + 
> +       bool quirk_wndr3700;
> ++      bool quirk_dir825;
> + 
> + #ifdef CONFIG_ATH9K_DEBUGFS
> +       struct ath9k_debug debug;
> + 
> +--- a/drivers/net/wireless/ath/ath9k/init.c
> ++++ b/drivers/net/wireless/ath/ath9k/init.c
> +@@ -554,8 +554,10 @@
> +       pdata = (struct ath9k_platform_data *) sc->dev->platform_data;
> +       if (!pdata)
> +               ah->ah_flags |= AH_USE_EEPROM;
> +-      else
> ++      else {
> +               sc->quirk_wndr3700 = pdata->quirk_wndr3700;
> ++              sc->quirk_dir825 = pdata->quirk_dir825;
> ++      }
> + 
> +       common = ath9k_hw_common(ah);
> +       common->ops = &ath9k_common_ops;
> +
> +--- a/include/linux/ath9k_platform.h
> ++++ b/include/linux/ath9k_platform.h
> +@@ -26,6 +26,7 @@
> +       u8 *macaddr;
> + 
> +       bool quirk_wndr3700;
> ++      bool quirk_dir825;
> + };
> + 
> + #endif /* _LINUX_ATH9K_PLATFORM_H */
> 
> _______________________________________________
> openwrt-devel mailing list
> [email protected]
> https://lists.openwrt.org/mailman/listinfo/openwrt-devel

_______________________________________________
openwrt-devel mailing list
[email protected]
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

Reply via email to