add chip+rf names for debug msgs, showing compiled-in support, etc.
This commit is contained in:
parent
b76daa638b
commit
4b4b304a1e
@ -87,13 +87,15 @@ typedef enum {
|
||||
* Each chip or class of chips registers to offer support.
|
||||
*/
|
||||
struct ath_hal_chip {
|
||||
const char *name;
|
||||
const char *(*probe)(uint16_t vendorid, uint16_t devid);
|
||||
struct ath_hal *(*attach)(uint16_t devid, HAL_SOFTC,
|
||||
HAL_BUS_TAG, HAL_BUS_HANDLE, HAL_STATUS *error);
|
||||
};
|
||||
#ifndef AH_CHIP
|
||||
#define AH_CHIP(name, _probe, _attach) \
|
||||
#define AH_CHIP(_name, _probe, _attach) \
|
||||
static struct ath_hal_chip name##_chip = { \
|
||||
.name = #_name, \
|
||||
.probe = _probe, \
|
||||
.attach = _attach \
|
||||
}; \
|
||||
@ -106,12 +108,14 @@ OS_DATA_SET(ah_chips, name##_chip)
|
||||
* have a fixed idea about which RF to use.
|
||||
*/
|
||||
struct ath_hal_rf {
|
||||
const char *name;
|
||||
HAL_BOOL (*probe)(struct ath_hal *ah);
|
||||
HAL_BOOL (*attach)(struct ath_hal *ah, HAL_STATUS *ecode);
|
||||
};
|
||||
#ifndef AH_RF
|
||||
#define AH_RF(name, _probe, _attach) \
|
||||
#define AH_RF(_name, _probe, _attach) \
|
||||
static struct ath_hal_rf name##_rf = { \
|
||||
.name = #_name, \
|
||||
.probe = _probe, \
|
||||
.attach = _attach \
|
||||
}; \
|
||||
|
@ -380,4 +380,4 @@ ar5210Probe(uint16_t vendorid, uint16_t devid)
|
||||
return "Atheros 5210";
|
||||
return AH_NULL;
|
||||
}
|
||||
AH_CHIP(ar5210, ar5210Probe, ar5210Attach);
|
||||
AH_CHIP(AR5210, ar5210Probe, ar5210Attach);
|
||||
|
@ -513,4 +513,4 @@ ar5211Probe(uint16_t vendorid, uint16_t devid)
|
||||
}
|
||||
return AH_NULL;
|
||||
}
|
||||
AH_CHIP(ar5211, ar5211Probe, ar5211Attach);
|
||||
AH_CHIP(AR5211, ar5211Probe, ar5211Attach);
|
||||
|
@ -764,4 +764,4 @@ ar2316Probe(struct ath_hal *ah)
|
||||
{
|
||||
return IS_2316(ah);
|
||||
}
|
||||
AH_RF(ar2316, ar2316Probe, ar2316RfAttach);
|
||||
AH_RF(RF2316, ar2316Probe, ar2316RfAttach);
|
||||
|
@ -741,4 +741,4 @@ ar2317Probe(struct ath_hal *ah)
|
||||
{
|
||||
return IS_2317(ah);
|
||||
}
|
||||
AH_RF(ar2317, ar2317Probe, ar2317RfAttach);
|
||||
AH_RF(RF2317, ar2317Probe, ar2317RfAttach);
|
||||
|
@ -756,4 +756,4 @@ ar2413Probe(struct ath_hal *ah)
|
||||
{
|
||||
return IS_2413(ah);
|
||||
}
|
||||
AH_RF(ar2413, ar2413Probe, ar2413RfAttach);
|
||||
AH_RF(RF2413, ar2413Probe, ar2413RfAttach);
|
||||
|
@ -719,4 +719,4 @@ ar2425Probe(struct ath_hal *ah)
|
||||
{
|
||||
return IS_2425(ah) || IS_2417(ah);
|
||||
}
|
||||
AH_RF(ar2425, ar2425Probe, ar2425RfAttach);
|
||||
AH_RF(RF2425, ar2425Probe, ar2425RfAttach);
|
||||
|
@ -708,4 +708,4 @@ ar5111Probe(struct ath_hal *ah)
|
||||
{
|
||||
return IS_RAD5111(ah);
|
||||
}
|
||||
AH_RF(ar5111, ar5111Probe, ar5111RfAttach);
|
||||
AH_RF(RF5111, ar5111Probe, ar5111RfAttach);
|
||||
|
@ -878,4 +878,4 @@ ar5112Probe(struct ath_hal *ah)
|
||||
{
|
||||
return IS_RAD5112(ah);
|
||||
}
|
||||
AH_RF(ar5112, ar5112Probe, ar5112RfAttach);
|
||||
AH_RF(RF5112, ar5112Probe, ar5112RfAttach);
|
||||
|
@ -867,4 +867,4 @@ ar5212Probe(uint16_t vendorid, uint16_t devid)
|
||||
}
|
||||
return AH_NULL;
|
||||
}
|
||||
AH_CHIP(ar5212, ar5212Probe, ar5212Attach);
|
||||
AH_CHIP(AR5212, ar5212Probe, ar5212Attach);
|
||||
|
@ -794,4 +794,4 @@ ar5413Probe(struct ath_hal *ah)
|
||||
{
|
||||
return IS_5413(ah);
|
||||
}
|
||||
AH_RF(ar5413, ar5413Probe, ar5413RfAttach);
|
||||
AH_RF(RF5413, ar5413Probe, ar5413RfAttach);
|
||||
|
@ -331,4 +331,4 @@ ar5312Probe(uint16_t vendorid, uint16_t devid)
|
||||
}
|
||||
return AH_NULL;
|
||||
}
|
||||
AH_CHIP(ar5312, ar5312Probe, ar5312Attach);
|
||||
AH_CHIP(AR5312, ar5312Probe, ar5312Attach);
|
||||
|
@ -483,4 +483,4 @@ ar5416Probe(uint16_t vendorid, uint16_t devid)
|
||||
return "Atheros 5416";
|
||||
return AH_NULL;
|
||||
}
|
||||
AH_CHIP(ar5416, ar5416Probe, ar5416Attach);
|
||||
AH_CHIP(AR5416, ar5416Probe, ar5416Attach);
|
||||
|
@ -304,4 +304,4 @@ ar9160Probe(uint16_t vendorid, uint16_t devid)
|
||||
return "Atheros 9160";
|
||||
return AH_NULL;
|
||||
}
|
||||
AH_CHIP(ar9160, ar9160Probe, ar9160Attach);
|
||||
AH_CHIP(AR9160, ar9160Probe, ar9160Attach);
|
||||
|
Loading…
x
Reference in New Issue
Block a user