X-Git-Url: https://git.karo-electronics.de/?a=blobdiff_plain;f=drivers%2Fssb%2Fsprom.c;h=007bc3a03486b621034134f33a1c3029cb8e0b29;hb=ec2a7587e0a91d5c1afe23a0a73edfce06c5e4e0;hp=f2f920fef10df9f2d0f5845fcf7ff70875c12350;hpb=7426ef52b42ebd54ba85133ffd29132e008a882c;p=karo-tx-linux.git diff --git a/drivers/ssb/sprom.c b/drivers/ssb/sprom.c index f2f920fef10d..007bc3a03486 100644 --- a/drivers/ssb/sprom.c +++ b/drivers/ssb/sprom.c @@ -176,3 +176,17 @@ const struct ssb_sprom *ssb_get_fallback_sprom(void) { return fallback_sprom; } + +/* http://bcm-v4.sipsolutions.net/802.11/IsSpromAvailable */ +bool ssb_is_sprom_available(struct ssb_bus *bus) +{ + /* status register only exists on chipcomon rev >= 11 and we need check + for >= 31 only */ + /* this routine differs from specs as we do not access SPROM directly + on PCMCIA */ + if (bus->bustype == SSB_BUSTYPE_PCI && + bus->chipco.dev->id.revision >= 31) + return bus->chipco.capabilities & SSB_CHIPCO_CAP_SPROM; + + return true; +}