source: branches/backfire/package/mac80211/patches/475-ath5k_fix_ar5312_5ghz_cap.patch @ 26610

Last change on this file since 26610 was 26610, checked in by nbd, 5 years ago

mac80211: merge latest changes from trunk, fixes #9227

File size: 1.8 KB
  • drivers/net/wireless/ath/ath5k/base.h

    a b struct ath5k_softc { 
    193193        dma_addr_t              desc_daddr;     /* DMA (physical) address */ 
    194194        size_t                  desc_len;       /* size of TX/RX descriptors */ 
    195195 
    196         DECLARE_BITMAP(status, 5); 
     196        DECLARE_BITMAP(status, 6); 
    197197#define ATH_STAT_INVALID        0               /* disable hardware accesses */ 
    198198#define ATH_STAT_MRRETRY        1               /* multi-rate retry support */ 
    199199#define ATH_STAT_PROMISC        2 
    200200#define ATH_STAT_LEDSOFT        3               /* enable LED gpio status */ 
    201201#define ATH_STAT_STARTED        4               /* opened & irqs enabled */ 
     202#define ATH_STAT_2G_DISABLED    5               /* multiband radio without 2G */ 
    202203 
    203204        unsigned int            filter_flags;   /* HW flags, AR5K_RX_FILTER_* */ 
    204205        struct ieee80211_channel *curchan;      /* current h/w channel */ 
  • drivers/net/wireless/ath/ath5k/ahb.c

    a b static int ath_ahb_probe(struct platform 
    160160                else 
    161161                        reg |= AR5K_AR5312_ENABLE_WLAN1; 
    162162                __raw_writel(reg, (void __iomem *) AR5K_AR5312_ENABLE); 
     163 
     164                /* 
     165                 * On a dual-band AR5312, the multiband radio is only 
     166                 * used as pass-through. Disable 2 GHz support in the 
     167                 * driver for it 
     168                 */ 
     169                if (to_platform_device(sc->dev)->id == 0 && 
     170                    (bcfg->config->flags & (BD_WLAN0|BD_WLAN1)) == 
     171                     (BD_WLAN1|BD_WLAN0)) 
     172                        __set_bit(ATH_STAT_2G_DISABLED, sc->status); 
    163173        } 
    164174 
    165175        ret = ath5k_init_softc(sc, &ath_ahb_bus_ops); 
  • drivers/net/wireless/ath/ath5k/attach.c

    a b int ath5k_hw_init(struct ath5k_softc *sc 
    313313                goto err; 
    314314        } 
    315315 
     316        if (test_bit(ATH_STAT_2G_DISABLED, sc->status)) { 
     317                __clear_bit(AR5K_MODE_11B, ah->ah_capabilities.cap_mode); 
     318                __clear_bit(AR5K_MODE_11G, ah->ah_capabilities.cap_mode); 
     319        } 
     320 
    316321        /* Crypto settings */ 
    317322        common->keymax = (sc->ah->ah_version == AR5K_AR5210 ? 
    318323                          AR5K_KEYTABLE_SIZE_5210 : AR5K_KEYTABLE_SIZE_5211); 
Note: See TracBrowser for help on using the repository browser.