From: Rajkumar Manoharan <rmanohar@codeaurora.org>
To: ath11k@lists.infradead.org
Cc: Pradeep Kumar Chitrapu <pradeepc@codeaurora.org>,
Rajkumar Manoharan <rmanohar@codeaurora.org>
Subject: [PATCH v2 2/3] ath11k: allow 4 address transmission for mesh packet
Date: Fri, 19 Apr 2019 11:11:37 -0700 [thread overview]
Message-ID: <1555697498-27472-3-git-send-email-rmanohar@codeaurora.org> (raw)
In-Reply-To: <1555697498-27472-1-git-send-email-rmanohar@codeaurora.org>
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 | 11 +++++++++++
2 files changed, 14 insertions(+)
diff --git a/drivers/net/wireless/ath/ath11k/dp_tx.c b/drivers/net/wireless/ath/ath11k/dp_tx.c
index 5324c5f514f8..b2807a88df9c 100644
--- a/drivers/net/wireless/ath/ath11k/dp_tx.c
+++ b/drivers/net/wireless/ath/ath11k/dp_tx.c
@@ -131,7 +131,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 7d838f2a9138..ccac41bf9217 100644
--- a/drivers/net/wireless/ath/ath11k/mac.c
+++ b/drivers/net/wireless/ath/ath11k/mac.c
@@ -2550,6 +2550,17 @@ static int ath11k_sta_state(struct ieee80211_hw *hw,
goto exit;
}
+ 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);
+ goto exit;
+ }
+ }
+
ret = ath11k_dp_peer_setup(ar, arvif->vdev_id, sta->addr);
if (ret) {
ath11k_warn(ar->ab, "failed to setup dp for peer %pM on vdev %i (%d)\n",
--
1.9.1
_______________________________________________
ath11k mailing list
ath11k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath11k
next prev parent reply other threads:[~2019-04-19 18:11 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-04-19 18:11 [PATCH v2 0/3] ath11k: Add Mesh mode support Rajkumar Manoharan
2019-04-19 18:11 ` [PATCH v2 1/3] ath11k: enable mesh mode Rajkumar Manoharan
2019-04-19 18:11 ` Rajkumar Manoharan [this message]
2019-04-19 18:11 ` [PATCH v2 3/3] ath11k: remove unnecessary check for PMF Rajkumar Manoharan
2019-05-28 13:48 ` [PATCH v2 0/3] ath11k: Add Mesh mode support Sven Eckelmann
2019-05-28 14:39 ` Sven Eckelmann
2019-05-29 4:26 ` Rajkumar Manoharan
2019-05-29 7:41 ` Sven Eckelmann
2019-05-29 7:52 ` Rajkumar Manoharan
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1555697498-27472-3-git-send-email-rmanohar@codeaurora.org \
--to=rmanohar@codeaurora.org \
--cc=ath11k@lists.infradead.org \
--cc=pradeepc@codeaurora.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox