blob: 479accf666ffe70022b75fabd67adc24eb344011 [file] [log] [blame]
developer4f0d84b2023-03-03 14:21:44 +08001From 21286ba6a27ae54885687c0f82a48e52cef638aa Mon Sep 17 00:00:00 2001
developerc04f5402023-02-03 09:22:26 +08002From: Peter Chiu <chui-hao.chiu@mediatek.com>
3Date: Fri, 3 Feb 2023 17:09:55 +0800
developerfd8e1152023-02-14 11:29:23 +08004Subject: [PATCH 4005/4005] wifi: mt76: revert EHT definitions
developerc04f5402023-02-03 09:22:26 +08005
6Revert the following patches
7* 68b17a24 wifi: mt76: connac: add helpers for EHT capability
8* b375845a wifi: mt76: connac: add CMD_CBW_320MHZ
9
10This reverts commit b375845abc105904242d3c6d9da15c7a1ec5ffc4.
11---
12 mt76_connac.h | 2 --
13 mt76_connac_mcu.c | 46 ----------------------------------------------
14 mt76_connac_mcu.h | 4 ----
15 3 files changed, 52 deletions(-)
16
17diff --git a/mt76_connac.h b/mt76_connac.h
18index 323203df..5a0a3ce1 100644
19--- a/mt76_connac.h
20+++ b/mt76_connac.h
21@@ -42,7 +42,6 @@ enum {
22 CMD_CBW_10MHZ,
23 CMD_CBW_5MHZ,
24 CMD_CBW_8080MHZ,
25- CMD_CBW_320MHZ,
26
27 CMD_HE_MCS_BW80 = 0,
28 CMD_HE_MCS_BW160,
29@@ -241,7 +240,6 @@ static inline u8 mt76_connac_chan_bw(struct cfg80211_chan_def *chandef)
30 [NL80211_CHAN_WIDTH_10] = CMD_CBW_10MHZ,
31 [NL80211_CHAN_WIDTH_20] = CMD_CBW_20MHZ,
32 [NL80211_CHAN_WIDTH_20_NOHT] = CMD_CBW_20MHZ,
33- [NL80211_CHAN_WIDTH_320] = CMD_CBW_320MHZ,
34 };
35
36 if (chandef->width >= ARRAY_SIZE(width_to_bw))
37diff --git a/mt76_connac_mcu.c b/mt76_connac_mcu.c
38index d7d85291..703ca736 100644
39--- a/mt76_connac_mcu.c
40+++ b/mt76_connac_mcu.c
41@@ -1334,40 +1334,6 @@ u8 mt76_connac_get_phy_mode(struct mt76_phy *phy, struct ieee80211_vif *vif,
42 }
43 EXPORT_SYMBOL_GPL(mt76_connac_get_phy_mode);
44
45-u8 mt76_connac_get_phy_mode_ext(struct mt76_phy *phy, struct ieee80211_vif *vif,
46- enum nl80211_band band)
47-{
48- const struct ieee80211_sta_eht_cap *eht_cap;
49- struct ieee80211_supported_band *sband;
50- u8 mode = 0;
51-
52- if (band == NL80211_BAND_6GHZ)
53- mode |= PHY_MODE_AX_6G;
54-
55- sband = phy->hw->wiphy->bands[band];
56- eht_cap = ieee80211_get_eht_iftype_cap(sband, vif->type);
57-
58- if (!eht_cap || !eht_cap->has_eht)
59- return mode;
60-
61- switch (band) {
62- case NL80211_BAND_6GHZ:
63- mode |= PHY_MODE_BE_6G;
64- break;
65- case NL80211_BAND_5GHZ:
66- mode |= PHY_MODE_BE_5G;
67- break;
68- case NL80211_BAND_2GHZ:
69- mode |= PHY_MODE_BE_24G;
70- break;
71- default:
72- break;
73- }
74-
75- return mode;
76-}
77-EXPORT_SYMBOL_GPL(mt76_connac_get_phy_mode_ext);
78-
79 const struct ieee80211_sta_he_cap *
80 mt76_connac_get_he_phy_cap(struct mt76_phy *phy, struct ieee80211_vif *vif)
81 {
82@@ -1380,18 +1346,6 @@ mt76_connac_get_he_phy_cap(struct mt76_phy *phy, struct ieee80211_vif *vif)
83 }
84 EXPORT_SYMBOL_GPL(mt76_connac_get_he_phy_cap);
85
86-const struct ieee80211_sta_eht_cap *
87-mt76_connac_get_eht_phy_cap(struct mt76_phy *phy, struct ieee80211_vif *vif)
88-{
89- enum nl80211_band band = phy->chandef.chan->band;
90- struct ieee80211_supported_band *sband;
91-
92- sband = phy->hw->wiphy->bands[band];
93-
94- return ieee80211_get_eht_iftype_cap(sband, vif->type);
95-}
96-EXPORT_SYMBOL_GPL(mt76_connac_get_eht_phy_cap);
97-
98 #define DEFAULT_HE_PE_DURATION 4
99 #define DEFAULT_HE_DURATION_RTS_THRES 1023
100 static void
101diff --git a/mt76_connac_mcu.h b/mt76_connac_mcu.h
developer4f0d84b2023-03-03 14:21:44 +0800102index 287cffcc..b80a1011 100644
developerc04f5402023-02-03 09:22:26 +0800103--- a/mt76_connac_mcu.h
104+++ b/mt76_connac_mcu.h
developer4f0d84b2023-03-03 14:21:44 +0800105@@ -1894,12 +1894,8 @@ void mt76_connac_mcu_reg_wr(struct mt76_dev *dev, u32 offset, u32 val);
developerc04f5402023-02-03 09:22:26 +0800106
107 const struct ieee80211_sta_he_cap *
108 mt76_connac_get_he_phy_cap(struct mt76_phy *phy, struct ieee80211_vif *vif);
109-const struct ieee80211_sta_eht_cap *
110-mt76_connac_get_eht_phy_cap(struct mt76_phy *phy, struct ieee80211_vif *vif);
111 u8 mt76_connac_get_phy_mode(struct mt76_phy *phy, struct ieee80211_vif *vif,
112 enum nl80211_band band, struct ieee80211_sta *sta);
113-u8 mt76_connac_get_phy_mode_ext(struct mt76_phy *phy, struct ieee80211_vif *vif,
114- enum nl80211_band band);
115
116 int mt76_connac_mcu_add_key(struct mt76_dev *dev, struct ieee80211_vif *vif,
117 struct mt76_connac_sta_key_conf *sta_key_conf,
118--
1192.18.0
120