From patchwork Tue Oct 10 08:13:05 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: yintang@qti.qualcomm.com X-Patchwork-Id: 9995279 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 4B37960230 for ; Tue, 10 Oct 2017 08:11:46 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3C65F28174 for ; Tue, 10 Oct 2017 08:11:46 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3141E2818E; Tue, 10 Oct 2017 08:11:46 +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=-4.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.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 C622228174 for ; Tue, 10 Oct 2017 08:11:45 +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:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: 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: List-Owner; bh=ZbSILog4dfyS2g4TtwV6iqE8naOdBhBIx0ceRpvqQdw=; b=DNpsd0gekCQYRR fzIIHWEzfdGyiAqd36dtKlCfgAj2rgRI/hXhPb+pzeoKGH6ArgUJI1SVRunEP2I+LPZEWyeny3/jF FE619xBumEtAqWj0IyK/CCBdHcI+aycHkBNzpAAUZknQmG7WXwdYSqD1ngY8idaMBfx6sYD79qyNC uo4pWsXZlDsR6vbGSY1MYuYNXo52cGP9ZwdYM6irwjAuuZX3HWurnGqut91N4feNrZMHd6zEzkuUL homAbi8KDcFBV6TfkHvwnLBYYk/KHXxJ/1ZIx1Cw/D1JznxrWRitHGSv2Q1ipDr6Cqxyxo6STVAVp gxow71ZxykxIHdcJ3YmQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1e1pdd-0005n5-OF; Tue, 10 Oct 2017 08:11:41 +0000 Received: from alexa-out.qualcomm.com ([129.46.98.28]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1e1pdZ-0005dA-CL for ath10k@lists.infradead.org; Tue, 10 Oct 2017 08:11:39 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=qti.qualcomm.com; i=@qti.qualcomm.com; q=dns/txt; s=qcdkim; t=1507623097; x=1539159097; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version; bh=eiXqU8bbx2d47P017ATpEELhqIFpL8bv/8T0ImO1qB0=; b=IfVxKGA/sjB3zYsDFImyC4tXMtpkbripNiBfjk15HLunga356Gu5begb 4nGIbVO8G1FORxzXcgTIJr89Ezf7/t8x9pCt4P/5yDVvIQgMRGknFcpnc KcLPe7ElQ+pSv3QMMOfjSTkU/6eWTExVuNVb6egwdGAtg/mJoBhgjerum I=; X-IronPort-AV: E=Sophos;i="5.42,503,1500966000"; d="scan'208";a="6179725" Received: from ironmsg02-r-new.qualcomm.com (HELO ironmsg02-R.qualcomm.com) ([10.53.140.106]) by alexa-out.qualcomm.com with ESMTP; 10 Oct 2017 01:11:17 -0700 X-IronPort-AV: E=McAfee;i="5900,7806,8679"; a="1046747382" X-MGA-submission: =?us-ascii?q?MDEv+wDJOBfg92e0vUvQ7VQsansniPNyTVYEIX?= =?us-ascii?q?dya8E1362o7FKZv4mYgD2pi62tzLn6YAsz8iGz03I4VP2vxZUa1YrJvH?= =?us-ascii?q?J07WfhMD1Pb39CsYdDm2qw4wAZskJmfimmJ992cbFblylpI6RoielRkn?= =?us-ascii?q?2y?= Received: from nasanexm02b.na.qualcomm.com ([10.85.0.42]) by ironmsg02-R.qualcomm.com with ESMTP/TLS/AES256-SHA; 10 Oct 2017 01:11:16 -0700 Received: from aptaiexm02b.ap.qualcomm.com (10.249.150.12) by nasanexm02b.na.qualcomm.com (10.85.0.42) with Microsoft SMTP Server (TLS) id 15.0.1293.2; Tue, 10 Oct 2017 01:11:16 -0700 Received: from yintang-HP-EliteBook-1.qca.qualcomm.com (10.80.80.8) by aptaiexm02b.ap.qualcomm.com (10.249.150.12) with Microsoft SMTP Server (TLS) id 15.0.1293.2; Tue, 10 Oct 2017 16:11:10 +0800 From: To: Subject: [PATCH V5 5/5] ath10k: Fix TDLS peer TX data failure issue on encryped AP Date: Tue, 10 Oct 2017 16:13:05 +0800 Message-ID: <1507623185-9383-1-git-send-email-yintang@qti.qualcomm.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: References: MIME-Version: 1.0 X-Originating-IP: [10.80.80.8] X-ClientProxiedBy: NASANEXM01C.na.qualcomm.com (10.85.0.83) To aptaiexm02b.ap.qualcomm.com (10.249.150.12) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20171010_011137_576294_38669EB9 X-CRM114-Status: UNSURE ( 4.94 ) 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: linux-wireless@vger.kernel.org Sender: "ath10k" Errors-To: ath10k-bounces+patchwork-ath10k=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP From: Yingying Tang For WPA encryption, QCA6174 firmware(version: WLAN.RM.4.4) will unblock data when M4 was sent successfully. For other encryption which didn't need 4-way handshake firmware will unblock the data when peer authorized. Since TDLS is 3-way handshake host need send authorize cmd to firmware to unblock data. Signed-off-by: Yingying Tang --- drivers/net/wireless/ath/ath10k/mac.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/net/wireless/ath/ath10k/mac.c b/drivers/net/wireless/ath/ath10k/mac.c index f6702cb..d2530f7 100644 --- a/drivers/net/wireless/ath/ath10k/mac.c +++ b/drivers/net/wireless/ath/ath10k/mac.c @@ -5841,6 +5841,10 @@ static int ath10k_set_key(struct ieee80211_hw *hw, enum set_key_cmd cmd, ath10k_warn(ar, "Peer %pM disappeared!\n", peer_addr); spin_unlock_bh(&ar->data_lock); + if (sta && sta->tdls) + ath10k_wmi_peer_set_param(ar, arvif->vdev_id, sta->addr, + WMI_PEER_AUTHORIZE, 1); + exit: mutex_unlock(&ar->conf_mutex); return ret;