Ticket #1017: ar5418_dmasize.diff
| File ar5418_dmasize.diff, 3.2 kB (added by mentor, 4 years ago) |
|---|
-
ath/if_ath_hal_extensions.h
old new 143 143 #define DEFAULT_AR5K_PHY_SPUR_THRESH 2 144 144 #define DEFAULT_AR5K_PHY_SIG_FIRSTEP 0 145 145 146 /* 147 * Transmit configuration register 148 */ 149 #define AR5K_TXCFG 0x0030 /* Register Address */ 150 #define AR5K_TXCFG_SDMAMR 0x00000007 /* DMA size */ 151 #define AR5K_TXCFG_SDMAMR_S 0 152 153 /* 154 * Receive configuration register 155 */ 156 #define AR5K_RXCFG 0x0034 /* Register Address */ 157 #define AR5K_RXCFG_SDMAMW 0x00000007 /* DMA size */ 158 #define AR5K_RXCFG_SDMAMW_S 0 159 160 /* 161 * DMA size definitions (2^(n+2)) 162 */ 163 enum ath5k_dmasize { 164 AR5K_DMASIZE_4B = 0, 165 AR5K_DMASIZE_8B, 166 AR5K_DMASIZE_16B, 167 AR5K_DMASIZE_32B, 168 AR5K_DMASIZE_64B, 169 AR5K_DMASIZE_128B, 170 AR5K_DMASIZE_256B, 171 AR5K_DMASIZE_512B 172 }; 173 146 174 static inline unsigned long field_width(unsigned long mask, unsigned long shift) 147 175 { 148 176 unsigned long r = 0; … … 429 457 VERIFICATION_WARNING(ah, AR5K_PHY_SPUR, AR5K_PHY_SPUR_THRESH, 0); 430 458 } 431 459 460 static inline void ath_hal_set_dmasize_pcie(struct ath_hal *ah) { 461 SET_FIELD(ah, AR5K_TXCFG, AR5K_TXCFG_SDMAMR, AR5K_DMASIZE_128B); 462 SET_FIELD(ah, AR5K_RXCFG, AR5K_RXCFG_SDMAMW, AR5K_DMASIZE_128B); 463 } 464 432 465 #endif /* _IF_ATH_HAL_EXTENSIONS_H_ */ -
ath/if_athvar.h
old new 692 692 unsigned int sc_txcont:1; /* Is continuous transmit enabled? */ 693 693 unsigned int sc_dfs_testmode:1; /* IF this is on, AP vaps will stay in 694 694 * 'channel availability check' indefinately, 695 * reporting radar and interference detections. 696 */ 695 * reporting radar and interference detections. */ 696 unsigned int sc_dmasize_stomp:1; /* Whether to stomp on DMA size. */ 697 697 698 unsigned int sc_txcont_power; /* Continuous transmit power in 0.5dBm units */ 698 699 unsigned int sc_txcont_rate; /* Continuous transmit rate in Mbps */ 699 700 -
ath/if_ath_pci.c
old new 252 252 dev_info, dev->name, athname ? athname : "Atheros ???", 253 253 (unsigned long long)phymem, dev->irq); 254 254 255 if (vdevice == AR5418_DEVID) 256 sc->aps_sc.sc_dmasize_stomp = 1; 257 255 258 /* ready to process interrupts */ 256 259 sc->aps_sc.sc_invalid = 0; 257 260 -
ath/if_ath.c
old new 632 632 IPRINTF(sc, "Interference mitigation is supported. Currently %s.\n", 633 633 (sc->sc_useintmit ? "enabled" : "disabled")); 634 634 } 635 636 sc->sc_dmasize_stomp = 0; 637 635 638 /* 636 639 * Check if the MAC has multi-rate retry support. 637 640 * We do this by trying to setup a fake extended … … 1708 1711 #endif 1709 1712 /* XXX: Any other features they clobber? */ 1710 1713 ath_override_intmit_if_disabled(sc); 1714 if (sc->sc_dmasize_stomp) 1715 ath_hal_set_dmasize_pcie(sc->sc_ah); 1711 1716 if (sc->sc_softled) 1712 1717 ath_hal_gpioCfgOutput(sc->sc_ah, sc->sc_ledpin); 1713 1718 ath_update_txpow(sc); /* update tx power state */
