[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20130628085804.GA27866@lnx-rg>
Date: Fri, 28 Jun 2013 10:58:05 +0200
From: Richard GENOUD <richard.genoud@...il.com>
To: Larry Finger <Larry.Finger@...inger.net>
Cc: Chaoming Li <chaoming_li@...lsil.com.cn>,
"John W. Linville" <linville@...driver.com>,
linux-wireless@...r.kernel.org, linux-kernel@...r.kernel.org,
Maxime Ripard <maxime.ripard@...e-electrons.com>
Subject: Re: rtl8192cu: slow path warning
On [jeu., 27.06.2013 13:20:52], Larry Finger wrote:
> On 06/27/2013 02:33 AM, Richard Genoud wrote:
> >Yes, of course, you can add my
> >Reported-by: Richard Genoud <richard.genoud@...il.com>
> >
> >But the patch doesn't compile on my platform ( since I'm on ARM, I
> >haven't got a PCI bus, so rtlwifi/pci.c is not compiled ) :
> >
> >ERROR: "rtl_lps_change_work_callback"
> >[drivers/net/wireless/rtlwifi/rtlwifi.ko] undefined!
> >
> >
> >Best regards,
> >Richard.
> >
> >PS: duckducking the warning, I found this automated report also :
> >https://retrace.fedoraproject.org/faf/reports/142038/
>
> A revised patch for the warning is attached. The fix relatively
> simple and the only difference between this one and the earlier
> version is that routine rtl_lps_change_work_callback() was moved
> from pci.c to ps.c. As a result, it will be available for ARM and
> other architectures without a PCI bus.
>
> Larry
>
>
> Index: wireless-testing-save/drivers/net/wireless/rtlwifi/pci.c
> ===================================================================
> --- wireless-testing-save.orig/drivers/net/wireless/rtlwifi/pci.c
> +++ wireless-testing-save/drivers/net/wireless/rtlwifi/pci.c
> @@ -1008,19 +1008,6 @@ static void _rtl_pci_prepare_bcn_tasklet
> return;
> }
>
> -static void rtl_lps_change_work_callback(struct work_struct *work)
> -{
> - struct rtl_works *rtlworks =
> - container_of(work, struct rtl_works, lps_change_work);
> - struct ieee80211_hw *hw = rtlworks->hw;
> - struct rtl_priv *rtlpriv = rtl_priv(hw);
> -
> - if (rtlpriv->enter_ps)
> - rtl_lps_enter(hw);
> - else
> - rtl_lps_leave(hw);
> -}
> -
> static void _rtl_pci_init_trx_var(struct ieee80211_hw *hw)
> {
> struct rtl_pci *rtlpci = rtl_pcidev(rtl_pcipriv(hw));
> Index: wireless-testing-save/drivers/net/wireless/rtlwifi/ps.h
> ===================================================================
> --- wireless-testing-save.orig/drivers/net/wireless/rtlwifi/ps.h
> +++ wireless-testing-save/drivers/net/wireless/rtlwifi/ps.h
> @@ -49,5 +49,6 @@ void rtl_swlps_rf_awake(struct ieee80211
> void rtl_swlps_rf_sleep(struct ieee80211_hw *hw);
> void rtl_p2p_ps_cmd(struct ieee80211_hw *hw, u8 p2p_ps_state);
> void rtl_p2p_info(struct ieee80211_hw *hw, void *data, unsigned int len);
> +void rtl_lps_change_work_callback(struct work_struct *work);
>
> #endif
> Index: wireless-testing-save/drivers/net/wireless/rtlwifi/usb.c
> ===================================================================
> --- wireless-testing-save.orig/drivers/net/wireless/rtlwifi/usb.c
> +++ wireless-testing-save/drivers/net/wireless/rtlwifi/usb.c
> @@ -1070,6 +1070,8 @@ int rtl_usb_probe(struct usb_interface *
> spin_lock_init(&rtlpriv->locks.usb_lock);
> INIT_WORK(&rtlpriv->works.fill_h2c_cmd,
> rtl_fill_h2c_cmd_work_callback);
> + INIT_WORK(&rtlpriv->works.lps_change_work,
> + rtl_lps_change_work_callback);
>
> rtlpriv->usb_data_index = 0;
> init_completion(&rtlpriv->firmware_loading_complete);
> Index: wireless-testing-save/drivers/net/wireless/rtlwifi/ps.c
> ===================================================================
> --- wireless-testing-save.orig/drivers/net/wireless/rtlwifi/ps.c
> +++ wireless-testing-save/drivers/net/wireless/rtlwifi/ps.c
> @@ -611,6 +611,18 @@ void rtl_swlps_rf_sleep(struct ieee80211
> MSECS(sleep_intv * mac->vif->bss_conf.beacon_int - 40));
> }
>
> +void rtl_lps_change_work_callback(struct work_struct *work)
> +{
> + struct rtl_works *rtlworks =
> + container_of(work, struct rtl_works, lps_change_work);
> + struct ieee80211_hw *hw = rtlworks->hw;
> + struct rtl_priv *rtlpriv = rtl_priv(hw);
> +
> + if (rtlpriv->enter_ps)
> + rtl_lps_enter(hw);
> + else
> + rtl_lps_leave(hw);
> +}
>
> void rtl_swlps_wq_callback(void *data)
> {
Tested the patch on 3.10-rc7, ARM at91sam9g35, usb key TP-link
TL-WN725N.
I haven't seen the WARNING any more.
Tests done: (DHCP request)
client with no security
client WEP
client WPA
AP with no security
AP WEP
AP+WAP test failed (bust it was like that before the patch also)
Tested-by: Richard Genoud <richard.genoud@...il.com>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists