ath: Add a bus type field
This can be used to store the bus types ( AHB/PCI/USB ). Signed-off-by: Sujith <Sujith.Manoharan@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
This commit is contained in:
@@ -48,6 +48,12 @@ enum ath_device_state {
|
|||||||
ATH_HW_INITIALIZED,
|
ATH_HW_INITIALIZED,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
enum ath_bus_type {
|
||||||
|
ATH_PCI,
|
||||||
|
ATH_AHB,
|
||||||
|
ATH_USB,
|
||||||
|
};
|
||||||
|
|
||||||
struct reg_dmn_pair_mapping {
|
struct reg_dmn_pair_mapping {
|
||||||
u16 regDmnEnum;
|
u16 regDmnEnum;
|
||||||
u16 reg_5ghz_ctl;
|
u16 reg_5ghz_ctl;
|
||||||
@@ -73,6 +79,7 @@ struct ath_ops {
|
|||||||
struct ath_common;
|
struct ath_common;
|
||||||
|
|
||||||
struct ath_bus_ops {
|
struct ath_bus_ops {
|
||||||
|
enum ath_bus_type ath_bus_type;
|
||||||
void (*read_cachesize)(struct ath_common *common, int *csz);
|
void (*read_cachesize)(struct ath_common *common, int *csz);
|
||||||
bool (*eeprom_read)(struct ath_common *common, u32 off, u16 *data);
|
bool (*eeprom_read)(struct ath_common *common, u32 off, u16 *data);
|
||||||
void (*bt_coex_prep)(struct ath_common *common);
|
void (*bt_coex_prep)(struct ath_common *common);
|
||||||
|
@@ -47,6 +47,7 @@ static bool ath_ahb_eeprom_read(struct ath_common *common, u32 off, u16 *data)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static struct ath_bus_ops ath_ahb_bus_ops = {
|
static struct ath_bus_ops ath_ahb_bus_ops = {
|
||||||
|
.ath_bus_type = ATH_AHB,
|
||||||
.read_cachesize = ath_ahb_read_cachesize,
|
.read_cachesize = ath_ahb_read_cachesize,
|
||||||
.eeprom_read = ath_ahb_eeprom_read,
|
.eeprom_read = ath_ahb_eeprom_read,
|
||||||
};
|
};
|
||||||
|
@@ -287,6 +287,7 @@ static bool ath_usb_eeprom_read(struct ath_common *common, u32 off, u16 *data)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static const struct ath_bus_ops ath9k_usb_bus_ops = {
|
static const struct ath_bus_ops ath9k_usb_bus_ops = {
|
||||||
|
.ath_bus_type = ATH_USB,
|
||||||
.read_cachesize = ath_usb_read_cachesize,
|
.read_cachesize = ath_usb_read_cachesize,
|
||||||
.eeprom_read = ath_usb_eeprom_read,
|
.eeprom_read = ath_usb_eeprom_read,
|
||||||
};
|
};
|
||||||
|
@@ -88,6 +88,7 @@ static void ath_pci_bt_coex_prep(struct ath_common *common)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static const struct ath_bus_ops ath_pci_bus_ops = {
|
static const struct ath_bus_ops ath_pci_bus_ops = {
|
||||||
|
.ath_bus_type = ATH_PCI,
|
||||||
.read_cachesize = ath_pci_read_cachesize,
|
.read_cachesize = ath_pci_read_cachesize,
|
||||||
.eeprom_read = ath_pci_eeprom_read,
|
.eeprom_read = ath_pci_eeprom_read,
|
||||||
.bt_coex_prep = ath_pci_bt_coex_prep,
|
.bt_coex_prep = ath_pci_bt_coex_prep,
|
||||||
|
Reference in New Issue
Block a user