Received: by 10.213.65.68 with SMTP id h4csp24880imn; Mon, 19 Mar 2018 18:18:46 -0700 (PDT) X-Google-Smtp-Source: AG47ELtMQLQUvCv36SHS+vxV1hUFoRbU1vBiJPz4uk0QKCRRntoxEHtDBtEbCZVqg3xehF922OrO X-Received: by 10.99.95.144 with SMTP id t138mr10356182pgb.94.1521508726514; Mon, 19 Mar 2018 18:18:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521508726; cv=none; d=google.com; s=arc-20160816; b=06zCuJZTs4Mfb2lzUqahZrZ3CcjLIa4d5yAA6IVZRRz1LegWnFeeZ8AtB0OAotdr+h EhOlOC7waGk1XLa3QvOGGBM6b/n9zo9DPLzMyAXT71SHv6FSte+SpDIGH4RXoavID7kX l13v2AOdRZUu9e0NatKkbJlHbmsWG/PEemILRk5fa0BdXOjQgxl499WEuVAonPfxDn4P dS5AEVv9Esl/IslT8w1M+LZpeN9gzJRdc4ElRirxwRpNejxNiF9JqFDH/xx+8ZMWA8Ig +iwkQk4vC2ogMCRiA0bstKhuErwlYTokX/gUf3WmugAQS9IRGIS4RrLHXEtw8lEqIxGR vo+Q== 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=b6sG9zROgwf5f2a5zj2CdZVZHQnFGLLQxAaedlWR+Tc=; b=c5Ro0FlcR0QLDKfeT+RLBBqPwluDLqhHXiOP03FsXhkDlthbZs4rXkKzb+bdv1VgbY K8PyRlrMWRzUljus5JLyl16HvxcKJE3O58TkcH6lm4PLcKzE8rbmAgiZmSBfMiE33tuN ZOnmft3+ZgHC+TlhW6bsVYO+CchM2PgHDoF9EbTal1GExzchGkfLtUp8wqtamGRc/yx9 26IRzq6ChDsXy5olMjFr3Ik/UEo5qgH6nn8hsm9ncZqY0raRw51aBnVoU9bj5ZP76062 KqfvMzcW4lepnO+1hIGjqhYJ/hY0S2YBHwUQ5r5A410xO+ofMmBpNDRucSTEIr5qIxp4 0Z+Q== 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 j5-v6si480427plt.25.2018.03.19.18.18.32; Mon, 19 Mar 2018 18:18:46 -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 S1031749AbeCSTJq (ORCPT + 99 others); Mon, 19 Mar 2018 15:09:46 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:51356 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S970041AbeCSS1q (ORCPT ); Mon, 19 Mar 2018 14:27:46 -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 DFF1D11D5; Mon, 19 Mar 2018 18:27:45 +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.9 184/241] ath10k: update tdls teardown state to target Date: Mon, 19 Mar 2018 19:07:29 +0100 Message-Id: <20180319180758.766531196@linuxfoundation.org> X-Mailer: git-send-email 2.16.2 In-Reply-To: <20180319180751.172155436@linuxfoundation.org> References: <20180319180751.172155436@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.9-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 @@ -6054,6 +6054,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",