mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-05 18:41:58 +09:00
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: 22dffbddf0 ("mt76: mt7915: introduce mt7915_mcu_beacon_check_caps()")
Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
This commit is contained in:
committed by
Felix Fietkau
parent
9a93364d65
commit
2be10a9744
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user