developer | 1bc2ce2 | 2023-03-25 00:47:41 +0800 | [diff] [blame] | 1 | From 770f4020e030af0b930f761513275d6284a9344f Mon Sep 17 00:00:00 2001 |
developer | 483388c | 2023-03-08 13:52:15 +0800 | [diff] [blame] | 2 | From: Peter Chiu <chui-hao.chiu@mediatek.com> |
| 3 | Date: Tue, 14 Feb 2023 18:35:43 +0800 |
developer | 1bc2ce2 | 2023-03-25 00:47:41 +0800 | [diff] [blame] | 4 | Subject: [PATCH 05/29] wifi: mt76: mt7996: remove mt7996_mcu_set_pm() |
developer | 483388c | 2023-03-08 13:52:15 +0800 | [diff] [blame] | 5 | |
| 6 | Currently using BSS_INFO_PS command will sometimes cause packet drop in |
| 7 | hw rx queue. |
| 8 | Temporarily remove this function until finding the cause. |
| 9 | |
| 10 | Signed-off-by: Peter Chiu <chui-hao.chiu@mediatek.com> |
| 11 | Signed-off-by: Shayne Chen <shayne.chen@mediatek.com> |
| 12 | Change-Id: I863fc1edb18e4d7b5dac20140dd0904875e1323c |
| 13 | --- |
| 14 | mt7996/main.c | 8 -------- |
| 15 | mt7996/mcu.c | 26 -------------------------- |
| 16 | mt7996/mt7996.h | 1 - |
| 17 | 3 files changed, 35 deletions(-) |
| 18 | |
| 19 | diff --git a/mt7996/main.c b/mt7996/main.c |
developer | 1bc2ce2 | 2023-03-25 00:47:41 +0800 | [diff] [blame] | 20 | index 3e4da035..f13f67b2 100644 |
developer | 483388c | 2023-03-08 13:52:15 +0800 | [diff] [blame] | 21 | --- a/mt7996/main.c |
| 22 | +++ b/mt7996/main.c |
developer | 1bc2ce2 | 2023-03-25 00:47:41 +0800 | [diff] [blame] | 23 | @@ -52,10 +52,6 @@ static int mt7996_start(struct ieee80211_hw *hw) |
developer | 483388c | 2023-03-08 13:52:15 +0800 | [diff] [blame] | 24 | |
| 25 | set_bit(MT76_STATE_RUNNING, &phy->mt76->state); |
| 26 | |
| 27 | - ieee80211_iterate_interfaces(dev->mt76.hw, |
| 28 | - IEEE80211_IFACE_ITER_RESUME_ALL, |
| 29 | - mt7996_mcu_set_pm, dev->mt76.hw); |
| 30 | - |
| 31 | ieee80211_queue_delayed_work(hw, &phy->mt76->mac_work, |
| 32 | MT7996_WATCHDOG_TIME); |
| 33 | |
developer | 1bc2ce2 | 2023-03-25 00:47:41 +0800 | [diff] [blame] | 34 | @@ -79,10 +75,6 @@ static void mt7996_stop(struct ieee80211_hw *hw) |
developer | 483388c | 2023-03-08 13:52:15 +0800 | [diff] [blame] | 35 | |
| 36 | clear_bit(MT76_STATE_RUNNING, &phy->mt76->state); |
| 37 | |
| 38 | - ieee80211_iterate_interfaces(dev->mt76.hw, |
| 39 | - IEEE80211_IFACE_ITER_RESUME_ALL, |
| 40 | - mt7996_mcu_set_pm, dev->mt76.hw); |
| 41 | - |
| 42 | mutex_unlock(&dev->mt76.mutex); |
| 43 | } |
| 44 | |
| 45 | diff --git a/mt7996/mcu.c b/mt7996/mcu.c |
| 46 | index 2e25572a..f6947438 100644 |
| 47 | --- a/mt7996/mcu.c |
| 48 | +++ b/mt7996/mcu.c |
| 49 | @@ -3577,32 +3577,6 @@ int mt7996_mcu_twt_agrt_update(struct mt7996_dev *dev, |
| 50 | &req, sizeof(req), true); |
| 51 | } |
| 52 | |
| 53 | -void mt7996_mcu_set_pm(void *priv, u8 *mac, struct ieee80211_vif *vif) |
| 54 | -{ |
| 55 | -#define EXIT_PM_STATE 0 |
| 56 | -#define ENTER_PM_STATE 1 |
| 57 | - struct ieee80211_hw *hw = priv; |
| 58 | - struct mt7996_dev *dev = mt7996_hw_dev(hw); |
| 59 | - struct mt7996_phy *phy = mt7996_hw_phy(hw); |
| 60 | - struct mt7996_vif *mvif = (struct mt7996_vif *)vif->drv_priv; |
| 61 | - struct bss_power_save *ps; |
| 62 | - struct sk_buff *skb; |
| 63 | - struct tlv *tlv; |
| 64 | - bool running = test_bit(MT76_STATE_RUNNING, &phy->mt76->state); |
| 65 | - |
| 66 | - skb = __mt7996_mcu_alloc_bss_req(&dev->mt76, &mvif->mt76, |
| 67 | - MT7996_BSS_UPDATE_MAX_SIZE); |
| 68 | - if (IS_ERR(skb)) |
| 69 | - return; |
| 70 | - |
| 71 | - tlv = mt7996_mcu_add_uni_tlv(skb, UNI_BSS_INFO_PS, sizeof(*ps)); |
| 72 | - ps = (struct bss_power_save *)tlv; |
| 73 | - ps->profile = running ? EXIT_PM_STATE : ENTER_PM_STATE; |
| 74 | - |
| 75 | - mt76_mcu_skb_send_msg(&dev->mt76, skb, |
| 76 | - MCU_WMWA_UNI_CMD(BSS_INFO_UPDATE), true); |
| 77 | -} |
| 78 | - |
| 79 | int mt7996_mcu_set_rts_thresh(struct mt7996_phy *phy, u32 val) |
| 80 | { |
| 81 | struct { |
| 82 | diff --git a/mt7996/mt7996.h b/mt7996/mt7996.h |
| 83 | index d20aa5f2..f9d8fbfd 100644 |
| 84 | --- a/mt7996/mt7996.h |
| 85 | +++ b/mt7996/mt7996.h |
| 86 | @@ -432,7 +432,6 @@ int mt7996_mcu_set_pulse_th(struct mt7996_dev *dev, |
| 87 | int mt7996_mcu_set_radar_th(struct mt7996_dev *dev, int index, |
| 88 | const struct mt7996_dfs_pattern *pattern); |
| 89 | int mt7996_mcu_set_radio_en(struct mt7996_phy *phy, bool enable); |
| 90 | -void mt7996_mcu_set_pm(void *priv, u8 *mac, struct ieee80211_vif *vif); |
| 91 | int mt7996_mcu_set_rts_thresh(struct mt7996_phy *phy, u32 val); |
| 92 | int mt7996_mcu_get_chan_mib_info(struct mt7996_phy *phy, bool chan_switch); |
| 93 | int mt7996_mcu_rdd_cmd(struct mt7996_dev *dev, int cmd, u8 index, |
| 94 | -- |
| 95 | 2.39.2 |
| 96 | |