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: 10881573 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 3CF5413B5 for ; Tue, 2 Apr 2019 12:43:12 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 22F5428898 for ; Tue, 2 Apr 2019 12:43:12 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 16FBB288C7; Tue, 2 Apr 2019 12:43:12 +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=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id B459028898 for ; Tue, 2 Apr 2019 12:43:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To: References:List-Owner; bh=sVnt2xkz3q0fuheQZz+/Rfbr1utD+j3PV6a06XV4P7o=; b=B0M +wsdZO+W6XSfacwB/lr1ddFSd512Ui+XZ49ZRIonOq6st+ZV2wKgrg6v9Lih7N7qs2v7PQCUXUYh0 Z/kkdKBRR7yVZTFyTSSYAW/i0cJ6HLJ8PTnF9EivJfgSiXhaCqrUc8gCh/PTKSnDj9bcZO+lMorwd iSlN7O5Enao35xaB6/MptfIu87RdS+VsZU45SYzM+q4sHXan2FrEdHo2DSOMH7dMFm2Tndq+JnuBw +XhhaMDijiTxpya0ktPCZSuy7pTzoGpAl2StGNLd9hwL9YQFlbKIV+dXrHFszaDQg+yXKk62kaI6l UFVnUWVqb6eLO0VVoEFxIgCQOEf4OGw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1hBIkw-0000fp-Bi; Tue, 02 Apr 2019 12:43:10 +0000 Received: from smtp.codeaurora.org ([198.145.29.96]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1hBIkt-0000fW-Ng for ath10k@lists.infradead.org; Tue, 02 Apr 2019 12:43:08 +0000 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id 0643B61CA2; 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 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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190402_054307_789029_9F3D934D X-CRM114-Status: UNSURE ( 9.49 ) X-CRM114-Notice: Please train this message. X-BeenThere: ath10k@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Rakesh Pillai , linux-wireless@vger.kernel.org MIME-Version: 1.0 Sender: "ath10k" Errors-To: ath10k-bounces+patchwork-ath10k=patchwork.kernel.org@lists.infradead.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);