Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp5008091ybc; Tue, 26 Nov 2019 19:22:54 -0800 (PST) X-Google-Smtp-Source: APXvYqw8FN0cr8OHRBaAt6c5aoUmu6XPQig7/mX3FY/33cX8Q26MgOFlLaIWmMhfliyllUM+cJuu X-Received: by 2002:aa7:c1cd:: with SMTP id d13mr3829585edp.288.1574824974888; Tue, 26 Nov 2019 19:22:54 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1574824974; cv=none; d=google.com; s=arc-20160816; b=muXq3CBd/g4OBCLB6pzymyV41qHt0IyzTZFpqM1+lV1QpQJykNjsFYst4yadxPvZDn zsCRznbK5Y6DgIctjhQU5uXJzTpVQJzHLqdaDVbGdwroNTlZl411XgkrilJqr4mfyEL7 UvAFnUhjlUQT8OIIMbSJuGAWZPOzlLsuqGXCvO2MC01zU0CwOeSLom6Hx8i1Iarv0pe0 gAcF0jtUJXxZ0QVFUxpJr6tIuOl9pIZ2o0Cuj2eOCgMOWAMeTqmBnvtrLuEb627MIk7V 3zR2d0nsfthJInEzHDAFRf8jSyqW53/jQyvb6IBOwEiNNkyc/avD0rco9rlIJmm7Sj6q a6JQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:feedback-id:content-transfer-encoding :mime-version:message-id:date:subject:cc:to:from:dmarc-filter :dkim-signature:dkim-signature; bh=3IoQ9F+MIiOg7PX+VUaZTcrgu40qTO1gfekVrqSle2w=; b=eZFWusH5lZwEqF4OTWJz49O8jTLH+P7tI5jx2FQWeiCtuYofY5nM342tn6wSzxKyD/ Po6ww9DD3qiiwO8VKMIn6nog7lnZuVmghC+yAT1SoMcpfuFo0nKfxSlEvwNcR49v2B0X x/aAGa26qDj4XGEHsPJw+VulQWiovHaQPBvWiqO+cBd/0KZYkcJV9Cr8PL5/gEYeNbJv 8iUIiPbhylOKiLzTGY/7FiqdKgevsUX40cUrGYbUmNDdoYofv3w/dCyQxuoGc0G27lNY pH4jHEUHLOE0xfL+BYdI6ak6Y3aBqUqbGVhBXtlsp7X8+JiZ9sz7TkshcAFQ7I0iToc3 QNWQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@codeaurora.org header.s=zsmsymrwgfyinv5wlfyidntwsjeeldzt header.b=IQyTtuHc; dkim=pass header.i=@amazonses.com header.s=gdwg2y3kokkkj5a55z2ilkup5wp5hhxx header.b="F8yNM8/D"; spf=pass (google.com: best guess record for domain of linux-wireless-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-wireless-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 oy25si8418228ejb.291.2019.11.26.19.22.12; Tue, 26 Nov 2019 19:22:54 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-wireless-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@codeaurora.org header.s=zsmsymrwgfyinv5wlfyidntwsjeeldzt header.b=IQyTtuHc; dkim=pass header.i=@amazonses.com header.s=gdwg2y3kokkkj5a55z2ilkup5wp5hhxx header.b="F8yNM8/D"; spf=pass (google.com: best guess record for domain of linux-wireless-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726346AbfK0DTZ (ORCPT + 99 others); Tue, 26 Nov 2019 22:19:25 -0500 Received: from a27-18.smtp-out.us-west-2.amazonses.com ([54.240.27.18]:51308 "EHLO a27-18.smtp-out.us-west-2.amazonses.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726295AbfK0DTZ (ORCPT ); Tue, 26 Nov 2019 22:19:25 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/simple; s=zsmsymrwgfyinv5wlfyidntwsjeeldzt; d=codeaurora.org; t=1574824764; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version:Content-Transfer-Encoding; bh=92Cgq7YPc/LoYHy38dUZaTP5T9x4xucq6/3tGdweYc0=; b=IQyTtuHcynwv/LnSDdn75Lqos0OxzOWli5UCVT+sabWgh5jNQ33y5GTeNC3Wt9o1 s+71jOQLNmUXxLi9YCJHZFy0aetSC4ULvFiI2C3MJ6sQD4umvSbn5Kqg2OZu3GG2lLE ZPctysUM6sTcVspmcuEHe2z6qdxuyYkEAO8FWIz0= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/simple; s=gdwg2y3kokkkj5a55z2ilkup5wp5hhxx; d=amazonses.com; t=1574824764; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version:Content-Transfer-Encoding:Feedback-ID; bh=92Cgq7YPc/LoYHy38dUZaTP5T9x4xucq6/3tGdweYc0=; b=F8yNM8/DznDpfA+NebnypKRkqkynPpYxdX5rmp3ODAxfKgdocj+UQ5qzs2Yf/5Op C1IUbPRxFWbTW3ELrWUfmF10JZrbkKD3kEYH+mkEE+u/CIUoz6LQr9pecLjJFEcUMVE yU6loWh++++7RtynUMNy2e/FFxmHrXhC3pnjVWRc= X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-caf-mail-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.0 required=2.0 tests=ALL_TRUSTED,SPF_NONE, URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.0 DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 8F3FFC43383 Authentication-Results: aws-us-west-2-caf-mail-1.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: aws-us-west-2-caf-mail-1.web.codeaurora.org; spf=none smtp.mailfrom=wgong@codeaurora.org From: Wen Gong To: ath10k@lists.infradead.org Cc: linux-wireless@vger.kernel.org Subject: [PATCH] ath10k: set WMI_PEER_AUTHORIZE after a firmware crash Date: Wed, 27 Nov 2019 03:19:24 +0000 Message-ID: <0101016eaadee57a-54500c6d-4751-423f-8bab-5acd8fad2175-000000@us-west-2.amazonses.com> X-Mailer: git-send-email 2.23.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-SES-Outgoing: 2019.11.27-54.240.27.18 Feedback-ID: 1.us-west-2.CZuq2qbDmUIuT3qdvXlRHZZCpfZqZ4GtG9v3VKgRyF0=:AmazonSES Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org After the firmware crashes ath10k recovers via ieee80211_reconfig(), which eventually leads to firmware configuration and including the encryption keys. However, because there is no new auth/assoc and 4-way-handshake, and firmware set the authorize flag after 4-way-handshake, so the authorize flag in firmware is not set in firmware without 4-way-handshake. This will lead to a failure of data transmission after recovery done when using encrypted connections like WPA-PSK. Set authorize flag after installing keys to firmware will fix the issue. This was noticed by testing firmware crashing using simulate_fw_crash debugfs file. Tested with QCA6174 SDIO with firmware WLAN.RMH.4.4.1-00007-QCARMSWP-1. Signed-off-by: Wen Gong --- drivers/net/wireless/ath/ath10k/mac.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/net/wireless/ath/ath10k/mac.c b/drivers/net/wireless/ath/ath10k/mac.c index ae84f8e4e7dd..0829582c0d50 100644 --- a/drivers/net/wireless/ath/ath10k/mac.c +++ b/drivers/net/wireless/ath/ath10k/mac.c @@ -6329,6 +6329,9 @@ static int ath10k_set_key(struct ieee80211_hw *hw, enum set_key_cmd cmd, if (sta && sta->tdls) ath10k_wmi_peer_set_param(ar, arvif->vdev_id, sta->addr, ar->wmi.peer_param->authorize, 1); + else if (sta && cmd == SET_KEY && (key->flags & IEEE80211_KEY_FLAG_PAIRWISE)) + ath10k_wmi_peer_set_param(ar, arvif->vdev_id, peer_addr, + ar->wmi.peer_param->authorize, 1); exit: mutex_unlock(&ar->conf_mutex); -- 2.23.0