Received: by 10.213.65.68 with SMTP id h4csp481964imn; Fri, 16 Mar 2018 09:05:12 -0700 (PDT) X-Google-Smtp-Source: AG47ELumQ2CXCW6IUmMaHgbhn7xDxecNE5BLZXFgc6JorZhxkstFktXA6PaZwOyABFj7E/wFZ0JR X-Received: by 10.99.127.75 with SMTP id p11mr1830062pgn.392.1521216312748; Fri, 16 Mar 2018 09:05:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521216312; cv=none; d=google.com; s=arc-20160816; b=fyDEu3w7uOS4KnABgB80Opkunatraph4VIRU4ckSho/XnAhd2PQ4wauW6fg3ce7p8P pjg8bT3OBzxX9pSn/Htw6Xs7QqItgRSgB067WgvsjZB4zNsbE/FK535x+lu/dahaf1rS zNzU473ajQlgWhXWITQ5tTm9ntus6pKEOW9syAUr/XA7H0/tDB/8nk595oF0w+zLbMzx FcrKZeNf46SJlE/GY8kiVJTTzJf6zQ67MGlVy+6EpfXko9GBQes6lXxXmQJFr8I6thDc Fng1KYCQdR3Vpu4PdPtxl8Rzc83BPr1fPrDzdZaWZAwIr05ENSwJuDWn25Gl0HdFsA0x 6kSA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=2lVOVby/CtyFfaha15D1XNgkyu25p90Lhnwgbr6XjvM=; b=HMSdTE3N0wviTOZUq7sCIRPVg+x67yxmXGmOuQ/G2cSdBIUcZyVTUnv9GE4UJtVoND E482DLg5uPvKiqKbsMm8hTOACnSdY4TQgvK2M8yd8XA8KCXIlNrfM/R3xdUXLsUMw74P NK7OeKObn9F7uq1Cuj4qU4NyOMAadfh1wxkyo3cpk70OuV3LDxgbzbIBmpS7Qdp4M11M SNFuo4fhAhrrDVkCpGuqoFVmszyP4cg+ss+UoIn2GyJORJh5k593rq9gLnlCma3VrqzN J0ioAAZcr94QE3BfmEVLvhkEjv8iMgWemjVl3gNm9PEpR2zzIG9aYfmPm09IKqlI8DrQ i2DQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a100-v6si6497171pli.483.2018.03.16.09.04.58; Fri, 16 Mar 2018 09:05:12 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934628AbeCPQCI (ORCPT + 99 others); Fri, 16 Mar 2018 12:02:08 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:44498 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933877AbeCPPme (ORCPT ); Fri, 16 Mar 2018 11:42:34 -0400 Received: from localhost (LFbn-1-12247-202.w90-92.abo.wanadoo.fr [90.92.61.202]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id B74A9FD4; Fri, 16 Mar 2018 15:42:33 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Manikanta Pubbisetty , Kalle Valo , Sasha Levin Subject: [PATCH 4.15 075/128] ath10k: update tdls teardown state to target Date: Fri, 16 Mar 2018 16:23:36 +0100 Message-Id: <20180316152340.426356878@linuxfoundation.org> X-Mailer: git-send-email 2.16.2 In-Reply-To: <20180316152336.199007505@linuxfoundation.org> References: <20180316152336.199007505@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.15-stable review patch. If anyone has any objections, please let me know. ------------------ From: Manikanta Pubbisetty [ Upstream commit 424ea0d174e82365f85c6770225dba098b8f1d5f ] 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 Signed-off-by: Kalle Valo Signed-off-by: Sasha Levin Signed-off-by: Greg Kroah-Hartman --- drivers/net/wireless/ath/ath10k/mac.c | 10 ++++++++++ 1 file changed, 10 insertions(+) --- 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 ieee8 "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",