All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ath10k: Fix length of wmi tlv command for protected mgmt frames
@ 2019-02-15 15:19 ` Surabhi Vishnoi
  0 siblings, 0 replies; 4+ messages in thread
From: Surabhi Vishnoi @ 2019-02-15 15:19 UTC (permalink / raw)
  To: ath10k; +Cc: linux-wireless, Surabhi Vishnoi

The length of wmi tlv command for management tx send is calculated
incorrectly in case of protected management frames as there is addition
of IEEE80211_CCMP_MIC_LEN twice. This leads to improper behaviour of
firmware as the wmi tlv mgmt tx send command for protected mgmt frames
is formed wrongly.

Fix the length calculation of wmi tlv command for mgmt tx send in case
of protected management frames by adding the IEEE80211_CCMP_MIC_LEN only
once.

Tested HW: WCN3990
Tested FW: WLAN.HL.3.1-00784-QCAHLSWMTPLZ-1

Fixes: 1807da49733e "ath10k: wmi: add management tx by reference support over wmi"
Signed-off-by: Surabhi Vishnoi <svishnoi@codeaurora.org>
---
 drivers/net/wireless/ath/ath10k/wmi-tlv.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/net/wireless/ath/ath10k/wmi-tlv.c b/drivers/net/wireless/ath/ath10k/wmi-tlv.c
index 5d05bff..a1c28c1 100644
--- a/drivers/net/wireless/ath/ath10k/wmi-tlv.c
+++ b/drivers/net/wireless/ath/ath10k/wmi-tlv.c
@@ -2764,10 +2764,8 @@ static void *ath10k_wmi_tlv_put_wmm(void *ptr,
 	if ((ieee80211_is_action(hdr->frame_control) ||
 	     ieee80211_is_deauth(hdr->frame_control) ||
 	     ieee80211_is_disassoc(hdr->frame_control)) &&
-	     ieee80211_has_protected(hdr->frame_control)) {
-		len += IEEE80211_CCMP_MIC_LEN;
+	     ieee80211_has_protected(hdr->frame_control))
 		buf_len += IEEE80211_CCMP_MIC_LEN;
-	}
 
 	buf_len = min_t(u32, buf_len, WMI_TLV_MGMT_TX_FRAME_MAX_LEN);
 	buf_len = round_up(buf_len, 4);
-- 
1.9.1


_______________________________________________
ath10k mailing list
ath10k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath10k

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH] ath10k: Fix length of wmi tlv command for protected mgmt frames
@ 2019-02-15 15:19 ` Surabhi Vishnoi
  0 siblings, 0 replies; 4+ messages in thread
From: Surabhi Vishnoi @ 2019-02-15 15:19 UTC (permalink / raw)
  To: ath10k; +Cc: linux-wireless, Surabhi Vishnoi

The length of wmi tlv command for management tx send is calculated
incorrectly in case of protected management frames as there is addition
of IEEE80211_CCMP_MIC_LEN twice. This leads to improper behaviour of
firmware as the wmi tlv mgmt tx send command for protected mgmt frames
is formed wrongly.

Fix the length calculation of wmi tlv command for mgmt tx send in case
of protected management frames by adding the IEEE80211_CCMP_MIC_LEN only
once.

Tested HW: WCN3990
Tested FW: WLAN.HL.3.1-00784-QCAHLSWMTPLZ-1

Fixes: 1807da49733e "ath10k: wmi: add management tx by reference support over wmi"
Signed-off-by: Surabhi Vishnoi <svishnoi@codeaurora.org>
---
 drivers/net/wireless/ath/ath10k/wmi-tlv.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/net/wireless/ath/ath10k/wmi-tlv.c b/drivers/net/wireless/ath/ath10k/wmi-tlv.c
