All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/3] ath10k: embed supported chip ids in hw_params
@ 2014-11-24 14:17 ` Michal Kazior
  0 siblings, 0 replies; 32+ messages in thread
From: Michal Kazior @ 2014-11-24 14:17 UTC (permalink / raw)
  To: ath10k; +Cc: linux-wireless, Michal Kazior

This will make it easier to extend and maintain
list of supported hardware.

As a requirement this moves chip_id checking a
little later because target_version isn't known
until BMI can be queried.

Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
---
 drivers/net/wireless/ath/ath10k/core.c | 72 ++++++++++++++++------------------
 drivers/net/wireless/ath/ath10k/core.h |  3 +-
 2 files changed, 36 insertions(+), 39 deletions(-)

diff --git a/drivers/net/wireless/ath/ath10k/core.c b/drivers/net/wireless/ath/ath10k/core.c
index f660553..3904ce3 100644
--- a/drivers/net/wireless/ath/ath10k/core.c
+++ b/drivers/net/wireless/ath/ath10k/core.c
@@ -43,11 +43,21 @@ MODULE_PARM_DESC(uart_print, "Uart target debugging");
 MODULE_PARM_DESC(p2p, "Enable ath10k P2P support");
 MODULE_PARM_DESC(skip_otp, "Skip otp failure for calibration in testmode");
 
+static u32 qca988x_supported_chips[] = {
+	/* QCA988X_HW_1_0_CHIP_ID_REV is not supported. It's way too buggy and
+	 * crashes because ath10k doesn't have hacks and workarounds for it.
+	 */
+
+	QCA988X_HW_2_0_CHIP_ID_REV
+};
+
 static const struct ath10k_hw_params ath10k_hw_params_list[] = {
 	{
 		.id = QCA988X_HW_2_0_VERSION,
 		.name = "qca988x hw2.0",
 		.patch_load_addr = QCA988X_HW_2_0_PATCH_LOAD_ADDR,
+		.supported_chips = qca988x_supported_chips,
+		.num_supported_chips = ARRAY_SIZE(qca988x_supported_chips),
 		.fw = {
 			.dir = QCA988X_HW_2_0_FW_DIR,
 			.fw = QCA988X_HW_2_0_FW_FILE,
@@ -719,10 +729,26 @@ static int ath10k_init_uart(struct ath10k *ar)
 	return 0;
 }
 
+static int ath10k_core_check_chip_id(struct ath10k *ar, u32 chip_id,
+				     const struct ath10k_hw_params *hw_params)
+{
+	u32 hw_revision = MS(chip_id, SOC_CHIP_ID_REV);
+	int i;
+
+	ath10k_dbg(ar, ATH10K_DBG_BOOT, "boot chip_id 0x%08x hw_revision 0x%x\n",
+		   chip_id, hw_revision);
+
+	for (i = 0; i < hw_params->num_supported_chips; i++)
+		if (hw_params->supported_chips[i] == hw_revision)
+			return 0;
+
+	return -ENOTSUPP;
+}
+
 static int ath10k_init_hw_params(struct ath10k *ar)
 {
 	const struct ath10k_hw_params *uninitialized_var(hw_params);
-	int i;
+	int i, ret;
 
 	for (i = 0; i < ARRAY_SIZE(ath10k_hw_params_list); i++) {
 		hw_params = &ath10k_hw_params_list[i];
@@ -737,6 +763,13 @@ static int ath10k_init_hw_params(struct ath10k *ar)
 		return -EINVAL;
 	}
 
+	ret = ath10k_core_check_chip_id(ar, ar->chip_id, hw_params);
+	if (ret) {
+		ath10k_err(ar, "unsupported hardware %s chip_id 0x%08x\n",
+			   hw_params->name, ar->chip_id);
+		return ret;
+	}
+
 	ar->hw_params = *hw_params;
 
 	ath10k_dbg(ar, ATH10K_DBG_BOOT, "Hardware name %s version 0x%x\n",
@@ -1055,34 +1088,6 @@ static int ath10k_core_probe_fw(struct ath10k *ar)
 	return 0;
 }
 
-static int ath10k_core_check_chip_id(struct ath10k *ar)
-{
-	u32 hw_revision = MS(ar->chip_id, SOC_CHIP_ID_REV);
-
-	ath10k_dbg(ar, ATH10K_DBG_BOOT, "boot chip_id 0x%08x hw_revision 0x%x\n",
-		   ar->chip_id, hw_revision);
-
-	/* Check that we are not using hw1.0 (some of them have same pci id
-	 * as hw2.0) before doing anything else as ath10k crashes horribly
-	 * due to missing hw1.0 workarounds. */
-	switch (hw_revision) {
-	case QCA988X_HW_1_0_CHIP_ID_REV:
-		ath10k_err(ar, "ERROR: qca988x hw1.0 is not supported\n");
-		return -EOPNOTSUPP;
-
-	case QCA988X_HW_2_0_CHIP_ID_REV:
-		/* known hardware revision, continue normally */
-		return 0;
-
-	default:
-		ath10k_warn(ar, "Warning: hardware revision unknown (0x%x), expect problems\n",
-			    ar->chip_id);
-		return 0;
-	}
-
-	return 0;
-}
-
 static void ath10k_core_register_work(struct work_struct *work)
 {
 	struct ath10k *ar = container_of(work, struct ath10k, register_work);
@@ -1130,16 +1135,7 @@ err:
 
 int ath10k_core_register(struct ath10k *ar, u32 chip_id)
 {
-	int status;
-
 	ar->chip_id = chip_id;
-
-	status = ath10k_core_check_chip_id(ar);
-	if (status) {
-		ath10k_err(ar, "Unsupported chip id 0x%08x\n", ar->chip_id);
-		return status;
-	}
-
 	queue_work(ar->workqueue, &ar->register_work);
 
 	return 0;
diff --git a/drivers/net/wireless/ath/ath10k/core.h b/drivers/net/wireless/ath/ath10k/core.h
index 8f86bd3..d37ffd6 100644
--- a/drivers/net/wireless/ath/ath10k/core.h
+++ b/drivers/net/wireless/ath/ath10k/core.h
@@ -475,7 +475,8 @@ struct ath10k {
 		u32 id;
 		const char *name;
 		u32 patch_load_addr;
-
+		const u32 *supported_chips;
+		int num_supported_chips;
 		struct ath10k_hw_params_fw {
 			const char *dir;
 			const char *fw;
-- 
1.8.5.3


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

* [PATCH 1/3] ath10k: embed supported chip ids in hw_params
@ 2014-11-24 14:17 ` Michal Kazior
  0 siblings, 0 replies; 32+ messages in thread
From: Michal Kazior @ 2014-11-24 14:17 UTC (permalink / raw)
  To: ath10k; +Cc: linux-wireless, Michal Kazior

This will make it easier to extend and maintain
list of supported hardware.

As a requirement this moves chip_id checking a
little later because target_version isn't known
until BMI can be queried.

Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
---
 drivers/net/wireless/ath/ath10k/core.c | 72 ++++++++++++++++------------------
 drivers/net/wireless/ath/ath10k/core.h |  3 +-
 2 files changed, 36 insertions(+), 39 deletions(-)

diff --git a/drivers/net/wireless/ath/ath10k/core.c b/drivers/net/wireless/ath/ath10k/core.c
index f660553..3904ce3 100644
--- a/drivers/net/wireless/ath/ath10k/core.c
+++ b/drivers/net/wireless/ath/ath10k/core.c
@@ -43,11 +43,21 @@ MODULE_PARM_DESC(uart_print, "Uart target debugging");
 MODULE_PARM_DESC(p2p, "Enable ath10k P2P support");
 MODULE_PARM_DESC(skip_otp, "Skip otp failure for calibration in testmode");
 
