From patchwork Mon Nov 6 08:09:31 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Manikanta Pubbisetty X-Patchwork-Id: 10042739 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 CB36D6032D for ; Mon, 6 Nov 2017 08:10:35 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B9CC42996B for ; Mon, 6 Nov 2017 08:10:35 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id AE13A29A49; Mon, 6 Nov 2017 08:10:35 +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 6DEF62996B for ; Mon, 6 Nov 2017 08:10:35 +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=F6Li+lAwyOI32INMlKF1+HaYFauqK7kvdIuJBmxAbv4=; b=hrNjH4y9/OpAVD 0sAV3YGNcw4A/349A2uGDyOnze+Eua4de9iau6a7wjBapp/BaUV7YRUNG460NE6FOrWbF51LEDCxl lAvBzgDyWmzHIa+ZNtV1NXIrdDq3Wm4Tgfdilh93sC3d1XgXKyaZg2BZJMp9fftYn8GJ+6mjT0a3b eFHChJ172qdpqnQhjGkHohv0ZZREVE08blobxpB7bOKAP6Wqjg1uPFZ2RuBvyAC6OJQyqGnOpNUsy t2OHs++fIxSsg0XIauRYe1IO9NZVJfOLc0UgIoVgObqt41G079frGnDHFr5X7xBTmLKYZweMfYUsR Bs+Qkv3hiSf/b33hMmvQ==; 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 1eBcUH-0005mW-4t; Mon, 06 Nov 2017 08:10:29 +0000 Received: from sabertooth01.qualcomm.com ([65.197.215.72]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1eBcUB-0004NF-TG for ath10k@lists.infradead.org; Mon, 06 Nov 2017 08:10:27 +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=1509955823; x=1541491823; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version; bh=inkRwmqtnsmLDNjiJEgcm2LvV02sxxdHlQT1xhdHW6s=; b=RN10ZhR1WElA1rzWOCqjR+UE00hMJsMdQnRAZGtdh40d5Z9rLGiiX9in RK4sGYIgcSbtXhZY6lCPyJx1eTlh3oyn2wqJJDJ91zwahKJe8q4ZKlQSz 0Hz48XZwhnu14Och5JXhkC9eN0TVpt3BcrtyRolB7jMnWYHdwVNpVXO8h w=; X-IronPort-AV: E=Sophos;i="5.44,351,1505804400"; d="scan'208";a="116476682" Received: from unknown (HELO Ironmsg03-L.qualcomm.com) ([10.53.140.110]) by sabertooth01.qualcomm.com with ESMTP; 06 Nov 2017 00:10:23 -0800 X-IronPort-AV: E=McAfee;i="5900,7806,8706"; a="1481074254" X-MGA-submission: =?us-ascii?q?MDF1lgQTGuXXGyEhw1sT2e/ZF03T7zbHUJaD3Y?= =?us-ascii?q?jSNGkUcfcnCBI6pJcWCOozCHIBeeSuxnq5hQsQKZ8eAXZYX8BJw2hrCP?= =?us-ascii?q?ja+QvNJWaILy9zn+vMdN0k6sOoYAmRMg2g8a+BhdNJrWQvOG4h4AxP9F?= =?us-ascii?q?Ph?= Received: from nasanexm01g.na.qualcomm.com ([10.85.0.33]) by Ironmsg03-L.qualcomm.com with ESMTP/TLS/AES256-SHA; 06 Nov 2017 00:10:23 -0800 Received: from aphydexm01f.ap.qualcomm.com (10.252.127.15) by NASANEXM01G.na.qualcomm.com (10.85.0.33) with Microsoft SMTP Server (TLS) id 15.0.1293.2; Mon, 6 Nov 2017 00:10:22 -0800 Received: from localhost (10.80.80.8) by aphydexm01f.ap.qualcomm.com (10.252.127.15) with Microsoft SMTP Server (TLS) id 15.0.1293.2; Mon, 6 Nov 2017 13:40:17 +0530 From: To: Subject: [PATCHv2 1/2] ath10k: update tdls teardown state to target Date: Mon, 6 Nov 2017 13:39:31 +0530 Message-ID: <1509955772-4941-2-git-send-email-mpubbise@qti.qualcomm.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1509955772-4941-1-git-send-email-mpubbise@qti.qualcomm.com> References: <1509955772-4941-1-git-send-email-mpubbise@qti.qualcomm.com> MIME-Version: 1.0 X-Originating-IP: [10.80.80.8] X-ClientProxiedBy: NASANEXM01F.na.qualcomm.com (10.85.0.32) To aphydexm01f.ap.qualcomm.com (10.252.127.15) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20171106_001024_991449_0047B4D0 X-CRM114-Status: UNSURE ( 8.43 ) 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: Manikanta Pubbisetty , 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: Manikanta Pubbisetty It is required to update the teardown state of the peer when a tdls link with that peer is terminated. This information is useful for the target to perform some cleanups wrt the tdls peer. Without proper cleanup, target assumes that the peer is connected and blocks future connection requests, updating the teardown state of the peer addresses the problem. Tested this change on QCA9888 with 10.4-3.5.1-00018 fw version. Signed-off-by: Manikanta Pubbisetty --- drivers/net/wireless/ath/ath10k/mac.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/drivers/net/wireless/ath/ath10k/mac.c b/drivers/net/wireless/ath/ath10k/mac.c index 0a947ee..c6460e7 100644 --- a/drivers/net/wireless/ath/ath10k/mac.c +++ b/drivers/net/wireless/ath/ath10k/mac.c @@ -6201,6 +6201,16 @@ static int ath10k_sta_state(struct ieee80211_hw *hw, "mac vdev %d peer delete %pM sta %pK (sta gone)\n", arvif->vdev_id, sta->addr, sta); + if (sta->tdls) { + ret = ath10k_mac_tdls_peer_update(ar, arvif->vdev_id, + sta, + WMI_TDLS_PEER_STATE_TEARDOWN); + if (ret) + ath10k_warn(ar, "failed to update tdls peer state for %pM state %d: %i\n", + sta->addr, + WMI_TDLS_PEER_STATE_TEARDOWN, ret); + } + ret = ath10k_peer_delete(ar, arvif->vdev_id, sta->addr); if (ret) ath10k_warn(ar, "failed to delete peer %pM for vdev %d: %i\n",