Skip to content

Commit 7c2dd61

Browse files
erstromKalle Valo
authored andcommitted
ath10k: add device type enum to ath10k_bus_params
Add dev_type parameter to struct ath10k_bus_params. The dev type specifies if the device is a high latency device (usb and sdio) or low latency device (pci, ahb and snoc) The setup of high latency chips is sometimes different than for chips using low latency interfaces. Signed-off-by: Erik Stromdahl <erik.stromdahl@gmail.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
1 parent c0d8d56 commit 7c2dd61

File tree

7 files changed

+13
-0
lines changed

7 files changed

+13
-0
lines changed

drivers/net/wireless/ath/ath10k/ahb.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -806,6 +806,7 @@ static int ath10k_ahb_probe(struct platform_device *pdev)
806806

807807
ath10k_pci_ce_deinit(ar);
808808

809+
bus_params.dev_type = ATH10K_DEV_TYPE_LL;
809810
bus_params.chip_id = ath10k_ahb_soc_read32(ar, SOC_CHIP_ID_ADDRESS);
810811
if (bus_params.chip_id == 0xffffffff) {
811812
ath10k_err(ar, "failed to get chip id\n");

drivers/net/wireless/ath/ath10k/core.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2928,6 +2928,7 @@ int ath10k_core_register(struct ath10k *ar,
29282928
const struct ath10k_bus_params *bus_params)
29292929
{
29302930
ar->chip_id = bus_params->chip_id;
2931+
ar->dev_type = bus_params->dev_type;
29312932
queue_work(ar->workqueue, &ar->register_work);
29322933

29332934
return 0;

drivers/net/wireless/ath/ath10k/core.h

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -915,8 +915,14 @@ struct ath10k_per_peer_tx_stats {
915915
u32 reserved2;
916916
};
917917

918+
enum ath10k_dev_type {
919+
ATH10K_DEV_TYPE_LL,
920+
ATH10K_DEV_TYPE_HL,
921+
};
922+
918923
struct ath10k_bus_params {
919924
u32 chip_id;
925+
enum ath10k_dev_type dev_type;
920926
};
921927

922928
struct ath10k {
@@ -929,6 +935,7 @@ struct ath10k {
929935
enum ath10k_hw_rev hw_rev;
930936
u16 dev_id;
931937
u32 chip_id;
938+
enum ath10k_dev_type dev_type;
932939
u32 target_version;
933940
u8 fw_version_major;
934941
u32 fw_version_minor;

drivers/net/wireless/ath/ath10k/pci.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3637,6 +3637,7 @@ static int ath10k_pci_probe(struct pci_dev *pdev,
36373637
goto err_free_irq;
36383638
}
36393639

3640+
bus_params.dev_type = ATH10K_DEV_TYPE_LL;
36403641
bus_params.chip_id = ath10k_pci_soc_read32(ar, SOC_CHIP_ID_ADDRESS);
36413642
if (bus_params.chip_id == 0xffffffff) {
36423643
ath10k_err(ar, "failed to get chip id\n");

drivers/net/wireless/ath/ath10k/sdio.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2036,6 +2036,7 @@ static int ath10k_sdio_probe(struct sdio_func *func,
20362036
goto err_free_wq;
20372037
}
20382038

2039+
bus_params.dev_type = ATH10K_DEV_TYPE_HL;
20392040
/* TODO: don't know yet how to get chip_id with SDIO */
20402041
bus_params.chip_id = 0;
20412042
ret = ath10k_core_register(ar, &bus_params);

drivers/net/wireless/ath/ath10k/snoc.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1351,6 +1351,7 @@ static int ath10k_snoc_probe(struct platform_device *pdev)
13511351
goto err_free_irq;
13521352
}
13531353

1354+
bus_params.dev_type = ATH10K_DEV_TYPE_LL;
13541355
bus_params.chip_id = drv_data->hw_rev;
13551356
ret = ath10k_core_register(ar, &bus_params);
13561357
if (ret) {

drivers/net/wireless/ath/ath10k/usb.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1016,6 +1016,7 @@ static int ath10k_usb_probe(struct usb_interface *interface,
10161016
ar->id.vendor = vendor_id;
10171017
ar->id.device = product_id;
10181018

1019+
bus_params.dev_type = ATH10K_DEV_TYPE_HL;
10191020
/* TODO: don't know yet how to get chip_id with USB */
10201021
bus_params.chip_id = 0;
10211022
ret = ath10k_core_register(ar, &bus_params);

0 commit comments

Comments
 (0)