From: Ping-Ke Shih <pkshih@xxxxxxxxxxx> Phydm needs to know connection state, so we issue notification to indicate reset_dm, pause_dig, or add/del sta. Signed-off-by: Ping-Ke Shih <pkshih@xxxxxxxxxxx> Signed-off-by: Larry Finger <Larry.Finger@xxxxxxxxxxxx> Cc: Yan-Hsuan Chuang <yhchuang@xxxxxxxxxxx> Cc: Birming Chiu <birming@xxxxxxxxxxx> Cc: Shaofu <shaofu@xxxxxxxxxxx> Cc: Steven Ting <steventing@xxxxxxxxxxx> --- drivers/net/wireless/realtek/rtlwifi/core.c | 13 +++++++++++++ drivers/net/wireless/realtek/rtlwifi/ps.c | 2 ++ 2 files changed, 15 insertions(+) diff --git a/drivers/net/wireless/realtek/rtlwifi/core.c b/drivers/net/wireless/realtek/rtlwifi/core.c index bb1425c3dc96..dc233bc146b0 100644 --- a/drivers/net/wireless/realtek/rtlwifi/core.c +++ b/drivers/net/wireless/realtek/rtlwifi/core.c @@ -946,6 +946,9 @@ static int rtl_op_sta_add(struct ieee80211_hw *hw, RT_TRACE(rtlpriv, COMP_MAC80211, DBG_DMESG, "Add sta addr is %pM\n", sta->addr); rtlpriv->cfg->ops->update_rate_tbl(hw, sta, 0, true); + + if (rtlpriv->phydm.ops) + rtlpriv->phydm.ops->phydm_add_sta(rtlpriv, sta); } return 0; @@ -960,6 +963,10 @@ static int rtl_op_sta_remove(struct ieee80211_hw *hw, if (sta) { RT_TRACE(rtlpriv, COMP_MAC80211, DBG_DMESG, "Remove sta addr is %pM\n", sta->addr); + + if (rtlpriv->phydm.ops) + rtlpriv->phydm.ops->phydm_del_sta(rtlpriv, sta); + sta_entry = (struct rtl_sta_info *)sta->drv_priv; sta_entry->wireless_mode = 0; sta_entry->ratr_index = 0; @@ -1434,6 +1441,9 @@ static void rtl_op_sw_scan_start(struct ieee80211_hw *hw, return; } + if (rtlpriv->phydm.ops) + rtlpriv->phydm.ops->phydm_pause_dig(rtlpriv, 1); + if (rtlpriv->cfg->ops->get_btc_status()) rtlpriv->btcoexist.btc_ops->btc_scan_notify(rtlpriv, 1); @@ -1491,6 +1501,9 @@ static void rtl_op_sw_scan_complete(struct ieee80211_hw *hw, rtlpriv->cfg->ops->scan_operation_backup(hw, SCAN_OPT_RESTORE); if (rtlpriv->cfg->ops->get_btc_status()) rtlpriv->btcoexist.btc_ops->btc_scan_notify(rtlpriv, 0); + + if (rtlpriv->phydm.ops) + rtlpriv->phydm.ops->phydm_pause_dig(rtlpriv, 0); } static int rtl_op_set_key(struct ieee80211_hw *hw, enum set_key_cmd cmd, diff --git a/drivers/net/wireless/realtek/rtlwifi/ps.c b/drivers/net/wireless/realtek/rtlwifi/ps.c index 07ee3096f50e..c64544158516 100644 --- a/drivers/net/wireless/realtek/rtlwifi/ps.c +++ b/drivers/net/wireless/realtek/rtlwifi/ps.c @@ -301,6 +301,8 @@ void rtl_ips_nic_on(struct ieee80211_hw *hw) ppsc->in_powersavemode = false; _rtl_ps_inactive_ps(hw); /* call after RF on */ + if (rtlpriv->phydm.ops) + rtlpriv->phydm.ops->phydm_reset_dm(rtlpriv); if (rtlpriv->cfg->ops->get_btc_status()) rtlpriv->btcoexist.btc_ops->btc_ips_notify(rtlpriv, ppsc->inactive_pwrstate); -- 2.12.3