Commit ebc7a496 authored by Kalle Valo's avatar Kalle Valo
Browse files
ath.git patches for v5.19. Major changes:

ath11k

* Wake-on-WLAN support for QCA6390 and WCN6855

* device recovery (firmware restart) support for QCA6390 and WCN6855

wcn36xx

* support for transmit rate reporting to user space
parents 26bb9340 b9e34ba6
Loading
Loading
Loading
Loading
+3 −6
Original line number Diff line number Diff line
@@ -728,20 +728,17 @@ static int ath10k_ahb_probe(struct platform_device *pdev)
	struct ath10k *ar;
	struct ath10k_ahb *ar_ahb;
	struct ath10k_pci *ar_pci;
	const struct of_device_id *of_id;
	enum ath10k_hw_rev hw_rev;
	size_t size;
	int ret;
	struct ath10k_bus_params bus_params = {};

	of_id = of_match_device(ath10k_ahb_of_match, &pdev->dev);
	if (!of_id) {
		dev_err(&pdev->dev, "failed to find matching device tree id\n");
	hw_rev = (enum ath10k_hw_rev)of_device_get_match_data(&pdev->dev);
	if (!hw_rev) {
		dev_err(&pdev->dev, "OF data missing\n");
		return -EINVAL;
	}

	hw_rev = (enum ath10k_hw_rev)of_id->data;

	size = sizeof(*ar_pci) + sizeof(*ar_ahb);
	ar = ath10k_core_create(size, &pdev->dev, ATH10K_BUS_AHB,
				hw_rev, &ath10k_ahb_hif_ops);
+25 −0
Original line number Diff line number Diff line
@@ -94,6 +94,7 @@ static const struct ath10k_hw_params ath10k_hw_params_list[] = {
		.credit_size_workaround = false,
		.tx_stats_over_pktlog = true,
		.dynamic_sar_support = false,
		.hw_restart_disconnect = false,
	},
	{
		.id = QCA988X_HW_2_0_VERSION,
@@ -131,6 +132,7 @@ static const struct ath10k_hw_params ath10k_hw_params_list[] = {
		.credit_size_workaround = false,
		.tx_stats_over_pktlog = true,
		.dynamic_sar_support = false,
		.hw_restart_disconnect = false,
	},
	{
		.id = QCA9887_HW_1_0_VERSION,
@@ -169,6 +171,7 @@ static const struct ath10k_hw_params ath10k_hw_params_list[] = {
		.credit_size_workaround = false,
		.tx_stats_over_pktlog = false,
		.dynamic_sar_support = false,
		.hw_restart_disconnect = false,
	},
	{
		.id = QCA6174_HW_3_2_VERSION,
@@ -202,6 +205,7 @@ static const struct ath10k_hw_params ath10k_hw_params_list[] = {
		.bmi_large_size_download = true,
		.supports_peer_stats_info = true,
		.dynamic_sar_support = true,
		.hw_restart_disconnect = false,
	},
	{
		.id = QCA6174_HW_2_1_VERSION,
@@ -239,6 +243,7 @@ static const struct ath10k_hw_params ath10k_hw_params_list[] = {
		.credit_size_workaround = false,
		.tx_stats_over_pktlog = false,
		.dynamic_sar_support = false,
		.hw_restart_disconnect = false,
	},
	{
		.id = QCA6174_HW_2_1_VERSION,
@@ -276,6 +281,7 @@ static const struct ath10k_hw_params ath10k_hw_params_list[] = {
		.credit_size_workaround = false,
		.tx_stats_over_pktlog = false,
		.dynamic_sar_support = false,
		.hw_restart_disconnect = false,
	},
	{
		.id = QCA6174_HW_3_0_VERSION,
@@ -313,6 +319,7 @@ static const struct ath10k_hw_params ath10k_hw_params_list[] = {
		.credit_size_workaround = false,
		.tx_stats_over_pktlog = false,
		.dynamic_sar_support = false,
		.hw_restart_disconnect = false,
	},
	{
		.id = QCA6174_HW_3_2_VERSION,
@@ -354,6 +361,7 @@ static const struct ath10k_hw_params ath10k_hw_params_list[] = {
		.tx_stats_over_pktlog = false,
		.supports_peer_stats_info = true,
		.dynamic_sar_support = true,
		.hw_restart_disconnect = false,
	},
	{
		.id = QCA99X0_HW_2_0_DEV_VERSION,
@@ -397,6 +405,7 @@ static const struct ath10k_hw_params ath10k_hw_params_list[] = {
		.credit_size_workaround = false,
		.tx_stats_over_pktlog = false,
		.dynamic_sar_support = false,
		.hw_restart_disconnect = false,
	},
	{
		.id = QCA9984_HW_1_0_DEV_VERSION,
@@ -447,6 +456,7 @@ static const struct ath10k_hw_params ath10k_hw_params_list[] = {
		.credit_size_workaround = false,
		.tx_stats_over_pktlog = false,
		.dynamic_sar_support = false,
		.hw_restart_disconnect = false,
	},
	{
		.id = QCA9888_HW_2_0_DEV_VERSION,
@@ -494,6 +504,7 @@ static const struct ath10k_hw_params ath10k_hw_params_list[] = {
		.credit_size_workaround = false,
		.tx_stats_over_pktlog = false,
		.dynamic_sar_support = false,
		.hw_restart_disconnect = false,
	},
	{
		.id = QCA9377_HW_1_0_DEV_VERSION,
@@ -531,6 +542,7 @@ static const struct ath10k_hw_params ath10k_hw_params_list[] = {
		.credit_size_workaround = false,
		.tx_stats_over_pktlog = false,
		.dynamic_sar_support = false,
		.hw_restart_disconnect = false,
	},
	{
		.id = QCA9377_HW_1_1_DEV_VERSION,
@@ -570,6 +582,7 @@ static const struct ath10k_hw_params ath10k_hw_params_list[] = {
		.credit_size_workaround = false,
		.tx_stats_over_pktlog = false,
		.dynamic_sar_support = false,
		.hw_restart_disconnect = false,
	},
	{
		.id = QCA9377_HW_1_1_DEV_VERSION,
@@ -600,6 +613,7 @@ static const struct ath10k_hw_params ath10k_hw_params_list[] = {
		.uart_pin_workaround = true,
		.credit_size_workaround = true,
		.dynamic_sar_support = false,
		.hw_restart_disconnect = false,
	},
	{
		.id = QCA4019_HW_1_0_DEV_VERSION,
@@ -644,6 +658,7 @@ static const struct ath10k_hw_params ath10k_hw_params_list[] = {
		.credit_size_workaround = false,
		.tx_stats_over_pktlog = false,
		.dynamic_sar_support = false,
		.hw_restart_disconnect = false,
	},
	{
		.id = WCN3990_HW_1_0_DEV_VERSION,
@@ -674,6 +689,7 @@ static const struct ath10k_hw_params ath10k_hw_params_list[] = {
		.credit_size_workaround = false,
		.tx_stats_over_pktlog = false,
		.dynamic_sar_support = true,
		.hw_restart_disconnect = true,
	},
};

@@ -2442,6 +2458,7 @@ EXPORT_SYMBOL(ath10k_core_napi_sync_disable);
static void ath10k_core_restart(struct work_struct *work)
{
	struct ath10k *ar = container_of(work, struct ath10k, restart_work);
	struct ath10k_vif *arvif;
	int ret;

	set_bit(ATH10K_FLAG_CRASH_FLUSH, &ar->dev_flags);
@@ -2480,6 +2497,14 @@ static void ath10k_core_restart(struct work_struct *work)
		ar->state = ATH10K_STATE_RESTARTING;
		ath10k_halt(ar);
		ath10k_scan_finish(ar);
		if (ar->hw_params.hw_restart_disconnect) {
			list_for_each_entry(arvif, &ar->arvifs, list) {
				if (arvif->is_up &&
				    arvif->vdev_type == WMI_VDEV_TYPE_STA)
					ieee80211_hw_restart_disconnect(arvif->vif);
			}
		}

		ieee80211_restart_hw(ar->hw);
		break;
	case ATH10K_STATE_OFF:
+2 −0
Original line number Diff line number Diff line
@@ -633,6 +633,8 @@ struct ath10k_hw_params {
	bool supports_peer_stats_info;

	bool dynamic_sar_support;

	bool hw_restart_disconnect;
};

struct htt_resp;
+27 −0
Original line number Diff line number Diff line
@@ -345,6 +345,12 @@ static void ath10k_usb_rx_complete(struct ath10k *ar, struct sk_buff *skb)
	ep->ep_ops.ep_rx_complete(ar, skb);
	/* The RX complete handler now owns the skb... */

	if (test_bit(ATH10K_FLAG_CORE_REGISTERED, &ar->dev_flags)) {
		local_bh_disable();
		napi_schedule(&ar->napi);
		local_bh_enable();
	}

	return;

out_free_skb:
@@ -387,6 +393,7 @@ static int ath10k_usb_hif_start(struct ath10k *ar)
	int i;
	struct ath10k_usb *ar_usb = ath10k_usb_priv(ar);

	ath10k_core_napi_enable(ar);
	ath10k_usb_start_recv_pipes(ar);

	/* set the TX resource avail threshold for each TX pipe */
@@ -462,6 +469,7 @@ static int ath10k_usb_hif_tx_sg(struct ath10k *ar, u8 pipe_id,
static void ath10k_usb_hif_stop(struct ath10k *ar)
{
	ath10k_usb_flush_all(ar);
	ath10k_core_napi_sync_disable(ar);
}

static u16 ath10k_usb_hif_get_free_queue_number(struct ath10k *ar, u8 pipe_id)
@@ -966,6 +974,20 @@ static int ath10k_usb_create(struct ath10k *ar,
	return ret;
}

static int ath10k_usb_napi_poll(struct napi_struct *ctx, int budget)
{
	struct ath10k *ar = container_of(ctx, struct ath10k, napi);
	int done;

	done = ath10k_htt_rx_hl_indication(ar, budget);
	ath10k_dbg(ar, ATH10K_DBG_USB, "napi poll: done: %d, budget:%d\n", done, budget);

	if (done < budget)
		napi_complete_done(ctx, done);

	return done;
}

/* ath10k usb driver registered functions */
static int ath10k_usb_probe(struct usb_interface *interface,
			    const struct usb_device_id *id)
@@ -992,6 +1014,9 @@ static int ath10k_usb_probe(struct usb_interface *interface,
		return -ENOMEM;
	}

	netif_napi_add(&ar->napi_dev, &ar->napi, ath10k_usb_napi_poll,
		       ATH10K_NAPI_BUDGET);

	usb_get_dev(dev);
	vendor_id = le16_to_cpu(dev->descriptor.idVendor);
	product_id = le16_to_cpu(dev->descriptor.idProduct);
@@ -1013,6 +1038,7 @@ static int ath10k_usb_probe(struct usb_interface *interface,
	bus_params.dev_type = ATH10K_DEV_TYPE_HL;
	/* TODO: don't know yet how to get chip_id with USB */
	bus_params.chip_id = 0;
	bus_params.hl_msdu_ids = true;
	ret = ath10k_core_register(ar, &bus_params);
	if (ret) {
		ath10k_warn(ar, "failed to register driver core: %d\n", ret);
@@ -1044,6 +1070,7 @@ static void ath10k_usb_remove(struct usb_interface *interface)
		return;

	ath10k_core_unregister(ar_usb->ar);
	netif_napi_del(&ar_usb->ar->napi);
	ath10k_usb_destroy(ar_usb->ar);
	usb_put_dev(interface_to_usbdev(interface));
	ath10k_core_destroy(ar_usb->ar);
+3 −3
Original line number Diff line number Diff line
@@ -16,20 +16,20 @@ ath11k-y += core.o \
	    ce.o \
	    peer.o \
	    dbring.o \
	    hw.o \
	    wow.o
	    hw.o

ath11k-$(CONFIG_ATH11K_DEBUGFS) += debugfs.o debugfs_htt_stats.o debugfs_sta.o
ath11k-$(CONFIG_NL80211_TESTMODE) += testmode.o
ath11k-$(CONFIG_ATH11K_TRACING) += trace.o
ath11k-$(CONFIG_THERMAL) += thermal.o
ath11k-$(CONFIG_ATH11K_SPECTRAL) += spectral.o
ath11k-$(CONFIG_PM) += wow.o

obj-$(CONFIG_ATH11K_AHB) += ath11k_ahb.o
ath11k_ahb-y += ahb.o

obj-$(CONFIG_ATH11K_PCI) += ath11k_pci.o
ath11k_pci-y += mhi.o pci.o
ath11k_pci-y += mhi.o pci.o pcic.o

# for tracing framework to find trace.h
CFLAGS_trace.o := -I$(src)
Loading