diff options
author | Sujith <Sujith.Manoharan@atheros.com> | 2010-04-01 00:58:20 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2010-04-06 16:55:09 -0400 |
commit | 497ad9adf44013dc9054f80c627acc44d4c90d37 (patch) | |
tree | 9690a124fe37329de7538ff67f4b32dbb56a9924 | |
parent | 32ffb1f4488b0727bcfc67a025becc0db3df7a17 (diff) |
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>
-rw-r--r-- | drivers/net/wireless/ath/ath.h | 13 | ||||
-rw-r--r-- | drivers/net/wireless/ath/ath9k/ahb.c | 1 | ||||
-rw-r--r-- | drivers/net/wireless/ath/ath9k/htc_drv_init.c | 1 | ||||
-rw-r--r-- | drivers/net/wireless/ath/ath9k/pci.c | 1 |
4 files changed, 13 insertions, 3 deletions
diff --git a/drivers/net/wireless/ath/ath.h b/drivers/net/wireless/ath/ath.h index 71fc960814f0..1fbf6b1f9a7e 100644 --- a/drivers/net/wireless/ath/ath.h +++ b/drivers/net/wireless/ath/ath.h | |||
@@ -48,6 +48,12 @@ enum ath_device_state { | |||
48 | ATH_HW_INITIALIZED, | 48 | ATH_HW_INITIALIZED, |
49 | }; | 49 | }; |
50 | 50 | ||
51 | enum ath_bus_type { | ||
52 | ATH_PCI, | ||
53 | ATH_AHB, | ||
54 | ATH_USB, | ||
55 | }; | ||
56 | |||
51 | struct reg_dmn_pair_mapping { | 57 | struct reg_dmn_pair_mapping { |
52 | u16 regDmnEnum; | 58 | u16 regDmnEnum; |
53 | u16 reg_5ghz_ctl; | 59 | u16 reg_5ghz_ctl; |
@@ -73,9 +79,10 @@ struct ath_ops { | |||
73 | struct ath_common; | 79 | struct ath_common; |
74 | 80 | ||
75 | struct ath_bus_ops { | 81 | struct ath_bus_ops { |
76 | void (*read_cachesize)(struct ath_common *common, int *csz); | 82 | enum ath_bus_type ath_bus_type; |
77 | bool (*eeprom_read)(struct ath_common *common, u32 off, u16 *data); | 83 | void (*read_cachesize)(struct ath_common *common, int *csz); |
78 | void (*bt_coex_prep)(struct ath_common *common); | 84 | bool (*eeprom_read)(struct ath_common *common, u32 off, u16 *data); |
85 | void (*bt_coex_prep)(struct ath_common *common); | ||
79 | }; | 86 | }; |
80 | 87 | ||
81 | struct ath_common { | 88 | struct ath_common { |
diff --git a/drivers/net/wireless/ath/ath9k/ahb.c b/drivers/net/wireless/ath/ath9k/ahb.c index ca4994f13151..85fdd26039c8 100644 --- a/drivers/net/wireless/ath/ath9k/ahb.c +++ b/drivers/net/wireless/ath/ath9k/ahb.c | |||
@@ -47,6 +47,7 @@ static bool ath_ahb_eeprom_read(struct ath_common *common, u32 off, u16 *data) | |||
47 | } | 47 | } |
48 | 48 | ||
49 | static struct ath_bus_ops ath_ahb_bus_ops = { | 49 | static struct ath_bus_ops ath_ahb_bus_ops = { |
50 | .ath_bus_type = ATH_AHB, | ||
50 | .read_cachesize = ath_ahb_read_cachesize, | 51 | .read_cachesize = ath_ahb_read_cachesize, |
51 | .eeprom_read = ath_ahb_eeprom_read, | 52 | .eeprom_read = ath_ahb_eeprom_read, |
52 | }; | 53 | }; |
diff --git a/drivers/net/wireless/ath/ath9k/htc_drv_init.c b/drivers/net/wireless/ath/ath9k/htc_drv_init.c index 90cfd9066abf..e268d458e7df 100644 --- a/drivers/net/wireless/ath/ath9k/htc_drv_init.c +++ b/drivers/net/wireless/ath/ath9k/htc_drv_init.c | |||
@@ -287,6 +287,7 @@ static bool ath_usb_eeprom_read(struct ath_common *common, u32 off, u16 *data) | |||
287 | } | 287 | } |
288 | 288 | ||
289 | static const struct ath_bus_ops ath9k_usb_bus_ops = { | 289 | static const struct ath_bus_ops ath9k_usb_bus_ops = { |
290 | .ath_bus_type = ATH_USB, | ||
290 | .read_cachesize = ath_usb_read_cachesize, | 291 | .read_cachesize = ath_usb_read_cachesize, |
291 | .eeprom_read = ath_usb_eeprom_read, | 292 | .eeprom_read = ath_usb_eeprom_read, |
292 | }; | 293 | }; |
diff --git a/drivers/net/wireless/ath/ath9k/pci.c b/drivers/net/wireless/ath/ath9k/pci.c index 9441c6718a30..1ec836cf1c0d 100644 --- a/drivers/net/wireless/ath/ath9k/pci.c +++ b/drivers/net/wireless/ath/ath9k/pci.c | |||
@@ -88,6 +88,7 @@ static void ath_pci_bt_coex_prep(struct ath_common *common) | |||
88 | } | 88 | } |
89 | 89 | ||
90 | static const struct ath_bus_ops ath_pci_bus_ops = { | 90 | static const struct ath_bus_ops ath_pci_bus_ops = { |
91 | .ath_bus_type = ATH_PCI, | ||
91 | .read_cachesize = ath_pci_read_cachesize, | 92 | .read_cachesize = ath_pci_read_cachesize, |
92 | .eeprom_read = ath_pci_eeprom_read, | 93 | .eeprom_read = ath_pci_eeprom_read, |
93 | .bt_coex_prep = ath_pci_bt_coex_prep, | 94 | .bt_coex_prep = ath_pci_bt_coex_prep, |