Skip to contentSkip to conversation

mt76: move rx connac2 shared code in connac module

PATCH New Lorenzo Bianconi 1 participant 4 messages Jun 8, 2022

Subsystems (2)
lore
Share & tools
lore

Lorenzo Bianconi

author maintainer
#0 lore raw

cover mt76: move rx connac2 shared code in connac module

Similar to tx counterpart, move mac rx shared code between mt7921 and mt7915 in mt76-connac module.

Lorenzo Bianconi (3):
mt76: connac: move HE radiotap parsing in connac module
mt76: connac: move mt76_connac2_reverse_frag0_hdr_trans in mt76-connac
module
mt76: connac: move mt76_connac2_mac_fill_rx_rate in connac module

 .../net/wireless/mediatek/mt76/mt76_connac.h  |   9 +
 .../wireless/mediatek/mt76/mt76_connac2_mac.h | 142 +++++++
 .../wireless/mediatek/mt76/mt76_connac_mac.c  | 368 +++++++++++++++++
 .../net/wireless/mediatek/mt76/mt7915/mac.c   | 381 +-----------------
 .../net/wireless/mediatek/mt76/mt7915/mac.h   | 139 -------
 .../net/wireless/mediatek/mt76/mt7921/mac.c   | 360 +----------------
 .../net/wireless/mediatek/mt76/mt7921/mac.h   | 136 -------
 7 files changed, 554 insertions(+), 981 deletions(-)
Signature · 1 line
2.35.3
author maintainer
#1 lore raw

PATCH 1/3 mt76: connac: move HE radiotap parsing in connac module

HE radiotap parsing code is shared between connac2 devices.

---
 .../net/wireless/mediatek/mt76/mt76_connac.h  |   3 +
 .../wireless/mediatek/mt76/mt76_connac2_mac.h |  56 ++++++
 .../wireless/mediatek/mt76/mt76_connac_mac.c  | 187 ++++++++++++++++++
 .../net/wireless/mediatek/mt76/mt7915/mac.c   | 180 +----------------
 .../net/wireless/mediatek/mt76/mt7915/mac.h   |  52 -----
 .../net/wireless/mediatek/mt76/mt7921/mac.c   | 187 +-----------------
 .../net/wireless/mediatek/mt76/mt7921/mac.h   |  52 -----
 7 files changed, 251 insertions(+), 466 deletions(-)
