Skip to contentSkip to conversation

ath10k: more cleanup

PATCH New Bartosz Markowski 2 participants 10 messages Apr 23, 2013 – Apr 24, 2013 Qualcomm Atheros ATH10K wireless driver

lore
Share & tools
lore
#0 lore raw

cover ath10k: more cleanup

Bartosz Markowski (7):
ath10k: Print more elgant HW name/version
ath10k: shift ath10k_generic_iter structure to mac header
ath10k: kill HIF_TYPE_AR9888
ath10k: shift REG_DUMP_COUNT_AR9888 to pci block
ath10k: move DIAG_TRANSFER_LIMIT to pci block
ath10k: remove leftover prototypes
ath10k: rename ath10k_pci_wait_for_target_to_awake

 drivers/net/wireless/ath/ath10k/core.c |    6 +++---
 drivers/net/wireless/ath/ath10k/core.h |    5 -----
 drivers/net/wireless/ath/ath10k/hif.h  |   14 --------------
 drivers/net/wireless/ath/ath10k/mac.h  |    5 +++++
 drivers/net/wireless/ath/ath10k/pci.c  |   11 ++++-------
 drivers/net/wireless/ath/ath10k/pci.h  |    8 ++++++++
 6 files changed, 20 insertions(+), 29 deletions(-)
Signature · 1 line
1.7.10
#1 lore raw

PATCH 1/7 ath10k: Print more elgant HW name/version

---
 drivers/net/wireless/ath/ath10k/core.c |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/net/wireless/ath/ath10k/core.c +3 -3
index 07102b8..d27bd27 100644
@@ -398,15 +398,15 @@ static int ath10k_init_hw_params(struct ath10k *ar)
 	}
 
 	if (i == ARRAY_SIZE(ath10k_hw_params_list)) {
-		ath10k_err("unsupported hardware version: 0x%x\n",
+		ath10k_err("Unsupported hardware version: 0x%x\n",
 			   ar->target_version);
 		return -EINVAL;
 	}
 
 	ar->hw_params = *hw_params;
 
-	ath10k_info("target_ver 0x%x target_type 0x%x name %s\n",
-		    ar->target_version, ar->target_type, ar->hw_params.name);
+	ath10k_info("Hardware name %s version 0x%x\n",
+		    ar->hw_params.name, ar->target_version);
 
 	return 0;
 }
Signature · 1 line
1.7.10
#2 lore raw

PATCH 2/7 ath10k: shift ath10k_generic_iter structure to mac header

In reply to Bartosz Markowski
---
 drivers/net/wireless/ath/ath10k/core.h |    5 -----
 drivers/net/wireless/ath/ath10k/mac.h  |    5 +++++
 2 files changed, 5 insertions(+), 5 deletions(-)
drivers/net/wireless/ath/ath10k/core.h +0 -5
index 42d9e72..148631a 100644
@@ -360,11 +360,6 @@ struct ath10k {
 #endif
 };
 
