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: 9995129 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 2F5C160216 for ; Tue, 10 Oct 2017 06:50:57 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 20BE527DCD for ; Tue, 10 Oct 2017 06:50:57 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1574627E5A; Tue, 10 Oct 2017 06:50:57 +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 9948927DCD for ; Tue, 10 Oct 2017 06:50:56 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751937AbdJJGuy (ORCPT ); Tue, 10 Oct 2017 02:50:54 -0400 Received: from alexa-out.qualcomm.com ([129.46.98.28]:37364 "EHLO alexa-out.qualcomm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750950AbdJJGux (ORCPT ); Tue, 10 Oct 2017 02:50:53 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=qti.qualcomm.com; i=@qti.qualcomm.com; q=dns/txt; s=qcdkim; t=1507618253; x=1539154253; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version; bh=hXiboKIWRUYHIeONZ8oaRA5t+ISWqd46GlwZOj1tYHM=; b=sKCVm87ebhel1CGQzxGkyIlZpJ8nptHbiQKrxHk8iZXL9PF7RQC5d+On kSTyh0OCDKK7j7/SwlB1cZ2kNtEuaif0Sr2fW4JIoFYwa4csVH3rNFHoY hOXJQJLdWaoj5U3EYBl0Y/N/ob7Fzv/D2xJ6T3w5WvN5xrwgUmT6rZzoE 4=; X-IronPort-AV: E=Sophos;i="5.42,503,1500966000"; d="scan'208";a="6177048" Received: from ironmsg04-r-new.qualcomm.com (HELO Ironmsg04-R.qualcomm.com) ([10.53.140.108]) by alexa-out.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: CC: , Manikanta Pubbisetty 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) 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 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",