linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/3] ath: Add a bus type field
@ 2010-04-01  4:58 Sujith
  2010-04-01 16:07 ` Pavel Roskin
  0 siblings, 1 reply; 4+ messages in thread
From: Sujith @ 2010-04-01  4:58 UTC (permalink / raw)
  To: linville; +Cc: linux-wireless

This can be used to store the bus types ( AHB/PCI/USB ).

Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
---
 drivers/net/wireless/ath/ath.h                |   13 ++++++++++---
 drivers/net/wireless/ath/ath9k/ahb.c          |    1 +
 drivers/net/wireless/ath/ath9k/htc_drv_init.c |    1 +
 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 71fc960..1fbf6b1 100644
--- a/drivers/net/wireless/ath/ath.h
+++ b/drivers/net/wireless/ath/ath.h
@@ -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 {
diff --git a/drivers/net/wireless/ath/ath9k/ahb.c b/drivers/net/wireless/ath/ath9k/ahb.c
index ca4994f..85fdd26 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)
 }
 
 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,
 };
diff --git a/drivers/net/wireless/ath/ath9k/htc_drv_init.c b/drivers/net/wireless/ath/ath9k/htc_drv_init.c
index 90cfd90..e268d45 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)
 }
 
 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,
 };
diff --git a/drivers/net/wireless/ath/ath9k/pci.c b/drivers/net/wireless/ath/ath9k/pci.c
index 9441c67..1ec836c 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)
 }
 
 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,
-- 
1.7.0.3


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH 1/3] ath: Add a bus type field
  2010-04-01  4:58 [PATCH 1/3] ath: Add a bus type field Sujith
@ 2010-04-01 16:07 ` Pavel Roskin
  2010-04-06 10:17   ` Sujith
  0 siblings, 1 reply; 4+ messages in thread
From: Pavel Roskin @ 2010-04-01 16:07 UTC (permalink / raw)
  To: Sujith; +Cc: linville, linux-wireless

On Thu, 2010-04-01 at 10:28 +0530, Sujith wrote:
> This can be used to store the bus types ( AHB/PCI/USB ).
 
> +enum ath_bus_type {
> +	ATH_PCI,
> +	ATH_AHB,
> +	ATH_USB,
> +};

I like the idea, but let's have ATH_BUS_PCI, ATH_BUS_AHB and
ATH_BUS_USB.  This way, one would be able to grep for "ATH_BUS_" to find
all occurrences of those symbols.

There are already symbols starting with "ATH_PCI", such as
ATH_PCIE_CAP_LINK_CTRL.

-- 
Regards,
Pavel Roskin

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH 1/3] ath: Add a bus type field
  2010-04-01 16:07 ` Pavel Roskin
@ 2010-04-06 10:17   ` Sujith
  2010-04-06 19:51     ` Pavel Roskin
  0 siblings, 1 reply; 4+ messages in thread
From: Sujith @ 2010-04-06 10:17 UTC (permalink / raw)
  To: Pavel Roskin; +Cc: linville@tuxdriver.com, linux-wireless@vger.kernel.org

Pavel Roskin wrote:
> On Thu, 2010-04-01 at 10:28 +0530, Sujith wrote:
> > This can be used to store the bus types ( AHB/PCI/USB ).
>  
> > +enum ath_bus_type {
> > +	ATH_PCI,
> > +	ATH_AHB,
> > +	ATH_USB,
> > +};
> 
> I like the idea, but let's have ATH_BUS_PCI, ATH_BUS_AHB and
> ATH_BUS_USB.  This way, one would be able to grep for "ATH_BUS_" to find
> all occurrences of those symbols.
> 
> There are already symbols starting with "ATH_PCI", such as
> ATH_PCIE_CAP_LINK_CTRL.

Sorry, I just noticed this mail.
A number of pending patches are on top of this one.
Maybe this can be done later ?

Sujith

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH 1/3] ath: Add a bus type field
  2010-04-06 10:17   ` Sujith
@ 2010-04-06 19:51     ` Pavel Roskin
  0 siblings, 0 replies; 4+ messages in thread
From: Pavel Roskin @ 2010-04-06 19:51 UTC (permalink / raw)
  To: Sujith; +Cc: linville@tuxdriver.com, linux-wireless@vger.kernel.org

On Tue, 2010-04-06 at 15:47 +0530, Sujith wrote:

> Sorry, I just noticed this mail.
> A number of pending patches are on top of this one.
> Maybe this can be done later ?

Sure, there is no immediate problem with the short names.

-- 
Regards,
Pavel Roskin

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2010-04-06 19:51 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-04-01  4:58 [PATCH 1/3] ath: Add a bus type field Sujith
2010-04-01 16:07 ` Pavel Roskin
2010-04-06 10:17   ` Sujith
2010-04-06 19:51     ` Pavel Roskin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).