From patchwork Tue Oct 10 06:50:01 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Manikanta Pubbisetty X-Patchwork-Id: 9995141 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 B42F160216 for ; Tue, 10 Oct 2017 06:52:19 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A462527F17 for ; Tue, 10 Oct 2017 06:52:19 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 98FC227F3E; Tue, 10 Oct 2017 06:52:19 +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 2D44227F17 for ; Tue, 10 Oct 2017 06:52:19 +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=HixswsyROtyIUGdYmHUB+BtzT0vVpwR8YZTaSqODg/I=; b=KRDQq50K9HYcuf sTFdyfSQ8q3z6zxefMg8zoRGtvPqTo1cV0X9ilZN9Ml1dW2AJ/KIr2q5/DUQNv/3wQGyMFpB+wkU8 x2XrOsA4atNoYXRdtpOFxsh15BiiuW8OpQBoC2Ca1Pku5+CzSVmtNLIjlMVXjs1y6u6fFuvWf4w5M 3Ie+7h6l54u/oBPt9eHVxqFVFxgn8HSUQWlu2mBC/GqECW/yr2JVh19NwTrPPkGPbKYrqrkbQ1WFf G/VZbQVYvm6NFDkjpzDbm0N+mfEiiv1RugtQJ6gzwCm25je9kNsNv0B/sF5yujte1QGOWXmGnT2sf 3H9R7P5v9LFsjoQnavRg==; 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 1e1oOk-0007NY-6x; Tue, 10 Oct 2017 06:52:14 +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 1e1oNw-0006dd-MT for ath10k@bombadil.infradead.org; Tue, 10 Oct 2017 06:51:24 +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=QMXYkjyZBQdOoNNGgyfiOfeFMcjAwEiKWM4yPpZlNqY=; b=NrPdUwCubAiBKYvWqka5Iiuy6 Qpqbb36QxqBl9RaOaaSO9UxkdQ5jwXPFtPUbgPOEP3vP0NO71IArt11P+fxVaPVOBqO75WTMzDlYa KGjrEze8YTFEr2Eln/KPFabcR3nFdKrdCR7iNxq+/hlGaqRTj4Rw0nvC7rAw/oo2/0pD/a731DXSC 1a/rB36mCCK1q+wFwKCKXNTFefEcXLlq2rYT7anXjY6uM9QFh2a2sfuNxwNSzuF4x82wESLQsRTIP r9Bw2TOncTzkxtsXGWckuSH922P7n8lNO/D/6Q7T3QsgieGPN1X4PW/ynjl30jsUi1GjSQeYue0Jy J98tI+XQw==; Received: from sabertooth01.qualcomm.com ([65.197.215.72]) by casper.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1e1oNq-0004kE-BU for ath10k@lists.infradead.org; Tue, 10 Oct 2017 06:51:23 +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=1507618278; x=1539154278; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version; bh=hXiboKIWRUYHIeONZ8oaRA5t+ISWqd46GlwZOj1tYHM=; b=Vn2ZucHZc+BAo5nFwA56zHcbx80wlttZHOrYRnjwqOEe8lBwDsmBKISH hDIwuoUKd8xhwiGTuWcjhjKDCst+nzEATYSmbgDebkibm228+idGDwT+Y lWlryv5VNmrvv0eb7ta9Loa7OdA4eWYPmcmEE6Qsjed2pr+Y5H5Fj1E8k A=; X-IronPort-AV: E=Sophos;i="5.42,503,1500966000"; d="scan'208";a="115659160" Received: from unknown (HELO Ironmsg04-R.qualcomm.com) ([10.53.140.108]) by sabertooth01.qualcomm.com with ESMTP; 09 Oct 2017 23:50:53 -0700 X-IronPort-AV: E=McAfee;i="5900,7806,8679"; a="1509026874" X-MGA-submission: =?us-ascii?q?MDGKPfQQrZpBu2phyztWfbxRQne+unG9zy346A?= =?us-ascii?q?TnPdcdZTGe03HEe0Vq/vs2CGdYiBd4kQNDGI6mXVJa05KKhvBGxrQ9lL?= =?us-ascii?q?vRlMIMWDGogxTmpFvnne5qPm3tcQOKWX6ltboHI7UV/MQ6e6UeU2UOnk?= =?us-ascii?q?vw?= Received: from nasanexm01g.na.qualcomm.com ([10.85.0.33]) by Ironmsg04-R.qualcomm.com with ESMTP/TLS/AES256-SHA; 09 Oct 2017 23:50:53 -0700 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, 9 Oct 2017 23:50:52 -0700 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; Tue, 10 Oct 2017 12:20:43 +0530 From: To: Subject: [PATCH 1/2] ath10k: update tdls teardown state to target Date: Tue, 10 Oct 2017 12:20:01 +0530 Message-ID: <1507618202-25473-2-git-send-email-mpubbise@qti.qualcomm.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1507618202-25473-1-git-send-email-mpubbise@qti.qualcomm.com> References: <1507618202-25473-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-20171010_075118_720094_F77EF8C8 X-CRM114-Status: GOOD ( 10.08 ) 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 5683f1a..35b7523 100644 --- a/drivers/net/wireless/ath/ath10k/mac.c +++ b/drivers/net/wireless/ath/ath10k/mac.c @@ -6183,6 +6183,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",