Commit 2cfd71f1 authored by Kalle Valo's avatar Kalle Valo
Browse files
mt76 driver had major conflicts within mt7615 directory. To make it easier for
every merge wireless-drivers to wireless-drivers-next and solve those
conflicts.
parents 3dc05ffb 1cfd3426
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -820,7 +820,7 @@ err_free_irq:
	ath10k_ahb_release_irq_legacy(ar);

err_free_pipes:
	ath10k_pci_free_pipes(ar);
	ath10k_pci_release_resource(ar);

err_resource_deinit:
	ath10k_ahb_resource_deinit(ar);
+37 −41
Original line number Diff line number Diff line
@@ -3473,6 +3473,28 @@ int ath10k_pci_setup_resource(struct ath10k *ar)

	timer_setup(&ar_pci->rx_post_retry, ath10k_pci_rx_replenish_retry, 0);

	ar_pci->attr = kmemdup(pci_host_ce_config_wlan,
			       sizeof(pci_host_ce_config_wlan),
			       GFP_KERNEL);
	if (!ar_pci->attr)
		return -ENOMEM;

	ar_pci->pipe_config = kmemdup(pci_target_ce_config_wlan,
				      sizeof(pci_target_ce_config_wlan),
				      GFP_KERNEL);
	if (!ar_pci->pipe_config) {
		ret = -ENOMEM;
		goto err_free_attr;
	}

	ar_pci->serv_to_pipe = kmemdup(pci_target_service_to_ce_map_wlan,
				       sizeof(pci_target_service_to_ce_map_wlan),
				       GFP_KERNEL);
	if (!ar_pci->serv_to_pipe) {
		ret = -ENOMEM;
		goto err_free_pipe_config;
	}

	if (QCA_REV_6174(ar) || QCA_REV_9377(ar))
		ath10k_pci_override_ce_config(ar);

@@ -3480,18 +3502,31 @@ int ath10k_pci_setup_resource(struct ath10k *ar)
	if (ret) {
		ath10k_err(ar, "failed to allocate copy engine pipes: %d\n",
			   ret);
		return ret;
		goto err_free_serv_to_pipe;
	}

	return 0;

err_free_serv_to_pipe:
	kfree(ar_pci->serv_to_pipe);
err_free_pipe_config:
	kfree(ar_pci->pipe_config);
err_free_attr:
	kfree(ar_pci->attr);
	return ret;
}

void ath10k_pci_release_resource(struct ath10k *ar)
{
	struct ath10k_pci *ar_pci = ath10k_pci_priv(ar);

	ath10k_pci_rx_retry_sync(ar);
	netif_napi_del(&ar->napi);
	ath10k_pci_ce_deinit(ar);
	ath10k_pci_free_pipes(ar);
	kfree(ar_pci->attr);
	kfree(ar_pci->pipe_config);
	kfree(ar_pci->serv_to_pipe);
}

