From: Dan Carpenter <error27@gmail.com>
To: quic_kvalo@quicinc.com
Cc: ath12k@lists.infradead.org
Subject: [bug report] wifi: ath12k: driver for Qualcomm Wi-Fi 7 devices
Date: Thu, 16 Feb 2023 14:44:02 +0300 [thread overview]
Message-ID: <Y+4XAnViIEiHzFXw@kili> (raw)
Hello Kalle Valo,
The patch d889913205cf: "wifi: ath12k: driver for Qualcomm Wi-Fi 7
devices" from Nov 28, 2022, leads to the following Smatch static
checker warning:
drivers/net/wireless/ath/ath12k/mac.c:1658 ath12k_peer_assoc_h_he()
warn: mask and shift to zero
drivers/net/wireless/ath/ath12k/mac.c
1642 /* the top most byte is used to indicate BSS color info */
1643 arg->peer_he_ops &= 0xffffff;
1644
1645 /* As per section 26.6.1 IEEE Std 802.11ax‐2022, if the Max AMPDU
1646 * Exponent Extension in HE cap is zero, use the arg->peer_max_mpdu
1647 * as calculated while parsing VHT caps(if VHT caps is present)
1648 * or HT caps (if VHT caps is not present).
1649 *
1650 * For non-zero value of Max AMPDU Exponent Extension in HE MAC caps,
1651 * if a HE STA sends VHT cap and HE cap IE in assoc request then, use
1652 * MAX_AMPDU_LEN_FACTOR as 20 to calculate max_ampdu length.
1653 * If a HE STA that does not send VHT cap, but HE and HT cap in assoc
1654 * request, then use MAX_AMPDU_LEN_FACTOR as 16 to calculate max_ampdu
1655 * length.
1656 */
1657 ampdu_factor = (he_cap->he_cap_elem.mac_cap_info[3] &
--> 1658 IEEE80211_HE_MAC_CAP3_MAX_AMPDU_LEN_EXP_MASK) >>
1659 IEEE80211_HE_MAC_CAP3_MAX_AMPDU_LEN_EXP_MASK;
^^^^^
This likely should be shifting by a shift define instead of a _MASK
value.
1660
1661 if (ampdu_factor) {
^^^^^^^^^^^^
Never going to be true.
1662 if (sta->deflink.vht_cap.vht_supported)
1663 arg->peer_max_mpdu = (1 << (IEEE80211_HE_VHT_MAX_AMPDU_FACTOR +
1664 ampdu_factor)) - 1;
1665 else if (sta->deflink.ht_cap.ht_supported)
1666 arg->peer_max_mpdu = (1 << (IEEE80211_HE_HT_MAX_AMPDU_FACTOR +
1667 ampdu_factor)) - 1;
1668 }
1669
regards,
dan carpenter
--
ath12k mailing list
ath12k@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/ath12k
next reply other threads:[~2023-02-16 11:44 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-16 11:44 Dan Carpenter [this message]
-- strict thread matches above, loose matches on Subject: below --
2024-06-14 17:33 [bug report] wifi: ath12k: driver for Qualcomm Wi-Fi 7 devices Dan Carpenter
2023-02-16 12:28 Dan Carpenter
2023-02-16 11:54 Dan Carpenter
2023-02-16 9:57 Dan Carpenter
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Y+4XAnViIEiHzFXw@kili \
--to=error27@gmail.com \
--cc=ath12k@lists.infradead.org \
--cc=quic_kvalo@quicinc.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.