Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp13475025ybl; Sun, 29 Dec 2019 12:48:04 -0800 (PST) X-Google-Smtp-Source: APXvYqwgLZuLvcUgeHald6odM0uBW23/AXWnmL6HEuYjrECqlj4ghI6aEYBWRMiCPs/GfdOuXgm+ X-Received: by 2002:a9d:4692:: with SMTP id z18mr68331015ote.163.1577652484541; Sun, 29 Dec 2019 12:48:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1577652484; cv=none; d=google.com; s=arc-20160816; b=dV9JayfiEkPFRoqWwKjXvAs0e7lIE2XjTNBix7E0CgLlh3IHBiCc34wN5zDhPJYiyo fSGJposo7VRSl9oTvkWZg7tOxToIg18oipCzc6hhGlxl33s+xWEIcB4iDvC/eLxDCnmv WefVPeuYeVkMNT137q57eNlxg9/WReYvxqmBfWpbbEoChI0yzNd75PkW+RVqGVM2b5pJ PV1fFdmdmX/w07C0TYgGINben3djlWP23fV7+yjXzmUQf8QAxWgGphflimQPUOoo39SS T5sW7RNiYqaE+7UTgyT22qmDLEJr+8tAXeDcFQ4MrCkFxxKsG0Lxic15w++Km7RbYVNu r+5Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=h0ga0s0Boz2UBlgwpcbNoIvpO9/Q84uG+uC1DFDDeGU=; b=nY8tx3D3WMt/eQ9AEF+SxGunJ8MPBGk9CoGeb2nP0TqSs2CmXi7NBUMVC3vshagCqD KOftnDR7N2nZz2Uk+9CHZ+lPx77cgpSCpowTfuzIjde5guwVPnFV5ufDUjmj+Wox1d/V rh2IxIeyaq62KIaiEtY73o96Mi3zRcZIj+XqOwH33LGWjzWxUxvm09nofeOJ7huLR0iC DlC+RL4qGT/IttwomGgv/r7dyT8KvXsVkygVhYsatUkdlvPQq7GryzxXSJH5v+BqZcKB ePf9vkm8ST+2QDQBbiyYG1pLehXkBZlUl80LljIIMrZ2U4J4BAs3VV5iC2NhIhFVT6b0 wlFA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=Z5rd0wAL; 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 x5si20009664oic.72.2019.12.29.12.47.53; Sun, 29 Dec 2019 12:48:04 -0800 (PST) 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; dkim=pass header.i=@kernel.org header.s=default header.b=Z5rd0wAL; 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 S1732460AbfL2Rx0 (ORCPT + 99 others); Sun, 29 Dec 2019 12:53:26 -0500 Received: from mail.kernel.org ([198.145.29.99]:40328 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732082AbfL2RxX (ORCPT ); Sun, 29 Dec 2019 12:53:23 -0500 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 0E492206A4; Sun, 29 Dec 2019 17:53:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1577642002; bh=nSXKaU5SQpSfrM9QlvZlXIaLKQ6xDYxaul8vUU6sXKg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Z5rd0wAL4ORUTrew6qlzrVkIzf+t69Rx8GE7PV5a68rDz8fPuEjIaxRGC/tDgblEw 2PIhcew3UJeLceqEpPFTHJcE5YeUYvZapaLSgXC0heb/WST97vBEgW2uZ/sVaekJOA imSFTTsMPtqKbCo5NWtpMD82tQbMElGO+TPoqXHE= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Sergey Matyukevich , Kalle Valo , Sasha Levin Subject: [PATCH 5.4 301/434] qtnfmac: fix invalid channel information output Date: Sun, 29 Dec 2019 18:25:54 +0100 Message-Id: <20191229172721.946537402@linuxfoundation.org> X-Mailer: git-send-email 2.24.1 In-Reply-To: <20191229172702.393141737@linuxfoundation.org> References: <20191229172702.393141737@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Sergey Matyukevich [ Upstream commit 24227a9e956a7c9913a7e6e7199a9ae3f540fe88 ] Do not attempt to print frequency for an invalid channel provided by firmware. That channel may simply not exist. Signed-off-by: Sergey Matyukevich Signed-off-by: Kalle Valo Signed-off-by: Sasha Levin --- drivers/net/wireless/quantenna/qtnfmac/event.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/drivers/net/wireless/quantenna/qtnfmac/event.c b/drivers/net/wireless/quantenna/qtnfmac/event.c index b57c8c18a8d0..7846383c8828 100644 --- a/drivers/net/wireless/quantenna/qtnfmac/event.c +++ b/drivers/net/wireless/quantenna/qtnfmac/event.c @@ -171,8 +171,9 @@ qtnf_event_handle_bss_join(struct qtnf_vif *vif, return -EPROTO; } - pr_debug("VIF%u.%u: BSSID:%pM status:%u\n", - vif->mac->macid, vif->vifid, join_info->bssid, status); + pr_debug("VIF%u.%u: BSSID:%pM chan:%u status:%u\n", + vif->mac->macid, vif->vifid, join_info->bssid, + le16_to_cpu(join_info->chan.chan.center_freq), status); if (status != WLAN_STATUS_SUCCESS) goto done; @@ -181,7 +182,7 @@ qtnf_event_handle_bss_join(struct qtnf_vif *vif, if (!cfg80211_chandef_valid(&chandef)) { pr_warn("MAC%u.%u: bad channel freq=%u cf1=%u cf2=%u bw=%u\n", vif->mac->macid, vif->vifid, - chandef.chan->center_freq, + chandef.chan ? chandef.chan->center_freq : 0, chandef.center_freq1, chandef.center_freq2, chandef.width); -- 2.20.1