Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp439557yba; Fri, 3 May 2019 04:54:57 -0700 (PDT) X-Google-Smtp-Source: APXvYqzNQ0xV835xU35jlpfPxQV9NlBIqQPjmrfbMvWjKLh7xpT4/5MxYOiogLcjWDJGsGI3iZwf X-Received: by 2002:a17:902:4381:: with SMTP id j1mr9576897pld.173.1556884497605; Fri, 03 May 2019 04:54:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1556884497; cv=none; d=google.com; s=arc-20160816; b=mPkFAoY6CnQaThliAQCoCVXvXf9kqT7lbdqy/gLZmXYn4Pjy3PWoWOd019XM5Syyrx eesCvFp4+2B3z35Xeh0Q6vugNQ9kbFPxtuMvQD9I3zJjvS4cnyL3Wh6aoS//71hvsaW9 ZfFU8v4TrTQcSGDErMKXIKbmFMTgfWX0Y062Xzr29z5wMjBKlJFRMAaWFyV3VF1uM0MI 2vaFuAEopeZgVRt8msc25UyJAcrTZv/GVjmJB81W/RM2sKCHTol6lpTAOEpPSzJX1oFI 9h5kazgb1u6weiklBvhB4qZsKMQQLoTEANPma7/32biLyLYJWroz8tH+EpmRYGEVW31Y hzPg== 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=emnoK5PKGCjKHIaVRHCYwaHIyqaLS3TIxvVWY7LbFb6Z7qZ1TnzpqlhVqQYjfkpD1Z xAGBg9cAG0xmY3gMtg/u4yRwEIHFteCejlWIosrS3hccG7TkAMLz/yl2D/1CRSGJw0Ez DhIWWYgyuip0H9d7qkIy/MRjwZSzChsEht/t4+1mmq8wdJ7wrL4Ukc57qIV/eOhrNFu9 04j4GW3W7sbFB8xds/jFwe9JgHWFIcLtc/LW0sTLU+A491nMyV4IEgRjf8KaZgStzWTB Qe4O98KsxDyAhl7Wl6A1/ZsXXeq1OjQwNSta8d3ooMorSAWPlpKP5VRlFoXI9xAC26OW b8Dg== 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 q81si1950049pfa.207.2019.05.03.04.54.43; Fri, 03 May 2019 04:54:57 -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 S1727714AbfECLxr (ORCPT + 99 others); Fri, 3 May 2019 07:53:47 -0400 Received: from rtits2.realtek.com ([211.75.126.72]:58263 "EHLO rtits2.realtek.com.tw" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727695AbfECLxq (ORCPT ); Fri, 3 May 2019 07:53:46 -0400 Authenticated-By: X-SpamFilter-By: BOX Solutions SpamTrap 5.62 with qID x43Brgj5000728, 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 x43Brgj5000728 (version=TLSv1 cipher=AES256-SHA bits=256 verify=NOT); Fri, 3 May 2019 19:53:42 +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 19:53:41 +0800 From: To: CC: Subject: [PATCH v2 4/5] rtw88: fix unassigned rssi_level in rtw_sta_info Date: Fri, 3 May 2019 19:53:34 +0800 Message-ID: <1556884415-23474-5-git-send-email-yhchuang@realtek.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1556884415-23474-1-git-send-email-yhchuang@realtek.com> References: <1556884415-23474-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