diff options
author | Sergey Matyukevich <sergey.matyukevich.os@quantenna.com> | 2019-11-13 11:06:51 +0000 |
---|---|---|
committer | Kalle Valo <kvalo@codeaurora.org> | 2019-11-14 17:28:49 +0200 |
commit | 24227a9e956a7c9913a7e6e7199a9ae3f540fe88 (patch) | |
tree | eef7776933614ab0bb759ce7be9ac1996fdcf5e4 /drivers/net/wireless/quantenna | |
parent | dd4c2260dab04f5ae7bdb79b9470e7da56f48145 (diff) | |
download | linux-stable-24227a9e956a7c9913a7e6e7199a9ae3f540fe88.tar.gz linux-stable-24227a9e956a7c9913a7e6e7199a9ae3f540fe88.tar.bz2 linux-stable-24227a9e956a7c9913a7e6e7199a9ae3f540fe88.zip |
qtnfmac: fix invalid channel information output
Do not attempt to print frequency for an invalid channel
provided by firmware. That channel may simply not exist.
Signed-off-by: Sergey Matyukevich <sergey.matyukevich.os@quantenna.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Diffstat (limited to 'drivers/net/wireless/quantenna')
-rw-r--r-- | drivers/net/wireless/quantenna/qtnfmac/event.c | 7 |
1 files 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); |