index 5d05bff..a1c28c1 100644
--- a/drivers/net/wireless/ath/ath10k/wmi-tlv.c
+++ b/drivers/net/wireless/ath/ath10k/wmi-tlv.c
@@ -2764,10 +2764,8 @@ static void *ath10k_wmi_tlv_put_wmm(void *ptr,
 	if ((ieee80211_is_action(hdr->frame_control) ||
 	     ieee80211_is_deauth(hdr->frame_control) ||
 	     ieee80211_is_disassoc(hdr->frame_control)) &&
-	     ieee80211_has_protected(hdr->frame_control)) {
-		len += IEEE80211_CCMP_MIC_LEN;
+	     ieee80211_has_protected(hdr->frame_control))
 		buf_len += IEEE80211_CCMP_MIC_LEN;
-	}
 
 	buf_len = min_t(u32, buf_len, WMI_TLV_MGMT_TX_FRAME_MAX_LEN);
 	buf_len = round_up(buf_len, 4);
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] ath10k: Fix length of wmi tlv command for protected mgmt frames
  2019-02-15 15:19 ` Surabhi Vishnoi
  (?)
@ 2019-02-26 13:04 ` Kalle Valo
  -1 siblings, 0 replies; 4+ messages in thread
From: Kalle Valo @ 2019-02-26 13:04 UTC (permalink / raw)
  To: Surabhi Vishnoi; +Cc: linux-wireless, ath10k

Surabhi Vishnoi <svishnoi@codeaurora.org> wrote:

> The length of wmi tlv command for management tx send is calculated
> incorrectly in case of protected management frames as there is addition
> of IEEE80211_CCMP_MIC_LEN twice. This leads to improper behaviour of
> firmware as the wmi tlv mgmt tx send command for protected mgmt frames
> is formed wrongly.
> 
> Fix the length calculation of wmi tlv command for mgmt tx send in case
> of protected management frames by adding the IEEE80211_CCMP_MIC_LEN only
> once.
> 
> Tested HW: WCN3990
> Tested FW: WLAN.HL.3.1-00784-QCAHLSWMTPLZ-1
> 
> Fixes: 1807da49733e "ath10k: wmi: add management tx by reference support over wmi"
> Signed-off-by: Surabhi Vishnoi <svishnoi@codeaurora.org>
> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>

Patch applied to ath-next branch of ath.git, thanks.

761156ff573d ath10k: Fix length of wmi tlv command for protected mgmt frames

-- 
https://patchwork.kernel.org/patch/10815099/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches


_______________________________________________
ath10k mailing list
ath10k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath10k

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] ath10k: Fix length of wmi tlv command for protected mgmt frames
  2019-02-15 15:19 ` Surabhi Vishnoi
  (?)
  (?)
@ 2019-02-26 13:04 ` Kalle Valo
  -1 siblings, 0 replies; 4+ messages in thread
From: Kalle Valo @ 2019-02-26 13:04 UTC (permalink / raw)
  To: Surabhi Vishnoi; +Cc: ath10k, linux-wireless, Surabhi Vishnoi

Surabhi Vishnoi <svishnoi@codeaurora.org> wrote:

> The length of wmi tlv command for management tx send is calculated
> incorrectly in case of protected management frames as there is addition
> of IEEE80211_CCMP_MIC_LEN twice. This leads to improper behaviour of
> firmware as the wmi tlv mgmt tx send command for protected mgmt frames
> is formed wrongly.
> 
> Fix the length calculation of wmi tlv command for mgmt tx send in case
> of protected management frames by adding the IEEE80211_CCMP_MIC_LEN only
> once.
> 
> Tested HW: WCN3990
> Tested FW: WLAN.HL.3.1-00784-QCAHLSWMTPLZ-1
> 
> Fixes: 1807da49733e "ath10k: wmi: add management tx by reference support over wmi"
> Signed-off-by: Surabhi Vishnoi <svishnoi@codeaurora.org>
> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>

Patch applied to ath-next branch of ath.git, thanks.

761156ff573d ath10k: Fix length of wmi tlv command for protected mgmt frames

-- 
https://patchwork.kernel.org/patch/10815099/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2019-02-26 13:04 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-02-15 15:19 [PATCH] ath10k: Fix length of wmi tlv command for protected mgmt frames Surabhi Vishnoi
2019-02-15 15:19 ` Surabhi Vishnoi
2019-02-26 13:04 ` Kalle Valo
2019-02-26 13:04 ` Kalle Valo

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.