]> git.karo-electronics.de Git - linux-beck.git/commitdiff
ath: Add a bus type field
authorSujith <Sujith.Manoharan@atheros.com>
Thu, 1 Apr 2010 04:58:20 +0000 (10:28 +0530)
committerJohn W. Linville <linville@tuxdriver.com>
Tue, 6 Apr 2010 20:55:09 +0000 (16:55 -0400)
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>
drivers/net/wireless/ath/ath.h
drivers/net/wireless/ath/ath9k/ahb.c
drivers/net/wireless/ath/ath9k/htc_drv_init.c
drivers/net/wireless/ath/ath9k/pci.c

index 71fc960814f0e26c77aed4278158addd011c6e58..1fbf6b1f9a7e0f430cc4f86164c410e9ed6a24f3 100644 (file)
@@ -48,6 +48,12 @@ enum ath_device_state {
        ATH_HW_INITIALIZED,
 };
 
+enum ath_bus_type {
+       ATH_PCI,
+       ATH_AHB,
+       ATH_USB,
+};
+
 struct reg_dmn_pair_mapping {
        u16 regDmnEnum;
        u16 reg_5ghz_ctl;
@@ -73,9 +79,10 @@ struct ath_ops {
 struct ath_common;
 
 struct ath_bus_ops {
-       void            (*read_cachesize)(struct ath_common *common, int *csz);
-       bool            (*eeprom_read)(struct ath_common *common, u32 off, u16 *data);
-       void            (*bt_coex_prep)(struct ath_common *common);
+       enum ath_bus_type ath_bus_type;
+       void (*read_cachesize)(struct ath_common *common, int *csz);
+       bool (*eeprom_read)(struct ath_common *common, u32 off, u16 *data);
+       void (*bt_coex_prep)(struct ath_common *common);
 };
 
 struct ath_common {
index ca4994f1315153b4ef2a9aae256846bbb4f6cf91..85fdd26039c8e70fd8f77888c083559006418caa 100644 (file)
@@ -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  = {
+       .ath_bus_type = ATH_AHB,
        .read_cachesize = ath_ahb_read_cachesize,
        .eeprom_read = ath_ahb_eeprom_read,
 };
index 90cfd9066abf0fb377703f831bfec7b92ae863d5..e268d458e7dfd4e8c0d48a8e3d5c5aaea7c88a83 100644 (file)
@@ -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 = {
+       .ath_bus_type = ATH_USB,
        .read_cachesize = ath_usb_read_cachesize,
        .eeprom_read = ath_usb_eeprom_read,
 };
index 9441c6718a3098a760c0c0d1a13819b3fe8524aa..1ec836cf1c0da8defa709b6ba983cac744ba9799 100644 (file)
@@ -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 = {
+       .ath_bus_type = ATH_PCI,
        .read_cachesize = ath_pci_read_cachesize,
        .eeprom_read = ath_pci_eeprom_read,
        .bt_coex_prep = ath_pci_bt_coex_prep,