Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp375861yba; Fri, 3 May 2019 03:38:02 -0700 (PDT) X-Google-Smtp-Source: APXvYqxYQRgW5qG0q9GWIVJXh12hhhF9WPRfJn956V3C6afSl3pfYEzQyH91W8n7/p9A3Bv29OVw X-Received: by 2002:a17:902:29a7:: with SMTP id h36mr9340798plb.319.1556879882279; Fri, 03 May 2019 03:38:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1556879882; cv=none; d=google.com; s=arc-20160816; b=OMhMBAeFkxHYectsjg762bYhzfg2E8MTzI38tatDnpKbOwwZGgoFT8ivtkxoXl0iU2 xBY+m0FQPhqofvRFGSUISsmiWdrJaWzvfd3RNMtfXrJS0u9p5YQy4rF6BhmFbv7CzUfd Zif97Phjd+QWG3yRtSHtOeilS5yxK54xBfT/9JIqwbmKB93AZ5lJs/jFaGKC9AQBr70i Ta7WkyCRrkNdR6liyPKF4kX5G9pV0x7+3NKiIYKIVKI9MLRZihQ/6uyl/0cnC9XUanG0 pTxNsIlnlyfnBGttlhVkCcU0hws0Be0ZApAmNiX7w6lXYdFgd12KeEHTiCurVK2wTFWQ A8oQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:authenticated-by; bh=KQn4cERJ8t1GMOy1Issnrz5jf8DBJABXIEymdLVqiLw=; b=bSxoqp3XRQNs2NK1aFZYOtU+s32+imA0sSXutpGS7ZutFoddud2LNqkhv+zLpDkQrZ JM7vnVOQ9oqBJlEH6/f1An9AF7SG9iQUe30ZmKFoNvxQbPsyFKxia2h4/K3z/6lkEIa5 6mjFIlQm63HkVsFWJ+AK56xmevjWqTECbwfmH5JS2Eb55X4sh3EYvBPwxb0Iefb39LzD ysfuBwKfind+38xOaQzLf6LjZC7Px6uKfM3wiPCDoMXUZ1fOPJUGafdxoyrCEme5xIxA UqpuNfRZlYpSTLcJlm1futNpyVbOM7ojNr5i1izYypJ6jiV0z0vtSuzk+7AleAHmOwMz xvag== ARC-Authentication-Results: i=1; mx.google.com; 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 e7si1804905pfc.152.2019.05.03.03.37.36; Fri, 03 May 2019 03:38:02 -0700 (PDT) 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; 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 S1727398AbfECKcU (ORCPT + 99 others); Fri, 3 May 2019 06:32:20 -0400 Received: from rtits2.realtek.com ([211.75.126.72]:48818 "EHLO rtits2.realtek.com.tw" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727375AbfECKcU (ORCPT ); Fri, 3 May 2019 06:32:20 -0400 Authenticated-By: X-SpamFilter-By: BOX Solutions SpamTrap 5.62 with qID x43AWFu5012120, This message is accepted by code: ctloc85258 Received: from mail.realtek.com (rtitcasv01.realtek.com.tw[172.21.6.18]) by rtits2.realtek.com.tw (8.15.2/2.57/5.78) with ESMTPS id x43AWFu5012120 (version=TLSv1 cipher=AES256-SHA bits=256 verify=NOT); Fri, 3 May 2019 18:32:15 +0800 Received: from localhost.localdomain (172.21.68.126) by RTITCASV01.realtek.com.tw (172.21.6.18) with Microsoft SMTP Server id 14.3.408.0; Fri, 3 May 2019 18:32:15 +0800 From: To: CC: Subject: [PATCH 4/6] rtw88: fix unassigned rssi_level in rtw_sta_info Date: Fri, 3 May 2019 18:31:40 +0800 Message-ID: <1556879502-16211-5-git-send-email-yhchuang@realtek.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1556879502-16211-1-git-send-email-yhchuang@realtek.com> References: <1556879502-16211-1-git-send-email-yhchuang@realtek.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [172.21.68.126] Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org From: Yan-Hsuan Chuang The new rssi_level should be stored in si, otherwise the rssi_level will never be updated and get a wrong RA mask, which is calculated by the rssi level Signed-off-by: Yan-Hsuan Chuang --- drivers/net/wireless/realtek/rtw88/phy.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/wireless/realtek/rtw88/phy.c b/drivers/net/wireless/realtek/rtw88/phy.c index 4381b36..7f437e2 100644 --- a/drivers/net/wireless/realtek/rtw88/phy.c +++ b/drivers/net/wireless/realtek/rtw88/phy.c @@ -144,10 +144,10 @@ static void rtw_phy_stat_rssi_iter(void *data, struct ieee80211_sta *sta) struct rtw_phy_stat_iter_data *iter_data = data; struct rtw_dev *rtwdev = iter_data->rtwdev; struct rtw_sta_info *si = (struct rtw_sta_info *)sta->drv_priv; - u8 rssi, rssi_level; + u8 rssi; rssi = ewma_rssi_read(&si->avg_rssi); - rssi_level = rtw_phy_get_rssi_level(si->rssi_level, rssi); + si->rssi_level = rtw_phy_get_rssi_level(si->rssi_level, rssi); rtw_fw_send_rssi_info(rtwdev, si); -- 2.7.4