* [PATCH v2] ath9k_hw: extend GPIO pin select mask for rfkill
@ 2011-09-30 6:01 Mohammed Shafi Shajakhan
2011-09-30 6:01 ` [PATCH] ath9k_hw: Fix number of GPIO pins for AR9287/9300 Mohammed Shafi Shajakhan
2011-09-30 6:01 ` [PATCH] ath9k_hw: set pci_express capability true for AR9480 Mohammed Shafi Shajakhan
0 siblings, 2 replies; 3+ messages in thread
From: Mohammed Shafi Shajakhan @ 2011-09-30 6:01 UTC (permalink / raw)
To: John W. Linville, Rodriguez Luis
Cc: Jouni Malinen, linux-wireless, Balasubramanian senthilkumar,
Vasanthakumar Thiagarajan, Rajkumar Manoharan, Vivek Natarajan,
ath9k-devel, Mohammed Shafi Shajakhan, Wilson Tsao, Hu, Russell
From: Mohammed Shafi Shajakhan <mohammed@qca.qualcomm.com>
this extends the bits for rf kill GPIO selection to [7:2] from [4:2] as
we use GPIO pin 11 as rfkill for AR9480 and also remove few unused
macros
Cc: Wilson Tsao <wtsao@qca.qualcomm.com>
Cc: "Hu, Russell" <rhu@qca.qualcomm.com>
Signed-off-by: Mohammed Shafi Shajakhan <mohammed@qca.qualcomm.com>
---
drivers/net/wireless/ath/ath9k/eeprom.h | 8 +++-----
drivers/net/wireless/ath/ath9k/hw.c | 10 ++++++++--
2 files changed, 11 insertions(+), 7 deletions(-)
diff --git a/drivers/net/wireless/ath/ath9k/eeprom.h b/drivers/net/wireless/ath/ath9k/eeprom.h
index a3c7d0c..70fe75c 100644
--- a/drivers/net/wireless/ath/ath9k/eeprom.h
+++ b/drivers/net/wireless/ath/ath9k/eeprom.h
@@ -104,11 +104,6 @@
#define OLC_FOR_AR9287_10_LATER (AR_SREV_9287_11_OR_LATER(ah) && \
ah->eep_ops->get_eeprom(ah, EEP_OL_PWRCTRL))
-#define AR_EEPROM_RFSILENT_GPIO_SEL 0x001c
-#define AR_EEPROM_RFSILENT_GPIO_SEL_S 2
-#define AR_EEPROM_RFSILENT_POLARITY 0x0002
-#define AR_EEPROM_RFSILENT_POLARITY_S 1
-
#define EEP_RFSILENT_ENABLED 0x0001
#define EEP_RFSILENT_ENABLED_S 0
#define EEP_RFSILENT_POLARITY 0x0002
@@ -116,6 +111,9 @@
#define EEP_RFSILENT_GPIO_SEL 0x001c
#define EEP_RFSILENT_GPIO_SEL_S 2
+#define AR9480_EEP_RFSILENT_GPIO_SEL 0x00fc
+#define AR9480_EEP_RFSILENT_GPIO_SEL_S 2
+
#define AR5416_OPFLAGS_11A 0x01
#define AR5416_OPFLAGS_11G 0x02
#define AR5416_OPFLAGS_N_5G_HT40 0x04
diff --git a/drivers/net/wireless/ath/ath9k/hw.c b/drivers/net/wireless/ath/ath9k/hw.c
index f2de7ee..521bb79 100644
--- a/drivers/net/wireless/ath/ath9k/hw.c
+++ b/drivers/net/wireless/ath/ath9k/hw.c
@@ -2170,8 +2170,14 @@ int ath9k_hw_fill_cap_info(struct ath_hw *ah)
#if defined(CONFIG_RFKILL) || defined(CONFIG_RFKILL_MODULE)
ah->rfsilent = ah->eep_ops->get_eeprom(ah, EEP_RF_SILENT);
if (ah->rfsilent & EEP_RFSILENT_ENABLED) {
- ah->rfkill_gpio =
- MS(ah->rfsilent, EEP_RFSILENT_GPIO_SEL);
+
+ if (AR_SREV_9480(ah))
+ ah->rfkill_gpio =
+ MS(ah->rfsilent, AR9480_EEP_RFSILENT_GPIO_SEL);
+ else
+ ah->rfkill_gpio =
+ MS(ah->rfsilent, EEP_RFSILENT_GPIO_SEL);
+
ah->rfkill_polarity =
MS(ah->rfsilent, EEP_RFSILENT_POLARITY);
--
1.7.0.4
^ permalink raw reply related [flat|nested] 3+ messages in thread* [PATCH] ath9k_hw: Fix number of GPIO pins for AR9287/9300
2011-09-30 6:01 [PATCH v2] ath9k_hw: extend GPIO pin select mask for rfkill Mohammed Shafi Shajakhan
@ 2011-09-30 6:01 ` Mohammed Shafi Shajakhan
2011-09-30 6:01 ` [PATCH] ath9k_hw: set pci_express capability true for AR9480 Mohammed Shafi Shajakhan
1 sibling, 0 replies; 3+ messages in thread
From: Mohammed Shafi Shajakhan @ 2011-09-30 6:01 UTC (permalink / raw)
To: John W. Linville, Rodriguez Luis
Cc: Jouni Malinen, linux-wireless, Balasubramanian senthilkumar,
Vasanthakumar Thiagarajan, Rajkumar Manoharan, Vivek Natarajan,
ath9k-devel, Mohammed Shafi Shajakhan, stable
From: Mohammed Shafi Shajakhan <mohammed@qca.qualcomm.com>
this patch fixes the assumption of maximum number of GPIO pins present
in AR9287/AR9300. this fix is essential as we might encounter some
functionality issues involved in accessing the status of GPIO pins which
are all incorrectly assumed to be not within the range of max_num_gpio
of AR9300/AR9287 chipsets
Cc: stable@kernel.org
Signed-off-by: Mohammed Shafi Shajakhan <mohammed@qca.qualcomm.com>
---
drivers/net/wireless/ath/ath9k/hw.c | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/drivers/net/wireless/ath/ath9k/hw.c b/drivers/net/wireless/ath/ath9k/hw.c
index f2de7ee..e2c62ea 100644
--- a/drivers/net/wireless/ath/ath9k/hw.c
+++ b/drivers/net/wireless/ath/ath9k/hw.c
@@ -2153,6 +2153,10 @@ int ath9k_hw_fill_cap_info(struct ath_hw *ah)
pCap->num_gpio_pins = AR9271_NUM_GPIO;
else if (AR_DEVID_7010(ah))
pCap->num_gpio_pins = AR7010_NUM_GPIO;
+ else if (AR_SREV_9300_20_OR_LATER(ah))
+ pCap->num_gpio_pins = AR9300_NUM_GPIO;
+ else if (AR_SREV_9287_11_OR_LATER(ah))
+ pCap->num_gpio_pins = AR9287_NUM_GPIO;
else if (AR_SREV_9285_12_OR_LATER(ah))
pCap->num_gpio_pins = AR9285_NUM_GPIO;
else if (AR_SREV_9280_20_OR_LATER(ah))
--
1.7.0.4
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [PATCH] ath9k_hw: set pci_express capability true for AR9480
2011-09-30 6:01 [PATCH v2] ath9k_hw: extend GPIO pin select mask for rfkill Mohammed Shafi Shajakhan
2011-09-30 6:01 ` [PATCH] ath9k_hw: Fix number of GPIO pins for AR9287/9300 Mohammed Shafi Shajakhan
@ 2011-09-30 6:01 ` Mohammed Shafi Shajakhan
1 sibling, 0 replies; 3+ messages in thread
From: Mohammed Shafi Shajakhan @ 2011-09-30 6:01 UTC (permalink / raw)
To: John W. Linville, Rodriguez Luis
Cc: Jouni Malinen, linux-wireless, Balasubramanian senthilkumar,
Vasanthakumar Thiagarajan, Rajkumar Manoharan, Vivek Natarajan,
ath9k-devel, Mohammed Shafi Shajakhan
From: Mohammed Shafi Shajakhan <mohammed@qca.qualcomm.com>
the AR_SREV register does not seems to indicate whether AR9480 is
pci_express capable or not though the other information like macVersion
etc can be obtained properly. this fix is essential as ASPM won't be intialized
and its related driver functionality ath9k_hw_configpcipowersave won't be
called
Signed-off-by: Mohammed Shafi Shajakhan <mohammed@qca.qualcomm.com>
---
drivers/net/wireless/ath/ath9k/hw.c | 7 ++++++-
1 files changed, 6 insertions(+), 1 deletions(-)
diff --git a/drivers/net/wireless/ath/ath9k/hw.c b/drivers/net/wireless/ath/ath9k/hw.c
index f2de7ee..56ba6a8 100644
--- a/drivers/net/wireless/ath/ath9k/hw.c
+++ b/drivers/net/wireless/ath/ath9k/hw.c
@@ -284,7 +284,12 @@ static void ath9k_hw_read_revisions(struct ath_hw *ah)
ah->hw_version.macVersion =
(val & AR_SREV_VERSION2) >> AR_SREV_TYPE2_S;
ah->hw_version.macRev = MS(val, AR_SREV_REVISION2);
- ah->is_pciexpress = (val & AR_SREV_TYPE2_HOST_MODE) ? 0 : 1;
+
+ if (AR_SREV_9480(ah))
+ ah->is_pciexpress = true;
+ else
+ ah->is_pciexpress = (val &
+ AR_SREV_TYPE2_HOST_MODE) ? 0 : 1;
} else {
if (!AR_SREV_9100(ah))
ah->hw_version.macVersion = MS(val, AR_SREV_VERSION);
--
1.7.0.4
^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2011-09-30 6:02 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-09-30 6:01 [PATCH v2] ath9k_hw: extend GPIO pin select mask for rfkill Mohammed Shafi Shajakhan
2011-09-30 6:01 ` [PATCH] ath9k_hw: Fix number of GPIO pins for AR9287/9300 Mohammed Shafi Shajakhan
2011-09-30 6:01 ` [PATCH] ath9k_hw: set pci_express capability true for AR9480 Mohammed Shafi Shajakhan
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox