From patchwork Tue Sep 19 03:17:15 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: 9958099 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 2CD206056A for ; Tue, 19 Sep 2017 03:17:07 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4340F28DE0 for ; Tue, 19 Sep 2017 03:17:07 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 385AB28DEA; Tue, 19 Sep 2017 03:17:07 +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 BCE5728DE0 for ; Tue, 19 Sep 2017 03:17:06 +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=XhgAVPdlGpXr7oVf0uPsBsbcRaGQnNTLQP/FfRn9F0E=; b=Fe8SOEQG+1H2/n HtiyJZzdq/JS2UZSMm8O4u+g9iKBnl9H6mLta0bPYHFbvY9ujfDYobm8ofc9tUNYEq91MrYHT8EsA +ZQtx27jOPKMcmTVKpXls/mQ/dHoa1+FAwEr2/Y9C7dCmfTC8TnCEG2akimmec5emp/ukpHueoVlw kMP9zi8jMSoLID4KhPC2+XVPFEHQoYsXg9iOJvjO+N6lUEIceuHgUQPZbSpsMRmqL+mzOXvyY4eCU 9g4RgxpddfNKzQqGMfbLdWpOKcOPa4Ng/xDh8BT4SPGxcwC3mu44R7T+PhYOe1knvb4ZmC4sHJVz3 dmG4exnzMr8nIjhKEYTQ==; 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 1du91L-00041U-2p; Tue, 19 Sep 2017 03:16:23 +0000 Received: from sabertooth01.qualcomm.com ([65.197.215.72]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1du91H-0003vk-H0 for ath10k@lists.infradead.org; Tue, 19 Sep 2017 03:16:21 +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=1505790979; x=1537326979; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version; bh=jiLmhr8jHYoR6Al2z89sCOtRy72QSsmm//OClbbixO0=; b=a9nWawqKiF0QvkCTRjOLaFr7lshuTrb0iYQ/c9ZzOLAI56+3hpkDAypV WRnzKra1KM8MPnW/IuG2FjxnxMSOuBHbJ7jplVBuJtIigMnIZ5oTXeI0h HGocG5JEipDNyLvYn3ZF03zPyQFDTa0u33SolBl3eYn8kQWYmiIU6AH/m 4=; X-IronPort-AV: E=Sophos;i="5.42,415,1500966000"; d="scan'208";a="115109265" Received: from unknown (HELO Ironmsg03-R.qualcomm.com) ([10.53.140.107]) by sabertooth01.qualcomm.com with ESMTP; 18 Sep 2017 20:15:59 -0700 X-IronPort-AV: E=McAfee;i="5900,7806,8658"; a="1443630060" X-MGA-submission: =?us-ascii?q?MDGf9+JlI4qAgxOF7mSl+1xNqcD5sQS0CSYlrs?= =?us-ascii?q?l5NamKXTpOJWAsJGQdVcV8VCNsVXi+uVab5VNe8hxj5tt1IXrsfc64zr?= =?us-ascii?q?eMgQ4xvCE3xPy0Vy1A7DusTHwznnwg4OcuTei4r+j7UaBi9ruBvnpnZD?= =?us-ascii?q?3a?= Received: from nasanexm01b.na.qualcomm.com ([10.85.0.82]) by Ironmsg03-R.qualcomm.com with ESMTP/TLS/AES256-SHA; 18 Sep 2017 20:15:59 -0700 Received: from aptaiexm02b.ap.qualcomm.com (10.249.150.12) by NASANEXM01B.na.qualcomm.com (10.85.0.82) with Microsoft SMTP Server (TLS) id 15.0.1293.2; Mon, 18 Sep 2017 20:15:58 -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, 19 Sep 2017 11:15:53 +0800 From: To: Subject: [TDLS PATCH V3 5/5] ath10k: Avoid to set WEP key for TDLS peer Date: Tue, 19 Sep 2017 11:17:15 +0800 Message-ID: <1505791035-28426-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: NASANEXM01E.na.qualcomm.com (10.85.0.31) 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-20170918_201619_673804_1503D800 X-CRM114-Status: UNSURE ( 5.05 ) 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 | 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;