mirror of
https://github.com/openwrt/openwrt.git
synced 2024-12-29 01:59:02 +00:00
2dcd955aea
This commit refreshes and updates the VHT160 ath10k support fix patches and adds a number of backports from ath-next: * 8ed05ed06fca ath10k: handle tdls peer events * 229329ff345f ath10k: wmi: modify svc bitmap parsing for wcn3990 * 14d65775687c ath10k: advertise TDLS wider bandwidth support for 5GHz * bc64d05220f3 ath10k: debugfs support to get final TPC stats for 10.4 variants * 8b2d93dd2261 ath10k: Fix kernel panic while using worker (ath10k_sta_rc_update_wk) * 4b190675ad06 ath10k: fix kernel panic while reading tpc_stats * be8cce96f14d ath10k: add support to configure channel dwell time * f40105e67478 ath: add support to get the detected radar specifications * 6f6eb1bcbeff ath10k: DFS Host Confirmation * 260e629bbf44 ath10k: fix memory leak of tpc_stats * 38441fb6fcbb ath10k: support use of channel 173 * 2e9bcd0d7324 ath10k: fix spectral scan for QCA9984 and QCA9888 chipsets Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com> [move backported patches in the 3xx number space, bring in upstream order, replace incomplete patch files with git format-patch ones, rewrite commit message, fix subject] Signed-off-by: Jo-Philipp Wich <jo@mein.io>
116 lines
3.3 KiB
Diff
116 lines
3.3 KiB
Diff
From 8ed05ed06fca0136cf4546e804318f57ef823348 Mon Sep 17 00:00:00 2001
|
|
From: Manikanta Pubbisetty <mpubbise@qti.qualcomm.com>
|
|
Date: Mon, 6 Nov 2017 13:39:32 +0530
|
|
Subject: [PATCH] ath10k: handle tdls peer events
|
|
|
|
Handle tdls peer events from the target. TDLS events for the peer
|
|
could be discover, teardown, etc. As of now, adding the logic to
|
|
handle tdls teardown events alone.
|
|
|
|
Teardown due to peer traffic indication(PTR) timeout is one such
|
|
teardown event from the target.
|
|
|
|
Tested this change on QCA9888 with 10.4-3.5.1-00018 fw version.
|
|
|
|
Signed-off-by: Manikanta Pubbisetty <mpubbise@qti.qualcomm.com>
|
|
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
|
|
---
|
|
drivers/net/wireless/ath/ath10k/wmi.c | 72 +++++++++++++++++++++++++++++++++++
|
|
1 file changed, 72 insertions(+)
|
|
|
|
--- a/drivers/net/wireless/ath/ath10k/wmi.c
|
|
+++ b/drivers/net/wireless/ath/ath10k/wmi.c
|
|
@@ -29,6 +29,7 @@
|
|
#include "p2p.h"
|
|
#include "hw.h"
|
|
#include "hif.h"
|
|
+#include "txrx.h"
|
|
|
|
#define ATH10K_WMI_BARRIER_ECHO_ID 0xBA991E9
|
|
#define ATH10K_WMI_BARRIER_TIMEOUT_HZ (3 * HZ)
|
|
@@ -4456,6 +4457,74 @@ void ath10k_wmi_event_pdev_tpc_config(st
|
|
__le32_to_cpu(ev->rate_max));
|
|
}
|
|
|
|
+static void
|
|
+ath10k_wmi_handle_tdls_peer_event(struct ath10k *ar, struct sk_buff *skb)
|
|
+{
|
|
+ struct wmi_tdls_peer_event *ev;
|
|
+ struct ath10k_peer *peer;
|
|
+ struct ath10k_vif *arvif;
|
|
+ int vdev_id;
|
|
+ int peer_status;
|
|
+ int peer_reason;
|
|
+ u8 reason;
|
|
+
|
|
+ if (skb->len < sizeof(*ev)) {
|
|
+ ath10k_err(ar, "received tdls peer event with invalid size (%d bytes)\n",
|
|
+ skb->len);
|
|
+ return;
|
|
+ }
|
|
+
|
|
+ ev = (struct wmi_tdls_peer_event *)skb->data;
|
|
+ vdev_id = __le32_to_cpu(ev->vdev_id);
|
|
+ peer_status = __le32_to_cpu(ev->peer_status);
|
|
+ peer_reason = __le32_to_cpu(ev->peer_reason);
|
|
+
|
|
+ spin_lock_bh(&ar->data_lock);
|
|
+ peer = ath10k_peer_find(ar, vdev_id, ev->peer_macaddr.addr);
|
|
+ spin_unlock_bh(&ar->data_lock);
|
|
+
|
|
+ if (!peer) {
|
|
+ ath10k_warn(ar, "failed to find peer entry for %pM\n",
|
|
+ ev->peer_macaddr.addr);
|
|
+ return;
|
|
+ }
|
|
+
|
|
+ switch (peer_status) {
|
|
+ case WMI_TDLS_SHOULD_TEARDOWN:
|
|
+ switch (peer_reason) {
|
|
+ case WMI_TDLS_TEARDOWN_REASON_PTR_TIMEOUT:
|
|
+ case WMI_TDLS_TEARDOWN_REASON_NO_RESPONSE:
|
|
+ case WMI_TDLS_TEARDOWN_REASON_RSSI:
|
|
+ reason = WLAN_REASON_TDLS_TEARDOWN_UNREACHABLE;
|
|
+ break;
|
|
+ default:
|
|
+ reason = WLAN_REASON_TDLS_TEARDOWN_UNSPECIFIED;
|
|
+ break;
|
|
+ }
|
|
+
|
|
+ arvif = ath10k_get_arvif(ar, vdev_id);
|
|
+ if (!arvif) {
|
|
+ ath10k_warn(ar, "received tdls peer event for invalid vdev id %u\n",
|
|
+ vdev_id);
|
|
+ return;
|
|
+ }
|
|
+
|
|
+ ieee80211_tdls_oper_request(arvif->vif, ev->peer_macaddr.addr,
|
|
+ NL80211_TDLS_TEARDOWN, reason,
|
|
+ GFP_ATOMIC);
|
|
+
|
|
+ ath10k_dbg(ar, ATH10K_DBG_WMI,
|
|
+ "received tdls teardown event for peer %pM reason %u\n",
|
|
+ ev->peer_macaddr.addr, peer_reason);
|
|
+ break;
|
|
+ default:
|
|
+ ath10k_dbg(ar, ATH10K_DBG_WMI,
|
|
+ "received unknown tdls peer event %u\n",
|
|
+ peer_status);
|
|
+ break;
|
|
+ }
|
|
+}
|
|
+
|
|
void ath10k_wmi_event_pdev_ftm_intg(struct ath10k *ar, struct sk_buff *skb)
|
|
{
|
|
ath10k_dbg(ar, ATH10K_DBG_WMI, "WMI_PDEV_FTM_INTG_EVENTID\n");
|
|
@@ -5478,6 +5547,9 @@ static void ath10k_wmi_10_4_op_rx(struct
|
|
case WMI_10_4_PDEV_TPC_CONFIG_EVENTID:
|
|
ath10k_wmi_event_pdev_tpc_config(ar, skb);
|
|
break;
|
|
+ case WMI_10_4_TDLS_PEER_EVENTID:
|
|
+ ath10k_wmi_handle_tdls_peer_event(ar, skb);
|
|
+ break;
|
|
default:
|
|
ath10k_warn(ar, "Unknown eventid: %d\n", id);
|
|
break;
|