* [ath9k-devel] [PATCH 0/4] ath9k_hw: modify hw identification message
@ 2009-10-26 14:38 ` Luis R. Rodriguez
0 siblings, 0 replies; 18+ messages in thread
From: Luis R. Rodriguez @ 2009-10-26 14:38 UTC (permalink / raw)
To: ath9k-devel
While reviewing ar9271 radio revisions I determined the radio revision
does not apply although it can be populated in the EEPROM. This changes
the hw probe print to reflect this for single chips and throws the code
into hw code to be shared with ath9k_htc.
Luis R. Rodriguez (4):
ath9k_hw: move mac name and rf name helpers to hw code
ath9k_hw: distinguish single-chip solutions on initial probe print
ath9k_hw: add AR9271 single chip name mapping
ath9k_hw: add some debug print for hw initialization
drivers/net/wireless/ath/ath9k/ahb.c | 10 ++--
drivers/net/wireless/ath/ath9k/calib.c | 3 +
drivers/net/wireless/ath/ath9k/hw.c | 90 ++++++++++++++++++++++++++++++++
drivers/net/wireless/ath/ath9k/hw.h | 2 +
drivers/net/wireless/ath/ath9k/main.c | 58 --------------------
drivers/net/wireless/ath/ath9k/pci.c | 10 ++--
6 files changed, 103 insertions(+), 70 deletions(-)
^ permalink raw reply [flat|nested] 18+ messages in thread
* [PATCH 0/4] ath9k_hw: modify hw identification message
@ 2009-10-26 14:38 ` Luis R. Rodriguez
0 siblings, 0 replies; 18+ messages in thread
From: Luis R. Rodriguez @ 2009-10-26 14:38 UTC (permalink / raw)
To: linville; +Cc: linux-wireless, ath9k-devel, Luis R. Rodriguez
While reviewing ar9271 radio revisions I determined the radio revision
does not apply although it can be populated in the EEPROM. This changes
the hw probe print to reflect this for single chips and throws the code
into hw code to be shared with ath9k_htc.
Luis R. Rodriguez (4):
ath9k_hw: move mac name and rf name helpers to hw code
ath9k_hw: distinguish single-chip solutions on initial probe print
ath9k_hw: add AR9271 single chip name mapping
ath9k_hw: add some debug print for hw initialization
drivers/net/wireless/ath/ath9k/ahb.c | 10 ++--
drivers/net/wireless/ath/ath9k/calib.c | 3 +
drivers/net/wireless/ath/ath9k/hw.c | 90 ++++++++++++++++++++++++++++++++
drivers/net/wireless/ath/ath9k/hw.h | 2 +
drivers/net/wireless/ath/ath9k/main.c | 58 --------------------
drivers/net/wireless/ath/ath9k/pci.c | 10 ++--
6 files changed, 103 insertions(+), 70 deletions(-)
^ permalink raw reply [flat|nested] 18+ messages in thread
* [ath9k-devel] [PATCH 1/4] ath9k_hw: move mac name and rf name helpers to hw code
2009-10-26 14:38 ` Luis R. Rodriguez
@ 2009-10-26 14:38 ` Luis R. Rodriguez
-1 siblings, 0 replies; 18+ messages in thread
From: Luis R. Rodriguez @ 2009-10-26 14:38 UTC (permalink / raw)
To: ath9k-devel
These are shared between ath9k and the future ath9k_htc driver.
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
---
drivers/net/wireless/ath/ath9k/ahb.c | 5 ++-
drivers/net/wireless/ath/ath9k/hw.c | 62 +++++++++++++++++++++++++++++++++
drivers/net/wireless/ath/ath9k/hw.h | 3 ++
drivers/net/wireless/ath/ath9k/main.c | 58 ------------------------------
drivers/net/wireless/ath/ath9k/pci.c | 5 ++-
5 files changed, 71 insertions(+), 62 deletions(-)
diff --git a/drivers/net/wireless/ath/ath9k/ahb.c b/drivers/net/wireless/ath/ath9k/ahb.c
index 25531f2..41422c4 100644
--- a/drivers/net/wireless/ath/ath9k/ahb.c
+++ b/drivers/net/wireless/ath/ath9k/ahb.c
@@ -137,9 +137,10 @@ static int ath_ahb_probe(struct platform_device *pdev)
"%s: Atheros AR%s MAC/BB Rev:%x, "
"AR%s RF Rev:%x, mem=0x%lx, irq=%d\n",
wiphy_name(hw->wiphy),
- ath_mac_bb_name(ah->hw_version.macVersion),
+ ath9k_hw_mac_bb_name(ah->hw_version.macVersion),
ah->hw_version.macRev,
- ath_rf_name((ah->hw_version.analog5GhzRev & AR_RADIO_SREV_MAJOR)),
+ ath9k_hw_rf_name((ah->hw_version.analog5GhzRev &
+ AR_RADIO_SREV_MAJOR)),
ah->hw_version.phyRev,
(unsigned long)mem, irq);
diff --git a/drivers/net/wireless/ath/ath9k/hw.c b/drivers/net/wireless/ath/ath9k/hw.c
index db95876..cf543e3 100644
--- a/drivers/net/wireless/ath/ath9k/hw.c
+++ b/drivers/net/wireless/ath/ath9k/hw.c
@@ -3928,3 +3928,65 @@ void ath_gen_timer_isr(struct ath_hw *ah)
}
}
EXPORT_SYMBOL(ath_gen_timer_isr);
+
+static struct {
+ u32 version;
+ const char * name;
+} ath_mac_bb_names[] = {
+ /* Devices with external radios */
+ { AR_SREV_VERSION_5416_PCI, "5416" },
+ { AR_SREV_VERSION_5416_PCIE, "5418" },
+ { AR_SREV_VERSION_9100, "9100" },
+ { AR_SREV_VERSION_9160, "9160" },
+ /* Single-chip solutions */
+ { AR_SREV_VERSION_9280, "9280" },
+ { AR_SREV_VERSION_9285, "9285" },
+ { AR_SREV_VERSION_9287, "9287" }
+};
+
+/* For devices with external radios */
+static struct {
+ u16 version;
+ const char * name;
+} ath_rf_names[] = {
+ { 0, "5133" },
+ { AR_RAD5133_SREV_MAJOR, "5133" },
+ { AR_RAD5122_SREV_MAJOR, "5122" },
+ { AR_RAD2133_SREV_MAJOR, "2133" },
+ { AR_RAD2122_SREV_MAJOR, "2122" }
+};
+
+/*
+ * Return the MAC/BB name. "????" is returned if the MAC/BB is unknown.
+ */
+const char *ath9k_hw_mac_bb_name(u32 mac_bb_version)
+{
+ int i;
+
+ for (i=0; i<ARRAY_SIZE(ath_mac_bb_names); i++) {
+ if (ath_mac_bb_names[i].version == mac_bb_version) {
+ return ath_mac_bb_names[i].name;
+ }
+ }
+
+ return "????";
+}
+EXPORT_SYMBOL(ath9k_hw_mac_bb_name);
+
+/*
+ * Return the RF name. "????" is returned if the RF is unknown.
+ * Used for devices with external radios.
+ */
+const char *ath9k_hw_rf_name(u16 rf_version)
+{
+ int i;
+
+ for (i=0; i<ARRAY_SIZE(ath_rf_names); i++) {
+ if (ath_rf_names[i].version == rf_version) {
+ return ath_rf_names[i].name;
+ }
+ }
+
+ return "????";
+}
+EXPORT_SYMBOL(ath9k_hw_rf_name);
diff --git a/drivers/net/wireless/ath/ath9k/hw.h b/drivers/net/wireless/ath/ath9k/hw.h
index 936ef5b..100fcba 100644
--- a/drivers/net/wireless/ath/ath9k/hw.h
+++ b/drivers/net/wireless/ath/ath9k/hw.h
@@ -720,6 +720,9 @@ void ath_gen_timer_free(struct ath_hw *ah, struct ath_gen_timer *timer);
void ath_gen_timer_isr(struct ath_hw *hw);
u32 ath9k_hw_gettsf32(struct ath_hw *ah);
+const char *ath9k_hw_mac_bb_name(u32 mac_bb_version);
+const char *ath9k_hw_rf_name(u16 rf_version);
+
#define ATH_PCIE_CAP_LINK_CTRL 0x70
#define ATH_PCIE_CAP_LINK_L0S 1
#define ATH_PCIE_CAP_LINK_L1 2
diff --git a/drivers/net/wireless/ath/ath9k/main.c b/drivers/net/wireless/ath/ath9k/main.c
index 69cf702..9fefc51 100644
--- a/drivers/net/wireless/ath/ath9k/main.c
+++ b/drivers/net/wireless/ath/ath9k/main.c
@@ -3191,64 +3191,6 @@ struct ieee80211_ops ath9k_ops = {
.rfkill_poll = ath9k_rfkill_poll_state,
};
-static struct {
- u32 version;
- const char * name;
-} ath_mac_bb_names[] = {
- { AR_SREV_VERSION_5416_PCI, "5416" },
- { AR_SREV_VERSION_5416_PCIE, "5418" },
- { AR_SREV_VERSION_9100, "9100" },
- { AR_SREV_VERSION_9160, "9160" },
- { AR_SREV_VERSION_9280, "9280" },
- { AR_SREV_VERSION_9285, "9285" },
- { AR_SREV_VERSION_9287, "9287" }
-};
-
-static struct {
- u16 version;
- const char * name;
-} ath_rf_names[] = {
- { 0, "5133" },
- { AR_RAD5133_SREV_MAJOR, "5133" },
- { AR_RAD5122_SREV_MAJOR, "5122" },
- { AR_RAD2133_SREV_MAJOR, "2133" },
- { AR_RAD2122_SREV_MAJOR, "2122" }
-};
-
-/*
- * Return the MAC/BB name. "????" is returned if the MAC/BB is unknown.
- */
-const char *
-ath_mac_bb_name(u32 mac_bb_version)
-{
- int i;
-
- for (i=0; i<ARRAY_SIZE(ath_mac_bb_names); i++) {
- if (ath_mac_bb_names[i].version == mac_bb_version) {
- return ath_mac_bb_names[i].name;
- }
- }
-
- return "????";
-}
-
-/*
- * Return the RF name. "????" is returned if the RF is unknown.
- */
-const char *
-ath_rf_name(u16 rf_version)
-{
- int i;
-
- for (i=0; i<ARRAY_SIZE(ath_rf_names); i++) {
- if (ath_rf_names[i].version == rf_version) {
- return ath_rf_names[i].name;
- }
- }
-
- return "????";
-}
-
static int __init ath9k_init(void)
{
int error;
diff --git a/drivers/net/wireless/ath/ath9k/pci.c b/drivers/net/wireless/ath/ath9k/pci.c
index 63059b6..76f3890 100644
--- a/drivers/net/wireless/ath/ath9k/pci.c
+++ b/drivers/net/wireless/ath/ath9k/pci.c
@@ -222,9 +222,10 @@ static int ath_pci_probe(struct pci_dev *pdev, const struct pci_device_id *id)
"%s: Atheros AR%s MAC/BB Rev:%x "
"AR%s RF Rev:%x: mem=0x%lx, irq=%d\n",
wiphy_name(hw->wiphy),
- ath_mac_bb_name(ah->hw_version.macVersion),
+ ath9k_hw_mac_bb_name(ah->hw_version.macVersion),
ah->hw_version.macRev,
- ath_rf_name((ah->hw_version.analog5GhzRev & AR_RADIO_SREV_MAJOR)),
+ ath9k_hw_rf_name((ah->hw_version.analog5GhzRev &
+ AR_RADIO_SREV_MAJOR)),
ah->hw_version.phyRev,
(unsigned long)mem, pdev->irq);
--
1.6.0.4
^ permalink raw reply related [flat|nested] 18+ messages in thread
* [PATCH 1/4] ath9k_hw: move mac name and rf name helpers to hw code
@ 2009-10-26 14:38 ` Luis R. Rodriguez
0 siblings, 0 replies; 18+ messages in thread
From: Luis R. Rodriguez @ 2009-10-26 14:38 UTC (permalink / raw)
To: linville; +Cc: linux-wireless, ath9k-devel, Luis R. Rodriguez
These are shared between ath9k and the future ath9k_htc driver.
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
---
drivers/net/wireless/ath/ath9k/ahb.c | 5 ++-
drivers/net/wireless/ath/ath9k/hw.c | 62 +++++++++++++++++++++++++++++++++
drivers/net/wireless/ath/ath9k/hw.h | 3 ++
drivers/net/wireless/ath/ath9k/main.c | 58 ------------------------------
drivers/net/wireless/ath/ath9k/pci.c | 5 ++-
5 files changed, 71 insertions(+), 62 deletions(-)
diff --git a/drivers/net/wireless/ath/ath9k/ahb.c b/drivers/net/wireless/ath/ath9k/ahb.c
index 25531f2..41422c4 100644
--- a/drivers/net/wireless/ath/ath9k/ahb.c
+++ b/drivers/net/wireless/ath/ath9k/ahb.c
@@ -137,9 +137,10 @@ static int ath_ahb_probe(struct platform_device *pdev)
"%s: Atheros AR%s MAC/BB Rev:%x, "
"AR%s RF Rev:%x, mem=0x%lx, irq=%d\n",
wiphy_name(hw->wiphy),
- ath_mac_bb_name(ah->hw_version.macVersion),
+ ath9k_hw_mac_bb_name(ah->hw_version.macVersion),
ah->hw_version.macRev,
- ath_rf_name((ah->hw_version.analog5GhzRev & AR_RADIO_SREV_MAJOR)),
+ ath9k_hw_rf_name((ah->hw_version.analog5GhzRev &
+ AR_RADIO_SREV_MAJOR)),
ah->hw_version.phyRev,
(unsigned long)mem, irq);
diff --git a/drivers/net/wireless/ath/ath9k/hw.c b/drivers/net/wireless/ath/ath9k/hw.c
index db95876..cf543e3 100644
--- a/drivers/net/wireless/ath/ath9k/hw.c
+++ b/drivers/net/wireless/ath/ath9k/hw.c
@@ -3928,3 +3928,65 @@ void ath_gen_timer_isr(struct ath_hw *ah)
}
}
EXPORT_SYMBOL(ath_gen_timer_isr);
+
+static struct {
+ u32 version;
+ const char * name;
+} ath_mac_bb_names[] = {
+ /* Devices with external radios */
+ { AR_SREV_VERSION_5416_PCI, "5416" },
+ { AR_SREV_VERSION_5416_PCIE, "5418" },
+ { AR_SREV_VERSION_9100, "9100" },
+ { AR_SREV_VERSION_9160, "9160" },
+ /* Single-chip solutions */
+ { AR_SREV_VERSION_9280, "9280" },
+ { AR_SREV_VERSION_9285, "9285" },
+ { AR_SREV_VERSION_9287, "9287" }
+};
+
+/* For devices with external radios */
+static struct {
+ u16 version;
+ const char * name;
+} ath_rf_names[] = {
+ { 0, "5133" },
+ { AR_RAD5133_SREV_MAJOR, "5133" },
+ { AR_RAD5122_SREV_MAJOR, "5122" },
+ { AR_RAD2133_SREV_MAJOR, "2133" },
+ { AR_RAD2122_SREV_MAJOR, "2122" }
+};
+
+/*
+ * Return the MAC/BB name. "????" is returned if the MAC/BB is unknown.
+ */
+const char *ath9k_hw_mac_bb_name(u32 mac_bb_version)
+{
+ int i;
+
+ for (i=0; i<ARRAY_SIZE(ath_mac_bb_names); i++) {
+ if (ath_mac_bb_names[i].version == mac_bb_version) {
+ return ath_mac_bb_names[i].name;
+ }
+ }
+
+ return "????";
+}
+EXPORT_SYMBOL(ath9k_hw_mac_bb_name);
+
+/*
+ * Return the RF name. "????" is returned if the RF is unknown.
+ * Used for devices with external radios.
+ */
+const char *ath9k_hw_rf_name(u16 rf_version)
+{
+ int i;
+
+ for (i=0; i<ARRAY_SIZE(ath_rf_names); i++) {
+ if (ath_rf_names[i].version == rf_version) {
+ return ath_rf_names[i].name;
+ }
+ }
+
+ return "????";
+}
+EXPORT_SYMBOL(ath9k_hw_rf_name);
diff --git a/drivers/net/wireless/ath/ath9k/hw.h b/drivers/net/wireless/ath/ath9k/hw.h
index 936ef5b..100fcba 100644
--- a/drivers/net/wireless/ath/ath9k/hw.h
+++ b/drivers/net/wireless/ath/ath9k/hw.h
@@ -720,6 +720,9 @@ void ath_gen_timer_free(struct ath_hw *ah, struct ath_gen_timer *timer);
void ath_gen_timer_isr(struct ath_hw *hw);
u32 ath9k_hw_gettsf32(struct ath_hw *ah);
+const char *ath9k_hw_mac_bb_name(u32 mac_bb_version);
+const char *ath9k_hw_rf_name(u16 rf_version);
+
#define ATH_PCIE_CAP_LINK_CTRL 0x70
#define ATH_PCIE_CAP_LINK_L0S 1
#define ATH_PCIE_CAP_LINK_L1 2
diff --git a/drivers/net/wireless/ath/ath9k/main.c b/drivers/net/wireless/ath/ath9k/main.c
index 69cf702..9fefc51 100644
--- a/drivers/net/wireless/ath/ath9k/main.c
+++ b/drivers/net/wireless/ath/ath9k/main.c
@@ -3191,64 +3191,6 @@ struct ieee80211_ops ath9k_ops = {
.rfkill_poll = ath9k_rfkill_poll_state,
};
-static struct {
- u32 version;
- const char * name;
-} ath_mac_bb_names[] = {
- { AR_SREV_VERSION_5416_PCI, "5416" },
- { AR_SREV_VERSION_5416_PCIE, "5418" },
- { AR_SREV_VERSION_9100, "9100" },
- { AR_SREV_VERSION_9160, "9160" },
- { AR_SREV_VERSION_9280, "9280" },
- { AR_SREV_VERSION_9285, "9285" },
- { AR_SREV_VERSION_9287, "9287" }
-};
-
-static struct {
- u16 version;
- const char * name;
-} ath_rf_names[] = {
- { 0, "5133" },
- { AR_RAD5133_SREV_MAJOR, "5133" },
- { AR_RAD5122_SREV_MAJOR, "5122" },
- { AR_RAD2133_SREV_MAJOR, "2133" },
- { AR_RAD2122_SREV_MAJOR, "2122" }
-};
-
-/*
- * Return the MAC/BB name. "????" is returned if the MAC/BB is unknown.
- */
-const char *
-ath_mac_bb_name(u32 mac_bb_version)
-{
- int i;
-
- for (i=0; i<ARRAY_SIZE(ath_mac_bb_names); i++) {
- if (ath_mac_bb_names[i].version == mac_bb_version) {
- return ath_mac_bb_names[i].name;
- }
- }
-
- return "????";
-}
-
-/*
- * Return the RF name. "????" is returned if the RF is unknown.
- */
-const char *
-ath_rf_name(u16 rf_version)
-{
- int i;
-
- for (i=0; i<ARRAY_SIZE(ath_rf_names); i++) {
- if (ath_rf_names[i].version == rf_version) {
- return ath_rf_names[i].name;
- }
- }
-
- return "????";
-}
-
static int __init ath9k_init(void)
{
int error;
diff --git a/drivers/net/wireless/ath/ath9k/pci.c b/drivers/net/wireless/ath/ath9k/pci.c
index 63059b6..76f3890 100644
--- a/drivers/net/wireless/ath/ath9k/pci.c
+++ b/drivers/net/wireless/ath/ath9k/pci.c
@@ -222,9 +222,10 @@ static int ath_pci_probe(struct pci_dev *pdev, const struct pci_device_id *id)
"%s: Atheros AR%s MAC/BB Rev:%x "
"AR%s RF Rev:%x: mem=0x%lx, irq=%d\n",
wiphy_name(hw->wiphy),
- ath_mac_bb_name(ah->hw_version.macVersion),
+ ath9k_hw_mac_bb_name(ah->hw_version.macVersion),
ah->hw_version.macRev,
- ath_rf_name((ah->hw_version.analog5GhzRev & AR_RADIO_SREV_MAJOR)),
+ ath9k_hw_rf_name((ah->hw_version.analog5GhzRev &
+ AR_RADIO_SREV_MAJOR)),
ah->hw_version.phyRev,
(unsigned long)mem, pdev->irq);
--
1.6.0.4
^ permalink raw reply related [flat|nested] 18+ messages in thread
* [ath9k-devel] [PATCH 2/4] ath9k_hw: distinguish single-chip solutions on initial probe print
2009-10-26 14:38 ` Luis R. Rodriguez
@ 2009-10-26 14:38 ` Luis R. Rodriguez
-1 siblings, 0 replies; 18+ messages in thread
From: Luis R. Rodriguez @ 2009-10-26 14:38 UTC (permalink / raw)
To: ath9k-devel
Devices with external radios have revisions which we can count on.
On single chip solutions these EEPROM values for these radio revision
also exist but are not meaningful as the radios are embedded onto the
same chip. Each single-chip device evolves together as one device.
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
---
drivers/net/wireless/ath/ath9k/ahb.c | 11 ++++-------
drivers/net/wireless/ath/ath9k/hw.c | 27 +++++++++++++++++++++++----
drivers/net/wireless/ath/ath9k/hw.h | 3 +--
drivers/net/wireless/ath/ath9k/pci.c | 11 ++++-------
4 files changed, 32 insertions(+), 20 deletions(-)
diff --git a/drivers/net/wireless/ath/ath9k/ahb.c b/drivers/net/wireless/ath/ath9k/ahb.c
index 41422c4..925818c 100644
--- a/drivers/net/wireless/ath/ath9k/ahb.c
+++ b/drivers/net/wireless/ath/ath9k/ahb.c
@@ -69,6 +69,7 @@ static int ath_ahb_probe(struct platform_device *pdev)
int irq;
int ret = 0;
struct ath_hw *ah;
+ char hw_name[1024];
if (!pdev->dev.platform_data) {
dev_err(&pdev->dev, "no platform data specified\n");
@@ -133,15 +134,11 @@ static int ath_ahb_probe(struct platform_device *pdev)
}
ah = sc->sc_ah;
+ ath9k_hw_name(ah, hw_name);
printk(KERN_INFO
- "%s: Atheros AR%s MAC/BB Rev:%x, "
- "AR%s RF Rev:%x, mem=0x%lx, irq=%d\n",
+ "%s: %s mem=0x%lx, irq=%d\n",
wiphy_name(hw->wiphy),
- ath9k_hw_mac_bb_name(ah->hw_version.macVersion),
- ah->hw_version.macRev,
- ath9k_hw_rf_name((ah->hw_version.analog5GhzRev &
- AR_RADIO_SREV_MAJOR)),
- ah->hw_version.phyRev,
+ hw_name,
(unsigned long)mem, irq);
return 0;
diff --git a/drivers/net/wireless/ath/ath9k/hw.c b/drivers/net/wireless/ath/ath9k/hw.c
index cf543e3..f65b591 100644
--- a/drivers/net/wireless/ath/ath9k/hw.c
+++ b/drivers/net/wireless/ath/ath9k/hw.c
@@ -3959,7 +3959,7 @@ static struct {
/*
* Return the MAC/BB name. "????" is returned if the MAC/BB is unknown.
*/
-const char *ath9k_hw_mac_bb_name(u32 mac_bb_version)
+static const char *ath9k_hw_mac_bb_name(u32 mac_bb_version)
{
int i;
@@ -3971,13 +3971,12 @@ const char *ath9k_hw_mac_bb_name(u32 mac_bb_version)
return "????";
}
-EXPORT_SYMBOL(ath9k_hw_mac_bb_name);
/*
* Return the RF name. "????" is returned if the RF is unknown.
* Used for devices with external radios.
*/
-const char *ath9k_hw_rf_name(u16 rf_version)
+static const char *ath9k_hw_rf_name(u16 rf_version)
{
int i;
@@ -3989,4 +3988,24 @@ const char *ath9k_hw_rf_name(u16 rf_version)
return "????";
}
-EXPORT_SYMBOL(ath9k_hw_rf_name);
+
+void ath9k_hw_name(struct ath_hw *ah, char *hw_name)
+{
+ /* chipsets >= AR9280 are single-chip */
+ if (AR_SREV_9280_10_OR_LATER(ah)) {
+ sprintf(hw_name,
+ "Atheros single-chip AR%s Rev:%x",
+ ath9k_hw_mac_bb_name(ah->hw_version.macVersion),
+ ah->hw_version.macRev);
+ }
+ else {
+ sprintf(hw_name,
+ "Atheros AR%s MAC/BB Rev:%x AR%s RF Rev:%x: ",
+ ath9k_hw_mac_bb_name(ah->hw_version.macVersion),
+ ah->hw_version.macRev,
+ ath9k_hw_rf_name((ah->hw_version.analog5GhzRev &
+ AR_RADIO_SREV_MAJOR)),
+ ah->hw_version.phyRev);
+ }
+}
+EXPORT_SYMBOL(ath9k_hw_name);
diff --git a/drivers/net/wireless/ath/ath9k/hw.h b/drivers/net/wireless/ath/ath9k/hw.h
index 100fcba..3ceb4c6 100644
--- a/drivers/net/wireless/ath/ath9k/hw.h
+++ b/drivers/net/wireless/ath/ath9k/hw.h
@@ -720,8 +720,7 @@ void ath_gen_timer_free(struct ath_hw *ah, struct ath_gen_timer *timer);
void ath_gen_timer_isr(struct ath_hw *hw);
u32 ath9k_hw_gettsf32(struct ath_hw *ah);
-const char *ath9k_hw_mac_bb_name(u32 mac_bb_version);
-const char *ath9k_hw_rf_name(u16 rf_version);
+void ath9k_hw_name(struct ath_hw *ah, char *hw_name);
#define ATH_PCIE_CAP_LINK_CTRL 0x70
#define ATH_PCIE_CAP_LINK_L0S 1
diff --git a/drivers/net/wireless/ath/ath9k/pci.c b/drivers/net/wireless/ath/ath9k/pci.c
index 76f3890..963d6fe 100644
--- a/drivers/net/wireless/ath/ath9k/pci.c
+++ b/drivers/net/wireless/ath/ath9k/pci.c
@@ -114,6 +114,7 @@ static int ath_pci_probe(struct pci_dev *pdev, const struct pci_device_id *id)
u32 val;
int ret = 0;
struct ath_hw *ah;
+ char hw_name[1024];
if (pci_enable_device(pdev))
return -EIO;
@@ -218,15 +219,11 @@ static int ath_pci_probe(struct pci_dev *pdev, const struct pci_device_id *id)
sc->irq = pdev->irq;
ah = sc->sc_ah;
+ ath9k_hw_name(ah, hw_name);
printk(KERN_INFO
- "%s: Atheros AR%s MAC/BB Rev:%x "
- "AR%s RF Rev:%x: mem=0x%lx, irq=%d\n",
+ "%s: %s mem=0x%lx, irq=%d\n",
wiphy_name(hw->wiphy),
- ath9k_hw_mac_bb_name(ah->hw_version.macVersion),
- ah->hw_version.macRev,
- ath9k_hw_rf_name((ah->hw_version.analog5GhzRev &
- AR_RADIO_SREV_MAJOR)),
- ah->hw_version.phyRev,
+ hw_name,
(unsigned long)mem, pdev->irq);
return 0;
--
1.6.0.4
^ permalink raw reply related [flat|nested] 18+ messages in thread
* [PATCH 2/4] ath9k_hw: distinguish single-chip solutions on initial probe print
@ 2009-10-26 14:38 ` Luis R. Rodriguez
0 siblings, 0 replies; 18+ messages in thread
From: Luis R. Rodriguez @ 2009-10-26 14:38 UTC (permalink / raw)
To: linville; +Cc: linux-wireless, ath9k-devel, Luis R. Rodriguez
Devices with external radios have revisions which we can count on.
On single chip solutions these EEPROM values for these radio revision
also exist but are not meaningful as the radios are embedded onto the
same chip. Each single-chip device evolves together as one device.
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
---
drivers/net/wireless/ath/ath9k/ahb.c | 11 ++++-------
drivers/net/wireless/ath/ath9k/hw.c | 27 +++++++++++++++++++++++----
drivers/net/wireless/ath/ath9k/hw.h | 3 +--
drivers/net/wireless/ath/ath9k/pci.c | 11 ++++-------
4 files changed, 32 insertions(+), 20 deletions(-)
diff --git a/drivers/net/wireless/ath/ath9k/ahb.c b/drivers/net/wireless/ath/ath9k/ahb.c
index 41422c4..925818c 100644
--- a/drivers/net/wireless/ath/ath9k/ahb.c
+++ b/drivers/net/wireless/ath/ath9k/ahb.c
@@ -69,6 +69,7 @@ static int ath_ahb_probe(struct platform_device *pdev)
int irq;
int ret = 0;
struct ath_hw *ah;
+ char hw_name[1024];
if (!pdev->dev.platform_data) {
dev_err(&pdev->dev, "no platform data specified\n");
@@ -133,15 +134,11 @@ static int ath_ahb_probe(struct platform_device *pdev)
}
ah = sc->sc_ah;
+ ath9k_hw_name(ah, hw_name);
printk(KERN_INFO
- "%s: Atheros AR%s MAC/BB Rev:%x, "
- "AR%s RF Rev:%x, mem=0x%lx, irq=%d\n",
+ "%s: %s mem=0x%lx, irq=%d\n",
wiphy_name(hw->wiphy),
- ath9k_hw_mac_bb_name(ah->hw_version.macVersion),
- ah->hw_version.macRev,
- ath9k_hw_rf_name((ah->hw_version.analog5GhzRev &
- AR_RADIO_SREV_MAJOR)),
- ah->hw_version.phyRev,
+ hw_name,
(unsigned long)mem, irq);
return 0;
diff --git a/drivers/net/wireless/ath/ath9k/hw.c b/drivers/net/wireless/ath/ath9k/hw.c
index cf543e3..f65b591 100644
--- a/drivers/net/wireless/ath/ath9k/hw.c
+++ b/drivers/net/wireless/ath/ath9k/hw.c
@@ -3959,7 +3959,7 @@ static struct {
/*
* Return the MAC/BB name. "????" is returned if the MAC/BB is unknown.
*/
-const char *ath9k_hw_mac_bb_name(u32 mac_bb_version)
+static const char *ath9k_hw_mac_bb_name(u32 mac_bb_version)
{
int i;
@@ -3971,13 +3971,12 @@ const char *ath9k_hw_mac_bb_name(u32 mac_bb_version)
return "????";
}
-EXPORT_SYMBOL(ath9k_hw_mac_bb_name);
/*
* Return the RF name. "????" is returned if the RF is unknown.
* Used for devices with external radios.
*/
-const char *ath9k_hw_rf_name(u16 rf_version)
+static const char *ath9k_hw_rf_name(u16 rf_version)
{
int i;
@@ -3989,4 +3988,24 @@ const char *ath9k_hw_rf_name(u16 rf_version)
return "????";
}
-EXPORT_SYMBOL(ath9k_hw_rf_name);
+
+void ath9k_hw_name(struct ath_hw *ah, char *hw_name)
+{
+ /* chipsets >= AR9280 are single-chip */
+ if (AR_SREV_9280_10_OR_LATER(ah)) {
+ sprintf(hw_name,
+ "Atheros single-chip AR%s Rev:%x",
+ ath9k_hw_mac_bb_name(ah->hw_version.macVersion),
+ ah->hw_version.macRev);
+ }
+ else {
+ sprintf(hw_name,
+ "Atheros AR%s MAC/BB Rev:%x AR%s RF Rev:%x: ",
+ ath9k_hw_mac_bb_name(ah->hw_version.macVersion),
+ ah->hw_version.macRev,
+ ath9k_hw_rf_name((ah->hw_version.analog5GhzRev &
+ AR_RADIO_SREV_MAJOR)),
+ ah->hw_version.phyRev);
+ }
+}
+EXPORT_SYMBOL(ath9k_hw_name);
diff --git a/drivers/net/wireless/ath/ath9k/hw.h b/drivers/net/wireless/ath/ath9k/hw.h
index 100fcba..3ceb4c6 100644
--- a/drivers/net/wireless/ath/ath9k/hw.h
+++ b/drivers/net/wireless/ath/ath9k/hw.h
@@ -720,8 +720,7 @@ void ath_gen_timer_free(struct ath_hw *ah, struct ath_gen_timer *timer);
void ath_gen_timer_isr(struct ath_hw *hw);
u32 ath9k_hw_gettsf32(struct ath_hw *ah);
-const char *ath9k_hw_mac_bb_name(u32 mac_bb_version);
-const char *ath9k_hw_rf_name(u16 rf_version);
+void ath9k_hw_name(struct ath_hw *ah, char *hw_name);
#define ATH_PCIE_CAP_LINK_CTRL 0x70
#define ATH_PCIE_CAP_LINK_L0S 1
diff --git a/drivers/net/wireless/ath/ath9k/pci.c b/drivers/net/wireless/ath/ath9k/pci.c
index 76f3890..963d6fe 100644
--- a/drivers/net/wireless/ath/ath9k/pci.c
+++ b/drivers/net/wireless/ath/ath9k/pci.c
@@ -114,6 +114,7 @@ static int ath_pci_probe(struct pci_dev *pdev, const struct pci_device_id *id)
u32 val;
int ret = 0;
struct ath_hw *ah;
+ char hw_name[1024];
if (pci_enable_device(pdev))
return -EIO;
@@ -218,15 +219,11 @@ static int ath_pci_probe(struct pci_dev *pdev, const struct pci_device_id *id)
sc->irq = pdev->irq;
ah = sc->sc_ah;
+ ath9k_hw_name(ah, hw_name);
printk(KERN_INFO
- "%s: Atheros AR%s MAC/BB Rev:%x "
- "AR%s RF Rev:%x: mem=0x%lx, irq=%d\n",
+ "%s: %s mem=0x%lx, irq=%d\n",
wiphy_name(hw->wiphy),
- ath9k_hw_mac_bb_name(ah->hw_version.macVersion),
- ah->hw_version.macRev,
- ath9k_hw_rf_name((ah->hw_version.analog5GhzRev &
- AR_RADIO_SREV_MAJOR)),
- ah->hw_version.phyRev,
+ hw_name,
(unsigned long)mem, pdev->irq);
return 0;
--
1.6.0.4
^ permalink raw reply related [flat|nested] 18+ messages in thread
* [ath9k-devel] [PATCH 3/4] ath9k_hw: add AR9271 single chip name mapping
2009-10-26 14:38 ` Luis R. Rodriguez
@ 2009-10-26 14:39 ` Luis R. Rodriguez
-1 siblings, 0 replies; 18+ messages in thread
From: Luis R. Rodriguez @ 2009-10-26 14:39 UTC (permalink / raw)
To: ath9k-devel
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
---
drivers/net/wireless/ath/ath9k/hw.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/drivers/net/wireless/ath/ath9k/hw.c b/drivers/net/wireless/ath/ath9k/hw.c
index f65b591..50be381 100644
--- a/drivers/net/wireless/ath/ath9k/hw.c
+++ b/drivers/net/wireless/ath/ath9k/hw.c
@@ -3941,7 +3941,8 @@ static struct {
/* Single-chip solutions */
{ AR_SREV_VERSION_9280, "9280" },
{ AR_SREV_VERSION_9285, "9285" },
- { AR_SREV_VERSION_9287, "9287" }
+ { AR_SREV_VERSION_9287, "9287" },
+ { AR_SREV_VERSION_9271, "9271" },
};
/* For devices with external radios */
--
1.6.0.4
^ permalink raw reply related [flat|nested] 18+ messages in thread
* [PATCH 3/4] ath9k_hw: add AR9271 single chip name mapping
@ 2009-10-26 14:39 ` Luis R. Rodriguez
0 siblings, 0 replies; 18+ messages in thread
From: Luis R. Rodriguez @ 2009-10-26 14:39 UTC (permalink / raw)
To: linville; +Cc: linux-wireless, ath9k-devel, Luis R. Rodriguez
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
---
drivers/net/wireless/ath/ath9k/hw.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/drivers/net/wireless/ath/ath9k/hw.c b/drivers/net/wireless/ath/ath9k/hw.c
index f65b591..50be381 100644
--- a/drivers/net/wireless/ath/ath9k/hw.c
+++ b/drivers/net/wireless/ath/ath9k/hw.c
@@ -3941,7 +3941,8 @@ static struct {
/* Single-chip solutions */
{ AR_SREV_VERSION_9280, "9280" },
{ AR_SREV_VERSION_9285, "9285" },
- { AR_SREV_VERSION_9287, "9287" }
+ { AR_SREV_VERSION_9287, "9287" },
+ { AR_SREV_VERSION_9271, "9271" },
};
/* For devices with external radios */
--
1.6.0.4
^ permalink raw reply related [flat|nested] 18+ messages in thread
* [ath9k-devel] [PATCH 4/4] ath9k_hw: add some debug print for hw initialization
2009-10-26 14:38 ` Luis R. Rodriguez
@ 2009-10-26 14:39 ` Luis R. Rodriguez
-1 siblings, 0 replies; 18+ messages in thread
From: Luis R. Rodriguez @ 2009-10-26 14:39 UTC (permalink / raw)
To: ath9k-devel
This helps debugging hw bring up.
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
---
drivers/net/wireless/ath/ath9k/calib.c | 3 +++
drivers/net/wireless/ath/ath9k/hw.c | 8 ++++++++
2 files changed, 11 insertions(+), 0 deletions(-)
diff --git a/drivers/net/wireless/ath/ath9k/calib.c b/drivers/net/wireless/ath/ath9k/calib.c
index 551f880..07b7618 100644
--- a/drivers/net/wireless/ath/ath9k/calib.c
+++ b/drivers/net/wireless/ath/ath9k/calib.c
@@ -1084,6 +1084,9 @@ static bool ar9285_clc(struct ath_hw *ah, struct ath9k_channel *chan)
{
struct ath_common *common = ath9k_hw_common(ah);
+ ath_print(common, ATH_DBG_CALIBRATE, "Running carrier leakage "
+ "calibration fix\n");
+
REG_SET_BIT(ah, AR_PHY_CL_CAL_CTL, AR_PHY_CL_CAL_ENABLE);
if (IS_CHAN_HT20(chan)) {
REG_SET_BIT(ah, AR_PHY_CL_CAL_CTL, AR_PHY_PARALLEL_CAL_ENABLE);
diff --git a/drivers/net/wireless/ath/ath9k/hw.c b/drivers/net/wireless/ath/ath9k/hw.c
index 50be381..04b6afc 100644
--- a/drivers/net/wireless/ath/ath9k/hw.c
+++ b/drivers/net/wireless/ath/ath9k/hw.c
@@ -1005,8 +1005,11 @@ int ath9k_hw_init(struct ath_hw *ah)
static void ath9k_hw_init_bb(struct ath_hw *ah,
struct ath9k_channel *chan)
{
+ struct ath_common *common = ath9k_hw_common(ah);
u32 synthDelay;
+ ath_print(common, ATH_DBG_RESET, "initializing baseband\n");
+
synthDelay = REG_READ(ah, AR_PHY_RX_DELAY) & AR_PHY_RX_DELAY_DELAY;
if (IS_CHAN_B(chan))
synthDelay = (4 * synthDelay) / 22;
@@ -1591,6 +1594,8 @@ static inline void ath9k_hw_set_dma(struct ath_hw *ah)
{
u32 regval;
+ ath_print(ath9k_hw_common(ah), ATH_DBG_RESET,
+ "Configuring DMA read/write settings\n");
/*
* set AHB_MODE not to do cacheline prefetches
*/
@@ -2145,6 +2150,9 @@ int ath9k_hw_reset(struct ath_hw *ah, struct ath9k_channel *chan,
/*
* For big endian systems turn on swapping for descriptors
*/
+ ath_print(common, ATH_DBG_RESET,
+ "Configuring byte swap settings\n");
+
if (AR_SREV_9100(ah)) {
u32 mask;
mask = REG_READ(ah, AR_CFG);
--
1.6.0.4
^ permalink raw reply related [flat|nested] 18+ messages in thread
* [PATCH 4/4] ath9k_hw: add some debug print for hw initialization
@ 2009-10-26 14:39 ` Luis R. Rodriguez
0 siblings, 0 replies; 18+ messages in thread
From: Luis R. Rodriguez @ 2009-10-26 14:39 UTC (permalink / raw)
To: linville; +Cc: linux-wireless, ath9k-devel, Luis R. Rodriguez
This helps debugging hw bring up.
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
---
drivers/net/wireless/ath/ath9k/calib.c | 3 +++
drivers/net/wireless/ath/ath9k/hw.c | 8 ++++++++
2 files changed, 11 insertions(+), 0 deletions(-)
diff --git a/drivers/net/wireless/ath/ath9k/calib.c b/drivers/net/wireless/ath/ath9k/calib.c
index 551f880..07b7618 100644
--- a/drivers/net/wireless/ath/ath9k/calib.c
+++ b/drivers/net/wireless/ath/ath9k/calib.c
@@ -1084,6 +1084,9 @@ static bool ar9285_clc(struct ath_hw *ah, struct ath9k_channel *chan)
{
struct ath_common *common = ath9k_hw_common(ah);
+ ath_print(common, ATH_DBG_CALIBRATE, "Running carrier leakage "
+ "calibration fix\n");
+
REG_SET_BIT(ah, AR_PHY_CL_CAL_CTL, AR_PHY_CL_CAL_ENABLE);
if (IS_CHAN_HT20(chan)) {
REG_SET_BIT(ah, AR_PHY_CL_CAL_CTL, AR_PHY_PARALLEL_CAL_ENABLE);
diff --git a/drivers/net/wireless/ath/ath9k/hw.c b/drivers/net/wireless/ath/ath9k/hw.c
index 50be381..04b6afc 100644
--- a/drivers/net/wireless/ath/ath9k/hw.c
+++ b/drivers/net/wireless/ath/ath9k/hw.c
@@ -1005,8 +1005,11 @@ int ath9k_hw_init(struct ath_hw *ah)
static void ath9k_hw_init_bb(struct ath_hw *ah,
struct ath9k_channel *chan)
{
+ struct ath_common *common = ath9k_hw_common(ah);
u32 synthDelay;
+ ath_print(common, ATH_DBG_RESET, "initializing baseband\n");
+
synthDelay = REG_READ(ah, AR_PHY_RX_DELAY) & AR_PHY_RX_DELAY_DELAY;
if (IS_CHAN_B(chan))
synthDelay = (4 * synthDelay) / 22;
@@ -1591,6 +1594,8 @@ static inline void ath9k_hw_set_dma(struct ath_hw *ah)
{
u32 regval;
+ ath_print(ath9k_hw_common(ah), ATH_DBG_RESET,
+ "Configuring DMA read/write settings\n");
/*
* set AHB_MODE not to do cacheline prefetches
*/
@@ -2145,6 +2150,9 @@ int ath9k_hw_reset(struct ath_hw *ah, struct ath9k_channel *chan,
/*
* For big endian systems turn on swapping for descriptors
*/
+ ath_print(common, ATH_DBG_RESET,
+ "Configuring byte swap settings\n");
+
if (AR_SREV_9100(ah)) {
u32 mask;
mask = REG_READ(ah, AR_CFG);
--
1.6.0.4
^ permalink raw reply related [flat|nested] 18+ messages in thread
* [ath9k-devel] [PATCH 2/4] ath9k_hw: distinguish single-chip solutions on initial probe print
2009-10-26 14:38 ` Luis R. Rodriguez
@ 2009-10-26 16:14 ` Kalle Valo
-1 siblings, 0 replies; 18+ messages in thread
From: Kalle Valo @ 2009-10-26 16:14 UTC (permalink / raw)
To: ath9k-devel
"Luis R. Rodriguez" <lrodriguez@atheros.com> writes:
> Devices with external radios have revisions which we can count on.
> On single chip solutions these EEPROM values for these radio revision
> also exist but are not meaningful as the radios are embedded onto the
> same chip. Each single-chip device evolves together as one device.
>
> Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
> ---
> drivers/net/wireless/ath/ath9k/ahb.c | 11 ++++-------
> drivers/net/wireless/ath/ath9k/hw.c | 27 +++++++++++++++++++++++----
> drivers/net/wireless/ath/ath9k/hw.h | 3 +--
> drivers/net/wireless/ath/ath9k/pci.c | 11 ++++-------
> 4 files changed, 32 insertions(+), 20 deletions(-)
>
> diff --git a/drivers/net/wireless/ath/ath9k/ahb.c b/drivers/net/wireless/ath/ath9k/ahb.c
> index 41422c4..925818c 100644
> --- a/drivers/net/wireless/ath/ath9k/ahb.c
> +++ b/drivers/net/wireless/ath/ath9k/ahb.c
> @@ -69,6 +69,7 @@ static int ath_ahb_probe(struct platform_device *pdev)
> int irq;
> int ret = 0;
> struct ath_hw *ah;
> + char hw_name[1024];
This is a bit too large to allocate from stack IMHO.
[...]
> --- a/drivers/net/wireless/ath/ath9k/pci.c
> +++ b/drivers/net/wireless/ath/ath9k/pci.c
> @@ -114,6 +114,7 @@ static int ath_pci_probe(struct pci_dev *pdev, const struct pci_device_id *id)
> u32 val;
> int ret = 0;
> struct ath_hw *ah;
> + char hw_name[1024];
Ditto.
--
Kalle Valo
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH 2/4] ath9k_hw: distinguish single-chip solutions on initial probe print
@ 2009-10-26 16:14 ` Kalle Valo
0 siblings, 0 replies; 18+ messages in thread
From: Kalle Valo @ 2009-10-26 16:14 UTC (permalink / raw)
To: Luis R. Rodriguez; +Cc: linville, linux-wireless, ath9k-devel
"Luis R. Rodriguez" <lrodriguez@atheros.com> writes:
> Devices with external radios have revisions which we can count on.
> On single chip solutions these EEPROM values for these radio revision
> also exist but are not meaningful as the radios are embedded onto the
> same chip. Each single-chip device evolves together as one device.
>
> Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
> ---
> drivers/net/wireless/ath/ath9k/ahb.c | 11 ++++-------
> drivers/net/wireless/ath/ath9k/hw.c | 27 +++++++++++++++++++++++----
> drivers/net/wireless/ath/ath9k/hw.h | 3 +--
> drivers/net/wireless/ath/ath9k/pci.c | 11 ++++-------
> 4 files changed, 32 insertions(+), 20 deletions(-)
>
> diff --git a/drivers/net/wireless/ath/ath9k/ahb.c b/drivers/net/wireless/ath/ath9k/ahb.c
> index 41422c4..925818c 100644
> --- a/drivers/net/wireless/ath/ath9k/ahb.c
> +++ b/drivers/net/wireless/ath/ath9k/ahb.c
> @@ -69,6 +69,7 @@ static int ath_ahb_probe(struct platform_device *pdev)
> int irq;
> int ret = 0;
> struct ath_hw *ah;
> + char hw_name[1024];
This is a bit too large to allocate from stack IMHO.
[...]
> --- a/drivers/net/wireless/ath/ath9k/pci.c
> +++ b/drivers/net/wireless/ath/ath9k/pci.c
> @@ -114,6 +114,7 @@ static int ath_pci_probe(struct pci_dev *pdev, const struct pci_device_id *id)
> u32 val;
> int ret = 0;
> struct ath_hw *ah;
> + char hw_name[1024];
Ditto.
--
Kalle Valo
^ permalink raw reply [flat|nested] 18+ messages in thread
* [ath9k-devel] [PATCH 2/4] ath9k_hw: distinguish single-chip solutions on initial probe print
2009-10-26 16:14 ` Kalle Valo
@ 2009-10-26 16:21 ` Luis R. Rodriguez
-1 siblings, 0 replies; 18+ messages in thread
From: Luis R. Rodriguez @ 2009-10-26 16:21 UTC (permalink / raw)
To: ath9k-devel
On Mon, Oct 26, 2009 at 9:14 AM, Kalle Valo <kalle.valo@iki.fi> wrote:
> "Luis R. Rodriguez" <lrodriguez@atheros.com> writes:
>
>> Devices with external radios have revisions which we can count on.
>> On single chip solutions these EEPROM values for these radio revision
>> also exist but are not meaningful as the radios are embedded onto the
>> same chip. Each single-chip device evolves together as one device.
>>
>> Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
>> ---
>> ?drivers/net/wireless/ath/ath9k/ahb.c | ? 11 ++++-------
>> ?drivers/net/wireless/ath/ath9k/hw.c ?| ? 27 +++++++++++++++++++++++----
>> ?drivers/net/wireless/ath/ath9k/hw.h ?| ? ?3 +--
>> ?drivers/net/wireless/ath/ath9k/pci.c | ? 11 ++++-------
>> ?4 files changed, 32 insertions(+), 20 deletions(-)
>>
>> diff --git a/drivers/net/wireless/ath/ath9k/ahb.c b/drivers/net/wireless/ath/ath9k/ahb.c
>> index 41422c4..925818c 100644
>> --- a/drivers/net/wireless/ath/ath9k/ahb.c
>> +++ b/drivers/net/wireless/ath/ath9k/ahb.c
>> @@ -69,6 +69,7 @@ static int ath_ahb_probe(struct platform_device *pdev)
>> ? ? ? int irq;
>> ? ? ? int ret = 0;
>> ? ? ? struct ath_hw *ah;
>> + ? ? char hw_name[1024];
>
> This is a bit too large to allocate from stack IMHO.
>
>
> [...]
>
>> --- a/drivers/net/wireless/ath/ath9k/pci.c
>> +++ b/drivers/net/wireless/ath/ath9k/pci.c
>> @@ -114,6 +114,7 @@ static int ath_pci_probe(struct pci_dev *pdev, const struct pci_device_id *id)
>> ? ? ? u32 val;
>> ? ? ? int ret = 0;
>> ? ? ? struct ath_hw *ah;
>> + ? ? char hw_name[1024];
>
> Ditto.
We use this for debugfs, so I went with that as an upper limit, given
that we just use it a probe it seemed sane.
Luis
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH 2/4] ath9k_hw: distinguish single-chip solutions on initial probe print
@ 2009-10-26 16:21 ` Luis R. Rodriguez
0 siblings, 0 replies; 18+ messages in thread
From: Luis R. Rodriguez @ 2009-10-26 16:21 UTC (permalink / raw)
To: Kalle Valo; +Cc: linville, linux-wireless, ath9k-devel
On Mon, Oct 26, 2009 at 9:14 AM, Kalle Valo <kalle.valo@iki.fi> wrote:
> "Luis R. Rodriguez" <lrodriguez@atheros.com> writes:
>
>> Devices with external radios have revisions which we can count on.
>> On single chip solutions these EEPROM values for these radio revision
>> also exist but are not meaningful as the radios are embedded onto the
>> same chip. Each single-chip device evolves together as one device.
>>
>> Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
>> ---
>> drivers/net/wireless/ath/ath9k/ahb.c | 11 ++++-------
>> drivers/net/wireless/ath/ath9k/hw.c | 27 +++++++++++++++++++++++----
>> drivers/net/wireless/ath/ath9k/hw.h | 3 +--
>> drivers/net/wireless/ath/ath9k/pci.c | 11 ++++-------
>> 4 files changed, 32 insertions(+), 20 deletions(-)
>>
>> diff --git a/drivers/net/wireless/ath/ath9k/ahb.c b/drivers/net/wireless/ath/ath9k/ahb.c
>> index 41422c4..925818c 100644
>> --- a/drivers/net/wireless/ath/ath9k/ahb.c
>> +++ b/drivers/net/wireless/ath/ath9k/ahb.c
>> @@ -69,6 +69,7 @@ static int ath_ahb_probe(struct platform_device *pdev)
>> int irq;
>> int ret = 0;
>> struct ath_hw *ah;
>> + char hw_name[1024];
>
> This is a bit too large to allocate from stack IMHO.
>
>
> [...]
>
>> --- a/drivers/net/wireless/ath/ath9k/pci.c
>> +++ b/drivers/net/wireless/ath/ath9k/pci.c
>> @@ -114,6 +114,7 @@ static int ath_pci_probe(struct pci_dev *pdev, const struct pci_device_id *id)
>> u32 val;
>> int ret = 0;
>> struct ath_hw *ah;
>> + char hw_name[1024];
>
> Ditto.
We use this for debugfs, so I went with that as an upper limit, given
that we just use it a probe it seemed sane.
Luis
^ permalink raw reply [flat|nested] 18+ messages in thread
* [ath9k-devel] [PATCH 2/4] ath9k_hw: distinguish single-chip solutions on initial probe print
2009-10-26 16:21 ` Luis R. Rodriguez
@ 2009-10-26 16:29 ` Michael Buesch
-1 siblings, 0 replies; 18+ messages in thread
From: Michael Buesch @ 2009-10-26 16:29 UTC (permalink / raw)
To: ath9k-devel
On Monday 26 October 2009 17:21:40 Luis R. Rodriguez wrote:
> >> --- a/drivers/net/wireless/ath/ath9k/pci.c
> >> +++ b/drivers/net/wireless/ath/ath9k/pci.c
> >> @@ -114,6 +114,7 @@ static int ath_pci_probe(struct pci_dev *pdev, const struct pci_device_id *id)
> >> ? ? ? u32 val;
> >> ? ? ? int ret = 0;
> >> ? ? ? struct ath_hw *ah;
> >> + ? ? char hw_name[1024];
> >
> > Ditto.
>
> We use this for debugfs, so I went with that as an upper limit, given
> that we just use it a probe it seemed sane.
I think it's completely insane, because you effectively use 25% of the available stack.
Why is a hardware name 1024 chars (max) long anyway?
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
I would be pissed off after reading the first line already ;)
--
Greetings, Michael.
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH 2/4] ath9k_hw: distinguish single-chip solutions on initial probe print
@ 2009-10-26 16:29 ` Michael Buesch
0 siblings, 0 replies; 18+ messages in thread
From: Michael Buesch @ 2009-10-26 16:29 UTC (permalink / raw)
To: Luis R. Rodriguez; +Cc: Kalle Valo, linville, linux-wireless, ath9k-devel
On Monday 26 October 2009 17:21:40 Luis R. Rodriguez wrote:
> >> --- a/drivers/net/wireless/ath/ath9k/pci.c
> >> +++ b/drivers/net/wireless/ath/ath9k/pci.c
> >> @@ -114,6 +114,7 @@ static int ath_pci_probe(struct pci_dev *pdev, const struct pci_device_id *id)
> >> u32 val;
> >> int ret = 0;
> >> struct ath_hw *ah;
> >> + char hw_name[1024];
> >
> > Ditto.
>
> We use this for debugfs, so I went with that as an upper limit, given
> that we just use it a probe it seemed sane.
I think it's completely insane, because you effectively use 25% of the available stack.
Why is a hardware name 1024 chars (max) long anyway?
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
I would be pissed off after reading the first line already ;)
--
Greetings, Michael.
^ permalink raw reply [flat|nested] 18+ messages in thread
* [ath9k-devel] [PATCH 2/4] ath9k_hw: distinguish single-chip solutions on initial probe print
2009-10-26 16:29 ` Michael Buesch
@ 2009-10-26 16:37 ` Luis R. Rodriguez
-1 siblings, 0 replies; 18+ messages in thread
From: Luis R. Rodriguez @ 2009-10-26 16:37 UTC (permalink / raw)
To: ath9k-devel
On Mon, Oct 26, 2009 at 9:29 AM, Michael Buesch <mb@bu3sch.de> wrote:
> On Monday 26 October 2009 17:21:40 Luis R. Rodriguez wrote:
>> >> --- a/drivers/net/wireless/ath/ath9k/pci.c
>> >> +++ b/drivers/net/wireless/ath/ath9k/pci.c
>> >> @@ -114,6 +114,7 @@ static int ath_pci_probe(struct pci_dev *pdev, const struct pci_device_id *id)
>> >> ? ? ? u32 val;
>> >> ? ? ? int ret = 0;
>> >> ? ? ? struct ath_hw *ah;
>> >> + ? ? char hw_name[1024];
>> >
>> > Ditto.
>>
>> We use this for debugfs, so I went with that as an upper limit, given
>> that we just use it a probe it seemed sane.
>
> I think it's completely insane, because you effectively use 25% of the available stack.
> Why is a hardware name 1024 chars (max) long anyway?
>
> xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
> xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
> xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
> xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
> xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
> xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
> xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
> xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
> xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
> xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
> xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
> xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
> xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
> xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
>
> I would be pissed off after reading the first line already ;)
Heh alright, I'll go reduce this, thanks.
Luis
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH 2/4] ath9k_hw: distinguish single-chip solutions on initial probe print
@ 2009-10-26 16:37 ` Luis R. Rodriguez
0 siblings, 0 replies; 18+ messages in thread
From: Luis R. Rodriguez @ 2009-10-26 16:37 UTC (permalink / raw)
To: Michael Buesch; +Cc: Kalle Valo, linville, linux-wireless, ath9k-devel
On Mon, Oct 26, 2009 at 9:29 AM, Michael Buesch <mb@bu3sch.de> wrote:
> On Monday 26 October 2009 17:21:40 Luis R. Rodriguez wrote:
>> >> --- a/drivers/net/wireless/ath/ath9k/pci.c
>> >> +++ b/drivers/net/wireless/ath/ath9k/pci.c
>> >> @@ -114,6 +114,7 @@ static int ath_pci_probe(struct pci_dev *pdev, const struct pci_device_id *id)
>> >> u32 val;
>> >> int ret = 0;
>> >> struct ath_hw *ah;
>> >> + char hw_name[1024];
>> >
>> > Ditto.
>>
>> We use this for debugfs, so I went with that as an upper limit, given
>> that we just use it a probe it seemed sane.
>
> I think it's completely insane, because you effectively use 25% of the available stack.
> Why is a hardware name 1024 chars (max) long anyway?
>
> xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
> xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
> xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
> xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
> xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
> xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
> xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
> xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
> xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
> xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
> xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
> xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
> xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
> xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
>
> I would be pissed off after reading the first line already ;)
Heh alright, I'll go reduce this, thanks.
Luis
^ permalink raw reply [flat|nested] 18+ messages in thread
end of thread, other threads:[~2009-10-26 16:38 UTC | newest]
Thread overview: 18+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-10-26 14:38 [ath9k-devel] [PATCH 0/4] ath9k_hw: modify hw identification message Luis R. Rodriguez
2009-10-26 14:38 ` Luis R. Rodriguez
2009-10-26 14:38 ` [ath9k-devel] [PATCH 1/4] ath9k_hw: move mac name and rf name helpers to hw code Luis R. Rodriguez
2009-10-26 14:38 ` Luis R. Rodriguez
2009-10-26 14:38 ` [ath9k-devel] [PATCH 2/4] ath9k_hw: distinguish single-chip solutions on initial probe print Luis R. Rodriguez
2009-10-26 14:38 ` Luis R. Rodriguez
2009-10-26 16:14 ` [ath9k-devel] " Kalle Valo
2009-10-26 16:14 ` Kalle Valo
2009-10-26 16:21 ` [ath9k-devel] " Luis R. Rodriguez
2009-10-26 16:21 ` Luis R. Rodriguez
2009-10-26 16:29 ` [ath9k-devel] " Michael Buesch
2009-10-26 16:29 ` Michael Buesch
2009-10-26 16:37 ` [ath9k-devel] " Luis R. Rodriguez
2009-10-26 16:37 ` Luis R. Rodriguez
2009-10-26 14:39 ` [ath9k-devel] [PATCH 3/4] ath9k_hw: add AR9271 single chip name mapping Luis R. Rodriguez
2009-10-26 14:39 ` Luis R. Rodriguez
2009-10-26 14:39 ` [ath9k-devel] [PATCH 4/4] ath9k_hw: add some debug print for hw initialization Luis R. Rodriguez
2009-10-26 14:39 ` Luis R. Rodriguez
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.