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: 10042737 X-Patchwork-Delegate: kvalo@adurom.com 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 E22426032D for ; Mon, 6 Nov 2017 08:10:26 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D01432997D for ; Mon, 6 Nov 2017 08:10:26 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C163D29A49; Mon, 6 Nov 2017 08:10:26 +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=-6.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 456EF2997D for ; Mon, 6 Nov 2017 08:10:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751830AbdKFIKY (ORCPT ); Mon, 6 Nov 2017 03:10:24 -0500 Received: from alexa-out.qualcomm.com ([129.46.98.28]:55122 "EHLO alexa-out.qualcomm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750760AbdKFIKY (ORCPT ); Mon, 6 Nov 2017 03:10:24 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=qti.qualcomm.com; i=@qti.qualcomm.com; q=dns/txt; s=qcdkim; t=1509955824; x=1541491824; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version; bh=inkRwmqtnsmLDNjiJEgcm2LvV02sxxdHlQT1xhdHW6s=; b=zGZSNoP7sk5MqpFqCtVEZ/A+cX6eejttttBbW0UX+D0Nwtp9hYqqhgZT rhRGMcZJaLmspjX19A4nv+hACCWS1/tBg56RtpwvddgBAQz73jU5ZbmcB kt6yJRKVgBcfbFl8j2PmXJZQNdAld4eLt8p0CyMScgae6HmWB4bzt2H2s Q=; Received: from ironmsg03-l-new.qualcomm.com (HELO Ironmsg03-L.qualcomm.com) ([10.53.140.110]) by alexa-out.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: CC: , Manikanta Pubbisetty 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) Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.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",