blob: 1b4049d1f0b6cee871b0216be254d31c41efc383 [file] [log] [blame]
From b655964b1f68678a665f30a68c13a73feeffaa73 Mon Sep 17 00:00:00 2001
From: Peter Chiu <chui-hao.chiu@mediatek.com>
Date: Fri, 3 Feb 2023 17:09:55 +0800
Subject: [PATCH 4005/4006] wifi: mt76: revert EHT definitions
Revert the following patches
* 68b17a24 wifi: mt76: connac: add helpers for EHT capability
* b375845a wifi: mt76: connac: add CMD_CBW_320MHZ
This reverts commit b375845abc105904242d3c6d9da15c7a1ec5ffc4.
---
mt76_connac.h | 2 --
mt76_connac_mcu.c | 46 ----------------------------------------------
mt76_connac_mcu.h | 4 ----
3 files changed, 52 deletions(-)
diff --git a/mt76_connac.h b/mt76_connac.h
index 323203df..5a0a3ce1 100644
--- a/mt76_connac.h
+++ b/mt76_connac.h
@@ -42,7 +42,6 @@ enum {
CMD_CBW_10MHZ,
CMD_CBW_5MHZ,
CMD_CBW_8080MHZ,
- CMD_CBW_320MHZ,
CMD_HE_MCS_BW80 = 0,
CMD_HE_MCS_BW160,
@@ -241,7 +240,6 @@ static inline u8 mt76_connac_chan_bw(struct cfg80211_chan_def *chandef)
[NL80211_CHAN_WIDTH_10] = CMD_CBW_10MHZ,
[NL80211_CHAN_WIDTH_20] = CMD_CBW_20MHZ,
[NL80211_CHAN_WIDTH_20_NOHT] = CMD_CBW_20MHZ,
- [NL80211_CHAN_WIDTH_320] = CMD_CBW_320MHZ,
};
if (chandef->width >= ARRAY_SIZE(width_to_bw))
diff --git a/mt76_connac_mcu.c b/mt76_connac_mcu.c
index d7d85291..703ca736 100644
--- a/mt76_connac_mcu.c
+++ b/mt76_connac_mcu.c
@@ -1334,40 +1334,6 @@ u8 mt76_connac_get_phy_mode(struct mt76_phy *phy, struct ieee80211_vif *vif,
}
EXPORT_SYMBOL_GPL(mt76_connac_get_phy_mode);
-u8 mt76_connac_get_phy_mode_ext(struct mt76_phy *phy, struct ieee80211_vif *vif,
- enum nl80211_band band)
-{
- const struct ieee80211_sta_eht_cap *eht_cap;
- struct ieee80211_supported_band *sband;
- u8 mode = 0;
-
- if (band == NL80211_BAND_6GHZ)
- mode |= PHY_MODE_AX_6G;
-
- sband = phy->hw->wiphy->bands[band];
- eht_cap = ieee80211_get_eht_iftype_cap(sband, vif->type);
-
- if (!eht_cap || !eht_cap->has_eht)
- return mode;
-
- switch (band) {
- case NL80211_BAND_6GHZ:
- mode |= PHY_MODE_BE_6G;
- break;
- case NL80211_BAND_5GHZ:
- mode |= PHY_MODE_BE_5G;
- break;
- case NL80211_BAND_2GHZ:
- mode |= PHY_MODE_BE_24G;
- break;
- default:
- break;
- }
-
- return mode;
-}
-EXPORT_SYMBOL_GPL(mt76_connac_get_phy_mode_ext);
-
const struct ieee80211_sta_he_cap *
mt76_connac_get_he_phy_cap(struct mt76_phy *phy, struct ieee80211_vif *vif)
{
@@ -1380,18 +1346,6 @@ mt76_connac_get_he_phy_cap(struct mt76_phy *phy, struct ieee80211_vif *vif)
}
EXPORT_SYMBOL_GPL(mt76_connac_get_he_phy_cap);
-const struct ieee80211_sta_eht_cap *
-mt76_connac_get_eht_phy_cap(struct mt76_phy *phy, struct ieee80211_vif *vif)
-{
- enum nl80211_band band = phy->chandef.chan->band;
- struct ieee80211_supported_band *sband;
-
- sband = phy->hw->wiphy->bands[band];
-
- return ieee80211_get_eht_iftype_cap(sband, vif->type);
-}
-EXPORT_SYMBOL_GPL(mt76_connac_get_eht_phy_cap);
-
#define DEFAULT_HE_PE_DURATION 4
#define DEFAULT_HE_DURATION_RTS_THRES 1023
static void
diff --git a/mt76_connac_mcu.h b/mt76_connac_mcu.h
index 130a8d25..2faef32b 100644
--- a/mt76_connac_mcu.h
+++ b/mt76_connac_mcu.h
@@ -1895,12 +1895,8 @@ void mt76_connac_mcu_reg_wr(struct mt76_dev *dev, u32 offset, u32 val);
const struct ieee80211_sta_he_cap *
mt76_connac_get_he_phy_cap(struct mt76_phy *phy, struct ieee80211_vif *vif);
-const struct ieee80211_sta_eht_cap *
-mt76_connac_get_eht_phy_cap(struct mt76_phy *phy, struct ieee80211_vif *vif);
u8 mt76_connac_get_phy_mode(struct mt76_phy *phy, struct ieee80211_vif *vif,
enum nl80211_band band, struct ieee80211_sta *sta);
-u8 mt76_connac_get_phy_mode_ext(struct mt76_phy *phy, struct ieee80211_vif *vif,
- enum nl80211_band band);
int mt76_connac_mcu_add_key(struct mt76_dev *dev, struct ieee80211_vif *vif,
struct mt76_connac_sta_key_conf *sta_key_conf,
--
2.18.0