drivers/net/wireless/mediatek/mt76/mt76_connac.h +3 -0
index 6b8d6c5d621a..c06a320b53bc 100644
@@ -253,5 +253,8 @@ void mt76_connac2_mac_write_txwi(struct mt76_dev *dev, __le32 *txwi,
 bool mt76_connac2_mac_add_txs_skb(struct mt76_dev *dev, struct mt76_wcid *wcid,
 				  int pid, __le32 *txs_data,
 				  struct mt76_sta_stats *stats);
+void mt76_connac2_mac_decode_he_radiotap(struct mt76_dev *dev,
+					 struct sk_buff *skb,
+					 __le32 *rxv, u32 mode);
 
 #endif /* __MT76_CONNAC_H */
drivers/net/wireless/mediatek/mt76/mt76_connac2_mac.h +56 -0

60 lines not on this page · raw message

drivers/net/wireless/mediatek/mt76/mt76_connac_mac.c +187 -0

196 lines not on this page · raw message

drivers/net/wireless/mediatek/mt76/mt7915/mac.c +2 -178

204 lines not on this page · raw message

drivers/net/wireless/mediatek/mt76/mt7915/mac.h +0 -52

58 lines not on this page · raw message

drivers/net/wireless/mediatek/mt76/mt7921/mac.c +3 -184

211 lines not on this page · raw message

drivers/net/wireless/mediatek/mt76/mt7921/mac.h +0 -52

58 lines not on this page · raw message

Signature · 1 line
2.35.3
author maintainer
#2 lore raw

PATCH 2/3 mt76: connac: move mt76_connac2_reverse_frag0_hdr_trans in mt76-connac module

In reply to Lorenzo Bianconi

mt76_connac2_reverse_frag0_hdr_trans routine is shared between mt7921 and mt7915e drivers.

---
 .../net/wireless/mediatek/mt76/mt76_connac.h  |  2 +
 .../wireless/mediatek/mt76/mt76_connac2_mac.h | 86 ++++++++++++++++
 .../wireless/mediatek/mt76/mt76_connac_mac.c  | 76 +++++++++++++++
 .../net/wireless/mediatek/mt76/mt7915/mac.c   | 97 +++----------------
 .../net/wireless/mediatek/mt76/mt7915/mac.h   | 87 -----------------
 .../net/wireless/mediatek/mt76/mt7921/mac.c   | 95 +++---------------
 .../net/wireless/mediatek/mt76/mt7921/mac.h   | 84 ----------------
 7 files changed, 189 insertions(+), 338 deletions(-)
drivers/net/wireless/mediatek/mt76/mt76_connac.h +2 -0
index c06a320b53bc..27ab1f2355ce 100644
@@ -256,5 +256,7 @@ bool mt76_connac2_mac_add_txs_skb(struct mt76_dev *dev, struct mt76_wcid *wcid,
 void mt76_connac2_mac_decode_he_radiotap(struct mt76_dev *dev,
 					 struct sk_buff *skb,
 					 __le32 *rxv, u32 mode);
+int mt76_connac2_reverse_frag0_hdr_trans(struct ieee80211_vif *vif,
+					 struct sk_buff *skb, u16 hdr_offset);
 
 #endif /* __MT76_CONNAC_H */
drivers/net/wireless/mediatek/mt76/mt76_connac2_mac.h +86 -0

92 lines not on this page · raw message

drivers/net/wireless/mediatek/mt76/mt76_connac_mac.c +76 -0

79 lines not on this page · raw message

drivers/net/wireless/mediatek/mt76/mt7915/mac.c +13 -84

128 lines not on this page · raw message

drivers/net/wireless/mediatek/mt76/mt7915/mac.h +0 -87

93 lines not on this page · raw message

drivers/net/wireless/mediatek/mt76/mt7921/mac.c +12 -83

120 lines not on this page · raw message

drivers/net/wireless/mediatek/mt76/mt7921/mac.h +0 -84

90 lines not on this page · raw message

Signature · 1 line
2.35.3
author maintainer
#3 lore raw

PATCH 3/3 mt76: connac: move mt76_connac2_mac_fill_rx_rate in connac module

In reply to Lorenzo Bianconi

Rely on mt76_connac2_mac_fill_rx_rate routine in mt7921 driver.

---
 .../net/wireless/mediatek/mt76/mt76_connac.h  |   4 +
 .../wireless/mediatek/mt76/mt76_connac_mac.c  | 105 +++++++++++++++++
 .../net/wireless/mediatek/mt76/mt7915/mac.c   | 106 +-----------------
 .../net/wireless/mediatek/mt76/mt7921/mac.c   |  82 +-------------
 4 files changed, 117 insertions(+), 180 deletions(-)
drivers/net/wireless/mediatek/mt76/mt76_connac.h +4 -0
index 27ab1f2355ce..a9927dcf3d6c 100644
@@ -258,5 +258,9 @@ void mt76_connac2_mac_decode_he_radiotap(struct mt76_dev *dev,
 					 __le32 *rxv, u32 mode);
 int mt76_connac2_reverse_frag0_hdr_trans(struct ieee80211_vif *vif,
 					 struct sk_buff *skb, u16 hdr_offset);
+int mt76_connac2_mac_fill_rx_rate(struct mt76_dev *dev,
+				  struct mt76_rx_status *status,
+				  struct ieee80211_supported_band *sband,
+				  __le32 *rxv, u8 *mode);
 
 #endif /* __MT76_CONNAC_H */
drivers/net/wireless/mediatek/mt76/mt76_connac_mac.c +105 -0

108 lines not on this page · raw message

drivers/net/wireless/mediatek/mt76/mt7915/mac.c +2 -104

118 lines not on this page · raw message

drivers/net/wireless/mediatek/mt76/mt7921/mac.c +6 -76

101 lines not on this page · raw message

Signature · 1 line
2.35.3