tech-misc archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

per-revision reg values (style question)



I'm trying to make athn(4) work for my newer AR9485 (support ends at
92xx now)
driver originally comes from linux and was written by Atheros.

in linux code they have a lot of quirks that we do not have. I think I
should update all of sys/dev/ic/athnreg.h accordingly.

there are many regs that vary by revision, e.g.
drivers/net/wireless/ath/ath9k/reg.h:23

#define AR_CR_RXE            (AR_SREV_9300_20_OR_LATER(ah) ? 0x0000000c : 0x00000004)

whereas for us (we do not have 9300 or later support)

#define AR_CR_RXE            0x00000004


I think whenever we have something like this we turn it into a function.
should I turn every single one of those cases to AR_CR_RXE(sc) ... and
change the code of the driver accordingly?

thanks.


Home | Main Index | Thread Index | Old Index