From patchwork Tue Apr 2 12:42:50 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rakesh Pillai X-Patchwork-Id: 10881571 X-Patchwork-Delegate: kvalo@adurom.com Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 2C04813B5 for ; Tue, 2 Apr 2019 12:43:10 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 16B9F28898 for ; Tue, 2 Apr 2019 12:43:10 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 0AE09288C7; Tue, 2 Apr 2019 12:43:10 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.7 required=2.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id EADEC28898 for ; Tue, 2 Apr 2019 12:43:08 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729576AbfDBMnI (ORCPT ); Tue, 2 Apr 2019 08:43:08 -0400 Received: from smtp.codeaurora.org ([198.145.29.96]:56150 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727082AbfDBMnI (ORCPT ); Tue, 2 Apr 2019 08:43:08 -0400 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id 1AD186192E; Tue, 2 Apr 2019 12:42:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1554208987; bh=KOV6qyyLGfi7zdkgVeg01mwkf0pv5v1c5fqkcY9gjEw=; h=From:To:Cc:Subject:Date:From; b=K4PuXfeUbOf3TooXBJHm0TC0hzQWxrX2c9w/EHg5w7+fLYmLcXUrRsWtFVZSWVwqz GXEzXEPv3YS5BPozXfxqQqWxV12cZOo2OSgVSLTzRKN4zmybcDQca+hhuSPR3sg+0d 7YC/6Uv4EVxM2uXKqULCVRwcjGbFADOzkDrVLuC8= Received: from pillair-linux.qualcomm.com (blr-c-bdr-fw-01_globalnat_allzones-outside.qualcomm.com [103.229.19.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: pillair@smtp.codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id 5FED061C54; Tue, 2 Apr 2019 12:42:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1554208976; bh=KOV6qyyLGfi7zdkgVeg01mwkf0pv5v1c5fqkcY9gjEw=; h=From:To:Cc:Subject:Date:From; b=Z2kLYnnLChpHEf1VrTBB7oq/yg5aBUp84Kz/N2JFeZAAjTHzYKS84dKqx5G6AhJaM JcteuBoZPcNrMgXfprL+0rzU+4B2mnKe/mCXQYk6iLnaWj0MDjbLbVRHIzLppeFqds kEF6kJm6DWte5oTF3mydtew8f4hPTKcYTzK99ZN8= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 5FED061C54 Authentication-Results: pdx-caf-mail.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: pdx-caf-mail.web.codeaurora.org; spf=none smtp.mailfrom=pillair@codeaurora.org From: Rakesh Pillai To: ath10k@lists.infradead.org Cc: linux-wireless@vger.kernel.org, Rakesh Pillai Subject: [PATCH] ath10k: Fix encoding for protected management frames Date: Tue, 2 Apr 2019 18:12:50 +0530 Message-Id: <1554208970-16527-1-git-send-email-pillair@codeaurora.org> X-Mailer: git-send-email 2.7.4 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Currently the protected management frames are not appended with the MIC_LEN which results in the protected management frames being encoded incorrectly. Add the extra space at the end of the protected management frames to fix this encoding error for the protected management frames. 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: Rakesh Pillai --- drivers/net/wireless/ath/ath10k/wmi-tlv.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/net/wireless/ath/ath10k/wmi-tlv.c b/drivers/net/wireless/ath/ath10k/wmi-tlv.c index 582fb11..02709fc 100644 --- a/drivers/net/wireless/ath/ath10k/wmi-tlv.c +++ b/drivers/net/wireless/ath/ath10k/wmi-tlv.c @@ -2840,8 +2840,10 @@ ath10k_wmi_tlv_op_gen_mgmt_tx_send(struct ath10k *ar, struct sk_buff *msdu, 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)) + ieee80211_has_protected(hdr->frame_control)) { + skb_put(msdu, IEEE80211_CCMP_MIC_LEN); 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);