Ignore:
Timestamp:
2011-02-05T16:08:18+01:00 (6 years ago)
Author:
blogic
Message:

[madwifi]

  • fixe up ifxmips patch for eeprom emulation to work with lantiq target
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/package/madwifi/patches/354-ifxmips_eeprom.patch

    r13096 r25369  
    11--- a/ath_hal/ah_os.c 
    22+++ b/ath_hal/ah_os.c 
    3 @@ -343,6 +343,46 @@ EXPORT_SYMBOL(ath_hal_func); 
     3@@ -343,6 +343,45 @@ 
    44  * NB: see the comments in ah_osdep.h about byte-swapping register 
    55  *     reads and writes to understand what's going on below. 
    66  */ 
    77+ 
    8 +#ifdef CONFIG_IFXMIPS 
    9 +extern int ifxmips_has_brn_block(void); 
    10 +static int ifxmips_emulate = 0; 
     8+#ifdef CONFIG_LANTIQ 
     9+extern int lantiq_emulate_madwifi_eep; 
    1110+#define EEPROM_EMULATION 1 
    1211+#endif 
     
    4847 ath_hal_reg_write(struct ath_hal *ah, u_int reg, u_int32_t val) 
    4948 { 
    50 @@ -351,20 +391,33 @@ ath_hal_reg_write(struct ath_hal *ah, u_ 
     49@@ -351,20 +390,33 @@ 
    5150                ath_hal_printf(ah, "%s: WRITE 0x%x <= 0x%x\n",  
    5251                                (ath_hal_func ?: "unknown"), reg, val); 
     
    5453-       _OS_REG_WRITE(ah, reg, val); 
    5554+#ifdef EEPROM_EMULATION 
    56 +       if((reg >= 0x6000) && (reg <= 0x6010) && ifxmips_emulate) 
     55+       if((reg >= 0x6000) && (reg <= 0x6010) && lantiq_emulate_madwifi_eep) 
    5756+       { 
    5857+               val = ath_hal_eeprom(ah, reg, val, 1); 
     
    7170+       u_int32_t val; 
    7271+#ifdef EEPROM_EMULATION 
    73 +       if((reg >= 0x6000) && (reg <= 0x6010) && ifxmips_emulate) 
     72+       if((reg >= 0x6000) && (reg <= 0x6010) && lantiq_emulate_madwifi_eep) 
    7473+       { 
    7574+               val = ath_hal_eeprom(ah, reg, 0, 0); 
     
    8685 #endif 
    8786        return val; 
    88 @@ -581,7 +634,9 @@ init_ath_hal(void) 
     87@@ -581,7 +633,6 @@ 
    8988 { 
    9089        const char *sep; 
    9190        int i; 
    9291- 
    93 +#ifdef CONFIG_IFXMIPS 
    94 +       ifxmips_emulate = ifxmips_has_brn_block(); 
    95 +#endif 
    9692        printk(KERN_INFO "%s: %s (", dev_info, ath_hal_version); 
    9793        sep = ""; 
Note: See TracChangeset for help on using the changeset viewer.