-struct ath10k_generic_iter {
-	struct ath10k *ar;
-	int ret;
-};
-
 static inline struct ath_common *ath10k_common(struct ath10k *ar)
 {
 	return &ar->common;
drivers/net/wireless/ath/ath10k/mac.h +5 -0
index 272ba74..58eed18 100644
@@ -21,6 +21,11 @@
 #include <net/mac80211.h>
 #include "core.h"
 
+struct ath10k_generic_iter {
+	struct ath10k *ar;
+	int ret;
+};
+
 struct ath10k *ath10k_mac_create(void);
 void ath10k_mac_destroy(struct ath10k *ar);
 int ath10k_mac_register(struct ath10k *ar);
Signature · 1 line
1.7.10
#3 lore raw

PATCH 3/7 ath10k: kill HIF_TYPE_AR9888

In reply to Bartosz Markowski
---
 drivers/net/wireless/ath/ath10k/hif.h |    2 --
 drivers/net/wireless/ath/ath10k/pci.c |    3 ---
 2 files changed, 5 deletions(-)
drivers/net/wireless/ath/ath10k/hif.h +0 -2
index 05e02c9..dbf1f37 100644
@@ -21,8 +21,6 @@
 #include <linux/kernel.h>
 #include "core.h"
 
-#define HIF_TYPE_AR9888  1
-
 /* FW dump area */
 #define REG_DUMP_COUNT_AR9888 60
 
drivers/net/wireless/ath/ath10k/pci.c +0 -3
index 0d1523b..6fe0508 100644
@@ -2188,12 +2188,9 @@ retry:
 	switch (pci_dev->device) {
 	case AR9888_1_0_DEVICE_ID:
 		target_type = TARGET_TYPE_AR9888;
-		hif_type = HIF_TYPE_AR9888;
 		break;
 	case AR9888_2_0_DEVICE_ID:
 		target_type = TARGET_TYPE_AR9888;
-		hif_type = HIF_TYPE_AR9888;
-
 		set_bit(ATH10K_PCI_FEATURE_MSI_X, ar_pci->features);
 		break;
 	default:
Signature · 1 line
1.7.10
#4 lore raw

PATCH 4/7 ath10k: shift REG_DUMP_COUNT_AR9888 to pci block

In reply to Bartosz Markowski
---
 drivers/net/wireless/ath/ath10k/hif.h |    3 ---
 drivers/net/wireless/ath/ath10k/pci.h |    3 +++
 2 files changed, 3 insertions(+), 3 deletions(-)
drivers/net/wireless/ath/ath10k/hif.h +0 -3
index dbf1f37..ec6d5d3 100644
@@ -21,9 +21,6 @@
 #include <linux/kernel.h>
 #include "core.h"
 
-/* FW dump area */
-#define REG_DUMP_COUNT_AR9888 60
-
 /*
  * maximum number of bytes that can be
  * handled atomically by DiagRead/DiagWrite
drivers/net/wireless/ath/ath10k/pci.h +3 -0
index 188593e..9148bc5 100644
@@ -23,6 +23,9 @@
 #include "ar9888def.h"
 #include "ce.h"
 
+/* FW dump area */
+#define REG_DUMP_COUNT_AR9888 60
+
 /*
  * maximum number of bytes that can be
  * handled atomically by DiagRead/DiagWrite
Signature · 1 line
1.7.10
#5 lore raw

PATCH 5/7 ath10k: move DIAG_TRANSFER_LIMIT to pci block

In reply to Bartosz Markowski
---
 drivers/net/wireless/ath/ath10k/hif.h |    6 ------
 drivers/net/wireless/ath/ath10k/pci.h |    5 +++++
 2 files changed, 5 insertions(+), 6 deletions(-)
drivers/net/wireless/ath/ath10k/hif.h +0 -6
index ec6d5d3..39104c2 100644
@@ -21,12 +21,6 @@
 #include <linux/kernel.h>
 #include "core.h"
 
-/*
- * maximum number of bytes that can be
- * handled atomically by DiagRead/DiagWrite
- */
-#define DIAG_TRANSFER_LIMIT 2048
-
 void ath10k_register_host_reg_table(struct ath10k *ar, u32 hif_type);
 void ath10k_register_target_reg_table(struct ath10k *ar, u32 target_type);
 
drivers/net/wireless/ath/ath10k/pci.h +5 -0
index 9148bc5..69b0b1d 100644
@@ -27,6 +27,11 @@
 #define REG_DUMP_COUNT_AR9888 60
 
 /*
+ * maximum number of bytes that can be handled atomically by DiagRead/DiagWrite
+ */
+#define DIAG_TRANSFER_LIMIT 2048
+
+/*
  * maximum number of bytes that can be
  * handled atomically by DiagRead/DiagWrite
  */
Signature · 1 line
1.7.10
#6 lore raw

PATCH 6/7 ath10k: remove leftover prototypes

In reply to Bartosz Markowski

* ath10k_register_host_reg_table()
* ath10k_register_target_reg_table()

---
 drivers/net/wireless/ath/ath10k/hif.h |    3 ---
 1 file changed, 3 deletions(-)
drivers/net/wireless/ath/ath10k/hif.h +0 -3
index 39104c2..23e7c99 100644
@@ -21,9 +21,6 @@
 #include <linux/kernel.h>
 #include "core.h"
 
-void ath10k_register_host_reg_table(struct ath10k *ar, u32 hif_type);
-void ath10k_register_target_reg_table(struct ath10k *ar, u32 target_type);
-
 struct ath10k_hif_cb {
 	int (*tx_completion_handler)(struct ath10k *ar,
 				     struct sk_buff *wbuf,
Signature · 1 line
1.7.10
#7 lore raw

PATCH 7/7 ath10k: rename ath10k_pci_wait_for_target_to_awake

In reply to Bartosz Markowski
---
 drivers/net/wireless/ath/ath10k/pci.c |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
drivers/net/wireless/ath/ath10k/pci.c +4 -4
index 6fe0508..790f23a 100644
@@ -430,7 +430,7 @@ static bool ath10k_pci_target_is_awake(struct ath10k *ar)
 	return (RTC_STATE_V_GET(val) == RTC_STATE_V_ON);
 }
 
-static void ath10k_pci_wait_for_target_to_awake(struct ath10k *ar)
+static void ath10k_pci_wait(struct ath10k *ar)
 {
 	int n = 100;
 
@@ -2034,7 +2034,7 @@ static int ath10k_pci_configure(struct ath10k *ar)
 			  ar_pci->mem + PCIE_LOCAL_BASE_ADDRESS +
 			  PCIE_SOC_WAKE_ADDRESS);
 
-		ath10k_pci_wait_for_target_to_awake(ar);
+		ath10k_pci_wait(ar);
 
 		/*
 		 * A potential race occurs here: The CORE_BASE write
@@ -2064,7 +2064,7 @@ static int ath10k_pci_configure(struct ath10k *ar)
 		  ar_pci->mem + PCIE_LOCAL_BASE_ADDRESS +
 		  PCIE_SOC_WAKE_ADDRESS);
 
-	ath10k_pci_wait_for_target_to_awake(ar);
+	ath10k_pci_wait(ar);
 
 	ret = ath10k_pci_reset_target(ar);
 	if (ret)
@@ -2298,7 +2298,7 @@ retry:
 	iowrite32(PCIE_SOC_WAKE_V_MASK,
 		  mem + PCIE_LOCAL_BASE_ADDRESS +
 		  PCIE_SOC_WAKE_ADDRESS);
-	ath10k_pci_wait_for_target_to_awake(ar);
+	ath10k_pci_wait(ar);
 
 	fw_indicator = ioread32(mem + FW_INDICATOR_ADDRESS);
 	iowrite32(PCIE_SOC_WAKE_RESET,
Signature · 1 line
1.7.10
Applied
#8 lore raw

cover ath10k: more cleanup

In reply to Bartosz Markowski
Quoted 8 lines · Bartosz Markowski

Bartosz Markowski (7):
ath10k: Print more elgant HW name/version
ath10k: shift ath10k_generic_iter structure to mac header
ath10k: kill HIF_TYPE_AR9888
ath10k: shift REG_DUMP_COUNT_AR9888 to pci block
ath10k: move DIAG_TRANSFER_LIMIT to pci block
ath10k: remove leftover prototypes
ath10k: rename ath10k_pci_wait_for_target_to_awake

Thanks, applied. Patch 4 had conflicts but git took care of that.

But there's a new warning now:

drivers/net/wireless/ath/ath10k/pci.c: In function 'ath10k_pci_probe':
drivers/net/wireless/ath/ath10k/pci.c:2150:6: warning: unused variable 'hif_type' [-Wunused-variable]

Signature · 1 line
Kalle Valo
#9 lore raw

cover ath10k: more cleanup

Quoted 10 lines · Kalle Valo
Quoted 8 lines · Bartosz Markowski

Bartosz Markowski (7):
ath10k: Print more elgant HW name/version
ath10k: shift ath10k_generic_iter structure to mac header
ath10k: kill HIF_TYPE_AR9888
ath10k: shift REG_DUMP_COUNT_AR9888 to pci block
ath10k: move DIAG_TRANSFER_LIMIT to pci block
ath10k: remove leftover prototypes
ath10k: rename ath10k_pci_wait_for_target_to_awake

Quoted 8 lines

Thanks, applied. Patch 4 had conflicts but git took care of that.

But there's a new warning now:

drivers/net/wireless/ath/ath10k/pci.c: In function 'ath10k_pci_probe':
drivers/net/wireless/ath/ath10k/pci.c:2150:6: warning: unused variable 'hif_type' [-Wunused-variable]

oops, sorry. I will fix it.

Bartosz