static const struct ath10k_bus_ops ath10k_pci_bus_ops = {
@@ -3601,30 +3636,6 @@ static int ath10k_pci_probe(struct pci_dev *pdev,

	timer_setup(&ar_pci->ps_timer, ath10k_pci_ps_timer, 0);

	ar_pci->attr = kmemdup(pci_host_ce_config_wlan,
			       sizeof(pci_host_ce_config_wlan),
			       GFP_KERNEL);
	if (!ar_pci->attr) {
		ret = -ENOMEM;
		goto err_free;
	}

	ar_pci->pipe_config = kmemdup(pci_target_ce_config_wlan,
				      sizeof(pci_target_ce_config_wlan),
				      GFP_KERNEL);
	if (!ar_pci->pipe_config) {
		ret = -ENOMEM;
		goto err_free;
	}

	ar_pci->serv_to_pipe = kmemdup(pci_target_service_to_ce_map_wlan,
				       sizeof(pci_target_service_to_ce_map_wlan),
				       GFP_KERNEL);
	if (!ar_pci->serv_to_pipe) {
		ret = -ENOMEM;
		goto err_free;
	}

	ret = ath10k_pci_setup_resource(ar);
	if (ret) {
		ath10k_err(ar, "failed to setup resource: %d\n", ret);
@@ -3705,10 +3716,9 @@ err_unsupported:

err_free_irq:
	ath10k_pci_free_irq(ar);
	ath10k_pci_rx_retry_sync(ar);

err_deinit_irq:
	ath10k_pci_deinit_irq(ar);
	ath10k_pci_release_resource(ar);

err_sleep:
	ath10k_pci_sleep_sync(ar);
@@ -3720,29 +3730,18 @@ err_free_pipes:
err_core_destroy:
	ath10k_core_destroy(ar);

err_free:
	kfree(ar_pci->attr);
	kfree(ar_pci->pipe_config);
	kfree(ar_pci->serv_to_pipe);

	return ret;
}

static void ath10k_pci_remove(struct pci_dev *pdev)
{
	struct ath10k *ar = pci_get_drvdata(pdev);
	struct ath10k_pci *ar_pci;

	ath10k_dbg(ar, ATH10K_DBG_PCI, "pci remove\n");

	if (!ar)
		return;

	ar_pci = ath10k_pci_priv(ar);

	if (!ar_pci)
		return;

	ath10k_core_unregister(ar);
	ath10k_pci_free_irq(ar);
	ath10k_pci_deinit_irq(ar);
@@ -3750,9 +3749,6 @@ static void ath10k_pci_remove(struct pci_dev *pdev)
	ath10k_pci_sleep_sync(ar);
	ath10k_pci_release(ar);
	ath10k_core_destroy(ar);
	kfree(ar_pci->attr);
	kfree(ar_pci->pipe_config);
	kfree(ar_pci->serv_to_pipe);
}

MODULE_DEVICE_TABLE(pci, ath10k_pci_id_table);
+3 −1
Original line number Diff line number Diff line
@@ -733,11 +733,13 @@ static void ath9k_hif_usb_reg_in_cb(struct urb *urb)
			return;
		}

		rx_buf->skb = nskb;

		usb_fill_int_urb(urb, hif_dev->udev,
				 usb_rcvintpipe(hif_dev->udev,
						 USB_REG_IN_PIPE),
				 nskb->data, MAX_REG_IN_BUF_SIZE,
				 ath9k_hif_usb_reg_in_cb, nskb, 1);
				 ath9k_hif_usb_reg_in_cb, rx_buf, 1);
	}

resubmit:
+14 −2
Original line number Diff line number Diff line
@@ -271,6 +271,8 @@ static int iwl_dbg_tlv_alloc_trigger(struct iwl_trans *trans,
{
	struct iwl_fw_ini_trigger_tlv *trig = (void *)tlv->data;
	u32 tp = le32_to_cpu(trig->time_point);
	struct iwl_ucode_tlv *dup = NULL;
	int ret;

	if (le32_to_cpu(tlv->length) < sizeof(*trig))
		return -EINVAL;
@@ -283,10 +285,20 @@ static int iwl_dbg_tlv_alloc_trigger(struct iwl_trans *trans,
		return -EINVAL;
	}

	if (!le32_to_cpu(trig->occurrences))
	if (!le32_to_cpu(trig->occurrences)) {
		dup = kmemdup(tlv, sizeof(*tlv) + le32_to_cpu(tlv->length),
				GFP_KERNEL);
		if (!dup)
			return -ENOMEM;
		trig = (void *)dup->data;
		trig->occurrences = cpu_to_le32(-1);
		tlv = dup;
	}

	return iwl_dbg_tlv_add(tlv, &trans->dbg.time_point[tp].trig_list);
	ret = iwl_dbg_tlv_add(tlv, &trans->dbg.time_point[tp].trig_list);
	kfree(dup);

	return ret;
}

static int (*dbg_tlv_alloc[])(struct iwl_trans *trans,
+3 −5
Original line number Diff line number Diff line
@@ -1189,16 +1189,14 @@ static int iwl_mvm_inactivity_check(struct iwl_mvm *mvm, u8 alloc_for_sta)
	for_each_set_bit(i, &changetid_queues, IWL_MAX_HW_QUEUES)
		iwl_mvm_change_queue_tid(mvm, i);

	rcu_read_unlock();

	if (free_queue >= 0 && alloc_for_sta != IWL_MVM_INVALID_STA) {
		ret = iwl_mvm_free_inactive_queue(mvm, free_queue, queue_owner,
						  alloc_for_sta);
		if (ret) {
			rcu_read_unlock();
		if (ret)
			return ret;
	}
	}

	rcu_read_unlock();

	return free_queue;
}
Loading