From 073c9d47c33e549bfad1935d986710f1d1e57279 Mon Sep 17 00:00:00 2001 From: Jes Sorensen Date: Mon, 9 Jun 2014 15:17:05 +0200 Subject: [PATCH] staging: rtl8723au: Don't run regular scans in the driver, the stack handles that Signed-off-by: Jes Sorensen Signed-off-by: Greg Kroah-Hartman --- drivers/staging/rtl8723au/Makefile | 1 - .../staging/rtl8723au/core/rtw_ioctl_set.c | 78 ------------------- drivers/staging/rtl8723au/core/rtw_mlme.c | 21 ----- .../staging/rtl8723au/include/rtw_ioctl_set.h | 4 - 4 files changed, 104 deletions(-) delete mode 100644 drivers/staging/rtl8723au/core/rtw_ioctl_set.c diff --git a/drivers/staging/rtl8723au/Makefile b/drivers/staging/rtl8723au/Makefile index a6316af94b79..6f76c7b2adbc 100644 --- a/drivers/staging/rtl8723au/Makefile +++ b/drivers/staging/rtl8723au/Makefile @@ -1,7 +1,6 @@ r8723au-y := \ core/rtw_cmd.o \ core/rtw_efuse.o \ - core/rtw_ioctl_set.o \ core/rtw_ieee80211.o \ core/rtw_led.o \ core/rtw_mlme.o \ diff --git a/drivers/staging/rtl8723au/core/rtw_ioctl_set.c b/drivers/staging/rtl8723au/core/rtw_ioctl_set.c deleted file mode 100644 index 30287af816f2..000000000000 --- a/drivers/staging/rtl8723au/core/rtw_ioctl_set.c +++ /dev/null @@ -1,78 +0,0 @@ -/****************************************************************************** - * - * Copyright(c) 2007 - 2012 Realtek Corporation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify it - * under the terms of version 2 of the GNU General Public License as - * published by the Free Software Foundation. - * - * This program is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for - * more details. - * - ******************************************************************************/ -#define _RTW_IOCTL_SET_C_ - -#include -#include -#include -#include - -#include -#include - -int rtw_set_802_11_bssid23a_list_scan(struct rtw_adapter *padapter, - struct cfg80211_ssid *pssid, - int ssid_max_num) -{ - struct mlme_priv *pmlmepriv = &padapter->mlmepriv; - int res = _SUCCESS; - - RT_TRACE(_module_rtl871x_ioctl_set_c_, _drv_err_, - ("+%s: fw_state =%x\n", __func__, get_fwstate(pmlmepriv))); - - if (!padapter) { - res = _FAIL; - goto exit; - } - if (padapter->hw_init_completed == false) { - res = _FAIL; - RT_TRACE(_module_rtl871x_ioctl_set_c_, _drv_err_, - ("%s: hw_init_completed == false ===\n", __func__)); - goto exit; - } - - if (check_fwstate(pmlmepriv, _FW_UNDER_SURVEY | _FW_UNDER_LINKING) || - (pmlmepriv->LinkDetectInfo.bBusyTraffic == true)) { - /* Scan or linking is in progress, do nothing. */ - RT_TRACE(_module_rtl871x_ioctl_set_c_, _drv_err_, - ("%s fail since fw_state = %x\n", __func__, - get_fwstate(pmlmepriv))); - - if (check_fwstate(pmlmepriv, - (_FW_UNDER_SURVEY|_FW_UNDER_LINKING))) { - RT_TRACE(_module_rtl871x_ioctl_set_c_, _drv_err_, - ("\n###_FW_UNDER_SURVEY|_FW_UNDER_LINKING\n")); - } else { - RT_TRACE(_module_rtl871x_ioctl_set_c_, _drv_err_, - ("\n###pmlmepriv->sitesurveyctrl.traffic_" - "busy == true\n")); - } - } else { - if (rtw_is_scan_deny(padapter)) { - DBG_8723A("%s(%s): scan deny\n", - __func__, padapter->pnetdev->name); - return _SUCCESS; - } - - spin_lock_bh(&pmlmepriv->lock); - - res = rtw_sitesurvey_cmd23a(padapter, pssid, ssid_max_num, - NULL, 0); - - spin_unlock_bh(&pmlmepriv->lock); - } -exit: - return res; -} diff --git a/drivers/staging/rtl8723au/core/rtw_mlme.c b/drivers/staging/rtl8723au/core/rtw_mlme.c index bdebde784f16..e89d0198d82d 100644 --- a/drivers/staging/rtl8723au/core/rtw_mlme.c +++ b/drivers/staging/rtl8723au/core/rtw_mlme.c @@ -1538,26 +1538,9 @@ void rtw_scan_timeout_handler23a(unsigned long data) rtw_cfg80211_indicate_scan_done(wdev_to_priv(adapter->rtw_wdev), true); } -static void rtw_auto_scan_handler(struct rtw_adapter *padapter) -{ - struct mlme_priv *pmlmepriv = &padapter->mlmepriv; - - /* auto site survey per 60sec */ - if (pmlmepriv->scan_interval > 0) { - pmlmepriv->scan_interval--; - if (pmlmepriv->scan_interval == 0) { - DBG_8723A("%s\n", __func__); - rtw_set_802_11_bssid23a_list_scan(padapter, NULL, 0); - /* 30*2 sec = 60sec */ - pmlmepriv->scan_interval = SCAN_INTERVAL; - } - } -} - void rtw_dynamic_check_timer_handler(unsigned long data) { struct rtw_adapter *adapter = (struct rtw_adapter *)data; - struct registry_priv *pregistrypriv = &adapter->registrypriv; if (adapter->hw_init_completed == false) goto out; @@ -1571,10 +1554,6 @@ void rtw_dynamic_check_timer_handler(unsigned long data) rtw_dynamic_chk_wk_cmd23a(adapter); - if (pregistrypriv->wifi_spec == 1) { - /* auto site survey */ - rtw_auto_scan_handler(adapter); - } out: mod_timer(&adapter->mlmepriv.dynamic_chk_timer, jiffies + msecs_to_jiffies(2000)); diff --git a/drivers/staging/rtl8723au/include/rtw_ioctl_set.h b/drivers/staging/rtl8723au/include/rtw_ioctl_set.h index 855fc40bae25..6c102dc97d42 100644 --- a/drivers/staging/rtl8723au/include/rtw_ioctl_set.h +++ b/drivers/staging/rtl8723au/include/rtw_ioctl_set.h @@ -17,10 +17,6 @@ #include -int rtw_set_802_11_bssid23a_list_scan(struct rtw_adapter *padapter, - struct cfg80211_ssid *pssid, - int ssid_max_num); - s32 FillH2CCmd(struct rtw_adapter *padapter, u8 ElementID, u32 CmdLen, u8 *pCmdBuffer); #endif -- 2.20.1