* ath11k: Meshpoint interfaces with fw 0x30804a5
@ 2019-04-03 14:47 Sven Eckelmann
0 siblings, 0 replies; 4+ messages in thread
From: Sven Eckelmann @ 2019-04-03 14:47 UTC (permalink / raw)
To: ath11k; +Cc: Simon Wunderlich, Shashidhar Lakkavalli
[-- Attachment #1.1.1: Type: text/plain, Size: 6177 bytes --]
Hi,
I just wanted to try out meshpoint interfaces with firmware 0x30804a5. The
change seemed to be a straight forward port from ath10k. But it turned out
that the firmware seems to behave significantly different. I saw three
unexpected things:
0. firmware dies immediately when using subtype 6 (MESH_11S) during vdev
create
[ 28.663988] Fatal error received from wcss software!:
[ 28.663988] QC Image Version: QC_IMAGE_VERSION_STRING=WLAN.HK.1.1-01967-QCAHKSWPL_SILICONZ-1
[ 28.663988] Image Variant : IMAGE_VARIANT_STRING=8074.wlanfw.evalQ
[ 28.663988]
[ 28.663988] ar_wal_peer.c:7223 Assertion !WAL_IS_TID_QOS_DATA(tidno) failedparam0 :zero, param1 :zero, param2 :zero.
[ 28.663988] Thread ID : 0x00000069 Thread name : WLAN RT0 Process ID : 0
[ 28.663988] Register:
[ 28.663988] SP : 0x4c5a1510
[ 28.663988] FP : 0x4c5a1518
[ 28.663988] PC : 0x4b0ba260
[ 28.663988] SSR : 0x00000008
[ 28.663988] BADVA : 0x00020000
[ 28.663988] LR : 0x4b0b9678
[ 28.663988]
[ 28.663988] Stack Dump
[ 28.663988] from : 0x4c5a1510
[ 28.663988] to : 0x4c5a1df8
[ 28.663988]
[ 28.710734] subsys-restart: subsystem_restart_dev(): Restart sequence requested for q6v5-wcss, restart_level = RELATED.
[ 28.733017] subsys-restart: subsystem_shutdown(): [kworker/3:1:125]: Shutting down q6v5-m3
[ 28.743654] remoteproc0: stopped remote processor q6v5-m3
[ 28.752024] subsys-restart: subsystem_shutdown(): [kworker/3:1:125]: Shutting down q6v5-wcss
[ 28.783038] remoteproc1: stopped remote processor q6v5-wcss
[ 28.783252] glink_core_link_down glink is down
[ 28.787759] <SSR>: glink SUBSYS_AFTER_SHUTDOWN cleanup done
[ 28.842155] glink_xprt_close_event
[ 30.532142] br-lan: port 2(wlan0-1) entered forwarding state
[ 31.582164] ath11k c000000.wifi: failed to vdev 1 create peer for AP: -110
[ 33.802144] open time Out: Q6 crash dump collection failed
[ 33.802370] subsys-restart: subsystem_ramdump(): q6v5-wcss[kworker/3:1:125]: Ramdump failed.
[ 33.806617] <SSR>: glink SUBSYS_BEFOER_POWERUP reinit done
[ 33.815142] ------------[ cut here ]------------
[ 33.820394] kernel BUG at backports-next-ath11k-20190402/drivers/net/wireless/ath/ath11k/ahb.c:997!
[ 33.825179] Internal error: Oops - BUG: 0 [#1] PREEMPT SMP
1. WMI commands just timeout (and system is rebooted automatically after a
while) when the meshpoint interface (with subtype 5 during vdev create)
is the only existing interface
[ 514.378873] ath11k c000000.wifi: Unknown eventid: 0x3e001
[ 514.378934] ath11k c000000.wifi: Unknown eventid: 0x3e001
[ 514.383259] ath11k c000000.wifi: Unknown eventid: 0x3e001
[ 514.390426] ath11k c000000.wifi: Set slottime: 1 for VDEV: 0
[ 514.394045] ath11k c000000.wifi: Set preamble: 1 for VDEV: 0
[ 514.400778] IPv6: ADDRCONF(NETDEV_UP): mesh0: link is not ready
[ 514.767922] ath11k c000000.wifi: Beacon interval: 100 set for VDEV: 0
[ 514.768002] ath11k c000000.wifi: Set staggered beacon mode for VDEV: 0
[ 514.774225] IPv6: ADDRCONF(NETDEV_CHANGE): mesh0: link becomes ready
[ 514.780195] ath11k c000000.wifi: Added peer: ac:86:74:61:6c:30 for VDEV: 0
[ 514.787351] ath11k c000000.wifi: Station ac:86:74:61:6c:30 moved to assoc state
[ 514.793344] ath11k c000000.wifi: Set staggered beacon mode for VDEV: 0
[ 517.792161] ath11k c000000.wifi: wmi command 16387 timeout
[ 517.792184] ath11k c000000.wifi: failed to send WMI_PDEV_SET_PARAM cmd
[ 517.796530] ath11k c000000.wifi: Failed to set beacon mode for VDEV: 0
[ 520.802153] ath11k c000000.wifi: wmi command 28675 timeout
[ 520.802175] ath11k c000000.wifi: failed to send WMI_BCN_TMPL_CMDID
....
[ 531.830735] Fatal error received from wcss software!:
[ 531.830735] QC Image Version: QC_IMAGE_VERSION_STRING=WLAN.HK.1.1-01967-QCAHKSWPL_SILICONZ-1
[ 531.830735] Image Variant : IMAGE_VARIANT_STRING=8074.wlanfw.evalQ
[ 531.830735]
[ 531.830735] dog_hb.c:209 DOG_HB detects starvation of task "WLAN RT0", triage with its owner(d.dump 0x4b554b50)
2. if I enable an AP device then I see HWMP path discovery Action frames for
each outgoing packet. So it looks to me like the response is not coming
in correctly (which is the answer from the remote device)
The device is able to receive packets (broadcast/unicast) from two OM5P-ACv2
when I enable an AP (02:03:7f:12:8b:67) at the same time (see option 2.) as
the meshpoint interface (00:03:7f:12:8b:67). But sending out is not working
at all (no packets in the air but visible in a monitor dump of the ath11k).
Also not when fixing the path (so no action frames for path discovery are
required anymore).
1. Where is is the requirement coming from the firmware to have an AP running
at the same time and how to avoid that?
2. How can I tell the firmware that it should forward the path reply action
frame for the path discovery up to us. I can see this frame on a third
(capture) device but not when capturing using a monitor interface on the
ath11k device.
* The only action frames I can see are the ones we sent (so which the
Linux wifi layer gave back to the monitor interface). All other management
frames (send from some remote device) seem to be missing. This became
especially obvious when I wanted to check for beacons on the monitor
interface.
3. Why does the firmware filter my outgoing unicast/broadcast frames for
meshpoint interfaces? (btw. AP is also not working here for me - might be
related)
* I can see them in the monitor dump but not in the air
Just for reference: The meshpoint interfaces were created using following
/etc/config/wireless OpenWrt-config:
config wifi-iface 'wmesh'
option device 'radio0'
option ifname 'mesh0'
option network 'bat0_hardif_mesh0'
option mode 'mesh'
option mesh_id 'mesh'
option mesh_fwding '0'
option mesh_ttl '1'
option 'mcast_rate' '24000'
Kind regards,
Sven
[-- Attachment #1.1.2: 0001-ath11k-Enable-meshpoint-mode.patch --]
[-- Type: text/x-patch, Size: 3640 bytes --]
From 2ad92425c1676f80929f1e2000159dea28d98419 Mon Sep 17 00:00:00 2001
From: Sven Eckelmann <seckelmann@datto.com>
Date: Fri, 29 Mar 2019 12:38:52 +0100
Subject: [PATCH] ath11k: Enable meshpoint interfaces
Signed-off-by: Sven Eckelmann <seckelmann@datto.com>
---
drivers/net/wireless/ath/ath11k/mac.c | 23 ++++++++++++++++++++++-
drivers/net/wireless/ath/ath11k/wmi.h | 1 +
2 files changed, 23 insertions(+), 1 deletion(-)
diff --git a/drivers/net/wireless/ath/ath11k/mac.c b/drivers/net/wireless/ath/ath11k/mac.c
index ad75269174dc..305b7ffb8cee 100644
--- a/drivers/net/wireless/ath/ath11k/mac.c
+++ b/drivers/net/wireless/ath/ath11k/mac.c
@@ -1640,6 +1640,13 @@ static void ath11k_bss_info_changed(struct ieee80211_hw *hw,
if (ret)
ath11k_warn(ar->ab, "failed to update bcn template: %d\n",
ret);
+
+ if (ieee80211_vif_is_mesh(vif)) {
+ /* mesh doesn't use SSID but firmware needs it */
+ strncpy(arvif->u.ap.ssid, "mesh",
+ sizeof(arvif->u.ap.ssid));
+ arvif->u.ap.ssid_len = 4;
+ }
}
if (changed & BSS_CHANGED_AP_PROBE_RESP) {
@@ -2150,7 +2157,8 @@ static int ath11k_install_peer_wep_keys(struct ath11k_vif *arvif,
lockdep_assert_held(&ar->conf_mutex);
- if (WARN_ON(arvif->vif->type != NL80211_IFTYPE_AP))
+ if (WARN_ON(arvif->vif->type != NL80211_IFTYPE_AP &&
+ arvif->vif->type != NL80211_IFTYPE_MESH_POINT))
return -EINVAL;
spin_lock_bh(&ar->data_lock);
@@ -2744,6 +2752,7 @@ static int ath11k_sta_state(struct ieee80211_hw *hw,
} else if (old_state == IEEE80211_STA_AUTH &&
new_state == IEEE80211_STA_ASSOC &&
(vif->type == NL80211_IFTYPE_AP ||
+ vif->type == NL80211_IFTYPE_MESH_POINT ||
vif->type == NL80211_IFTYPE_ADHOC)) {
ret = ath11k_station_assoc(ar, vif, sta, false);
if (ret)
@@ -2756,6 +2765,7 @@ static int ath11k_sta_state(struct ieee80211_hw *hw,
} else if (old_state == IEEE80211_STA_ASSOC &&
new_state == IEEE80211_STA_AUTH &&
(vif->type == NL80211_IFTYPE_AP ||
+ vif->type == NL80211_IFTYPE_MESH_POINT ||
vif->type == NL80211_IFTYPE_ADHOC)) {
ret = ath11k_station_disassoc(ar, vif, sta);
if (ret)
@@ -3590,6 +3600,10 @@ static int ath11k_add_interface(struct ieee80211_hw *hw,
case NL80211_IFTYPE_STATION:
arvif->vdev_type = WMI_VDEV_TYPE_STA;
break;
+ case NL80211_IFTYPE_MESH_POINT:
+ arvif->vdev_type = WMI_VDEV_TYPE_AP;
+ arvif->vdev_subtype = WMI_VDEV_SUBTYPE_MESH_11S;
+ break;
case NL80211_IFTYPE_AP:
arvif->vdev_type = WMI_VDEV_TYPE_AP;
break;
@@ -4841,6 +4855,9 @@ static const struct ieee80211_iface_limit ath11k_if_limits[] = {
{
.max = 16,
.types = BIT(NL80211_IFTYPE_AP)
+#ifdef CPTCFG_MAC80211_MESH
+ | BIT(NL80211_IFTYPE_MESH_POINT)
+#endif
},
};
@@ -4957,6 +4974,10 @@ static int ath11k_mac_register(struct ath11k *ar)
ar->hw->wiphy->interface_modes = BIT(NL80211_IFTYPE_STATION) |
BIT(NL80211_IFTYPE_AP);
+ if (test_bit(WMI_SERVICE_MESH_11S, ar->ab->wmi_sc.svc_map))
+ ar->hw->wiphy->interface_modes |=
+ BIT(NL80211_IFTYPE_MESH_POINT);
+
ieee80211_hw_set(ar->hw, SIGNAL_DBM);
ieee80211_hw_set(ar->hw, SUPPORTS_PS);
ieee80211_hw_set(ar->hw, SUPPORTS_DYNAMIC_PS);
diff --git a/drivers/net/wireless/ath/ath11k/wmi.h b/drivers/net/wireless/ath/ath11k/wmi.h
index 55634b1d5ec2..dba42a3cf9ea 100644
--- a/drivers/net/wireless/ath/ath11k/wmi.h
+++ b/drivers/net/wireless/ath/ath11k/wmi.h
@@ -4713,6 +4713,7 @@ enum wmi_vdev_subtype {
WMI_VDEV_SUBTYPE_P2P_DEVICE = 1,
WMI_VDEV_SUBTYPE_P2P_CLIENT = 2,
WMI_VDEV_SUBTYPE_P2P_GO = 3,
+ WMI_VDEV_SUBTYPE_MESH_11S = 5,
};
enum wmi_sta_powersave_param {
--
2.20.1
[-- Attachment #1.2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
[-- Attachment #2: Type: text/plain, Size: 146 bytes --]
_______________________________________________
ath11k mailing list
ath11k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath11k
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: ath11k: Meshpoint interfaces with fw 0x30804a5
[not found] <cd1c5f61ef06cf858ad650c7529ed2ff@codeaurora.org>
@ 2019-04-04 3:21 ` Rajkumar Manoharan
2019-04-04 6:45 ` Sven Eckelmann
0 siblings, 1 reply; 4+ messages in thread
From: Rajkumar Manoharan @ 2019-04-04 3:21 UTC (permalink / raw)
To: ath11k, seckelmann
[-- Attachment #1: Type: text/plain, Size: 1320 bytes --]
> I just wanted to try out meshpoint interfaces with firmware 0x30804a5.
> The
> change seemed to be a straight forward port from ath10k. But it turned
> out
> that the firmware seems to behave significantly different. I saw three
> unexpected things:
>
> 0. firmware dies immediately when using subtype 6 (MESH_11S) during
> vdev
> create
>
> [ 28.663988] Fatal error received from wcss software!:
> [ 28.663988] QC Image Version:
> QC_IMAGE_VERSION_STRING=WLAN.HK.1.1-01967-QCAHKSWPL_SILICONZ-1
> [ 28.663988] Image Variant :
> IMAGE_VARIANT_STRING=8074.wlanfw.evalQ
> [ 28.663988]
> [ 28.663988] ar_wal_peer.c:7223 Assertion
> !WAL_IS_TID_QOS_DATA(tidno) failedparam0 :zero, param1 :zero, param2
> :zero.
>
Sven,
Cool... The target assert was fixed in firmware. QCA also is bringing up
ath11k in MP and with attached list of changes, we were able to send
traffic
open-mesh. Changes are not yet pushed to tree.
Below issues were observed in bring up and fixed in
WLAN.HK.2.1.0.1-00113-QCAHKSWPL_SILICONZ-1 firmware
1) Assert in mesh interface creation.
2) Group action were filtered
3) fix 4 addr in firmware for mesh peers
Moving forward please use 2.1.0-1 firmware release which is meant for
ath11k.
We are still working on to enable secured mesh (SAE).
-Rajkumar
[-- Attachment #2: mesh_aio.patch --]
[-- Type: text/x-diff, Size: 15378 bytes --]
From 8c5024b43512ae5985436c835d2624041b823a7e Mon Sep 17 00:00:00 2001
From: Rajkumar Manoharan <rmanohar@codeaurora.org>
Date: Mon, 21 Jan 2019 16:45:21 -0800
Subject: [PATCH 1/6] ath11k: enable mesh mode
Allow Meshpoint configuration from ath11k and advertise MP
support to mac80211.
Signed-off-by: Rajkumar Manoharan <rmanohar@codeaurora.org>
---
drivers/net/wireless/ath/ath11k/mac.c | 13 +++++++++++--
drivers/net/wireless/ath/ath11k/wmi.h | 11 +++++++----
2 files changed, 18 insertions(+), 6 deletions(-)
diff --git a/drivers/net/wireless/ath/ath11k/mac.c b/drivers/net/wireless/ath/ath11k/mac.c
index 3d624a46c62c..07b340a97be9 100644
--- a/drivers/net/wireless/ath/ath11k/mac.c
+++ b/drivers/net/wireless/ath/ath11k/mac.c
@@ -2150,7 +2150,8 @@ static int ath11k_install_peer_wep_keys(struct ath11k_vif *arvif,
lockdep_assert_held(&ar->conf_mutex);
- if (WARN_ON(arvif->vif->type != NL80211_IFTYPE_AP))
+ if (WARN_ON(arvif->vif->type != NL80211_IFTYPE_AP &&
+ arvif->vif->type != NL80211_IFTYPE_MESH_POINT))
return -EINVAL;
spin_lock_bh(&ar->data_lock);
@@ -2713,6 +2714,7 @@ static int ath11k_sta_state(struct ieee80211_hw *hw,
} else if (old_state == IEEE80211_STA_AUTH &&
new_state == IEEE80211_STA_ASSOC &&
(vif->type == NL80211_IFTYPE_AP ||
+ vif->type == NL80211_IFTYPE_MESH_POINT ||
vif->type == NL80211_IFTYPE_ADHOC)) {
ret = ath11k_station_assoc(ar, vif, sta, false);
if (ret)
@@ -2725,6 +2727,7 @@ static int ath11k_sta_state(struct ieee80211_hw *hw,
} else if (old_state == IEEE80211_STA_ASSOC &&
new_state == IEEE80211_STA_AUTH &&
(vif->type == NL80211_IFTYPE_AP ||
+ vif->type == NL80211_IFTYPE_MESH_POINT ||
vif->type == NL80211_IFTYPE_ADHOC)) {
ret = ath11k_station_disassoc(ar, vif, sta);
if (ret)
@@ -3562,6 +3565,8 @@ static int ath11k_add_interface(struct ieee80211_hw *hw,
case NL80211_IFTYPE_STATION:
arvif->vdev_type = WMI_VDEV_TYPE_STA;
break;
+ case NL80211_IFTYPE_MESH_POINT:
+ arvif->vdev_subtype = WMI_VDEV_SUBTYPE_MESH_11S;
case NL80211_IFTYPE_AP:
arvif->vdev_type = WMI_VDEV_TYPE_AP;
break;
@@ -4813,6 +4818,9 @@ static int ath11k_get_survey(struct ieee80211_hw *hw, int idx,
{
.max = 16,
.types = BIT(NL80211_IFTYPE_AP)
+#ifdef CONFIG_MAC80211_MESH
+ | BIT(NL80211_IFTYPE_MESH_POINT)
+#endif
},
};
@@ -4927,7 +4935,8 @@ static int ath11k_mac_register(struct ath11k *ar)
ar->hw->wiphy->available_antennas_tx = cap->tx_chain_mask;
ar->hw->wiphy->interface_modes = BIT(NL80211_IFTYPE_STATION) |
- BIT(NL80211_IFTYPE_AP);
+ BIT(NL80211_IFTYPE_AP) |
+ BIT(NL80211_IFTYPE_MESH_POINT);
ieee80211_hw_set(ar->hw, SIGNAL_DBM);
ieee80211_hw_set(ar->hw, SUPPORTS_PS);
diff --git a/drivers/net/wireless/ath/ath11k/wmi.h b/drivers/net/wireless/ath/ath11k/wmi.h
index 06ba7cdd9c10..c25ed3934fb7 100644
--- a/drivers/net/wireless/ath/ath11k/wmi.h
+++ b/drivers/net/wireless/ath/ath11k/wmi.h
@@ -4685,10 +4685,13 @@ enum wmi_vdev_type {
};
enum wmi_vdev_subtype {
- WMI_VDEV_SUBTYPE_NONE = 0,
- WMI_VDEV_SUBTYPE_P2P_DEVICE = 1,
- WMI_VDEV_SUBTYPE_P2P_CLIENT = 2,
- WMI_VDEV_SUBTYPE_P2P_GO = 3,
+ WMI_VDEV_SUBTYPE_NONE,
+ WMI_VDEV_SUBTYPE_P2P_DEVICE,
+ WMI_VDEV_SUBTYPE_P2P_CLIENT,
+ WMI_VDEV_SUBTYPE_P2P_GO,
+ WMI_VDEV_SUBTYPE_PROXY_STA,
+ WMI_VDEV_SUBTYPE_MESH_NON_11S,
+ WMI_VDEV_SUBTYPE_MESH_11S,
};
enum wmi_sta_powersave_param {
--
1.9.1
From 77c0156d8f4eeca518dc63946b413c1127323dbe Mon Sep 17 00:00:00 2001
From: Rajkumar Manoharan <rmanohar@codeaurora.org>
Date: Wed, 13 Mar 2019 11:21:54 -0700
Subject: [PATCH 2/6] ath11k: allow 4 address transmission for mesh packet
Inform the target to use 4 adressses in 802.11 header for mesh data
by marking the peer is capable of operating in 4 address format.
Also ensure to inform TCL ring that mesh header is pesent in payload.
This will be useful for enabling HW checksumming form mesh packets.
Co-Developed-by: Pradeep Kumar Chitrapu <pradeepc@codeaurora.org>
Signed-off-by: Pradeep Kumar Chitrapu <pradeepc@codeaurora.org>
Signed-off-by: Rajkumar Manoharan <rmanohar@codeaurora.org>
---
drivers/net/wireless/ath/ath11k/dp_tx.c | 3 +++
drivers/net/wireless/ath/ath11k/mac.c | 9 +++++++++
2 files changed, 12 insertions(+)
diff --git a/drivers/net/wireless/ath/ath11k/dp_tx.c b/drivers/net/wireless/ath/ath11k/dp_tx.c
index eedf8a465db6..33b190ed9d7c 100644
--- a/drivers/net/wireless/ath/ath11k/dp_tx.c
+++ b/drivers/net/wireless/ath/ath11k/dp_tx.c
@@ -128,7 +128,10 @@ int ath11k_dp_tx(struct ath11k *ar, struct ath11k_vif *arvif,
FIELD_PREP(HAL_TCL_DATA_CMD_INFO1_TCP6_CKSUM_EN, 1);
}
+ if (ieee80211_vif_is_mesh(arvif->vif))
+ ti.flags1 |= FIELD_PREP(HAL_TCL_DATA_CMD_INFO2_MESH_ENABLE, 1);
ti.flags1 |= FIELD_PREP(HAL_TCL_DATA_CMD_INFO2_TID_OVERWRITE, 1);
+
ti.tid = ath11k_dp_get_tid(skb);
switch (ti.encap_type) {
diff --git a/drivers/net/wireless/ath/ath11k/mac.c b/drivers/net/wireless/ath/ath11k/mac.c
index 07b340a97be9..14bd1e86c6f4 100644
--- a/drivers/net/wireless/ath/ath11k/mac.c
+++ b/drivers/net/wireless/ath/ath11k/mac.c
@@ -2487,6 +2487,15 @@ static int ath11k_station_assoc(struct ath11k *ar,
}
}
+ if (ieee80211_vif_is_mesh(vif)) {
+ ret = ath11k_wmi_set_peer_param(ar, sta->addr, arvif->vdev_id,
+ WMI_PEER_USE_4ADDR, 1);
+ if (ret) {
+ ath11k_warn(ar->ab, "failed to STA %pM 4addr capability: %d\n",
+ sta->addr, ret);
+ }
+ }
+
return 0;
}
--
1.9.1
From 7cd5c82b3162a41e156240ed6d3ff74f1ffc745f Mon Sep 17 00:00:00 2001
From: Rajkumar Manoharan <rmanohar@codeaurora.org>
Date: Thu, 28 Mar 2019 13:34:18 -0700
Subject: [PATCH 3/6] ath11k: handle encrypted mesh group action frame
Firmware delivers mesh group action frame as encrypted payload.
To allow software decryption for these group action frames, rx
status should not be marked as RX_FLAG_DECRYPTED and protected
bit in frame control should not be cleared.
Tested-by: Pradeep Kumar Chitrapu <pradeepc@codeaurora.org>
Signed-off-by: Rajkumar Manoharan <rmanohar@codeaurora.org>
---
drivers/net/wireless/ath/ath11k/wmi.c | 56 +++++++++++++++++++++++------------
1 file changed, 37 insertions(+), 19 deletions(-)
diff --git a/drivers/net/wireless/ath/ath11k/wmi.c b/drivers/net/wireless/ath/ath11k/wmi.c
index e28cafe5d94f..d983bbbdfef0 100644
--- a/drivers/net/wireless/ath/ath11k/wmi.c
+++ b/drivers/net/wireless/ath/ath11k/wmi.c
@@ -3509,20 +3509,22 @@ int ath11k_pull_vdev_stopped_param_tlv(struct ath11k_base *ab, u8 *evt_buf,
/* If keys are configured, HW decrypts all frames
* with protected bit set. Mark such frames as decrypted.
*/
-static bool ath11k_wmi_check_wep_reauth(struct ath11k_base *ab,
- struct sk_buff *skb)
+static void ath11k_wmi_handle_wep_reauth(struct ath11k_base *ab,
+ struct sk_buff *skb,
+ struct ieee80211_rx_status *status)
{
struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)skb->data;
unsigned int hdrlen;
bool peer_key;
u8 *addr, keyidx;
- if (!ieee80211_is_auth(hdr->frame_control))
- return false;
+ if (!ieee80211_is_auth(hdr->frame_control) ||
+ !ieee80211_has_protected(hdr->frame_control))
+ return;
hdrlen = ieee80211_hdrlen(hdr->frame_control);
if (skb->len < (hdrlen + IEEE80211_WEP_IV_LEN))
- return false;
+ return;
keyidx = skb->data[hdrlen + (IEEE80211_WEP_IV_LEN - 1)] >> WEP_KEYID_SHIFT;
addr = ieee80211_get_SA(hdr);
@@ -3534,10 +3536,8 @@ static bool ath11k_wmi_check_wep_reauth(struct ath11k_base *ab,
if (peer_key) {
ath11k_dbg(ab, ATH11K_DBG_MAC,
"mac wep key present for peer %pM\n", addr);
- return true;
+ status->flag |= RX_FLAG_DECRYPTED;
}
-
- return false;
}
int ath11k_pull_mgmt_rx_params_tlv(struct ath11k_base *ab,
@@ -5060,6 +5060,28 @@ void ath11k_vdev_stopped_event(struct ath11k_base *ab, u8 *evt_buf, u32 len)
ath11k_dbg(ab, ATH11K_DBG_WMI, "vdev stopped for vdev id %d", vdev_id);
}
+static bool ath11k_wmi_rx_is_decrypted(struct ieee80211_hdr *hdr)
+{
+ if (!ieee80211_has_protected(hdr->frame_control))
+ return false;
+
+ /* FW delivers WEP Shared Auth frame with Protected Bit set and
+ * encrypted payload. However in case of PMF it delivers decrypted
+ * frames with Protected Bit set.
+ */
+ if (ieee80211_is_auth(hdr->frame_control))
+ return false;
+
+ /* FW delivers broadcast or multicast management frames
+ * (ex: group privacy action frames in mesh) as encrypted payload.
+ */
+ if (is_multicast_ether_addr(ieee80211_get_DA(hdr)))
+ return false;
+
+ return true;
+}
+
+
void ath11k_mgmt_rx_event(struct ath11k_base *ab, struct sk_buff *skb)
{
struct mgmt_rx_event_params rx_ev;
@@ -5135,18 +5157,14 @@ void ath11k_mgmt_rx_event(struct ath11k_base *ab, struct sk_buff *skb)
*/
status->flag |= RX_FLAG_SKIP_MONITOR;
- if (ieee80211_has_protected(hdr->frame_control)) {
- /* FW delivers WEP Shared Auth frame with Protected Bit set and
- * encrypted payload.
- */
- if (ath11k_wmi_check_wep_reauth(ab, skb)) {
- status->flag |= RX_FLAG_DECRYPTED;
- /* However in case of PMF, FW delivers decrypted frames
- * with Protected Bit set. Don't clear that.
- */
- } else if (!ieee80211_is_robust_mgmt_frame(skb)) {
- status->flag |= RX_FLAG_DECRYPTED;
+ ath11k_wmi_handle_wep_reauth(ab, skb, status);
+
+ if (ath11k_wmi_rx_is_decrypted(hdr)) {
+ status->flag |= RX_FLAG_DECRYPTED;
+ if (!ieee80211_is_action(hdr->frame_control) &&
+ !ieee80211_is_deauth(hdr->frame_control) &&
+ !ieee80211_is_disassoc(hdr->frame_control)) {
status->flag |= RX_FLAG_IV_STRIPPED |
RX_FLAG_MMIC_STRIPPED;
hdr->frame_control = __cpu_to_le16(fc &
--
1.9.1
From 13ed4c1de2595f5ce21c09615974a086bfcbe22c Mon Sep 17 00:00:00 2001
From: Rajkumar Manoharan <rmanohar@codeaurora.org>
Date: Thu, 28 Mar 2019 16:45:11 -0700
Subject: [PATCH 4/6] ath11k: allow software encryption of GMAC/CMAC ciphers
Until hardward encryption of CMAC/GMAC ciphers are properly
validated, allow only software encryption for now.
Signed-off-by: Rajkumar Manoharan <rmanohar@codeaurora.org>
---
drivers/net/wireless/ath/ath11k/mac.c | 23 ++++++++++++++++++-----
1 file changed, 18 insertions(+), 5 deletions(-)
diff --git a/drivers/net/wireless/ath/ath11k/mac.c b/drivers/net/wireless/ath/ath11k/mac.c
index 14bd1e86c6f4..120246c9b536 100644
--- a/drivers/net/wireless/ath/ath11k/mac.c
+++ b/drivers/net/wireless/ath/ath11k/mac.c
@@ -2030,7 +2030,6 @@ static int ath11k_install_key(struct ath11k_vif *arvif,
switch (key->cipher) {
case WLAN_CIPHER_SUITE_CCMP:
arg.key_cipher = WMI_CIPHER_AES_CCM;
- /* TODO: Re-check if flag is valid */
key->flags |= IEEE80211_KEY_FLAG_GENERATE_IV_MGMT;
break;
case WLAN_CIPHER_SUITE_TKIP:
@@ -2049,12 +2048,12 @@ static int ath11k_install_key(struct ath11k_vif *arvif,
case WLAN_CIPHER_SUITE_GCMP_256:
arg.key_cipher = WMI_CIPHER_AES_GCM;
break;
- case WLAN_CIPHER_SUITE_BIP_GMAC_128:
- case WLAN_CIPHER_SUITE_BIP_GMAC_256:
- arg.key_cipher = WMI_CIPHER_AES_GMAC;
case WLAN_CIPHER_SUITE_AES_CMAC:
case WLAN_CIPHER_SUITE_BIP_CMAC_256:
- arg.key_cipher = WMI_CIPHER_AES_CMAC;
+ case WLAN_CIPHER_SUITE_BIP_GMAC_128:
+ case WLAN_CIPHER_SUITE_BIP_GMAC_256:
+ WARN_ON(1);
+ return -EINVAL;
default:
ath11k_warn(ar->ab, "cipher %d is not supported\n", key->cipher);
return -EOPNOTSUPP;
@@ -2237,6 +2236,13 @@ static int ath11k_set_key(struct ieee80211_hw *hw, enum set_key_cmd cmd,
int ret = 0;
u32 flags = 0;
+ /* this one needs to be done in software */
+ if (key->cipher == WLAN_CIPHER_SUITE_AES_CMAC ||
+ key->cipher == WLAN_CIPHER_SUITE_BIP_CMAC_256 ||
+ key->cipher == WLAN_CIPHER_SUITE_BIP_GMAC_128 ||
+ key->cipher == WLAN_CIPHER_SUITE_BIP_GMAC_256)
+ return 1;
+
if (key->keyidx > WMI_MAX_KEY_INDEX)
return -ENOSPC;
@@ -4922,7 +4928,14 @@ static int ath11k_mac_register(struct ath11k *ar)
WLAN_CIPHER_SUITE_WEP104,
WLAN_CIPHER_SUITE_TKIP,
WLAN_CIPHER_SUITE_CCMP,
+ WLAN_CIPHER_SUITE_GCMP,
+ WLAN_CIPHER_SUITE_GCMP_256,
+ WLAN_CIPHER_SUITE_CCMP_256,
+ /* Software encryption ciphers */
WLAN_CIPHER_SUITE_AES_CMAC,
+ WLAN_CIPHER_SUITE_BIP_CMAC_256,
+ WLAN_CIPHER_SUITE_BIP_GMAC_128,
+ WLAN_CIPHER_SUITE_BIP_GMAC_256,
};
int ret;
u32 ht_cap = 0;
--
1.9.1
From 74758b845bd69f339271457ae4fb8d067a769ad6 Mon Sep 17 00:00:00 2001
From: Rajkumar Manoharan <rmanohar@codeaurora.org>
Date: Thu, 28 Mar 2019 17:14:38 -0700
Subject: [PATCH 5/6] ath11k: fix key deletion
Signed-off-by: Rajkumar Manoharan <rmanohar@codeaurora.org>
---
drivers/net/wireless/ath/ath11k/mac.c | 14 +++++---------
drivers/net/wireless/ath/ath11k/wmi.c | 3 ++-
2 files changed, 7 insertions(+), 10 deletions(-)
diff --git a/drivers/net/wireless/ath/ath11k/mac.c b/drivers/net/wireless/ath/ath11k/mac.c
index 120246c9b536..1dfc10d954a9 100644
--- a/drivers/net/wireless/ath/ath11k/mac.c
+++ b/drivers/net/wireless/ath/ath11k/mac.c
@@ -2019,14 +2019,6 @@ static int ath11k_install_key(struct ath11k_vif *arvif,
reinit_completion(&ar->install_key_done);
- if (cmd == DISABLE_KEY) {
- /* TODO: Check if FW expects value other than NONE for del */
- /* arg.key_cipher = WMI_CIPHER_NONE; */
- arg.key_len = 0;
- arg.key_data = NULL;
- goto install;
- }
-
switch (key->cipher) {
case WLAN_CIPHER_SUITE_CCMP:
arg.key_cipher = WMI_CIPHER_AES_CCM;
@@ -2059,7 +2051,11 @@ static int ath11k_install_key(struct ath11k_vif *arvif,
return -EOPNOTSUPP;
}
-install:
+ if (cmd == DISABLE_KEY) {
+ arg.key_cipher = WMI_CIPHER_NONE;
+ arg.key_data = NULL;
+ }
+
ret = ath11k_wmi_vdev_install_key(arvif->ar, &arg);
if (ret)
return ret;
diff --git a/drivers/net/wireless/ath/ath11k/wmi.c b/drivers/net/wireless/ath/ath11k/wmi.c
index d983bbbdfef0..5ac178d4d9fd 100644
--- a/drivers/net/wireless/ath/ath11k/wmi.c
+++ b/drivers/net/wireless/ath/ath11k/wmi.c
@@ -1732,7 +1732,8 @@ int ath11k_wmi_vdev_install_key(struct ath11k *ar,
tlv = (struct wmi_tlv *)(skb->data + sizeof(*cmd));
tlv->header = FIELD_PREP(WMI_TLV_TAG, WMI_TAG_ARRAY_BYTE) |
FIELD_PREP(WMI_TLV_LEN, key_len_aligned);
- memcpy(tlv->value, (u8 *)arg->key_data, key_len_aligned);
+ if (arg->key_data)
+ memcpy(tlv->value, (u8 *)arg->key_data, key_len_aligned);
ret = ath11k_wmi_cmd_send(wmi, skb, WMI_VDEV_INSTALL_KEY_CMDID);
if (ret) {
--
1.9.1
From d6c3f0f2caecc8eb1066cf4ee3bee7ff10645515 Mon Sep 17 00:00:00 2001
From: Rajkumar Manoharan <rmanohar@codeaurora.org>
Date: Thu, 28 Mar 2019 17:22:09 -0700
Subject: [PATCH 6/6] ath11k: do not set default keyidx by default
Signed-off-by: Rajkumar Manoharan <rmanohar@codeaurora.org>
---
drivers/net/wireless/ath/ath11k/mac.c | 5 -----
1 file changed, 5 deletions(-)
diff --git a/drivers/net/wireless/ath/ath11k/mac.c b/drivers/net/wireless/ath/ath11k/mac.c
index 1dfc10d954a9..65d147852636 100644
--- a/drivers/net/wireless/ath/ath11k/mac.c
+++ b/drivers/net/wireless/ath/ath11k/mac.c
@@ -3611,11 +3611,6 @@ static int ath11k_add_interface(struct ieee80211_hw *hw,
spin_unlock_bh(&ar->data_lock);
arvif->def_wep_key_index = -1;
- param_id = WMI_VDEV_PARAM_DEF_KEYID;
- ret = ath11k_wmi_vdev_set_param_cmd(ar, arvif->vdev_id,
- param_id, arvif->def_wep_key_index);
- if (ret)
- ath11k_warn(ar->ab, "Failed to set default keyid: %d\n", ret);
param_id = WMI_VDEV_PARAM_TX_ENCAP_TYPE;
param_value = ATH11K_HW_TXRX_NATIVE_WIFI;
--
1.9.1
[-- Attachment #3: Type: text/plain, Size: 146 bytes --]
_______________________________________________
ath11k mailing list
ath11k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath11k
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: ath11k: Meshpoint interfaces with fw 0x30804a5
2019-04-04 3:21 ` ath11k: Meshpoint interfaces with fw 0x30804a5 Rajkumar Manoharan
@ 2019-04-04 6:45 ` Sven Eckelmann
2019-04-04 7:56 ` John Crispin
0 siblings, 1 reply; 4+ messages in thread
From: Sven Eckelmann @ 2019-04-04 6:45 UTC (permalink / raw)
To: Rajkumar Manoharan; +Cc: ath11k, john
[-- Attachment #1.1: Type: text/plain, Size: 1013 bytes --]
On Thursday, 4 April 2019 05:21:14 CEST Rajkumar Manoharan wrote:
[...]
> Below issues were observed in bring up and fixed in
> WLAN.HK.2.1.0.1-00113-QCAHKSWPL_SILICONZ-1 firmware
>
> 1) Assert in mesh interface creation.
> 2) Group action were filtered
> 3) fix 4 addr in firmware for mesh peers
>
>
> Moving forward please use 2.1.0-1 firmware release which is meant for
> ath11k.
> We are still working on to enable secured mesh (SAE).
Thanks. So it looks like I was on the right track for the initial 11s support.
We are using this firmware at the moment because I heard from John that the
newest(?) firmware was not working with the public available ath11k sources.
But since I have absolutely no idea about the current firmware situation of
ath11k and can also not find anything which sounds like 2.1.0-1 in Kalle's
repo [1] (and I most likely mixed something up), I would like John to add a
comment about the current situation.
Kind regards,
Sven
[1] https://github.com/kvalo/ath11k-firmware
[-- Attachment #1.2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
[-- Attachment #2: Type: text/plain, Size: 146 bytes --]
_______________________________________________
ath11k mailing list
ath11k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath11k
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: ath11k: Meshpoint interfaces with fw 0x30804a5
2019-04-04 6:45 ` Sven Eckelmann
@ 2019-04-04 7:56 ` John Crispin
0 siblings, 0 replies; 4+ messages in thread
From: John Crispin @ 2019-04-04 7:56 UTC (permalink / raw)
To: Sven Eckelmann, Rajkumar Manoharan; +Cc: ath11k
On 04/04/2019 08:45, Sven Eckelmann wrote:
> On Thursday, 4 April 2019 05:21:14 CEST Rajkumar Manoharan wrote:
> [...]
>> Below issues were observed in bring up and fixed in
>> WLAN.HK.2.1.0.1-00113-QCAHKSWPL_SILICONZ-1 firmware
>>
>> 1) Assert in mesh interface creation.
>> 2) Group action were filtered
>> 3) fix 4 addr in firmware for mesh peers
>>
>>
>> Moving forward please use 2.1.0-1 firmware release which is meant for
>> ath11k.
>> We are still working on to enable secured mesh (SAE).
> Thanks. So it looks like I was on the right track for the initial 11s support.
> We are using this firmware at the moment because I heard from John that the
> newest(?) firmware was not working with the public available ath11k sources.
> But since I have absolutely no idea about the current firmware situation of
> ath11k and can also not find anything which sounds like 2.1.0-1 in Kalle's
> repo [1] (and I most likely mixed something up), I would like John to add a
> comment about the current situation.
>
> Kind regards,
> Sven
>
> [1] https://github.com/kvalo/ath11k-firmware
Hi All,
we imported the latest FW into our tree and were seeing that the driver
did not come up successfully. I have not looked into the details yet as
I am busy working on the V4 of the 802.3 encap mode patches and the
matching ath11k support patch. I will give it another try int he coming
days.
John
_______________________________________________
ath11k mailing list
ath11k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath11k
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2019-04-04 7:56 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <cd1c5f61ef06cf858ad650c7529ed2ff@codeaurora.org>
2019-04-04 3:21 ` ath11k: Meshpoint interfaces with fw 0x30804a5 Rajkumar Manoharan
2019-04-04 6:45 ` Sven Eckelmann
2019-04-04 7:56 ` John Crispin
2019-04-03 14:47 Sven Eckelmann
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.