Commit eb464d4a authored by Kalle Valo's avatar Kalle Valo
Browse files
ath.git patches for 4.14. Major changes:

wil6210

* support FW RSSI reporting (by mistake this was accidentally
  mentioned already in the previous pull request, but now it's really
  included)

* make debugfs optional, adds new Kconfig option CONFIG_WIL6210_DEBUGFS
parents a9a65a6b 393b706c
Loading
Loading
Loading
Loading
+7 −7
Original line number Original line Diff line number Diff line
@@ -519,7 +519,7 @@ static const struct firmware *ath10k_fetch_fw_file(struct ath10k *ar,
		dir = ".";
		dir = ".";


	snprintf(filename, sizeof(filename), "%s/%s", dir, file);
	snprintf(filename, sizeof(filename), "%s/%s", dir, file);
	ret = request_firmware_direct(&fw, filename, ar->dev);
	ret = request_firmware(&fw, filename, ar->dev);
	ath10k_dbg(ar, ATH10K_DBG_BOOT, "boot fw request '%s': %d\n",
	ath10k_dbg(ar, ATH10K_DBG_BOOT, "boot fw request '%s': %d\n",
		   filename, ret);
		   filename, ret);


@@ -2057,6 +2057,12 @@ int ath10k_core_start(struct ath10k *ar, enum ath10k_firmware_mode mode,
		goto err_wmi_detach;
		goto err_wmi_detach;
	}
	}


	/* If firmware indicates Full Rx Reorder support it must be used in a
	 * slightly different manner. Let HTT code know.
	 */
	ar->htt.rx_ring.in_ord_rx = !!(test_bit(WMI_SERVICE_RX_FULL_REORDER,
						ar->wmi.svc_map));

	status = ath10k_htt_rx_alloc(&ar->htt);
	status = ath10k_htt_rx_alloc(&ar->htt);
	if (status) {
	if (status) {
		ath10k_err(ar, "failed to alloc htt rx: %d\n", status);
		ath10k_err(ar, "failed to alloc htt rx: %d\n", status);
@@ -2177,12 +2183,6 @@ int ath10k_core_start(struct ath10k *ar, enum ath10k_firmware_mode mode,
		}
		}
	}
	}


	/* If firmware indicates Full Rx Reorder support it must be used in a
	 * slightly different manner. Let HTT code know.
	 */
	ar->htt.rx_ring.in_ord_rx = !!(test_bit(WMI_SERVICE_RX_FULL_REORDER,
						ar->wmi.svc_map));

	status = ath10k_htt_rx_ring_refill(ar);
	status = ath10k_htt_rx_ring_refill(ar);
	if (status) {
	if (status) {
		ath10k_err(ar, "failed to refill htt rx ring: %d\n", status);
		ath10k_err(ar, "failed to refill htt rx ring: %d\n", status);
+1 −1
Original line number Original line Diff line number Diff line
@@ -462,7 +462,7 @@ struct ath10k_ce_crash_hdr {
struct ath10k_fw_crash_data {
struct ath10k_fw_crash_data {
	bool crashed_since_read;
	bool crashed_since_read;


	uuid_le uuid;
	guid_t guid;
	struct timespec timestamp;
	struct timespec timestamp;
	__le32 registers[REG_DUMP_COUNT_QCA988X];
	__le32 registers[REG_DUMP_COUNT_QCA988X];
	struct ath10k_ce_crash_data ce_crash_data[CE_COUNT_MAX];
	struct ath10k_ce_crash_data ce_crash_data[CE_COUNT_MAX];
+3 −3
Original line number Original line Diff line number Diff line
@@ -70,7 +70,7 @@ struct ath10k_dump_file_data {


	/* some info we can get from ath10k struct that might help */
	/* some info we can get from ath10k struct that might help */


	u8 uuid[16];
	guid_t guid;


	__le32 chip_id;
	__le32 chip_id;


@@ -719,7 +719,7 @@ ath10k_debug_get_new_fw_crash_data(struct ath10k *ar)
	lockdep_assert_held(&ar->data_lock);
	lockdep_assert_held(&ar->data_lock);


	crash_data->crashed_since_read = true;
	crash_data->crashed_since_read = true;
	uuid_le_gen(&crash_data->uuid);
	guid_gen(&crash_data->guid);
	getnstimeofday(&crash_data->timestamp);
	getnstimeofday(&crash_data->timestamp);


	return crash_data;
	return crash_data;
@@ -766,7 +766,7 @@ static struct ath10k_dump_file_data *ath10k_build_dump_file(struct ath10k *ar,


	dump_data->version = cpu_to_le32(ATH10K_FW_CRASH_DUMP_VERSION);
	dump_data->version = cpu_to_le32(ATH10K_FW_CRASH_DUMP_VERSION);


	memcpy(dump_data->uuid, &crash_data->uuid, sizeof(dump_data->uuid));
	guid_copy(&dump_data->guid, &crash_data->guid);
	dump_data->chip_id = cpu_to_le32(ar->chip_id);
	dump_data->chip_id = cpu_to_le32(ar->chip_id);
	dump_data->bus_type = cpu_to_le32(0);
	dump_data->bus_type = cpu_to_le32(0);
	dump_data->target_version = cpu_to_le32(ar->target_version);
	dump_data->target_version = cpu_to_le32(ar->target_version);
+12 −7
Original line number Original line Diff line number Diff line
@@ -1524,7 +1524,7 @@ static bool ath10k_htt_rx_amsdu_allowed(struct ath10k *ar,
	 */
	 */


	if (!rx_status->freq) {
	if (!rx_status->freq) {
		ath10k_warn(ar, "no channel configured; ignoring frame(s)!\n");
		ath10k_dbg(ar, ATH10K_DBG_HTT, "no channel configured; ignoring frame(s)!\n");
		return false;
		return false;
	}
	}


@@ -1745,7 +1745,8 @@ static void ath10k_htt_rx_delba(struct ath10k *ar, struct htt_resp *resp)
}
}


static int ath10k_htt_rx_extract_amsdu(struct sk_buff_head *list,
static int ath10k_htt_rx_extract_amsdu(struct sk_buff_head *list,
				       struct sk_buff_head *amsdu)
				       struct sk_buff_head *amsdu,
				       int budget_left)
{
{
	struct sk_buff *msdu;
	struct sk_buff *msdu;
	struct htt_rx_desc *rxd;
	struct htt_rx_desc *rxd;
@@ -1756,8 +1757,9 @@ static int ath10k_htt_rx_extract_amsdu(struct sk_buff_head *list,
	if (WARN_ON(!skb_queue_empty(amsdu)))
	if (WARN_ON(!skb_queue_empty(amsdu)))
		return -EINVAL;
		return -EINVAL;


	while ((msdu = __skb_dequeue(list))) {
	while ((msdu = __skb_dequeue(list)) && budget_left) {
		__skb_queue_tail(amsdu, msdu);
		__skb_queue_tail(amsdu, msdu);
		budget_left--;


		rxd = (void *)msdu->data - sizeof(*rxd);
		rxd = (void *)msdu->data - sizeof(*rxd);
		if (rxd->msdu_end.common.info0 &
		if (rxd->msdu_end.common.info0 &
@@ -1848,7 +1850,8 @@ static int ath10k_htt_rx_h_rx_offload(struct ath10k *ar,
	return num_msdu;
	return num_msdu;
}
}


static int ath10k_htt_rx_in_ord_ind(struct ath10k *ar, struct sk_buff *skb)
static int ath10k_htt_rx_in_ord_ind(struct ath10k *ar, struct sk_buff *skb,
				    int budget_left)
{
{
	struct ath10k_htt *htt = &ar->htt;
	struct ath10k_htt *htt = &ar->htt;
	struct htt_resp *resp = (void *)skb->data;
	struct htt_resp *resp = (void *)skb->data;
@@ -1905,9 +1908,9 @@ static int ath10k_htt_rx_in_ord_ind(struct ath10k *ar, struct sk_buff *skb)
	if (offload)
	if (offload)
		num_msdus = ath10k_htt_rx_h_rx_offload(ar, &list);
		num_msdus = ath10k_htt_rx_h_rx_offload(ar, &list);


	while (!skb_queue_empty(&list)) {
	while (!skb_queue_empty(&list) && budget_left) {
		__skb_queue_head_init(&amsdu);
		__skb_queue_head_init(&amsdu);
		ret = ath10k_htt_rx_extract_amsdu(&list, &amsdu);
		ret = ath10k_htt_rx_extract_amsdu(&list, &amsdu, budget_left);
		switch (ret) {
		switch (ret) {
		case 0:
		case 0:
			/* Note: The in-order indication may report interleaved
			/* Note: The in-order indication may report interleaved
@@ -1917,6 +1920,7 @@ static int ath10k_htt_rx_in_ord_ind(struct ath10k *ar, struct sk_buff *skb)
			 * should still give an idea about rx rate to the user.
			 * should still give an idea about rx rate to the user.
			 */
			 */
			num_msdus += skb_queue_len(&amsdu);
			num_msdus += skb_queue_len(&amsdu);
			budget_left -= skb_queue_len(&amsdu);
			ath10k_htt_rx_h_ppdu(ar, &amsdu, status, vdev_id);
			ath10k_htt_rx_h_ppdu(ar, &amsdu, status, vdev_id);
			ath10k_htt_rx_h_filter(ar, &amsdu, status);
			ath10k_htt_rx_h_filter(ar, &amsdu, status);
			ath10k_htt_rx_h_mpdu(ar, &amsdu, status);
			ath10k_htt_rx_h_mpdu(ar, &amsdu, status);
@@ -2559,7 +2563,8 @@ int ath10k_htt_txrx_compl_task(struct ath10k *ar, int budget)
		}
		}


		spin_lock_bh(&htt->rx_ring.lock);
		spin_lock_bh(&htt->rx_ring.lock);
		num_rx_msdus = ath10k_htt_rx_in_ord_ind(ar, skb);
		num_rx_msdus = ath10k_htt_rx_in_ord_ind(ar, skb,
							(budget - quota));
		spin_unlock_bh(&htt->rx_ring.lock);
		spin_unlock_bh(&htt->rx_ring.lock);
		if (num_rx_msdus < 0) {
		if (num_rx_msdus < 0) {
			resched_napi = true;
			resched_napi = true;
+1 −0
Original line number Original line Diff line number Diff line
@@ -7644,6 +7644,7 @@ static const struct ieee80211_ops ath10k_ops = {
#ifdef CONFIG_PM
#ifdef CONFIG_PM
	.suspend			= ath10k_wow_op_suspend,
	.suspend			= ath10k_wow_op_suspend,
	.resume				= ath10k_wow_op_resume,
	.resume				= ath10k_wow_op_resume,
	.set_wakeup			= ath10k_wow_op_set_wakeup,
#endif
#endif
#ifdef CONFIG_MAC80211_DEBUGFS
#ifdef CONFIG_MAC80211_DEBUGFS
	.sta_add_debugfs		= ath10k_sta_add_debugfs,
	.sta_add_debugfs		= ath10k_sta_add_debugfs,
Loading