developer | f3f5d9b | 2023-02-07 15:24:34 +0800 | [diff] [blame^] | 1 | From b655964b1f68678a665f30a68c13a73feeffaa73 Mon Sep 17 00:00:00 2001 |
| 2 | From: Peter Chiu <chui-hao.chiu@mediatek.com> |
| 3 | Date: Fri, 3 Feb 2023 17:09:55 +0800 |
| 4 | Subject: [PATCH 4005/4006] wifi: mt76: revert EHT definitions |
| 5 | |
| 6 | Revert the following patches |
| 7 | * 68b17a24 wifi: mt76: connac: add helpers for EHT capability |
| 8 | * b375845a wifi: mt76: connac: add CMD_CBW_320MHZ |
| 9 | |
| 10 | This 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 | |
| 17 | diff --git a/mt76_connac.h b/mt76_connac.h |
| 18 | index 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)) |
| 37 | diff --git a/mt76_connac_mcu.c b/mt76_connac_mcu.c |
| 38 | index 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 |
| 101 | diff --git a/mt76_connac_mcu.h b/mt76_connac_mcu.h |
| 102 | index 130a8d25..2faef32b 100644 |
| 103 | --- a/mt76_connac_mcu.h |
| 104 | +++ b/mt76_connac_mcu.h |
| 105 | @@ -1895,12 +1895,8 @@ void mt76_connac_mcu_reg_wr(struct mt76_dev *dev, u32 offset, u32 val); |
| 106 | |
| 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 | -- |
| 119 | 2.18.0 |
| 120 | |