ath10k: cleanup - respin
cover ath10k: cleanup - respin
Couple of updated patches.
Bartosz Markowski (3):
ath10k: remove excessive CONFIG_PM_SLEEP checks
ath10k: kill PCIE_LOCAL_REG_READ/WRITE macros
ath10k: update supported firmware tag to .599
drivers/net/wireless/ath/ath10k/core.c | 5 +---- drivers/net/wireless/ath/ath10k/hw.h | 2 +- drivers/net/wireless/ath/ath10k/pci.c | 16 +++++++--------- drivers/net/wireless/ath/ath10k/pci.h | 11 ++++++----- 4 files changed, 15 insertions(+), 19 deletions(-)
Signature · 1 line
1.7.10
PATCH 1/3 ath10k: remove excessive CONFIG_PM_SLEEP checks
There's no big overhead and without those #ifdefs
the code looks simpler.
--- drivers/net/wireless/ath/ath10k/core.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-)
drivers/net/wireless/ath/ath10k/core.c +1 -4
@@ -72,10 +72,8 @@ static void ath10k_send_suspend_complete(struct ath10k *ar) {ath10k_dbg (ATH10K_DBG_CORE ,"%s\n" , __func__); -#if defined(CONFIG_PM_SLEEP ) ar->is_target_paused = true;wake_up (&ar->event_queue); -#endif }static int ath10k_check_fw_version (struct ath10k *ar)
@@ -458,9 +456,8 @@ struct ath10k *ath10k_core_create(void *hif_priv, struct device *dev,INIT_WORK (&ar->offchan_tx_work, ath10k_offchan_tx_work);skb_queue_head_init (&ar->offchan_tx_queue); -#if defined(CONFIG_PM_SLEEP )init_waitqueue_head (&ar->event_queue); -#endif +return ar; err_wq:
Signature · 1 line
1.7.10
PATCH 2/3 ath10k: kill PCIE_LOCAL_REG_READ/WRITE macros
In reply to Bartosz MarkowskiConvert them into inline functions with better names.
--- drivers/net/wireless/ath/ath10k/pci.c | 16 +++++++--------- drivers/net/wireless/ath/ath10k/pci.h | 11 ++++++----- 2 files changed, 13 insertions(+), 14 deletions(-)
drivers/net/wireless/ath/ath10k/pci.c +7 -9
@@ -2109,8 +2109,7 @@ static void ath10k_pci_device_reset(struct ath10k_pci *ar_pci)if (!mem)return ; -A_PCIE_LOCAL_REG_WRITE (mem,PCIE_SOC_WAKE_ADDRESS , -PCIE_SOC_WAKE_V_MASK ); +ath10k_pci_reg_write32 (mem,PCIE_SOC_WAKE_ADDRESS ,PCIE_SOC_WAKE_V_MASK );for (i =0 ; i <ATH_PCI_RESET_WAIT_MAX ; i++) {if (ath10k_pci_target_is_awake (ar))break ;
@@ -2118,12 +2117,12 @@ static void ath10k_pci_device_reset(struct ath10k_pci *ar_pci) }/* Put Target, including PCIe, into RESET. */ - val =A_PCIE_LOCAL_REG_READ (mem,SOC_GLOBAL_RESET_ADDRESS ); + val =ath10k_pci_reg_read32 (mem,SOC_GLOBAL_RESET_ADDRESS ); val |=1 ; -A_PCIE_LOCAL_REG_WRITE (mem,SOC_GLOBAL_RESET_ADDRESS , val); +ath10k_pci_reg_write32 (mem,SOC_GLOBAL_RESET_ADDRESS , val);for (i =0 ; i <ATH_PCI_RESET_WAIT_MAX ; i++) { -if (A_PCIE_LOCAL_REG_READ (mem,RTC_STATE_ADDRESS ) & +if (ath10k_pci_reg_read32 (mem,RTC_STATE_ADDRESS ) &RTC_STATE_COLD_RESET_MASK )break ;msleep (1 );
@@ -2131,17 +2130,16 @@ static void ath10k_pci_device_reset(struct ath10k_pci *ar_pci)/* Pull Target, including PCIe, out of RESET. */ val &= ~1 ; -A_PCIE_LOCAL_REG_WRITE (mem,SOC_GLOBAL_RESET_ADDRESS , val); +ath10k_pci_reg_write32 (mem,SOC_GLOBAL_RESET_ADDRESS , val);for (i =0 ; i <ATH_PCI_RESET_WAIT_MAX ; i++) { -if (!(A_PCIE_LOCAL_REG_READ (mem,RTC_STATE_ADDRESS ) & +if (!(ath10k_pci_reg_read32 (mem,RTC_STATE_ADDRESS ) &RTC_STATE_COLD_RESET_MASK ))break ;msleep (1 ); } -A_PCIE_LOCAL_REG_WRITE (mem,PCIE_SOC_WAKE_ADDRESS , -PCIE_SOC_WAKE_RESET ); +ath10k_pci_reg_write32 (mem,PCIE_SOC_WAKE_ADDRESS ,PCIE_SOC_WAKE_RESET ); }static void ath10k_pci_dump_features (struct ath10k_pci *ar_pci)
drivers/net/wireless/ath/ath10k/pci.h +6 -5
@@ -229,12 +229,13 @@ static inline struct ath10k_pci *ath10k_pci_priv(struct ath10k *ar)return ar->hif.priv; } -#define A_PCIE_LOCAL_REG_READ (mem, addr) \ - ioread32((mem) + PCIE_LOCAL_BASE_ADDRESS + (u32)(addr)) +static inline u32 ath10k_pci_reg_read32 (void __iomem *mem,u32 addr) { +return ioread32 (mem +PCIE_LOCAL_BASE_ADDRESS + addr); +} -#define A_PCIE_LOCAL_REG_WRITE (mem, addr, val) \ - iowrite32((val), \ - ((mem) + PCIE_LOCAL_BASE_ADDRESS + (u32)(addr))) +static inline void ath10k_pci_reg_write32 (void __iomem *mem,u32 addr,u32 val) { +iowrite32 (val, mem +PCIE_LOCAL_BASE_ADDRESS + addr); +}#define ATH_PCI_RESET_WAIT_MAX 10/* ms */ #define PCIE_WAKE_TIMEOUT 5000/* 5ms */
Signature · 1 line
1.7.10
PATCH 3/3 ath10k: update supported firmware tag to .599
In reply to Bartosz Markowski--- drivers/net/wireless/ath/ath10k/hw.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/wireless/ath/ath10k/hw.h +1 -1
@@ -24,7 +24,7 @@#define SUPPORTED_FW_MAJOR 1#define SUPPORTED_FW_MINOR 0#define SUPPORTED_FW_RELEASE 0 -#define SUPPORTED_FW_BUILD 548 +#define SUPPORTED_FW_BUILD 599/* AR9888 1.0 definitions */ #define AR9888_HW_1_0_VERSION 0x4000002c
Signature · 1 line
1.7.10
Kalle Valo
Appliedcover ath10k: cleanup - respin
In reply to Bartosz MarkowskiQuoted 6 lines · Bartosz Markowski
Couple of updated patches.
Bartosz Markowski (3):
ath10k: remove excessiveCONFIG_PM_SLEEPchecks
ath10k: kill PCIE_LOCAL_REG_READ/WRITE macros
ath10k: update supported firmware tag to .599
Thanks, applied.
Signature · 1 line
Kalle Valo