| From 1fea00cf3e5af0ae1d1b3de6d772b21b83ac7ef4 Mon Sep 17 00:00:00 2001 |
| From: Peter Chiu <chui-hao.chiu@mediatek.com> |
| Date: Tue, 14 Feb 2023 18:35:43 +0800 |
| Subject: [PATCH 05/29] wifi: mt76: mt7996: remove mt7996_mcu_set_pm() |
| |
| Currently using BSS_INFO_PS command will sometimes cause packet drop in |
| hw rx queue. |
| Temporarily remove this function until finding the cause. |
| |
| Signed-off-by: Peter Chiu <chui-hao.chiu@mediatek.com> |
| Signed-off-by: Shayne Chen <shayne.chen@mediatek.com> |
| Change-Id: I863fc1edb18e4d7b5dac20140dd0904875e1323c |
| --- |
| mt7996/main.c | 8 -------- |
| mt7996/mcu.c | 26 -------------------------- |
| mt7996/mt7996.h | 1 - |
| 3 files changed, 35 deletions(-) |
| |
| diff --git a/mt7996/main.c b/mt7996/main.c |
| index 3e4da03..f13f67b 100644 |
| --- a/mt7996/main.c |
| +++ b/mt7996/main.c |
| @@ -52,10 +52,6 @@ static int mt7996_start(struct ieee80211_hw *hw) |
| |
| set_bit(MT76_STATE_RUNNING, &phy->mt76->state); |
| |
| - ieee80211_iterate_interfaces(dev->mt76.hw, |
| - IEEE80211_IFACE_ITER_RESUME_ALL, |
| - mt7996_mcu_set_pm, dev->mt76.hw); |
| - |
| ieee80211_queue_delayed_work(hw, &phy->mt76->mac_work, |
| MT7996_WATCHDOG_TIME); |
| |
| @@ -79,10 +75,6 @@ static void mt7996_stop(struct ieee80211_hw *hw) |
| |
| clear_bit(MT76_STATE_RUNNING, &phy->mt76->state); |
| |
| - ieee80211_iterate_interfaces(dev->mt76.hw, |
| - IEEE80211_IFACE_ITER_RESUME_ALL, |
| - mt7996_mcu_set_pm, dev->mt76.hw); |
| - |
| mutex_unlock(&dev->mt76.mutex); |
| } |
| |
| diff --git a/mt7996/mcu.c b/mt7996/mcu.c |
| index 2e25572..f694743 100644 |
| --- a/mt7996/mcu.c |
| +++ b/mt7996/mcu.c |
| @@ -3577,32 +3577,6 @@ int mt7996_mcu_twt_agrt_update(struct mt7996_dev *dev, |
| &req, sizeof(req), true); |
| } |
| |
| -void mt7996_mcu_set_pm(void *priv, u8 *mac, struct ieee80211_vif *vif) |
| -{ |
| -#define EXIT_PM_STATE 0 |
| -#define ENTER_PM_STATE 1 |
| - struct ieee80211_hw *hw = priv; |
| - struct mt7996_dev *dev = mt7996_hw_dev(hw); |
| - struct mt7996_phy *phy = mt7996_hw_phy(hw); |
| - struct mt7996_vif *mvif = (struct mt7996_vif *)vif->drv_priv; |
| - struct bss_power_save *ps; |
| - struct sk_buff *skb; |
| - struct tlv *tlv; |
| - bool running = test_bit(MT76_STATE_RUNNING, &phy->mt76->state); |
| - |
| - skb = __mt7996_mcu_alloc_bss_req(&dev->mt76, &mvif->mt76, |
| - MT7996_BSS_UPDATE_MAX_SIZE); |
| - if (IS_ERR(skb)) |
| - return; |
| - |
| - tlv = mt7996_mcu_add_uni_tlv(skb, UNI_BSS_INFO_PS, sizeof(*ps)); |
| - ps = (struct bss_power_save *)tlv; |
| - ps->profile = running ? EXIT_PM_STATE : ENTER_PM_STATE; |
| - |
| - mt76_mcu_skb_send_msg(&dev->mt76, skb, |
| - MCU_WMWA_UNI_CMD(BSS_INFO_UPDATE), true); |
| -} |
| - |
| int mt7996_mcu_set_rts_thresh(struct mt7996_phy *phy, u32 val) |
| { |
| struct { |
| diff --git a/mt7996/mt7996.h b/mt7996/mt7996.h |
| index d20aa5f..f9d8fbf 100644 |
| --- a/mt7996/mt7996.h |
| +++ b/mt7996/mt7996.h |
| @@ -432,7 +432,6 @@ int mt7996_mcu_set_pulse_th(struct mt7996_dev *dev, |
| int mt7996_mcu_set_radar_th(struct mt7996_dev *dev, int index, |
| const struct mt7996_dfs_pattern *pattern); |
| int mt7996_mcu_set_radio_en(struct mt7996_phy *phy, bool enable); |
| -void mt7996_mcu_set_pm(void *priv, u8 *mac, struct ieee80211_vif *vif); |
| int mt7996_mcu_set_rts_thresh(struct mt7996_phy *phy, u32 val); |
| int mt7996_mcu_get_chan_mib_info(struct mt7996_phy *phy, bool chan_switch); |
| int mt7996_mcu_rdd_cmd(struct mt7996_dev *dev, int cmd, u8 index, |
| -- |
| 2.18.0 |
| |