From patchwork Wed Dec 23 08:46:19 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: You-Sheng Yang X-Patchwork-Id: 1419715 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.ubuntu.com (client-ip=91.189.94.19; helo=huckleberry.canonical.com; envelope-from=kernel-team-bounces@lists.ubuntu.com; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=canonical.com Received: from huckleberry.canonical.com (huckleberry.canonical.com [91.189.94.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4D16V83nm5z9sVs; Wed, 23 Dec 2020 19:55:12 +1100 (AEDT) Received: from localhost ([127.0.0.1] helo=huckleberry.canonical.com) by huckleberry.canonical.com with esmtp (Exim 4.86_2) (envelope-from ) id 1krzvH-0006Ek-8F; Wed, 23 Dec 2020 08:55:07 +0000 Received: from mail-pj1-f45.google.com ([209.85.216.45]) by huckleberry.canonical.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1krzuT-0005Qa-Rs for kernel-team@lists.ubuntu.com; Wed, 23 Dec 2020 08:54:18 +0000 Received: by mail-pj1-f45.google.com with SMTP id n3so799115pjm.1 for ; Wed, 23 Dec 2020 00:53:59 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=saibm+wh9GOYfwuoFv24K/tQSCZTrotOKkaL0ybv1kQ=; b=dSG238KTvFjJUQiteQ7EhtZiqMqA+Sb7blpyrfKf09Oe83ALAL8XhLopDP1oFi5K1j 3XHp3STa1ChG3d5B6P90DHzwr5MVtnz7XDnpizK9+55tdwDdV2B3hKCaKH0dkRzXCXdA YJv0OkQTIcstdRt+sPz7OJy2veooSwmtfv0GP6pZM/7MMXeun8gpm/pekk7KteLmjBSJ yqELd/Gikw7/ksjnaTOvk6lyzcX7XNfqa/sqxnSMIy88sbN8yAc9N8CjCsFhqwFx8wBJ zsm1JUCHXEri2bwJQw2LXZOWGJETMDzGY4trlGxw5RH330O9yKQLJKJmLB0kDBUMVXtW EYwA== X-Gm-Message-State: AOAM533+/F0SIsrAdVslDLxwZICgPOtFXxZ335DjZ3neKfZbHY5i0P0M iWia28CEeR6P1fFvWwVc5nZr5HYGMZHTmFKe X-Google-Smtp-Source: ABdhPJwxbDVLPPnRqD/DHanRZlRLM0vvSVNmXmhahMBcAOu/cMpxaA6FVMS8LniFK67T9YR280hSKA== X-Received: by 2002:a17:902:a401:b029:dc:3e1d:234a with SMTP id p1-20020a170902a401b02900dc3e1d234amr3163130plq.48.1608713635712; Wed, 23 Dec 2020 00:53:55 -0800 (PST) Received: from localhost (61-220-137-37.HINET-IP.hinet.net. [61.220.137.37]) by smtp.gmail.com with ESMTPSA id a22sm23045903pfg.49.2020.12.23.00.53.54 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 23 Dec 2020 00:53:55 -0800 (PST) From: You-Sheng Yang To: kernel-team@lists.ubuntu.com Subject: [PATCH 046/379][SRU][OEM-5.6] ath11k: fill channel info from rx channel Date: Wed, 23 Dec 2020 16:46:19 +0800 Message-Id: <20201223085152.554896-47-vicamo.yang@canonical.com> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201223085152.554896-1-vicamo.yang@canonical.com> References: <20201223085152.554896-1-vicamo.yang@canonical.com> MIME-Version: 1.0 Received-SPF: pass client-ip=209.85.216.45; envelope-from=vicamo@gmail.com; helo=mail-pj1-f45.google.com X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.20 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: kernel-team-bounces@lists.ubuntu.com Sender: "kernel-team" From: Venkateswara Naralasetty BugLink: https://bugs.launchpad.net/bugs/1879633 Fill the channel information from rx channel for the packet which has invalid channel info from meta data. Signed-off-by: Venkateswara Naralasetty Signed-off-by: Kalle Valo (cherry picked from commit de06b2f75190e691467e89d191c7752dfa340a3a) Signed-off-by: You-Sheng Yang --- drivers/net/wireless/ath/ath11k/dp_rx.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/drivers/net/wireless/ath/ath11k/dp_rx.c b/drivers/net/wireless/ath/ath11k/dp_rx.c index 61ff9a9a32cf..c4affc45c2f6 100644 --- a/drivers/net/wireless/ath/ath11k/dp_rx.c +++ b/drivers/net/wireless/ath/ath11k/dp_rx.c @@ -2227,9 +2227,13 @@ static void ath11k_dp_rx_h_ppdu(struct ath11k *ar, struct hal_rx_desc *rx_desc, } else if (channel_num >= 36 && channel_num <= 173) { rx_status->band = NL80211_BAND_5GHZ; } else { - ath11k_warn(ar->ab, "Unsupported Channel info received %d\n", - channel_num); - return; + spin_lock_bh(&ar->data_lock); + rx_status->band = ar->rx_channel->band; + channel_num = + ieee80211_frequency_to_channel(ar->rx_channel->center_freq); + spin_unlock_bh(&ar->data_lock); + ath11k_dbg_dump(ar->ab, ATH11K_DBG_DATA, NULL, "rx_desc: ", + rx_desc, sizeof(struct hal_rx_desc)); } rx_status->freq = ieee80211_channel_to_frequency(channel_num,