From patchwork Tue Oct 24 08:51:13 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: 10023801 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 D316F601E8 for ; Tue, 24 Oct 2017 09:13:59 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C6AAB289C9 for ; Tue, 24 Oct 2017 09:13:59 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id BAF4A289C2; Tue, 24 Oct 2017 09:13:59 +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 5135528982 for ; Tue, 24 Oct 2017 09:13:59 +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=uLQ1iURHl5WB/hXEyi2Eq/3VH2uAFETp0XBdyMPPp+0=; b=AuKP+LJ6+2TM7M mFE4G6SphZfpNoNkx9PM2J5hRilEDfIJyW2yjHT5pI/QI04lOdSlcqHF3BseEWv//539YvpAXu29a bNzJlXT+aGDrHIO64lUQjMiSrrJSZoe8aaGB+KiiUTRUywib4VnQS5kLxX47rMzPgqObM+jCtU8+V wSNtJNVI9dgWoUvb0/QxxPrNIrCmQhA1tghMcMFmSqbYf/0OUDwLFJo8GvuvbidPRBBuax3V3nYiG FFXm/0C2xD5jmoKKE8CHU5iaZn3IYX4jAVz5NKT7B4KUxo7DbckqIe3g3XcMb8CO+If6Ik846dU9f cGItpyR4R78UJKgNT3XQ==; 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 1e6vHU-0001fo-Ov; Tue, 24 Oct 2017 09:13:52 +0000 Received: from casper.infradead.org ([2001:8b0:10b:1236::1]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1e6v5g-00023g-Iz for ath10k@bombadil.infradead.org; Tue, 24 Oct 2017 09:01:40 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=Content-Type:MIME-Version:References: In-Reply-To:Message-ID:Date:Subject:CC:To:From:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=avQwujRX4Wm7CKddu7aiPNFKIJ5o9QLpRwR0H8gq4Jo=; b=cR8boIAYmeBZa9qKpgBV8A4Es PgtmLyb32n1yFXr2X2Ecdrphg6nBM+4oQbMehHe/gCLQ1AUsYPXMmsE6rKP9zGzSsdv4uTtpvvUI+ 3V3EpvvB0il4W2FXi2i04g91jBv1XKCq7zTGFjFjoPxG9p+Hls798BH59zIutLGQu1+K2ZLAXJ6+M vAuvIuMHa+pBScNlUVWAwzpYxERRRowt6J0W/0yZAVIvPLgyMJ7ZKTpZr26HOuFPFnS65u/PfRrJI pmUsQwugNdVN5MUPserXMgMtvJjtRS3v8Fh+W2wVRCJiCQ14e/6dLcTLKCoAgN/Wg4jW2XKrVsodq D6sVlVG+A==; Received: from alexa-out.qualcomm.com ([129.46.98.28]) by casper.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1e6uuB-0001bf-4Y for ath10k@lists.infradead.org; Tue, 24 Oct 2017 08:49:49 +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=1508834987; x=1540370987; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version; bh=XGrb9WHE1rnfJTXtKquvopKn2UA7pPswfKGf3AYWCDg=; b=RXyrBpF3vDhJQByMNJxNYyf8DzqsWmAdonTdjpFTBoec1om9PtTENLYV 7+kDscdK8SVhk9FuId2jkWAoSdQICkg591T7H3j1bWR+Pe0y/SVLYcBFz 5DIzXDY74nulK+KsTh/Ar5VJkWreZ0F2iFUz04yNUFD8AfZ0KYSWg8Y1F Q=; Received: from ironmsg03-l-new.qualcomm.com (HELO Ironmsg03-L.qualcomm.com) ([10.53.140.110]) by alexa-out.qualcomm.com with ESMTP; 24 Oct 2017 01:49:18 -0700 X-IronPort-AV: E=McAfee;i="5900,7806,8693"; a="1472147929" X-MGA-submission: =?us-ascii?q?MDGmEN5mwiR/UDxyzxafC6nmd34vStT367S8lO?= =?us-ascii?q?1YFad1Wubst4Kvc8UAede2BQ2IsC4qN6iHY57tmZKJTsRc6CgnpH1Mkl?= =?us-ascii?q?y1bYDqVldpGnmBhE2qgVZM2oOxnBAKuGx2FMnj91lTZdzs8QgJx66SNg?= =?us-ascii?q?ep?= Received: from nasanexm01e.na.qualcomm.com ([10.85.0.31]) by Ironmsg03-L.qualcomm.com with ESMTP/TLS/AES256-SHA; 24 Oct 2017 01:49:18 -0700 Received: from aptaiexm02b.ap.qualcomm.com (10.249.150.12) by NASANEXM01E.na.qualcomm.com (10.85.0.31) with Microsoft SMTP Server (TLS) id 15.0.1293.2; Tue, 24 Oct 2017 01:49:17 -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, 24 Oct 2017 16:49:12 +0800 From: To: Subject: [PATCH v7 4/5] ath10k: Avoid to set WEP key for TDLS peer Date: Tue, 24 Oct 2017 16:51:13 +0800 Message-ID: <1508835074-3384-5-git-send-email-yintang@qti.qualcomm.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1508835074-3384-1-git-send-email-yintang@qti.qualcomm.com> References: <1508835074-3384-1-git-send-email-yintang@qti.qualcomm.com> 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-20171024_094947_590223_C02A5081 X-CRM114-Status: UNSURE ( 9.27 ) 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 TDLS peer do not need WEP key. Setting WEP key will lead to TDLS setup failure. Add fix to avoid setting WEP key for TDLS peer. Signed-off-by: Yingying Tang --- drivers/net/wireless/ath/ath10k/mac.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/wireless/ath/ath10k/mac.c b/drivers/net/wireless/ath/ath10k/mac.c index 1672043..a984a72 100644 --- a/drivers/net/wireless/ath/ath10k/mac.c +++ b/drivers/net/wireless/ath/ath10k/mac.c @@ -2966,7 +2966,7 @@ static int ath10k_station_assoc(struct ath10k *ar, } /* Plumb cached keys only for static WEP */ - if (arvif->def_wep_key_idx != -1) { + if ((arvif->def_wep_key_idx != -1) && (!sta->tdls)) { ret = ath10k_install_peer_wep_keys(arvif, sta->addr); if (ret) { ath10k_warn(ar, "failed to install peer wep keys for vdev %i: %d\n",