+static u32 qca988x_supported_chips[] = {
+	/* QCA988X_HW_1_0_CHIP_ID_REV is not supported. It's way too buggy and
+	 * crashes because ath10k doesn't have hacks and workarounds for it.
+	 */
+
+	QCA988X_HW_2_0_CHIP_ID_REV
+};
+
 static const struct ath10k_hw_params ath10k_hw_params_list[] = {
 	{
 		.id = QCA988X_HW_2_0_VERSION,
 		.name = "qca988x hw2.0",
 		.patch_load_addr = QCA988X_HW_2_0_PATCH_LOAD_ADDR,
+		.supported_chips = qca988x_supported_chips,
+		.num_supported_chips = ARRAY_SIZE(qca988x_supported_chips),
 		.fw = {
 			.dir = QCA988X_HW_2_0_FW_DIR,
 			.fw = QCA988X_HW_2_0_FW_FILE,
@@ -719,10 +729,26 @@ static int ath10k_init_uart(struct ath10k *ar)
 	return 0;
 }
 
+static int ath10k_core_check_chip_id(struct ath10k *ar, u32 chip_id,
+				     const struct ath10k_hw_params *hw_params)
+{
+	u32 hw_revision = MS(chip_id, SOC_CHIP_ID_REV);
+	int i;
+
+	ath10k_dbg(ar, ATH10K_DBG_BOOT, "boot chip_id 0x%08x hw_revision 0x%x\n",
+		   chip_id, hw_revision);
+
+	for (i = 0; i < hw_params->num_supported_chips; i++)
+		if (hw_params->supported_chips[i] == hw_revision)
+			return 0;
+
+	return -ENOTSUPP;
+}
+
 static int ath10k_init_hw_params(struct ath10k *ar)
 {
 	const struct ath10k_hw_params *uninitialized_var(hw_params);
-	int i;
+	int i, ret;
 
 	for (i = 0; i < ARRAY_SIZE(ath10k_hw_params_list); i++) {
 		hw_params = &ath10k_hw_params_list[i];
@@ -737,6 +763,13 @@ static int ath10k_init_hw_params(struct ath10k *ar)
 		return -EINVAL;
 	}
 
+	ret = ath10k_core_check_chip_id(ar, ar->chip_id, hw_params);
+	if (ret) {
+		ath10k_err(ar, "unsupported hardware %s chip_id 0x%08x\n",
+			   hw_params->name, ar->chip_id);
+		return ret;
+	}
+
 	ar->hw_params = *hw_params;
 
 	ath10k_dbg(ar, ATH10K_DBG_BOOT, "Hardware name %s version 0x%x\n",
@@ -1055,34 +1088,6 @@ static int ath10k_core_probe_fw(struct ath10k *ar)
 	return 0;
 }
 
-static int ath10k_core_check_chip_id(struct ath10k *ar)
-{
-	u32 hw_revision = MS(ar->chip_id, SOC_CHIP_ID_REV);
-
-	ath10k_dbg(ar, ATH10K_DBG_BOOT, "boot chip_id 0x%08x hw_revision 0x%x\n",
-		   ar->chip_id, hw_revision);
-
-	/* Check that we are not using hw1.0 (some of them have same pci id
-	 * as hw2.0) before doing anything else as ath10k crashes horribly
-	 * due to missing hw1.0 workarounds. */
-	switch (hw_revision) {
-	case QCA988X_HW_1_0_CHIP_ID_REV:
-		ath10k_err(ar, "ERROR: qca988x hw1.0 is not supported\n");
-		return -EOPNOTSUPP;
-
-	case QCA988X_HW_2_0_CHIP_ID_REV:
-		/* known hardware revision, continue normally */
-		return 0;
-
-	default:
-		ath10k_warn(ar, "Warning: hardware revision unknown (0x%x), expect problems\n",
-			    ar->chip_id);
-		return 0;
-	}
-
-	return 0;
-}
-
 static void ath10k_core_register_work(struct work_struct *work)
 {
 	struct ath10k *ar = container_of(work, struct ath10k, register_work);
@@ -1130,16 +1135,7 @@ err:
 
 int ath10k_core_register(struct ath10k *ar, u32 chip_id)
 {
-	int status;
-
 	ar->chip_id = chip_id;
-
-	status = ath10k_core_check_chip_id(ar);
-	if (status) {
-		ath10k_err(ar, "Unsupported chip id 0x%08x\n", ar->chip_id);
-		return status;
-	}
-
 	queue_work(ar->workqueue, &ar->register_work);
 
 	return 0;
diff --git a/drivers/net/wireless/ath/ath10k/core.h b/drivers/net/wireless/ath/ath10k/core.h
index 8f86bd3..d37ffd6 100644
--- a/drivers/net/wireless/ath/ath10k/core.h
+++ b/drivers/net/wireless/ath/ath10k/core.h
@@ -475,7 +475,8 @@ struct ath10k {
 		u32 id;
 		const char *name;
 		u32 patch_load_addr;
-
+		const u32 *supported_chips;
+		int num_supported_chips;
 		struct ath10k_hw_params_fw {
 			const char *dir;
 			const char *fw;
-- 
1.8.5.3


_______________________________________________
ath10k mailing list
ath10k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath10k

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

* [PATCH 2/3] ath10k: put board size into hw_params
  2014-11-24 14:17 ` Michal Kazior
@ 2014-11-24 14:17   ` Michal Kazior
  -1 siblings, 0 replies; 32+ messages in thread
From: Michal Kazior @ 2014-11-24 14:17 UTC (permalink / raw)
  To: ath10k; +Cc: linux-wireless, Michal Kazior

This makes it easier to extend the list of
supported hardware.

Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
---
 drivers/net/wireless/ath/ath10k/core.c | 8 +++++---
 drivers/net/wireless/ath/ath10k/core.h | 2 ++
 2 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/drivers/net/wireless/ath/ath10k/core.c b/drivers/net/wireless/ath/ath10k/core.c
index 3904ce3..204aa04 100644
--- a/drivers/net/wireless/ath/ath10k/core.c
+++ b/drivers/net/wireless/ath/ath10k/core.c
@@ -63,6 +63,8 @@ static const struct ath10k_hw_params ath10k_hw_params_list[] = {
 			.fw = QCA988X_HW_2_0_FW_FILE,
 			.otp = QCA988X_HW_2_0_OTP_FILE,
 			.board = QCA988X_HW_2_0_BOARD_DATA_FILE,
+			.board_size = QCA988X_BOARD_DATA_SZ,
+			.board_ext_size = QCA988X_BOARD_EXT_DATA_SZ,
 		},
 	},
 };
@@ -156,8 +158,8 @@ static const struct firmware *ath10k_fetch_fw_file(struct ath10k *ar,
 static int ath10k_push_board_ext_data(struct ath10k *ar, const void *data,
 				      size_t data_len)
 {
-	u32 board_data_size = QCA988X_BOARD_DATA_SZ;
-	u32 board_ext_data_size = QCA988X_BOARD_EXT_DATA_SZ;
+	u32 board_data_size = ar->hw_params.fw.board_size;
+	u32 board_ext_data_size = ar->hw_params.fw.board_ext_size;
 	u32 board_ext_data_addr;
 	int ret;
 
@@ -203,7 +205,7 @@ static int ath10k_push_board_ext_data(struct ath10k *ar, const void *data,
 static int ath10k_download_board_data(struct ath10k *ar, const void *data,
 				      size_t data_len)
 {
-	u32 board_data_size = QCA988X_BOARD_DATA_SZ;
+	u32 board_data_size = ar->hw_params.fw.board_size;
 	u32 address;
 	int ret;
 
diff --git a/drivers/net/wireless/ath/ath10k/core.h b/drivers/net/wireless/ath/ath10k/core.h
index d37ffd6..1cc81e8 100644
--- a/drivers/net/wireless/ath/ath10k/core.h
+++ b/drivers/net/wireless/ath/ath10k/core.h
@@ -482,6 +482,8 @@ struct ath10k {
 			const char *fw;
 			const char *otp;
 			const char *board;
+			size_t board_size;
+			size_t board_ext_size;
 		} fw;
 	} hw_params;
 
-- 
1.8.5.3


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

* [PATCH 2/3] ath10k: put board size into hw_params
@ 2014-11-24 14:17   ` Michal Kazior
  0 siblings, 0 replies; 32+ messages in thread
From: Michal Kazior @ 2014-11-24 14:17 UTC (permalink / raw)
  To: ath10k; +Cc: linux-wireless, Michal Kazior

This makes it easier to extend the list of
supported hardware.

Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
---
 drivers/net/wireless/ath/ath10k/core.c | 8 +++++---
 drivers/net/wireless/ath/ath10k/core.h | 2 ++
 2 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/drivers/net/wireless/ath/ath10k/core.c b/drivers/net/wireless/ath/ath10k/core.c
index 3904ce3..204aa04 100644
--- a/drivers/net/wireless/ath/ath10k/core.c
+++ b/drivers/net/wireless/ath/ath10k/core.c
@@ -63,6 +63,8 @@ static const struct ath10k_hw_params ath10k_hw_params_list[] = {
 			.fw = QCA988X_HW_2_0_FW_FILE,
 			.otp = QCA988X_HW_2_0_OTP_FILE,
 			.board = QCA988X_HW_2_0_BOARD_DATA_FILE,
+			.board_size = QCA988X_BOARD_DATA_SZ,
+			.board_ext_size = QCA988X_BOARD_EXT_DATA_SZ,
 		},
 	},
 };
@@ -156,8 +158,8 @@ static const struct firmware *ath10k_fetch_fw_file(struct ath10k *ar,
 static int ath10k_push_board_ext_data(struct ath10k *ar, const void *data,
 				      size_t data_len)
 {
-	u32 board_data_size = QCA988X_BOARD_DATA_SZ;
-	u32 board_ext_data_size = QCA988X_BOARD_EXT_DATA_SZ;
+	u32 board_data_size = ar->hw_params.fw.board_size;
+	u32 board_ext_data_size = ar->hw_params.fw.board_ext_size;
 	u32 board_ext_data_addr;
 	int ret;
 
@@ -203,7 +205,7 @@ static int ath10k_push_board_ext_data(struct ath10k *ar, const void *data,
 static int ath10k_download_board_data(struct ath10k *ar, const void *data,
 				      size_t data_len)
 {
-	u32 board_data_size = QCA988X_BOARD_DATA_SZ;
+	u32 board_data_size = ar->hw_params.fw.board_size;
 	u32 address;
 	int ret;
 
diff --git a/drivers/net/wireless/ath/ath10k/core.h b/drivers/net/wireless/ath/ath10k/core.h
index d37ffd6..1cc81e8 100644
--- a/drivers/net/wireless/ath/ath10k/core.h
+++ b/drivers/net/wireless/ath/ath10k/core.h
@@ -482,6 +482,8 @@ struct ath10k {
 			const char *fw;
 			const char *otp;
 			const char *board;
+			size_t board_size;
+			size_t board_ext_size;
 		} fw;
 	} hw_params;
 
-- 
1.8.5.3


_______________________________________________
ath10k mailing list
ath10k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath10k

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

* [PATCH 3/3] ath10k: move uart pin config into hw_params
  2014-11-24 14:17 ` Michal Kazior
@ 2014-11-24 14:17   ` Michal Kazior
  -1 siblings, 0 replies; 32+ messages in thread
From: Michal Kazior @ 2014-11-24 14:17 UTC (permalink / raw)
  To: ath10k; +Cc: linux-wireless, Michal Kazior

This will make it possible to easily support
different hardware with different uart pin
configuration.

Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
---
 drivers/net/wireless/ath/ath10k/core.c | 3 ++-
 drivers/net/wireless/ath/ath10k/core.h | 1 +
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/net/wireless/ath/ath10k/core.c b/drivers/net/wireless/ath/ath10k/core.c
index 204aa04..0bce152 100644
--- a/drivers/net/wireless/ath/ath10k/core.c
+++ b/drivers/net/wireless/ath/ath10k/core.c
@@ -58,6 +58,7 @@ static const struct ath10k_hw_params ath10k_hw_params_list[] = {
 		.patch_load_addr = QCA988X_HW_2_0_PATCH_LOAD_ADDR,
 		.supported_chips = qca988x_supported_chips,
 		.num_supported_chips = ARRAY_SIZE(qca988x_supported_chips),
+		.uart_pin = 7,
 		.fw = {
 			.dir = QCA988X_HW_2_0_FW_DIR,
 			.fw = QCA988X_HW_2_0_FW_FILE,
@@ -708,7 +709,7 @@ static int ath10k_init_uart(struct ath10k *ar)
 	if (!uart_print)
 		return 0;
 
-	ret = ath10k_bmi_write32(ar, hi_dbg_uart_txpin, 7);
+	ret = ath10k_bmi_write32(ar, hi_dbg_uart_txpin, ar->hw_params.uart_pin);
 	if (ret) {
 		ath10k_warn(ar, "could not enable UART prints (%d)\n", ret);
 		return ret;
diff --git a/drivers/net/wireless/ath/ath10k/core.h b/drivers/net/wireless/ath/ath10k/core.h
index 1cc81e8..f8dd904 100644
--- a/drivers/net/wireless/ath/ath10k/core.h
+++ b/drivers/net/wireless/ath/ath10k/core.h
@@ -477,6 +477,7 @@ struct ath10k {
 		u32 patch_load_addr;
 		const u32 *supported_chips;
 		int num_supported_chips;
+		int uart_pin;
 		struct ath10k_hw_params_fw {
 			const char *dir;
 			const char *fw;
-- 
1.8.5.3


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

* [PATCH 3/3] ath10k: move uart pin config into hw_params
@ 2014-11-24 14:17   ` Michal Kazior
  0 siblings, 0 replies; 32+ messages in thread
From: Michal Kazior @ 2014-11-24 14:17 UTC (permalink / raw)
  To: ath10k; +Cc: linux-wireless, Michal Kazior

This will make it possible to easily support
different hardware with different uart pin
configuration.

Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
---
 drivers/net/wireless/ath/ath10k/core.c | 3 ++-
 drivers/net/wireless/ath/ath10k/core.h | 1 +
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/net/wireless/ath/ath10k/core.c b/drivers/net/wireless/ath/ath10k/core.c
index 204aa04..0bce152 100644
--- a/drivers/net/wireless/ath/ath10k/core.c
+++ b/drivers/net/wireless/ath/ath10k/core.c
@@ -58,6 +58,7 @@ static const struct ath10k_hw_params ath10k_hw_params_list[] = {
 		.patch_load_addr = QCA988X_HW_2_0_PATCH_LOAD_ADDR,
 		.supported_chips = qca988x_supported_chips,
 		.num_supported_chips = ARRAY_SIZE(qca988x_supported_chips),
+		.uart_pin = 7,
 		.fw = {
 			.dir = QCA988X_HW_2_0_FW_DIR,
 			.fw = QCA988X_HW_2_0_FW_FILE,
@@ -708,7 +709,7 @@ static int ath10k_init_uart(struct ath10k *ar)
 	if (!uart_print)
 		return 0;
 
-	ret = ath10k_bmi_write32(ar, hi_dbg_uart_txpin, 7);
+	ret = ath10k_bmi_write32(ar, hi_dbg_uart_txpin, ar->hw_params.uart_pin);
 	if (ret) {
 		ath10k_warn(ar, "could not enable UART prints (%d)\n", ret);
 		return ret;
diff --git a/drivers/net/wireless/ath/ath10k/core.h b/drivers/net/wireless/ath/ath10k/core.h
index 1cc81e8..f8dd904 100644
--- a/drivers/net/wireless/ath/ath10k/core.h
+++ b/drivers/net/wireless/ath/ath10k/core.h
@@ -477,6 +477,7 @@ struct ath10k {
 		u32 patch_load_addr;
 		const u32 *supported_chips;
 		int num_supported_chips;
+		int uart_pin;
 		struct ath10k_hw_params_fw {
 			const char *dir;
 			const char *fw;
-- 
1.8.5.3


_______________________________________________
ath10k mailing list
ath10k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath10k

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

* Re: [PATCH 1/3] ath10k: embed supported chip ids in hw_params
  2014-11-24 14:17 ` Michal Kazior
@ 2014-11-26  7:21   ` Kalle Valo
  -1 siblings, 0 replies; 32+ messages in thread
From: Kalle Valo @ 2014-11-26  7:21 UTC (permalink / raw)
  To: Michal Kazior; +Cc: ath10k, linux-wireless

Michal Kazior <michal.kazior@tieto.com> writes:

> This will make it easier to extend and maintain
> list of supported hardware.
>
> As a requirement this moves chip_id checking a
> little later because target_version isn't known
> until BMI can be queried.
>
> Signed-off-by: Michal Kazior <michal.kazior@tieto.com>

The reason why I originally added the chip_id check was that QCA988X hw
1.0 failed badly (ath10k might have even crashed, don't remember
anymore) and I added this chip_id as an ugly workaround to detect hw1.0
early. Most likely with this patch the problem comes back again.

I don't know what's a good solution, need to think more. Any ideas?

-- 
Kalle Valo

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

* Re: [PATCH 1/3] ath10k: embed supported chip ids in hw_params
@ 2014-11-26  7:21   ` Kalle Valo
  0 siblings, 0 replies; 32+ messages in thread
From: Kalle Valo @ 2014-11-26  7:21 UTC (permalink / raw)
  To: Michal Kazior; +Cc: linux-wireless, ath10k

Michal Kazior <michal.kazior@tieto.com> writes:

> This will make it easier to extend and maintain
> list of supported hardware.
>
> As a requirement this moves chip_id checking a
> little later because target_version isn't known
> until BMI can be queried.
>
> Signed-off-by: Michal Kazior <michal.kazior@tieto.com>

The reason why I originally added the chip_id check was that QCA988X hw
1.0 failed badly (ath10k might have even crashed, don't remember
anymore) and I added this chip_id as an ugly workaround to detect hw1.0
early. Most likely with this patch the problem comes back again.

I don't know what's a good solution, need to think more. Any ideas?

-- 
Kalle Valo

_______________________________________________
ath10k mailing list
ath10k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath10k

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

* Re: [PATCH 1/3] ath10k: embed supported chip ids in hw_params
  2014-11-26  7:21   ` Kalle Valo
@ 2014-11-26  7:54     ` Michal Kazior
  -1 siblings, 0 replies; 32+ messages in thread
From: Michal Kazior @ 2014-11-26  7:54 UTC (permalink / raw)
  To: Kalle Valo; +Cc: ath10k, linux-wireless

On 26 November 2014 at 08:21, Kalle Valo <kvalo@qca.qualcomm.com> wrote:
> Michal Kazior <michal.kazior@tieto.com> writes:
>
>> This will make it easier to extend and maintain
>> list of supported hardware.
>>
>> As a requirement this moves chip_id checking a
>> little later because target_version isn't known
>> until BMI can be queried.
>>
>> Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
>
> The reason why I originally added the chip_id check was that QCA988X hw
> 1.0 failed badly (ath10k might have even crashed, don't remember
> anymore) and I added this chip_id as an ugly workaround to detect hw1.0
> early. Most likely with this patch the problem comes back again.

Hmm.. good point. I think it mostly failed during firmware transfer to
target but since BMI also needs CE then it might as well fail mid-way.


> I don't know what's a good solution, need to think more. Any ideas?

Hmm.. I have a couple of ideas:

1. Don't use BMI to read target_version. Instead use a register
(assuming there is one). This implies each transport (we have pci only
now) would need to be able to read it somehow unless we support a
fallback to BMI if it wasn't prepped by the transport.

2. Have a dedicatd pci-specific structure:

 struct ath10k_pci_supported_chip {
   u16 dev_id;
   u32 chip_id;
 };

 struct ath10k_pci_supported_chip ath10k_pci_supported_chips[] = {
   { QCA988X_2_0_DEVICE_ID, QCA988X_HW_2_0_CHIP_ID_REV },
   // ...
 };

Probably the simplest and has least impact.

3. Don't use target_version to decide hw_params. Use pci device id
instead. This is a bit of a problem because ath10k_hw_params_list is
in core and is supposed to be transport-agnostic (but should it really
be? I can imagine theoretical usb transport could have devices
reporting identical target_version as a pci one but would need
different firmware files to be used). This probably needs more
thinking through.


Michał

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

* Re: [PATCH 1/3] ath10k: embed supported chip ids in hw_params
@ 2014-11-26  7:54     ` Michal Kazior
  0 siblings, 0 replies; 32+ messages in thread
From: Michal Kazior @ 2014-11-26  7:54 UTC (permalink / raw)
  To: Kalle Valo; +Cc: linux-wireless, ath10k

On 26 November 2014 at 08:21, Kalle Valo <kvalo@qca.qualcomm.com> wrote:
> Michal Kazior <michal.kazior@tieto.com> writes:
>
>> This will make it easier to extend and maintain
>> list of supported hardware.
>>
>> As a requirement this moves chip_id checking a
>> little later because target_version isn't known
>> until BMI can be queried.
>>
>> Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
>
> The reason why I originally added the chip_id check was that QCA988X hw
> 1.0 failed badly (ath10k might have even crashed, don't remember
> anymore) and I added this chip_id as an ugly workaround to detect hw1.0
> early. Most likely with this patch the problem comes back again.

Hmm.. good point. I think it mostly failed during firmware transfer to
target but since BMI also needs CE then it might as well fail mid-way.


> I don't know what's a good solution, need to think more. Any ideas?

Hmm.. I have a couple of ideas:

1. Don't use BMI to read target_version. Instead use a register
(assuming there is one). This implies each transport (we have pci only
now) would need to be able to read it somehow unless we support a
fallback to BMI if it wasn't prepped by the transport.

2. Have a dedicatd pci-specific structure:

 struct ath10k_pci_supported_chip {
   u16 dev_id;
   u32 chip_id;
 };

 struct ath10k_pci_supported_chip ath10k_pci_supported_chips[] = {
   { QCA988X_2_0_DEVICE_ID, QCA988X_HW_2_0_CHIP_ID_REV },
   // ...
 };

Probably the simplest and has least impact.

3. Don't use target_version to decide hw_params. Use pci device id
instead. This is a bit of a problem because ath10k_hw_params_list is
in core and is supposed to be transport-agnostic (but should it really
be? I can imagine theoretical usb transport could have devices
reporting identical target_version as a pci one but would need
different firmware files to be used). This probably needs more
thinking through.


Michał

_______________________________________________
ath10k mailing list
ath10k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath10k

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

* Re: [PATCH 1/3] ath10k: embed supported chip ids in hw_params
  2014-11-26  7:54     ` Michal Kazior
@ 2014-11-27  7:30       ` Kalle Valo
  -1 siblings, 0 replies; 32+ messages in thread
From: Kalle Valo @ 2014-11-27  7:30 UTC (permalink / raw)
  To: Michal Kazior; +Cc: ath10k, linux-wireless

Michal Kazior <michal.kazior@tieto.com> writes:

> 2. Have a dedicatd pci-specific structure:
>
>  struct ath10k_pci_supported_chip {
>    u16 dev_id;
>    u32 chip_id;
>  };
>
>  struct ath10k_pci_supported_chip ath10k_pci_supported_chips[] = {
>    { QCA988X_2_0_DEVICE_ID, QCA988X_HW_2_0_CHIP_ID_REV },
>    // ...
>  };
>
> Probably the simplest and has least impact.

Another idea which is a variation of this:

In ath10k_core_register() we iterate through ath10k_hw_params_list and
make sure that the chip id is supported and if not, bail out. If the
chip id is found from the array continue the registration process like
in this patch. Basically this would be a whitelist check.

-- 
Kalle Valo

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

* Re: [PATCH 1/3] ath10k: embed supported chip ids in hw_params
@ 2014-11-27  7:30       ` Kalle Valo
  0 siblings, 0 replies; 32+ messages in thread
From: Kalle Valo @ 2014-11-27  7:30 UTC (permalink / raw)
  To: Michal Kazior; +Cc: linux-wireless, ath10k

Michal Kazior <michal.kazior@tieto.com> writes:

> 2. Have a dedicatd pci-specific structure:
>
>  struct ath10k_pci_supported_chip {
>    u16 dev_id;
>    u32 chip_id;
>  };
>
>  struct ath10k_pci_supported_chip ath10k_pci_supported_chips[] = {
>    { QCA988X_2_0_DEVICE_ID, QCA988X_HW_2_0_CHIP_ID_REV },
>    // ...
>  };
>
> Probably the simplest and has least impact.

Another idea which is a variation of this:

In ath10k_core_register() we iterate through ath10k_hw_params_list and
make sure that the chip id is supported and if not, bail out. If the
chip id is found from the array continue the registration process like
in this patch. Basically this would be a whitelist check.

-- 
Kalle Valo

_______________________________________________
ath10k mailing list
ath10k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath10k

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

* Re: [PATCH 1/3] ath10k: embed supported chip ids in hw_params
  2014-11-27  7:30       ` Kalle Valo
@ 2014-11-27  7:45         ` Michal Kazior
  -1 siblings, 0 replies; 32+ messages in thread
From: Michal Kazior @ 2014-11-27  7:45 UTC (permalink / raw)
  To: Kalle Valo; +Cc: ath10k, linux-wireless

On 27 November 2014 at 08:30, Kalle Valo <kvalo@qca.qualcomm.com> wrote:
> Michal Kazior <michal.kazior@tieto.com> writes:
>
>> 2. Have a dedicatd pci-specific structure:
>>
>>  struct ath10k_pci_supported_chip {
>>    u16 dev_id;
>>    u32 chip_id;
>>  };
>>
>>  struct ath10k_pci_supported_chip ath10k_pci_supported_chips[] = {
>>    { QCA988X_2_0_DEVICE_ID, QCA988X_HW_2_0_CHIP_ID_REV },
>>    // ...
>>  };
>>
>> Probably the simplest and has least impact.
>
> Another idea which is a variation of this:
>
> In ath10k_core_register() we iterate through ath10k_hw_params_list and
> make sure that the chip id is supported and if not, bail out. If the
> chip id is found from the array continue the registration process like
> in this patch. Basically this would be a whitelist check.

This won't work because chip ids can overlap between different
hardware designs and you'd get false positives.


Michał

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

* Re: [PATCH 1/3] ath10k: embed supported chip ids in hw_params
@ 2014-11-27  7:45         ` Michal Kazior
  0 siblings, 0 replies; 32+ messages in thread
From: Michal Kazior @ 2014-11-27  7:45 UTC (permalink / raw)
  To: Kalle Valo; +Cc: linux-wireless, ath10k

On 27 November 2014 at 08:30, Kalle Valo <kvalo@qca.qualcomm.com> wrote:
> Michal Kazior <michal.kazior@tieto.com> writes:
>
>> 2. Have a dedicatd pci-specific structure:
>>
>>  struct ath10k_pci_supported_chip {
>>    u16 dev_id;
>>    u32 chip_id;
>>  };
>>
>>  struct ath10k_pci_supported_chip ath10k_pci_supported_chips[] = {
>>    { QCA988X_2_0_DEVICE_ID, QCA988X_HW_2_0_CHIP_ID_REV },
>>    // ...
>>  };
>>
>> Probably the simplest and has least impact.
>
> Another idea which is a variation of this:
>
> In ath10k_core_register() we iterate through ath10k_hw_params_list and
> make sure that the chip id is supported and if not, bail out. If the
> chip id is found from the array continue the registration process like
> in this patch. Basically this would be a whitelist check.

This won't work because chip ids can overlap between different
hardware designs and you'd get false positives.


Michał

_______________________________________________
ath10k mailing list
ath10k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath10k

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

* Re: [PATCH 1/3] ath10k: embed supported chip ids in hw_params
  2014-11-27  7:45         ` Michal Kazior
@ 2014-11-28  7:02           ` Kalle Valo
  -1 siblings, 0 replies; 32+ messages in thread
From: Kalle Valo @ 2014-11-28  7:02 UTC (permalink / raw)
  To: Michal Kazior; +Cc: linux-wireless, ath10k

Michal Kazior <michal.kazior@tieto.com> writes:

> On 27 November 2014 at 08:30, Kalle Valo <kvalo@qca.qualcomm.com> wrote:
>> Michal Kazior <michal.kazior@tieto.com> writes:
>>
>>> 2. Have a dedicatd pci-specific structure:
>>>
>>>  struct ath10k_pci_supported_chip {
>>>    u16 dev_id;
>>>    u32 chip_id;
>>>  };
>>>
>>>  struct ath10k_pci_supported_chip ath10k_pci_supported_chips[] = {
>>>    { QCA988X_2_0_DEVICE_ID, QCA988X_HW_2_0_CHIP_ID_REV },
>>>    // ...
>>>  };
>>>
>>> Probably the simplest and has least impact.
>>
>> Another idea which is a variation of this:
>>
>> In ath10k_core_register() we iterate through ath10k_hw_params_list and
>> make sure that the chip id is supported and if not, bail out. If the
>> chip id is found from the array continue the registration process like
>> in this patch. Basically this would be a whitelist check.
>
> This won't work because chip ids can overlap between different
> hardware designs and you'd get false positives.

Ah, let's forget that then.

-- 
Kalle Valo

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

* Re: [PATCH 1/3] ath10k: embed supported chip ids in hw_params
@ 2014-11-28  7:02           ` Kalle Valo
  0 siblings, 0 replies; 32+ messages in thread
From: Kalle Valo @ 2014-11-28  7:02 UTC (permalink / raw)
  To: Michal Kazior; +Cc: linux-wireless, ath10k

Michal Kazior <michal.kazior@tieto.com> writes:

> On 27 November 2014 at 08:30, Kalle Valo <kvalo@qca.qualcomm.com> wrote:
>> Michal Kazior <michal.kazior@tieto.com> writes:
>>
>>> 2. Have a dedicatd pci-specific structure:
>>>
>>>  struct ath10k_pci_supported_chip {
>>>    u16 dev_id;
>>>    u32 chip_id;
>>>  };
>>>
>>>  struct ath10k_pci_supported_chip ath10k_pci_supported_chips[] = {
>>>    { QCA988X_2_0_DEVICE_ID, QCA988X_HW_2_0_CHIP_ID_REV },
>>>    // ...
>>>  };
>>>
>>> Probably the simplest and has least impact.
>>
>> Another idea which is a variation of this:
>>
>> In ath10k_core_register() we iterate through ath10k_hw_params_list and
>> make sure that the chip id is supported and if not, bail out. If the
>> chip id is found from the array continue the registration process like
>> in this patch. Basically this would be a whitelist check.
>
> This won't work because chip ids can overlap between different
> hardware designs and you'd get false positives.

Ah, let's forget that then.

-- 
Kalle Valo

_______________________________________________
ath10k mailing list
ath10k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath10k

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

* Re: [PATCH 1/3] ath10k: embed supported chip ids in hw_params
  2014-11-26  7:54     ` Michal Kazior
@ 2014-11-28  7:10       ` Kalle Valo
  -1 siblings, 0 replies; 32+ messages in thread
From: Kalle Valo @ 2014-11-28  7:10 UTC (permalink / raw)
  To: Michal Kazior; +Cc: linux-wireless, ath10k

Michal Kazior <michal.kazior@tieto.com> writes:

> Hmm.. I have a couple of ideas:

[...]

> 2. Have a dedicatd pci-specific structure:
>
>  struct ath10k_pci_supported_chip {
>    u16 dev_id;
>    u32 chip_id;
>  };
>
>  struct ath10k_pci_supported_chip ath10k_pci_supported_chips[] = {
>    { QCA988X_2_0_DEVICE_ID, QCA988X_HW_2_0_CHIP_ID_REV },
>    // ...
>  };
>
> Probably the simplest and has least impact.

Yeah, this seems to be the best. Can you send v2?

-- 
Kalle Valo

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

* Re: [PATCH 1/3] ath10k: embed supported chip ids in hw_params
@ 2014-11-28  7:10       ` Kalle Valo
  0 siblings, 0 replies; 32+ messages in thread
From: Kalle Valo @ 2014-11-28  7:10 UTC (permalink / raw)
  To: Michal Kazior; +Cc: linux-wireless, ath10k

Michal Kazior <michal.kazior@tieto.com> writes:

> Hmm.. I have a couple of ideas:

[...]

> 2. Have a dedicatd pci-specific structure:
>
>  struct ath10k_pci_supported_chip {
>    u16 dev_id;
>    u32 chip_id;
>  };
>
>  struct ath10k_pci_supported_chip ath10k_pci_supported_chips[] = {
>    { QCA988X_2_0_DEVICE_ID, QCA988X_HW_2_0_CHIP_ID_REV },
>    // ...
>  };
>
> Probably the simplest and has least impact.

Yeah, this seems to be the best. Can you send v2?

-- 
Kalle Valo

_______________________________________________
ath10k mailing list
ath10k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath10k

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

* Re: [PATCH 1/3] ath10k: embed supported chip ids in hw_params
  2014-11-28  7:10       ` Kalle Valo
@ 2014-11-28 11:25         ` Michal Kazior
  -1 siblings, 0 replies; 32+ messages in thread
From: Michal Kazior @ 2014-11-28 11:25 UTC (permalink / raw)
  To: Kalle Valo; +Cc: linux-wireless, ath10k

On 28 November 2014 at 08:10, Kalle Valo <kvalo@qca.qualcomm.com> wrote:
> Michal Kazior <michal.kazior@tieto.com> writes:
>
>> Hmm.. I have a couple of ideas:
>
> [...]
>
>> 2. Have a dedicatd pci-specific structure:
>>
>>  struct ath10k_pci_supported_chip {
>>    u16 dev_id;
>>    u32 chip_id;
>>  };
>>
>>  struct ath10k_pci_supported_chip ath10k_pci_supported_chips[] = {
>>    { QCA988X_2_0_DEVICE_ID, QCA988X_HW_2_0_CHIP_ID_REV },
>>    // ...
>>  };
>>
>> Probably the simplest and has least impact.
>
> Yeah, this seems to be the best. Can you send v2?

Ok. I'll go with this approach and post a v2 when I'm done.


Michał

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

* Re: [PATCH 1/3] ath10k: embed supported chip ids in hw_params
@ 2014-11-28 11:25         ` Michal Kazior
  0 siblings, 0 replies; 32+ messages in thread
From: Michal Kazior @ 2014-11-28 11:25 UTC (permalink / raw)
  To: Kalle Valo; +Cc: linux-wireless, ath10k

On 28 November 2014 at 08:10, Kalle Valo <kvalo@qca.qualcomm.com> wrote:
> Michal Kazior <michal.kazior@tieto.com> writes:
>
>> Hmm.. I have a couple of ideas:
>
> [...]
>
>> 2. Have a dedicatd pci-specific structure:
>>
>>  struct ath10k_pci_supported_chip {
>>    u16 dev_id;
>>    u32 chip_id;
>>  };
>>
>>  struct ath10k_pci_supported_chip ath10k_pci_supported_chips[] = {
>>    { QCA988X_2_0_DEVICE_ID, QCA988X_HW_2_0_CHIP_ID_REV },
>>    // ...
>>  };
>>
>> Probably the simplest and has least impact.
>
> Yeah, this seems to be the best. Can you send v2?

Ok. I'll go with this approach and post a v2 when I'm done.


Michał

_______________________________________________
ath10k mailing list
ath10k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath10k

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

* [PATCH v2 1/3] ath10k: create a chip revision whielist
  2014-11-24 14:17 ` Michal Kazior
@ 2014-12-01  7:17   ` Michal Kazior
  -1 siblings, 0 replies; 32+ messages in thread
From: Michal Kazior @ 2014-12-01  7:17 UTC (permalink / raw)
  To: ath10k; +Cc: linux-wireless, Michal Kazior

This will make it easier to extend and maintain
list of supported hardware.

Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
---

Notes:
    v2:
     * create a separate chip_id whitelist array
       instead of using hw_params as discussed [Kalle]

 drivers/net/wireless/ath/ath10k/core.c | 37 ----------------------------------
 drivers/net/wireless/ath/ath10k/core.h |  1 -
 drivers/net/wireless/ath/ath10k/pci.c  | 31 ++++++++++++++++++++++++++++
 drivers/net/wireless/ath/ath10k/pci.h  |  5 +++++
 4 files changed, 36 insertions(+), 38 deletions(-)

diff --git a/drivers/net/wireless/ath/ath10k/core.c b/drivers/net/wireless/ath/ath10k/core.c
index 7762061..ece8ab4 100644
--- a/drivers/net/wireless/ath/ath10k/core.c
+++ b/drivers/net/wireless/ath/ath10k/core.c
@@ -1068,34 +1068,6 @@ static int ath10k_core_probe_fw(struct ath10k *ar)
 	return 0;
 }
 
-static int ath10k_core_check_chip_id(struct ath10k *ar)
-{
-	u32 hw_revision = MS(ar->chip_id, SOC_CHIP_ID_REV);
-
-	ath10k_dbg(ar, ATH10K_DBG_BOOT, "boot chip_id 0x%08x hw_revision 0x%x\n",
-		   ar->chip_id, hw_revision);
-
-	/* Check that we are not using hw1.0 (some of them have same pci id
-	 * as hw2.0) before doing anything else as ath10k crashes horribly
-	 * due to missing hw1.0 workarounds. */
-	switch (hw_revision) {
-	case QCA988X_HW_1_0_CHIP_ID_REV:
-		ath10k_err(ar, "ERROR: qca988x hw1.0 is not supported\n");
-		return -EOPNOTSUPP;
-
-	case QCA988X_HW_2_0_CHIP_ID_REV:
-		/* known hardware revision, continue normally */
-		return 0;
-
-	default:
-		ath10k_warn(ar, "Warning: hardware revision unknown (0x%x), expect problems\n",
-			    ar->chip_id);
-		return 0;
-	}
-
-	return 0;
-}
-
 static void ath10k_core_register_work(struct work_struct *work)
 {
 	struct ath10k *ar = container_of(work, struct ath10k, register_work);
@@ -1143,16 +1115,7 @@ err:
 
 int ath10k_core_register(struct ath10k *ar, u32 chip_id)
 {
-	int status;
-
 	ar->chip_id = chip_id;
-
-	status = ath10k_core_check_chip_id(ar);
-	if (status) {
-		ath10k_err(ar, "Unsupported chip id 0x%08x\n", ar->chip_id);
-		return status;
-	}
-
 	queue_work(ar->workqueue, &ar->register_work);
 
 	return 0;
diff --git a/drivers/net/wireless/ath/ath10k/core.h b/drivers/net/wireless/ath/ath10k/core.h
index 4a29498..88e6c74 100644
--- a/drivers/net/wireless/ath/ath10k/core.h
+++ b/drivers/net/wireless/ath/ath10k/core.h
@@ -479,7 +479,6 @@ struct ath10k {
 		u32 id;
 		const char *name;
 		u32 patch_load_addr;
-
 		struct ath10k_hw_params_fw {
 			const char *dir;
 			const char *fw;
diff --git a/drivers/net/wireless/ath/ath10k/pci.c b/drivers/net/wireless/ath/ath10k/pci.c
index 0816098..e55292f 100644
--- a/drivers/net/wireless/ath/ath10k/pci.c
+++ b/drivers/net/wireless/ath/ath10k/pci.c
@@ -64,6 +64,14 @@ static const struct pci_device_id ath10k_pci_id_table[] = {
 	{0}
 };
 
+static const struct ath10k_pci_supp_chip ath10k_pci_supp_chips[] = {
+	/* QCA988X pre 2.0 chips are not supported because they need some nasty
+	 * hacks. ath10k doesn't have them and these devices crash horribly
+	 * because of that.
+	 */
+	{ QCA988X_2_0_DEVICE_ID, QCA988X_HW_2_0_CHIP_ID_REV },
+};
+
 static void ath10k_pci_buffer_cleanup(struct ath10k *ar);
 static int ath10k_pci_cold_reset(struct ath10k *ar);
 static int ath10k_pci_warm_reset(struct ath10k *ar);
@@ -2467,6 +2475,23 @@ static void ath10k_pci_release(struct ath10k *ar)
 	pci_disable_device(pdev);
 }
 
+static bool ath10k_pci_chip_is_supported(u32 dev_id, u32 chip_id)
+{
+	const struct ath10k_pci_supp_chip *supp_chip;
+	int i;
+	u32 rev_id = MS(chip_id, SOC_CHIP_ID_REV);
+
+	for (i = 0; i < ARRAY_SIZE(ath10k_pci_supp_chips); i++) {
+		supp_chip = &ath10k_pci_supp_chips[i];
+
+		if (supp_chip->dev_id == dev_id &&
+		    supp_chip->rev_id == rev_id)
+			return true;
+	}
+
+	return false;
+}
+
 static int ath10k_pci_probe(struct pci_dev *pdev,
 			    const struct pci_device_id *pci_dev)
 {
@@ -2512,6 +2537,12 @@ static int ath10k_pci_probe(struct pci_dev *pdev,
 		goto err_sleep;
 	}
 
+	if (!ath10k_pci_chip_is_supported(pdev->device, chip_id)) {
+		ath10k_err(ar, "device %04x with chip_id %08x isn't supported\n",
+			   pdev->device, chip_id);
+		goto err_sleep;
+	}
+
 	ret = ath10k_pci_alloc_pipes(ar);
 	if (ret) {
 		ath10k_err(ar, "failed to allocate copy engine pipes: %d\n",
diff --git a/drivers/net/wireless/ath/ath10k/pci.h b/drivers/net/wireless/ath/ath10k/pci.h
index cf36511..ce4a1ef 100644
--- a/drivers/net/wireless/ath/ath10k/pci.h
+++ b/drivers/net/wireless/ath/ath10k/pci.h
@@ -152,6 +152,11 @@ struct ath10k_pci_pipe {
 	struct tasklet_struct intr;
 };
 
+struct ath10k_pci_supp_chip {
+	u32 dev_id;
+	u32 rev_id;
+};
+
 struct ath10k_pci {
 	struct pci_dev *pdev;
 	struct device *dev;
-- 
1.8.5.3


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

* [PATCH v2 1/3] ath10k: create a chip revision whielist
@ 2014-12-01  7:17   ` Michal Kazior
  0 siblings, 0 replies; 32+ messages in thread
From: Michal Kazior @ 2014-12-01  7:17 UTC (permalink / raw)
  To: ath10k; +Cc: linux-wireless, Michal Kazior

This will make it easier to extend and maintain
list of supported hardware.

Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
---

Notes:
    v2:
     * create a separate chip_id whitelist array
       instead of using hw_params as discussed [Kalle]

 drivers/net/wireless/ath/ath10k/core.c | 37 ----------------------------------
 drivers/net/wireless/ath/ath10k/core.h |  1 -
 drivers/net/wireless/ath/ath10k/pci.c  | 31 ++++++++++++++++++++++++++++
 drivers/net/wireless/ath/ath10k/pci.h  |  5 +++++
 4 files changed, 36 insertions(+), 38 deletions(-)

diff --git a/drivers/net/wireless/ath/ath10k/core.c b/drivers/net/wireless/ath/ath10k/core.c
index 7762061..ece8ab4 100644
--- a/drivers/net/wireless/ath/ath10k/core.c
+++ b/drivers/net/wireless/ath/ath10k/core.c
@@ -1068,34 +1068,6 @@ static int ath10k_core_probe_fw(struct ath10k *ar)
 	return 0;
 }
 
-static int ath10k_core_check_chip_id(struct ath10k *ar)
-{
-	u32 hw_revision = MS(ar->chip_id, SOC_CHIP_ID_REV);
-
-	ath10k_dbg(ar, ATH10K_DBG_BOOT, "boot chip_id 0x%08x hw_revision 0x%x\n",
-		   ar->chip_id, hw_revision);
-
-	/* Check that we are not using hw1.0 (some of them have same pci id
-	 * as hw2.0) before doing anything else as ath10k crashes horribly
-	 * due to missing hw1.0 workarounds. */
-	switch (hw_revision) {
-	case QCA988X_HW_1_0_CHIP_ID_REV:
-		ath10k_err(ar, "ERROR: qca988x hw1.0 is not supported\n");
-		return -EOPNOTSUPP;
-
-	case QCA988X_HW_2_0_CHIP_ID_REV:
-		/* known hardware revision, continue normally */
-		return 0;
-
-	default:
-		ath10k_warn(ar, "Warning: hardware revision unknown (0x%x), expect problems\n",
-			    ar->chip_id);
-		return 0;
-	}
-
-	return 0;
-}
-
 static void ath10k_core_register_work(struct work_struct *work)
 {
 	struct ath10k *ar = container_of(work, struct ath10k, register_work);
@@ -1143,16 +1115,7 @@ err:
 
 int ath10k_core_register(struct ath10k *ar, u32 chip_id)
 {
-	int status;
-
 	ar->chip_id = chip_id;
-
-	status = ath10k_core_check_chip_id(ar);
-	if (status) {
-		ath10k_err(ar, "Unsupported chip id 0x%08x\n", ar->chip_id);
-		return status;
-	}
-
 	queue_work(ar->workqueue, &ar->register_work);
 
 	return 0;
diff --git a/drivers/net/wireless/ath/ath10k/core.h b/drivers/net/wireless/ath/ath10k/core.h
index 4a29498..88e6c74 100644
--- a/drivers/net/wireless/ath/ath10k/core.h
+++ b/drivers/net/wireless/ath/ath10k/core.h
@@ -479,7 +479,6 @@ struct ath10k {
 		u32 id;
 		const char *name;
 		u32 patch_load_addr;
-
 		struct ath10k_hw_params_fw {
 			const char *dir;
 			const char *fw;
diff --git a/drivers/net/wireless/ath/ath10k/pci.c b/drivers/net/wireless/ath/ath10k/pci.c
index 0816098..e55292f 100644
--- a/drivers/net/wireless/ath/ath10k/pci.c
+++ b/drivers/net/wireless/ath/ath10k/pci.c
@@ -64,6 +64,14 @@ static const struct pci_device_id ath10k_pci_id_table[] = {
 	{0}
 };
 
+static const struct ath10k_pci_supp_chip ath10k_pci_supp_chips[] = {
+	/* QCA988X pre 2.0 chips are not supported because they need some nasty
+	 * hacks. ath10k doesn't have them and these devices crash horribly
+	 * because of that.
+	 */
+	{ QCA988X_2_0_DEVICE_ID, QCA988X_HW_2_0_CHIP_ID_REV },
+};
+
 static void ath10k_pci_buffer_cleanup(struct ath10k *ar);
 static int ath10k_pci_cold_reset(struct ath10k *ar);
 static int ath10k_pci_warm_reset(struct ath10k *ar);
@@ -2467,6 +2475,23 @@ static void ath10k_pci_release(struct ath10k *ar)
 	pci_disable_device(pdev);
 }
 
+static bool ath10k_pci_chip_is_supported(u32 dev_id, u32 chip_id)
+{
+	const struct ath10k_pci_supp_chip *supp_chip;
+	int i;
+	u32 rev_id = MS(chip_id, SOC_CHIP_ID_REV);
+
+	for (i = 0; i < ARRAY_SIZE(ath10k_pci_supp_chips); i++) {
+		supp_chip = &ath10k_pci_supp_chips[i];
+
+		if (supp_chip->dev_id == dev_id &&
+		    supp_chip->rev_id == rev_id)
+			return true;
+	}
+
+	return false;
+}
+
 static int ath10k_pci_probe(struct pci_dev *pdev,
 			    const struct pci_device_id *pci_dev)
 {
@@ -2512,6 +2537,12 @@ static int ath10k_pci_probe(struct pci_dev *pdev,
 		goto err_sleep;
 	}
 
+	if (!ath10k_pci_chip_is_supported(pdev->device, chip_id)) {
+		ath10k_err(ar, "device %04x with chip_id %08x isn't supported\n",
+			   pdev->device, chip_id);
+		goto err_sleep;
+	}
+
 	ret = ath10k_pci_alloc_pipes(ar);
 	if (ret) {
 		ath10k_err(ar, "failed to allocate copy engine pipes: %d\n",
diff --git a/drivers/net/wireless/ath/ath10k/pci.h b/drivers/net/wireless/ath/ath10k/pci.h
index cf36511..ce4a1ef 100644
--- a/drivers/net/wireless/ath/ath10k/pci.h
+++ b/drivers/net/wireless/ath/ath10k/pci.h
@@ -152,6 +152,11 @@ struct ath10k_pci_pipe {
 	struct tasklet_struct intr;
 };
 
+struct ath10k_pci_supp_chip {
+	u32 dev_id;
+	u32 rev_id;
+};
+
 struct ath10k_pci {
 	struct pci_dev *pdev;
 	struct device *dev;
-- 
1.8.5.3


_______________________________________________
ath10k mailing list
ath10k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath10k

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

* [PATCH v2 2/3] ath10k: put board size into hw_params
  2014-12-01  7:17   ` Michal Kazior
@ 2014-12-01  7:17     ` Michal Kazior
  -1 siblings, 0 replies; 32+ messages in thread
From: Michal Kazior @ 2014-12-01  7:17 UTC (permalink / raw)
  To: ath10k; +Cc: linux-wireless, Michal Kazior

This makes it easier to extend the list of
supported hardware.

Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
---
 drivers/net/wireless/ath/ath10k/core.c | 8 +++++---
 drivers/net/wireless/ath/ath10k/core.h | 2 ++
 2 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/drivers/net/wireless/ath/ath10k/core.c b/drivers/net/wireless/ath/ath10k/core.c
index ece8ab4..8bb1657 100644
--- a/drivers/net/wireless/ath/ath10k/core.c
+++ b/drivers/net/wireless/ath/ath10k/core.c
@@ -53,6 +53,8 @@ static const struct ath10k_hw_params ath10k_hw_params_list[] = {
 			.fw = QCA988X_HW_2_0_FW_FILE,
 			.otp = QCA988X_HW_2_0_OTP_FILE,
 			.board = QCA988X_HW_2_0_BOARD_DATA_FILE,
+			.board_size = QCA988X_BOARD_DATA_SZ,
+			.board_ext_size = QCA988X_BOARD_EXT_DATA_SZ,
 		},
 	},
 };
@@ -146,8 +148,8 @@ static const struct firmware *ath10k_fetch_fw_file(struct ath10k *ar,
 static int ath10k_push_board_ext_data(struct ath10k *ar, const void *data,
 				      size_t data_len)
 {
-	u32 board_data_size = QCA988X_BOARD_DATA_SZ;
-	u32 board_ext_data_size = QCA988X_BOARD_EXT_DATA_SZ;
+	u32 board_data_size = ar->hw_params.fw.board_size;
+	u32 board_ext_data_size = ar->hw_params.fw.board_ext_size;
 	u32 board_ext_data_addr;
 	int ret;
 
@@ -193,7 +195,7 @@ static int ath10k_push_board_ext_data(struct ath10k *ar, const void *data,
 static int ath10k_download_board_data(struct ath10k *ar, const void *data,
 				      size_t data_len)
 {
-	u32 board_data_size = QCA988X_BOARD_DATA_SZ;
+	u32 board_data_size = ar->hw_params.fw.board_size;
 	u32 address;
 	int ret;
 
diff --git a/drivers/net/wireless/ath/ath10k/core.h b/drivers/net/wireless/ath/ath10k/core.h
index 88e6c74..f1a3edd 100644
--- a/drivers/net/wireless/ath/ath10k/core.h
+++ b/drivers/net/wireless/ath/ath10k/core.h
@@ -484,6 +484,8 @@ struct ath10k {
 			const char *fw;
 			const char *otp;
 			const char *board;
+			size_t board_size;
+			size_t board_ext_size;
 		} fw;
 	} hw_params;
 
-- 
1.8.5.3


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

* [PATCH v2 2/3] ath10k: put board size into hw_params
@ 2014-12-01  7:17     ` Michal Kazior
  0 siblings, 0 replies; 32+ messages in thread
From: Michal Kazior @ 2014-12-01  7:17 UTC (permalink / raw)
  To: ath10k; +Cc: linux-wireless, Michal Kazior

This makes it easier to extend the list of
supported hardware.

Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
---
 drivers/net/wireless/ath/ath10k/core.c | 8 +++++---
 drivers/net/wireless/ath/ath10k/core.h | 2 ++
 2 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/drivers/net/wireless/ath/ath10k/core.c b/drivers/net/wireless/ath/ath10k/core.c
index ece8ab4..8bb1657 100644
--- a/drivers/net/wireless/ath/ath10k/core.c
+++ b/drivers/net/wireless/ath/ath10k/core.c
@@ -53,6 +53,8 @@ static const struct ath10k_hw_params ath10k_hw_params_list[] = {
 			.fw = QCA988X_HW_2_0_FW_FILE,
 			.otp = QCA988X_HW_2_0_OTP_FILE,
 			.board = QCA988X_HW_2_0_BOARD_DATA_FILE,
+			.board_size = QCA988X_BOARD_DATA_SZ,
+			.board_ext_size = QCA988X_BOARD_EXT_DATA_SZ,
 		},
 	},
 };
@@ -146,8 +148,8 @@ static const struct firmware *ath10k_fetch_fw_file(struct ath10k *ar,
 static int ath10k_push_board_ext_data(struct ath10k *ar, const void *data,
 				      size_t data_len)
 {
-	u32 board_data_size = QCA988X_BOARD_DATA_SZ;
-	u32 board_ext_data_size = QCA988X_BOARD_EXT_DATA_SZ;
+	u32 board_data_size = ar->hw_params.fw.board_size;
+	u32 board_ext_data_size = ar->hw_params.fw.board_ext_size;
 	u32 board_ext_data_addr;
 	int ret;
 
@@ -193,7 +195,7 @@ static int ath10k_push_board_ext_data(struct ath10k *ar, const void *data,
 static int ath10k_download_board_data(struct ath10k *ar, const void *data,
 				      size_t data_len)
 {
-	u32 board_data_size = QCA988X_BOARD_DATA_SZ;
+	u32 board_data_size = ar->hw_params.fw.board_size;
 	u32 address;
 	int ret;
 
diff --git a/drivers/net/wireless/ath/ath10k/core.h b/drivers/net/wireless/ath/ath10k/core.h
index 88e6c74..f1a3edd 100644
--- a/drivers/net/wireless/ath/ath10k/core.h
+++ b/drivers/net/wireless/ath/ath10k/core.h
@@ -484,6 +484,8 @@ struct ath10k {
 			const char *fw;
 			const char *otp;
 			const char *board;
+			size_t board_size;
+			size_t board_ext_size;
 		} fw;
 	} hw_params;
 
-- 
1.8.5.3


_______________________________________________
ath10k mailing list
ath10k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath10k

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

* [PATCH v2 3/3] ath10k: move uart pin config into hw_params
  2014-12-01  7:17   ` Michal Kazior
@ 2014-12-01  7:17     ` Michal Kazior
  -1 siblings, 0 replies; 32+ messages in thread
From: Michal Kazior @ 2014-12-01  7:17 UTC (permalink / raw)
  To: ath10k; +Cc: linux-wireless, Michal Kazior

This will make it possible to easily support
different hardware with different uart pin
configuration.

Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
---
 drivers/net/wireless/ath/ath10k/core.c | 3 ++-
 drivers/net/wireless/ath/ath10k/core.h | 1 +
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/net/wireless/ath/ath10k/core.c b/drivers/net/wireless/ath/ath10k/core.c
index 8bb1657..7c913cc 100644
--- a/drivers/net/wireless/ath/ath10k/core.c
+++ b/drivers/net/wireless/ath/ath10k/core.c
@@ -48,6 +48,7 @@ static const struct ath10k_hw_params ath10k_hw_params_list[] = {
 		.id = QCA988X_HW_2_0_VERSION,
 		.name = "qca988x hw2.0",
 		.patch_load_addr = QCA988X_HW_2_0_PATCH_LOAD_ADDR,
+		.uart_pin = 7,
 		.fw = {
 			.dir = QCA988X_HW_2_0_FW_DIR,
 			.fw = QCA988X_HW_2_0_FW_FILE,
@@ -698,7 +699,7 @@ static int ath10k_init_uart(struct ath10k *ar)
 	if (!uart_print)
 		return 0;
 
-	ret = ath10k_bmi_write32(ar, hi_dbg_uart_txpin, 7);
+	ret = ath10k_bmi_write32(ar, hi_dbg_uart_txpin, ar->hw_params.uart_pin);
 	if (ret) {
 		ath10k_warn(ar, "could not enable UART prints (%d)\n", ret);
 		return ret;
diff --git a/drivers/net/wireless/ath/ath10k/core.h b/drivers/net/wireless/ath/ath10k/core.h
index f1a3edd..0188c84 100644
--- a/drivers/net/wireless/ath/ath10k/core.h
+++ b/drivers/net/wireless/ath/ath10k/core.h
@@ -479,6 +479,7 @@ struct ath10k {
 		u32 id;
 		const char *name;
 		u32 patch_load_addr;
+		int uart_pin;
 		struct ath10k_hw_params_fw {
 			const char *dir;
 			const char *fw;
-- 
1.8.5.3


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

* [PATCH v2 3/3] ath10k: move uart pin config into hw_params
@ 2014-12-01  7:17     ` Michal Kazior
  0 siblings, 0 replies; 32+ messages in thread
From: Michal Kazior @ 2014-12-01  7:17 UTC (permalink / raw)
  To: ath10k; +Cc: linux-wireless, Michal Kazior

This will make it possible to easily support
different hardware with different uart pin
configuration.

Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
---
 drivers/net/wireless/ath/ath10k/core.c | 3 ++-
 drivers/net/wireless/ath/ath10k/core.h | 1 +
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/net/wireless/ath/ath10k/core.c b/drivers/net/wireless/ath/ath10k/core.c
index 8bb1657..7c913cc 100644
--- a/drivers/net/wireless/ath/ath10k/core.c
+++ b/drivers/net/wireless/ath/ath10k/core.c
@@ -48,6 +48,7 @@ static const struct ath10k_hw_params ath10k_hw_params_list[] = {
 		.id = QCA988X_HW_2_0_VERSION,
 		.name = "qca988x hw2.0",
 		.patch_load_addr = QCA988X_HW_2_0_PATCH_LOAD_ADDR,
+		.uart_pin = 7,
 		.fw = {
 			.dir = QCA988X_HW_2_0_FW_DIR,
 			.fw = QCA988X_HW_2_0_FW_FILE,
@@ -698,7 +699,7 @@ static int ath10k_init_uart(struct ath10k *ar)
 	if (!uart_print)
 		return 0;
 
-	ret = ath10k_bmi_write32(ar, hi_dbg_uart_txpin, 7);
+	ret = ath10k_bmi_write32(ar, hi_dbg_uart_txpin, ar->hw_params.uart_pin);
 	if (ret) {
 		ath10k_warn(ar, "could not enable UART prints (%d)\n", ret);
 		return ret;
diff --git a/drivers/net/wireless/ath/ath10k/core.h b/drivers/net/wireless/ath/ath10k/core.h
index f1a3edd..0188c84 100644
--- a/drivers/net/wireless/ath/ath10k/core.h
+++ b/drivers/net/wireless/ath/ath10k/core.h
@@ -479,6 +479,7 @@ struct ath10k {
 		u32 id;
 		const char *name;
 		u32 patch_load_addr;
+		int uart_pin;
 		struct ath10k_hw_params_fw {
 			const char *dir;
 			const char *fw;
-- 
1.8.5.3


_______________________________________________
ath10k mailing list
ath10k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath10k

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

* Re: [PATCH v2 1/3] ath10k: create a chip revision whielist
  2014-12-01  7:17   ` Michal Kazior
@ 2014-12-01  7:47     ` Kalle Valo
  -1 siblings, 0 replies; 32+ messages in thread
From: Kalle Valo @ 2014-12-01  7:47 UTC (permalink / raw)
  To: Michal Kazior; +Cc: ath10k, linux-wireless

Michal Kazior <michal.kazior@tieto.com> writes:

> This will make it easier to extend and maintain
> list of supported hardware.
>
> Signed-off-by: Michal Kazior <michal.kazior@tieto.com>

I fixed a typo: s/whielist/whitelist/

> --- a/drivers/net/wireless/ath/ath10k/core.h
> +++ b/drivers/net/wireless/ath/ath10k/core.h
> @@ -479,7 +479,6 @@ struct ath10k {
>  		u32 id;
>  		const char *name;
>  		u32 patch_load_addr;
> -
>  		struct ath10k_hw_params_fw {
>  			const char *dir;
>  			const char *fw;

I removed this unnecessary change:

https://github.com/kvalo/ath/commit/bfa7b7948acaf7063cf4d664393b7f7a1c53b2e4

Because of my change there was also a simple conflict in patch 3:

https://github.com/kvalo/ath/commit/3487683c94495b6e0bbb1f3b19b3987b4ca2ff1f

-- 
Kalle Valo

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

* Re: [PATCH v2 1/3] ath10k: create a chip revision whielist
@ 2014-12-01  7:47     ` Kalle Valo
  0 siblings, 0 replies; 32+ messages in thread
From: Kalle Valo @ 2014-12-01  7:47 UTC (permalink / raw)
  To: Michal Kazior; +Cc: linux-wireless, ath10k

Michal Kazior <michal.kazior@tieto.com> writes:

> This will make it easier to extend and maintain
> list of supported hardware.
>
> Signed-off-by: Michal Kazior <michal.kazior@tieto.com>

I fixed a typo: s/whielist/whitelist/

> --- a/drivers/net/wireless/ath/ath10k/core.h
> +++ b/drivers/net/wireless/ath/ath10k/core.h
> @@ -479,7 +479,6 @@ struct ath10k {
>  		u32 id;
>  		const char *name;
>  		u32 patch_load_addr;
> -
>  		struct ath10k_hw_params_fw {
>  			const char *dir;
>  			const char *fw;

I removed this unnecessary change:

https://github.com/kvalo/ath/commit/bfa7b7948acaf7063cf4d664393b7f7a1c53b2e4

Because of my change there was also a simple conflict in patch 3:

https://github.com/kvalo/ath/commit/3487683c94495b6e0bbb1f3b19b3987b4ca2ff1f

-- 
Kalle Valo

_______________________________________________
ath10k mailing list
ath10k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath10k

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

* Re: [PATCH v2 1/3] ath10k: create a chip revision whielist
  2014-12-01  7:47     ` Kalle Valo
@ 2014-12-01  8:35       ` Michal Kazior
  -1 siblings, 0 replies; 32+ messages in thread
From: Michal Kazior @ 2014-12-01  8:35 UTC (permalink / raw)
  To: Kalle Valo; +Cc: ath10k, linux-wireless

On 1 December 2014 at 08:47, Kalle Valo <kvalo@qca.qualcomm.com> wrote:
> Michal Kazior <michal.kazior@tieto.com> writes:
>
>> This will make it easier to extend and maintain
>> list of supported hardware.
>>
>> Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
>
> I fixed a typo: s/whielist/whitelist/

Oops. Thanks!


>> --- a/drivers/net/wireless/ath/ath10k/core.h
>> +++ b/drivers/net/wireless/ath/ath10k/core.h
>> @@ -479,7 +479,6 @@ struct ath10k {
>>               u32 id;
>>               const char *name;
>>               u32 patch_load_addr;
>> -
>>               struct ath10k_hw_params_fw {
>>                       const char *dir;
>>                       const char *fw;
>
> I removed this unnecessary change:
>
> https://github.com/kvalo/ath/commit/bfa7b7948acaf7063cf4d664393b7f7a1c53b2e4
>
> Because of my change there was also a simple conflict in patch 3:
>
> https://github.com/kvalo/ath/commit/3487683c94495b6e0bbb1f3b19b3987b4ca2ff1f

Ah, my original intention was to eventually remove the blank line
along with these patches but whatever. Looks good nonetheless, thanks!


Michał

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

* Re: [PATCH v2 1/3] ath10k: create a chip revision whielist
@ 2014-12-01  8:35       ` Michal Kazior
  0 siblings, 0 replies; 32+ messages in thread
From: Michal Kazior @ 2014-12-01  8:35 UTC (permalink / raw)
  To: Kalle Valo; +Cc: linux-wireless, ath10k

On 1 December 2014 at 08:47, Kalle Valo <kvalo@qca.qualcomm.com> wrote:
> Michal Kazior <michal.kazior@tieto.com> writes:
>
>> This will make it easier to extend and maintain
>> list of supported hardware.
>>
>> Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
>
> I fixed a typo: s/whielist/whitelist/

Oops. Thanks!


>> --- a/drivers/net/wireless/ath/ath10k/core.h
>> +++ b/drivers/net/wireless/ath/ath10k/core.h
>> @@ -479,7 +479,6 @@ struct ath10k {
>>               u32 id;
>>               const char *name;
>>               u32 patch_load_addr;
>> -
>>               struct ath10k_hw_params_fw {
>>                       const char *dir;
>>                       const char *fw;
>
> I removed this unnecessary change:
>
> https://github.com/kvalo/ath/commit/bfa7b7948acaf7063cf4d664393b7f7a1c53b2e4
>
> Because of my change there was also a simple conflict in patch 3:
>
> https://github.com/kvalo/ath/commit/3487683c94495b6e0bbb1f3b19b3987b4ca2ff1f

Ah, my original intention was to eventually remove the blank line
along with these patches but whatever. Looks good nonetheless, thanks!


Michał

_______________________________________________
ath10k mailing list
ath10k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath10k

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

* Re: [PATCH v2 1/3] ath10k: create a chip revision whielist
  2014-12-01  7:17   ` Michal Kazior
@ 2014-12-08 15:35     ` Kalle Valo
  -1 siblings, 0 replies; 32+ messages in thread
From: Kalle Valo @ 2014-12-08 15:35 UTC (permalink / raw)
  To: Michal Kazior; +Cc: ath10k, linux-wireless

Michal Kazior <michal.kazior@tieto.com> writes:

> This will make it easier to extend and maintain
> list of supported hardware.
>
> Signed-off-by: Michal Kazior <michal.kazior@tieto.com>

Thanks, all three patches applied.

-- 
Kalle Valo

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

* Re: [PATCH v2 1/3] ath10k: create a chip revision whielist
@ 2014-12-08 15:35     ` Kalle Valo
  0 siblings, 0 replies; 32+ messages in thread
From: Kalle Valo @ 2014-12-08 15:35 UTC (permalink / raw)
  To: Michal Kazior; +Cc: linux-wireless, ath10k

Michal Kazior <michal.kazior@tieto.com> writes:

> This will make it easier to extend and maintain
> list of supported hardware.
>
> Signed-off-by: Michal Kazior <michal.kazior@tieto.com>

Thanks, all three patches applied.

-- 
Kalle Valo

_______________________________________________
ath10k mailing list
ath10k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath10k

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

end of thread, other threads:[~2014-12-08 15:36 UTC | newest]

Thread overview: 32+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-11-24 14:17 [PATCH 1/3] ath10k: embed supported chip ids in hw_params Michal Kazior
2014-11-24 14:17 ` Michal Kazior
2014-11-24 14:17 ` [PATCH 2/3] ath10k: put board size into hw_params Michal Kazior
2014-11-24 14:17   ` Michal Kazior
2014-11-24 14:17 ` [PATCH 3/3] ath10k: move uart pin config " Michal Kazior
2014-11-24 14:17   ` Michal Kazior
2014-11-26  7:21 ` [PATCH 1/3] ath10k: embed supported chip ids in hw_params Kalle Valo
2014-11-26  7:21   ` Kalle Valo
2014-11-26  7:54   ` Michal Kazior
2014-11-26  7:54     ` Michal Kazior
2014-11-27  7:30     ` Kalle Valo
2014-11-27  7:30       ` Kalle Valo
2014-11-27  7:45       ` Michal Kazior
2014-11-27  7:45         ` Michal Kazior
2014-11-28  7:02         ` Kalle Valo
2014-11-28  7:02           ` Kalle Valo
2014-11-28  7:10     ` Kalle Valo
2014-11-28  7:10       ` Kalle Valo
2014-11-28 11:25       ` Michal Kazior
2014-11-28 11:25         ` Michal Kazior
2014-12-01  7:17 ` [PATCH v2 1/3] ath10k: create a chip revision whielist Michal Kazior
2014-12-01  7:17   ` Michal Kazior
2014-12-01  7:17   ` [PATCH v2 2/3] ath10k: put board size into hw_params Michal Kazior
2014-12-01  7:17     ` Michal Kazior
2014-12-01  7:17   ` [PATCH v2 3/3] ath10k: move uart pin config " Michal Kazior
2014-12-01  7:17     ` Michal Kazior
2014-12-01  7:47   ` [PATCH v2 1/3] ath10k: create a chip revision whielist Kalle Valo
2014-12-01  7:47     ` Kalle Valo
2014-12-01  8:35     ` Michal Kazior
2014-12-01  8:35       ` Michal Kazior
2014-12-08 15:35   ` Kalle Valo
2014-12-08 15:35     ` Kalle Valo

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.