* [PATCH] rtlwifi: rtl8192cu: Fix performance issue.
@ 2015-06-04 0:47 Taehee Yoo
2015-06-05 17:40 ` Larry Finger
2015-06-08 8:48 ` Kalle Valo
0 siblings, 2 replies; 3+ messages in thread
From: Taehee Yoo @ 2015-06-04 0:47 UTC (permalink / raw)
To: Larry.Finger; +Cc: ap420073, linux-wireless
After physical reconnect, the rtl8192cu chipset shows low
transmission rates.It cause is that variable "iqk_initialized"
do not de-initialized. So I add this code.
Signed-off-by: Taehee Yoo <ap420073@gmail.com>
---
drivers/net/wireless/rtlwifi/rtl8192cu/hw.c | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/drivers/net/wireless/rtlwifi/rtl8192cu/hw.c b/drivers/net/wireless/rtlwifi/rtl8192cu/hw.c
index 1898596..6a4ef05 100644
--- a/drivers/net/wireless/rtlwifi/rtl8192cu/hw.c
+++ b/drivers/net/wireless/rtlwifi/rtl8192cu/hw.c
@@ -987,7 +987,6 @@ int rtl92cu_hw_init(struct ieee80211_hw *hw)
struct rtl_phy *rtlphy = &(rtlpriv->phy);
struct rtl_ps_ctl *ppsc = rtl_psc(rtl_priv(hw));
int err = 0;
- static bool iqk_initialized;
unsigned long flags;
/* As this function can take a very long time (up to 350 ms)
@@ -1038,11 +1037,11 @@ int rtl92cu_hw_init(struct ieee80211_hw *hw)
rtlpriv->cfg->ops->set_hw_reg(hw, HW_VAR_ETHER_ADDR, mac->mac_addr);
if (ppsc->rfpwr_state == ERFON) {
rtl92c_phy_set_rfpath_switch(hw, 1);
- if (iqk_initialized) {
+ if (rtlphy->iqk_initialized) {
rtl92c_phy_iq_calibrate(hw, true);
} else {
rtl92c_phy_iq_calibrate(hw, false);
- iqk_initialized = true;
+ rtlphy->iqk_initialized = true;
}
rtl92c_dm_check_txpower_tracking(hw);
rtl92c_phy_lc_calibrate(hw);
@@ -1391,6 +1390,9 @@ void rtl92cu_card_disable(struct ieee80211_hw *hw)
_CardDisableHWSM(hw);
else
_CardDisableWithoutHWSM(hw);
+
+ /* after power off we should do iqk again */
+ rtlpriv->phy.iqk_initialized = false;
}
void rtl92cu_set_check_bssid(struct ieee80211_hw *hw, bool check_bssid)
--
2.1.4
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] rtlwifi: rtl8192cu: Fix performance issue.
2015-06-04 0:47 [PATCH] rtlwifi: rtl8192cu: Fix performance issue Taehee Yoo
@ 2015-06-05 17:40 ` Larry Finger
2015-06-08 8:48 ` Kalle Valo
1 sibling, 0 replies; 3+ messages in thread
From: Larry Finger @ 2015-06-05 17:40 UTC (permalink / raw)
To: Taehee Yoo; +Cc: linux-wireless
On 06/03/2015 07:47 PM, Taehee Yoo wrote:
> After physical reconnect, the rtl8192cu chipset shows low
> transmission rates.It cause is that variable "iqk_initialized"
> do not de-initialized. So I add this code.
>
> Signed-off-by: Taehee Yoo <ap420073@gmail.com>
> ---
> drivers/net/wireless/rtlwifi/rtl8192cu/hw.c | 8 +++++---
> 1 file changed, 5 insertions(+), 3 deletions(-)
I like this patch very much. Getting rid of a static variable is always good.
Acked-by: Larry Finger <Larry.Finger@lwfinger.net>
Thanks,
Larry
>
> diff --git a/drivers/net/wireless/rtlwifi/rtl8192cu/hw.c b/drivers/net/wireless/rtlwifi/rtl8192cu/hw.c
> index 1898596..6a4ef05 100644
> --- a/drivers/net/wireless/rtlwifi/rtl8192cu/hw.c
> +++ b/drivers/net/wireless/rtlwifi/rtl8192cu/hw.c
> @@ -987,7 +987,6 @@ int rtl92cu_hw_init(struct ieee80211_hw *hw)
> struct rtl_phy *rtlphy = &(rtlpriv->phy);
> struct rtl_ps_ctl *ppsc = rtl_psc(rtl_priv(hw));
> int err = 0;
> - static bool iqk_initialized;
> unsigned long flags;
>
> /* As this function can take a very long time (up to 350 ms)
> @@ -1038,11 +1037,11 @@ int rtl92cu_hw_init(struct ieee80211_hw *hw)
> rtlpriv->cfg->ops->set_hw_reg(hw, HW_VAR_ETHER_ADDR, mac->mac_addr);
> if (ppsc->rfpwr_state == ERFON) {
> rtl92c_phy_set_rfpath_switch(hw, 1);
> - if (iqk_initialized) {
> + if (rtlphy->iqk_initialized) {
> rtl92c_phy_iq_calibrate(hw, true);
> } else {
> rtl92c_phy_iq_calibrate(hw, false);
> - iqk_initialized = true;
> + rtlphy->iqk_initialized = true;
> }
> rtl92c_dm_check_txpower_tracking(hw);
> rtl92c_phy_lc_calibrate(hw);
> @@ -1391,6 +1390,9 @@ void rtl92cu_card_disable(struct ieee80211_hw *hw)
> _CardDisableHWSM(hw);
> else
> _CardDisableWithoutHWSM(hw);
> +
> + /* after power off we should do iqk again */
> + rtlpriv->phy.iqk_initialized = false;
> }
>
> void rtl92cu_set_check_bssid(struct ieee80211_hw *hw, bool check_bssid)
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: rtlwifi: rtl8192cu: Fix performance issue.
2015-06-04 0:47 [PATCH] rtlwifi: rtl8192cu: Fix performance issue Taehee Yoo
2015-06-05 17:40 ` Larry Finger
@ 2015-06-08 8:48 ` Kalle Valo
1 sibling, 0 replies; 3+ messages in thread
From: Kalle Valo @ 2015-06-08 8:48 UTC (permalink / raw)
To: Taehee Yoo; +Cc: Larry.Finger, ap420073, linux-wireless
> After physical reconnect, the rtl8192cu chipset shows low
> transmission rates.It cause is that variable "iqk_initialized"
> do not de-initialized. So I add this code.
>
> Signed-off-by: Taehee Yoo <ap420073@gmail.com>
> Acked-by: Larry Finger <Larry.Finger@lwfinger.net>
Thanks, applied to wireless-drivers-next.git.
Kalle Valo
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2015-06-08 8:48 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-06-04 0:47 [PATCH] rtlwifi: rtl8192cu: Fix performance issue Taehee Yoo
2015-06-05 17:40 ` Larry Finger
2015-06-08 8:48 ` Kalle Valo
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).