source: trunk/package/mac80211/patches/542-ath9k-add-MAC-revision-detection-for-AR9330.patch @ 27187

Last change on this file since 27187 was 27187, checked in by hauke, 5 years ago

package/mac80211: Add linux 3.0 compatibility

Add patches from Hauke adding linux 3.0 compatibility.

Signed-off-by: Jonas Gorski <jonas.gorski+openwrt@…>

File size: 1.4 KB
  • drivers/net/wireless/ath/ath9k/hw.c

    a b static void ath9k_hw_read_revisions(stru 
    252252        case AR5416_AR9100_DEVID: 
    253253                ah->hw_version.macVersion = AR_SREV_VERSION_9100; 
    254254                break; 
     255        case AR9300_DEVID_AR9330: 
     256                ah->hw_version.macVersion = AR_SREV_VERSION_9330; 
     257                if (ah->get_mac_revision) { 
     258                        ah->hw_version.macRev = ah->get_mac_revision(); 
     259                } else { 
     260                        val = REG_READ(ah, AR_SREV); 
     261                        ah->hw_version.macRev = MS(val, AR_SREV_REVISION2); 
     262                } 
     263                return; 
    255264        case AR9300_DEVID_AR9340: 
    256265                ah->hw_version.macVersion = AR_SREV_VERSION_9340; 
    257266                val = REG_READ(ah, AR_SREV); 
  • drivers/net/wireless/ath/ath9k/hw.h

    a b struct ath_hw { 
    863863        u32 ent_mode; 
    864864 
    865865        bool is_clk_25mhz; 
     866        int (*get_mac_revision)(void); 
    866867}; 
    867868 
    868869struct ath_bus_ops { 
  • drivers/net/wireless/ath/ath9k/init.c

    a b static int ath9k_init_softc(u16 devid, s 
    575575                sc->sc_ah->gpio_val = pdata->gpio_val; 
    576576                sc->sc_ah->led_pin = pdata->led_pin; 
    577577                ah->is_clk_25mhz = pdata->is_clk_25mhz; 
     578                ah->get_mac_revision = pdata->get_mac_revision; 
    578579        } 
    579580 
    580581        common = ath9k_hw_common(ah); 
  • include/linux/ath9k_platform.h

    a b struct ath9k_platform_data { 
    3030        u32 gpio_val; 
    3131 
    3232        bool is_clk_25mhz; 
     33        int (*get_mac_revision)(void); 
    3334}; 
    3435 
    3536#endif /* _LINUX_ATH9K_PLATFORM_H */ 
Note: See TracBrowser for help on using the repository browser.