aboutsummaryrefslogtreecommitdiff
path: root/drivers/net
diff options
context:
space:
mode:
authorLarry Finger <Larry.Finger@lwfinger.net>2013-11-18 11:11:25 -0600
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2014-02-06 11:08:13 -0800
commitcfce18a7871370cf75c0a289a94ff52c5eec17d2 (patch)
treec217ef6bea67d8a4482699be1c2fc889b62ced09 /drivers/net
parenta4b29f1bd1a0a56a48f00c5737079f15826b441b (diff)
downloadlinaro-lsk-cfce18a7871370cf75c0a289a94ff52c5eec17d2.tar.gz
rtlwifi: rtl8192c: Prevent reconnect attempts if not connected
commit 8fd77aec1a9d6f4328fc0244f21932114e066df3 upstream. This driver has a watchdog timer that attempts to reconnect when beacon frames are not seen for 6 seconds. This patch disables that reconnect whenever the device has never been connected. Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: John W. Linville <linville@tuxdriver.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/wireless/rtlwifi/base.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/net/wireless/rtlwifi/base.c b/drivers/net/wireless/rtlwifi/base.c
index 3698028c910..6fc0853fd7f 100644
--- a/drivers/net/wireless/rtlwifi/base.c
+++ b/drivers/net/wireless/rtlwifi/base.c
@@ -1427,7 +1427,8 @@ void rtl_watchdog_wq_callback(void *data)
/* if we can't recv beacon for 6s, we should
* reconnect this AP
*/
- if (rtlpriv->link_info.roam_times >= 3) {
+ if ((rtlpriv->link_info.roam_times >= 3) &&
+ !is_zero_ether_addr(rtlpriv->mac80211.bssid)) {
RT_TRACE(rtlpriv, COMP_ERR, DBG_EMERG,
"AP off, try to reconnect now\n");
rtlpriv->link_info.roam_times = 0;