Commit ae4027a7 authored by Ryder Lee's avatar Ryder Lee Committed by Felix Fietkau

mt76: mt7915: fix decoded radiotap HE flags

Move assignment of .data1 and .data2 to a single place and fix overwriting
of values from the template
Signed-off-by: default avatarRyder Lee <ryder.lee@mediatek.com>
Signed-off-by: default avatarFelix Fietkau <nbd@nbd.name>
parent 4c04f25d
...@@ -235,9 +235,14 @@ mt7915_mac_decode_he_radiotap(struct sk_buff *skb, ...@@ -235,9 +235,14 @@ mt7915_mac_decode_he_radiotap(struct sk_buff *skb,
.data1 = HE_BITS(DATA1_DATA_MCS_KNOWN) | .data1 = HE_BITS(DATA1_DATA_MCS_KNOWN) |
HE_BITS(DATA1_DATA_DCM_KNOWN) | HE_BITS(DATA1_DATA_DCM_KNOWN) |
HE_BITS(DATA1_STBC_KNOWN) | HE_BITS(DATA1_STBC_KNOWN) |
HE_BITS(DATA1_CODING_KNOWN), HE_BITS(DATA1_CODING_KNOWN) |
HE_BITS(DATA1_LDPC_XSYMSEG_KNOWN) |
HE_BITS(DATA1_DOPPLER_KNOWN) |
HE_BITS(DATA1_BSS_COLOR_KNOWN),
.data2 = HE_BITS(DATA2_GI_KNOWN) | .data2 = HE_BITS(DATA2_GI_KNOWN) |
HE_BITS(DATA2_TXBF_KNOWN), HE_BITS(DATA2_TXBF_KNOWN) |
HE_BITS(DATA2_PE_DISAMBIG_KNOWN) |
HE_BITS(DATA2_TXOP_KNOWN),
}; };
struct ieee80211_radiotap_he *he = NULL; struct ieee80211_radiotap_he *he = NULL;
__le32 v2 = rxv->v[2]; __le32 v2 = rxv->v[2];
...@@ -248,12 +253,6 @@ mt7915_mac_decode_he_radiotap(struct sk_buff *skb, ...@@ -248,12 +253,6 @@ mt7915_mac_decode_he_radiotap(struct sk_buff *skb,
he = skb_push(skb, sizeof(known)); he = skb_push(skb, sizeof(known));
memcpy(he, &known, sizeof(known)); memcpy(he, &known, sizeof(known));
he->data1 = HE_BITS(DATA1_LDPC_XSYMSEG_KNOWN) |
HE_BITS(DATA1_DOPPLER_KNOWN) |
HE_BITS(DATA1_BSS_COLOR_KNOWN);
he->data2 = HE_BITS(DATA2_PE_DISAMBIG_KNOWN) |
HE_BITS(DATA2_TXOP_KNOWN);
he->data3 = HE_PREP(DATA3_BSS_COLOR, BSS_COLOR, v14) | he->data3 = HE_PREP(DATA3_BSS_COLOR, BSS_COLOR, v14) |
HE_PREP(DATA3_LDPC_XSYMSEG, LDPC_EXT_SYM, v2); HE_PREP(DATA3_LDPC_XSYMSEG, LDPC_EXT_SYM, v2);
he->data5 = HE_PREP(DATA5_PE_DISAMBIG, PE_DISAMBIG, v2) | he->data5 = HE_PREP(DATA5_PE_DISAMBIG, PE_DISAMBIG, v2) |
...@@ -296,10 +295,10 @@ mt7915_mac_decode_he_radiotap(struct sk_buff *skb, ...@@ -296,10 +295,10 @@ mt7915_mac_decode_he_radiotap(struct sk_buff *skb,
HE_BITS(DATA1_SPTL_REUSE3_KNOWN) | HE_BITS(DATA1_SPTL_REUSE3_KNOWN) |
HE_BITS(DATA1_SPTL_REUSE4_KNOWN); HE_BITS(DATA1_SPTL_REUSE4_KNOWN);
he->data4 = HE_PREP(DATA4_TB_SPTL_REUSE1, SR_MASK, v11) | he->data4 |= HE_PREP(DATA4_TB_SPTL_REUSE1, SR_MASK, v11) |
HE_PREP(DATA4_TB_SPTL_REUSE2, SR1_MASK, v11) | HE_PREP(DATA4_TB_SPTL_REUSE2, SR1_MASK, v11) |
HE_PREP(DATA4_TB_SPTL_REUSE3, SR2_MASK, v11) | HE_PREP(DATA4_TB_SPTL_REUSE3, SR2_MASK, v11) |
HE_PREP(DATA4_TB_SPTL_REUSE4, SR3_MASK, v11); HE_PREP(DATA4_TB_SPTL_REUSE4, SR3_MASK, v11);
mt7915_mac_decode_he_radiotap_ru(status, rxv, he); mt7915_mac_decode_he_radiotap_ru(status, rxv, he);
break; break;
......
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