Commit 2be10a97 authored by Lorenzo Bianconi's avatar Lorenzo Bianconi Committed by Felix Fietkau

mt76: mt7915: fix endiannes warning mt7915_mcu_beacon_check_caps

Fix the following sparse warning mt7915_mcu_beacon_check_caps routine:
warning: cast to restricted __le32
warning: cast from restricted __le16

Fixes: 22dffbdd ("mt76: mt7915: introduce mt7915_mcu_beacon_check_caps()")
Signed-off-by: default avatarLorenzo Bianconi <lorenzo@kernel.org>
Signed-off-by: default avatarFelix Fietkau <nbd@nbd.name>
parent 9a93364d
......@@ -2561,9 +2561,8 @@ mt7915_mcu_beacon_check_caps(struct mt7915_phy *phy, struct ieee80211_vif *vif,
len);
if (ie && ie[1] >= sizeof(*ht)) {
ht = (void *)(ie + 2);
bc = le32_to_cpu(ht->cap_info);
vc->ldpc |= !!(bc & IEEE80211_HT_CAP_LDPC_CODING);
vc->ldpc |= !!(le16_to_cpu(ht->cap_info) &
IEEE80211_HT_CAP_LDPC_CODING);
}
ie = cfg80211_find_ie(WLAN_EID_VHT_CAPABILITY, mgmt->u.beacon.variable,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment