Skip to contentSkip to conversation

staging: rtl8188eu: Remove unused member MultiFunc from struct hal_data_8188e

PATCH New navin patidar 1 participant 9 messages Jul 28, 2014 Staging

lore
Share & tools
lore
#0 lore raw

PATCH 1/9 staging: rtl8188eu: Remove unused member MultiFunc from struct hal_data_8188e

---
 drivers/staging/rtl8188eu/hal/rtl8188e_hal_init.c |    1 -
 drivers/staging/rtl8188eu/include/rtl8188e_hal.h  |    1 -
 2 files changed, 2 deletions(-)
drivers/staging/rtl8188eu/hal/rtl8188e_hal_init.c +0 -1
index 161138f..fbf70f6 100644
@@ -517,7 +517,6 @@ static struct HAL_VERSION ReadChipVersion8188E(struct adapter *padapter)
 	pHalData->RegulatorMode = ((value32 & TRP_BT_EN) ? RT_LDO_REGULATOR : RT_SWITCHING_REGULATOR);
 
 	ChipVersion.ROMVer = 0;	/*  ROM code version. */
-	pHalData->MultiFunc = RT_MULTI_FUNC_NONE;
 
 	dump_chip_info(ChipVersion);
 
drivers/staging/rtl8188eu/include/rtl8188e_hal.h +0 -1
index 4b7b069..fb20653 100644
@@ -240,7 +240,6 @@ enum rt_regulator_mode {
 
 struct hal_data_8188e {
 	struct HAL_VERSION	VersionID;
-	enum rt_multi_func MultiFunc; /*  For multi-function consideration. */
 	enum rt_regulator_mode RegulatorMode; /*  switching regulator or LDO */
 	u16	CustomerID;
 
Signature · 1 line
1.7.10.4
#1 lore raw

PATCH 2/9 staging: rtl8188eu: Remove wrapper function rtw_join_timeout_handler()

---
 drivers/staging/rtl8188eu/core/rtw_mlme.c     |    3 ++-
 drivers/staging/rtl8188eu/include/rtw_mlme.h  |    3 +--
 drivers/staging/rtl8188eu/os_dep/mlme_linux.c |   10 +---------
 3 files changed, 4 insertions(+), 12 deletions(-)
drivers/staging/rtl8188eu/core/rtw_mlme.c +2 -1
index c15fab2..f63f1c2 100644
@@ -1362,8 +1362,9 @@ void rtw_cpwm_event_callback(struct adapter *padapter, u8 *pbuf)
 * _rtw_join_timeout_handler - Timeout/faliure handler for CMD JoinBss
 * @adapter: pointer to struct adapter structure
 */
-void _rtw_join_timeout_handler (struct adapter *adapter)
+void _rtw_join_timeout_handler (void *function_context)
 {
+	struct adapter *adapter = (struct adapter *)function_context;
 	struct	mlme_priv *pmlmepriv = &adapter->mlmepriv;
 	int do_join_r;
 
drivers/staging/rtl8188eu/include/rtw_mlme.h +1 -2
index 5b1fcd2..40b0c4b 100644
@@ -436,7 +436,6 @@ void indicate_wx_scan_complete_event(struct adapter *padapter);
 void rtw_indicate_wx_assoc_event(struct adapter *padapter);
 void rtw_indicate_wx_disassoc_event(struct adapter *padapter);
 int event_thread(void *context);
-void rtw_join_timeout_handler(void *FunctionContext);
 void _rtw_scan_timeout_handler(void *FunctionContext);
 void rtw_free_network_queue(struct adapter *adapter, u8 isfreeall);
 int rtw_init_mlme_priv(struct adapter *adapter);
@@ -553,7 +552,7 @@ void rtw_update_registrypriv_dev_network(struct adapter *adapter);
 
 void rtw_get_encrypt_decrypt_from_registrypriv(struct adapter *adapter);
 
-void _rtw_join_timeout_handler(struct adapter *adapter);
+void _rtw_join_timeout_handler(void *function_context);
 void rtw_scan_timeout_handler(struct adapter *adapter);
 
 void rtw_dynamic_check_timer_handlder(struct adapter *adapter);
drivers/staging/rtl8188eu/os_dep/mlme_linux.c +1 -9
index 737677c..41d2459 100644
@@ -25,14 +25,6 @@
 #include <drv_types.h>
 #include <mlme_osdep.h>
 
-void rtw_join_timeout_handler (void *FunctionContext)
-{
-	struct adapter *adapter = (struct adapter *)FunctionContext;
-
-	_rtw_join_timeout_handler(adapter);
-}
-
-
 void _rtw_scan_timeout_handler (void *FunctionContext)
 {
 	struct adapter *adapter = (struct adapter *)FunctionContext;
@@ -54,7 +46,7 @@ void rtw_init_mlme_timer(struct adapter *padapter)
 {
 	struct	mlme_priv *pmlmepriv = &padapter->mlmepriv;
 
-	_init_timer(&(pmlmepriv->assoc_timer), padapter->pnetdev, rtw_join_timeout_handler, padapter);
+	_init_timer(&(pmlmepriv->assoc_timer), padapter->pnetdev, _rtw_join_timeout_handler, padapter);
 	_init_timer(&(pmlmepriv->scan_to_timer), padapter->pnetdev, _rtw_scan_timeout_handler, padapter);
 	_init_timer(&(pmlmepriv->dynamic_chk_timer), padapter->pnetdev, _dynamic_check_timer_handlder, padapter);
 }
Signature · 1 line
1.7.10.4
#2 lore raw

PATCH 3/9 staging: rtl8188eu: Remove wrapper function _rtw_scan_timeout_handler()

In reply to navin patidar
---
 drivers/staging/rtl8188eu/core/rtw_mlme.c     |    3 ++-
 drivers/staging/rtl8188eu/include/rtw_mlme.h  |    3 +--
 drivers/staging/rtl8188eu/os_dep/mlme_linux.c |    9 +--------
 3 files changed, 4 insertions(+), 11 deletions(-)
drivers/staging/rtl8188eu/core/rtw_mlme.c +2 -1
index f63f1c2..d5b2f51 100644
@@ -1404,8 +1404,9 @@ void _rtw_join_timeout_handler (void *function_context)
 * rtw_scan_timeout_handler - Timeout/Faliure handler for CMD SiteSurvey
 * @adapter: pointer to struct adapter structure
 */
-void rtw_scan_timeout_handler (struct adapter *adapter)
+void rtw_scan_timeout_handler (void *function_context)
 {
+	struct adapter *adapter = (struct adapter *)function_context;
 	struct	mlme_priv *pmlmepriv = &adapter->mlmepriv;
 
 	DBG_88E(FUNC_ADPT_FMT" fw_state=%x\n", FUNC_ADPT_ARG(adapter), get_fwstate(pmlmepriv));
drivers/staging/rtl8188eu/include/rtw_mlme.h +1 -2
index 40b0c4b..8f5457b 100644
@@ -436,7 +436,6 @@ void indicate_wx_scan_complete_event(struct adapter *padapter);
 void rtw_indicate_wx_assoc_event(struct adapter *padapter);
 void rtw_indicate_wx_disassoc_event(struct adapter *padapter);
 int event_thread(void *context);
-void _rtw_scan_timeout_handler(void *FunctionContext);
 void rtw_free_network_queue(struct adapter *adapter, u8 isfreeall);
 int rtw_init_mlme_priv(struct adapter *adapter);
 void rtw_free_mlme_priv(struct mlme_priv *pmlmepriv);
@@ -553,7 +552,7 @@ void rtw_update_registrypriv_dev_network(struct adapter *adapter);
 void rtw_get_encrypt_decrypt_from_registrypriv(struct adapter *adapter);
 
 void _rtw_join_timeout_handler(void *function_context);
-void rtw_scan_timeout_handler(struct adapter *adapter);
+void rtw_scan_timeout_handler(void *function_context);
 
 void rtw_dynamic_check_timer_handlder(struct adapter *adapter);
 #define rtw_is_scan_deny(adapter) false
drivers/staging/rtl8188eu/os_dep/mlme_linux.c +1 -8
index 41d2459..0bfaa78 100644
@@ -25,13 +25,6 @@
 #include <drv_types.h>
 #include <mlme_osdep.h>
 
-void _rtw_scan_timeout_handler (void *FunctionContext)
-{
-	struct adapter *adapter = (struct adapter *)FunctionContext;
-
-	rtw_scan_timeout_handler(adapter);
-}
-
 static void _dynamic_check_timer_handlder(void *FunctionContext)
 {
 	struct adapter *adapter = (struct adapter *)FunctionContext;
@@ -47,7 +40,7 @@ void rtw_init_mlme_timer(struct adapter *padapter)
 	struct	mlme_priv *pmlmepriv = &padapter->mlmepriv;
 
 	_init_timer(&(pmlmepriv->assoc_timer), padapter->pnetdev, _rtw_join_timeout_handler, padapter);
-	_init_timer(&(pmlmepriv->scan_to_timer), padapter->pnetdev, _rtw_scan_timeout_handler, padapter);
+	_init_timer(&(pmlmepriv->scan_to_timer), padapter->pnetdev, rtw_scan_timeout_handler, padapter);
 	_init_timer(&(pmlmepriv->dynamic_chk_timer), padapter->pnetdev, _dynamic_check_timer_handlder, padapter);
 }
 
Signature · 1 line
1.7.10.4
#3 lore raw

PATCH 4/9 staging: rtl8188eu: Remove wrapper function _dynamic_check_timer_handlder()

In reply to navin patidar
---
 drivers/staging/rtl8188eu/core/rtw_mlme.c     |   13 ++++++++-----
 drivers/staging/rtl8188eu/include/rtw_mlme.h  |    2 +-
 drivers/staging/rtl8188eu/os_dep/mlme_linux.c |   12 +-----------
 3 files changed, 10 insertions(+), 17 deletions(-)
drivers/staging/rtl8188eu/core/rtw_mlme.c +8 -5
index d5b2f51..149c271 100644
@@ -1431,24 +1431,27 @@ static void rtw_auto_scan_handler(struct adapter *padapter)
 	}
 }
 
-void rtw_dynamic_check_timer_handlder(struct adapter *adapter)
+void rtw_dynamic_check_timer_handlder(void *function_context)
 {
+	struct adapter *adapter = (struct adapter *)function_context;
 	struct registry_priv *pregistrypriv = &adapter->registrypriv;
 
 	if (!adapter)
-		return;
+		goto exit;
 	if (!adapter->hw_init_completed)
-		return;
+		goto exit;
 	if ((adapter->bDriverStopped) || (adapter->bSurpriseRemoved))
-		return;
+		goto exit;
 	if (adapter->net_closed)
-		return;
+		goto exit;
 	rtw_dynamic_chk_wk_cmd(adapter);
 
 	if (pregistrypriv->wifi_spec == 1) {
 		/* auto site survey */
 		rtw_auto_scan_handler(adapter);
 	}
+exit:
+	_set_timer(&adapter->mlmepriv.dynamic_chk_timer, 2000);
 }
 
 #define RTW_SCAN_RESULT_EXPIRE 2000
drivers/staging/rtl8188eu/include/rtw_mlme.h +1 -1
index 8f5457b..8d83f7c 100644
@@ -554,7 +554,7 @@ void rtw_get_encrypt_decrypt_from_registrypriv(struct adapter *adapter);
 void _rtw_join_timeout_handler(void *function_context);
 void rtw_scan_timeout_handler(void *function_context);
 
-void rtw_dynamic_check_timer_handlder(struct adapter *adapter);
+void rtw_dynamic_check_timer_handlder(void *function_context);
 #define rtw_is_scan_deny(adapter) false
 #define rtw_clear_scan_deny(adapter) do {} while (0)
 #define rtw_set_scan_deny_timer_hdl(adapter) do {} while (0)
drivers/staging/rtl8188eu/os_dep/mlme_linux.c +1 -11
index 0bfaa78..82b71fa 100644
@@ -25,23 +25,13 @@
 #include <drv_types.h>
 #include <mlme_osdep.h>
 
-static void _dynamic_check_timer_handlder(void *FunctionContext)
-{
-	struct adapter *adapter = (struct adapter *)FunctionContext;
-
-	if (adapter->registrypriv.mp_mode == 1)
-		return;
-	rtw_dynamic_check_timer_handlder(adapter);
-	_set_timer(&adapter->mlmepriv.dynamic_chk_timer, 2000);
-}
-
 void rtw_init_mlme_timer(struct adapter *padapter)
 {
 	struct	mlme_priv *pmlmepriv = &padapter->mlmepriv;
 
 	_init_timer(&(pmlmepriv->assoc_timer), padapter->pnetdev, _rtw_join_timeout_handler, padapter);
 	_init_timer(&(pmlmepriv->scan_to_timer), padapter->pnetdev, rtw_scan_timeout_handler, padapter);
-	_init_timer(&(pmlmepriv->dynamic_chk_timer), padapter->pnetdev, _dynamic_check_timer_handlder, padapter);
+	_init_timer(&(pmlmepriv->dynamic_chk_timer), padapter->pnetdev, rtw_dynamic_check_timer_handlder, padapter);
 }
 
 void rtw_os_indicate_connect(struct adapter *adapter)
Signature · 1 line
1.7.10.4
#4 lore raw

PATCH 5/9 staging: rtl8188eu: Remove wrapper function _survey_timer_hdl()

In reply to navin patidar
---
 drivers/staging/rtl8188eu/core/rtw_mlme_ext.c    |    3 ++-
 drivers/staging/rtl8188eu/include/rtw_mlme_ext.h |    2 +-
 drivers/staging/rtl8188eu/os_dep/mlme_linux.c    |    9 +--------
 3 files changed, 4 insertions(+), 10 deletions(-)
drivers/staging/rtl8188eu/core/rtw_mlme_ext.c +2 -1
index 41cfd30..b113f0b 100644
@@ -4833,8 +4833,9 @@ void linked_status_chk(struct adapter *padapter)
 	}
 }
 
-void survey_timer_hdl(struct adapter *padapter)
+void survey_timer_hdl(void *function_context)
 {
+	struct adapter *padapter = (struct adapter *)function_context;
 	struct cmd_obj	*ph2c;
 	struct sitesurvey_parm	*psurveyPara;
 	struct cmd_priv					*pcmdpriv = &padapter->cmdpriv;
drivers/staging/rtl8188eu/include/rtw_mlme_ext.h +1 -1
index 654bd36..a948d45 100644
@@ -646,7 +646,7 @@ void mlmeext_sta_add_event_callback(struct adapter *padapter,
 
 void linked_status_chk(struct adapter *padapter);
 
-void survey_timer_hdl (struct adapter *padapter);
+void survey_timer_hdl (void *function_context);
 void link_timer_hdl (struct adapter *padapter);
 void addba_timer_hdl(struct sta_info *psta);
 
drivers/staging/rtl8188eu/os_dep/mlme_linux.c +1 -8
index 82b71fa..f59e130 100644
@@ -129,13 +129,6 @@ void rtw_report_sec_ie(struct adapter *adapter, u8 authmode, u8 *sec_ie)
 	}
 }
 
-static void _survey_timer_hdl(void *FunctionContext)
-{
-	struct adapter *padapter = (struct adapter *)FunctionContext;
-
-	survey_timer_hdl(padapter);
-}
-
 static void _link_timer_hdl(void *FunctionContext)
 {
 	struct adapter *padapter = (struct adapter *)FunctionContext;
@@ -157,7 +150,7 @@ void init_mlme_ext_timer(struct adapter *padapter)
 {
 	struct	mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv;
 
-	_init_timer(&pmlmeext->survey_timer, padapter->pnetdev, _survey_timer_hdl, padapter);
+	_init_timer(&pmlmeext->survey_timer, padapter->pnetdev, survey_timer_hdl, padapter);
 	_init_timer(&pmlmeext->link_timer, padapter->pnetdev, _link_timer_hdl, padapter);
 }
 
Signature · 1 line
1.7.10.4
#5 lore raw

PATCH 6/9 staging: rtl8188eu: Remove wrapper function _link_timer_hdl()

In reply to navin patidar
---
 drivers/staging/rtl8188eu/core/rtw_mlme_ext.c    |    3 ++-
 drivers/staging/rtl8188eu/include/rtw_mlme_ext.h |    2 +-
 drivers/staging/rtl8188eu/os_dep/mlme_linux.c    |    8 +-------
 3 files changed, 4 insertions(+), 9 deletions(-)
drivers/staging/rtl8188eu/core/rtw_mlme_ext.c +2 -1
index b113f0b..f18bb78 100644
@@ -4873,8 +4873,9 @@ exit_survey_timer_hdl:
 	return;
 }
 
-void link_timer_hdl(struct adapter *padapter)
+void link_timer_hdl(void *function_context)
 {
+	struct adapter *padapter = (struct adapter *)function_context;
 	struct mlme_ext_priv	*pmlmeext = &padapter->mlmeextpriv;
 	struct mlme_ext_info	*pmlmeinfo = &(pmlmeext->mlmext_info);
 
drivers/staging/rtl8188eu/include/rtw_mlme_ext.h +1 -1
index a948d45..05a010f 100644
@@ -647,7 +647,7 @@ void mlmeext_sta_add_event_callback(struct adapter *padapter,
 void linked_status_chk(struct adapter *padapter);
 
 void survey_timer_hdl (void *function_context);
-void link_timer_hdl (struct adapter *padapter);
+void link_timer_hdl (void *funtion_context);
 void addba_timer_hdl(struct sta_info *psta);
 
 #define set_survey_timer(mlmeext, ms) \
drivers/staging/rtl8188eu/os_dep/mlme_linux.c +1 -7
index f59e130..4f5fa08 100644
@@ -129,12 +129,6 @@ void rtw_report_sec_ie(struct adapter *adapter, u8 authmode, u8 *sec_ie)
 	}
 }
 
-static void _link_timer_hdl(void *FunctionContext)
-{
-	struct adapter *padapter = (struct adapter *)FunctionContext;
-	link_timer_hdl(padapter);
-}
-
 static void _addba_timer_hdl(void *FunctionContext)
 {
 	struct sta_info *psta = (struct sta_info *)FunctionContext;
@@ -151,7 +145,7 @@ void init_mlme_ext_timer(struct adapter *padapter)
 	struct	mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv;
 
 	_init_timer(&pmlmeext->survey_timer, padapter->pnetdev, survey_timer_hdl, padapter);
-	_init_timer(&pmlmeext->link_timer, padapter->pnetdev, _link_timer_hdl, padapter);
+	_init_timer(&pmlmeext->link_timer, padapter->pnetdev, link_timer_hdl, padapter);
 }
 
 #ifdef CONFIG_88EU_AP_MODE
Signature · 1 line
1.7.10.4
#6 lore raw

PATCH 7/9 staging: rtl8188eu: Remove wrapper function _addba_timer_hdl()

In reply to navin patidar
---
 drivers/staging/rtl8188eu/core/rtw_mlme_ext.c    |    3 ++-
 drivers/staging/rtl8188eu/include/rtw_mlme_ext.h |    2 +-
 drivers/staging/rtl8188eu/os_dep/mlme_linux.c    |    8 +-------
 3 files changed, 4 insertions(+), 9 deletions(-)
drivers/staging/rtl8188eu/core/rtw_mlme_ext.c +2 -1
index f18bb78..5ba5099 100644
@@ -4910,8 +4910,9 @@ void link_timer_hdl(void *function_context)
 	return;
 }
 
-void addba_timer_hdl(struct sta_info *psta)
+void addba_timer_hdl(void *function_context)
 {
+	struct sta_info *psta = (struct sta_info *)function_context;
 	struct ht_priv	*phtpriv;
 
 	if (!psta)
drivers/staging/rtl8188eu/include/rtw_mlme_ext.h +1 -1
index 05a010f..d699ca1 100644
@@ -648,7 +648,7 @@ void linked_status_chk(struct adapter *padapter);
 
 void survey_timer_hdl (void *function_context);
 void link_timer_hdl (void *funtion_context);
-void addba_timer_hdl(struct sta_info *psta);
+void addba_timer_hdl(void *function_context);
 
 #define set_survey_timer(mlmeext, ms) \
 	do { \
drivers/staging/rtl8188eu/os_dep/mlme_linux.c +1 -7
index 4f5fa08..1b892c4 100644
@@ -129,15 +129,9 @@ void rtw_report_sec_ie(struct adapter *adapter, u8 authmode, u8 *sec_ie)
 	}
 }
 
-static void _addba_timer_hdl(void *FunctionContext)
-{
-	struct sta_info *psta = (struct sta_info *)FunctionContext;
-	addba_timer_hdl(psta);
-}
-
 void init_addba_retry_timer(struct adapter *padapter, struct sta_info *psta)
 {
-	_init_timer(&psta->addba_retry_timer, padapter->pnetdev, _addba_timer_hdl, psta);
+	_init_timer(&psta->addba_retry_timer, padapter->pnetdev, addba_timer_hdl, psta);
 }
 
 void init_mlme_ext_timer(struct adapter *padapter)
Signature · 1 line
1.7.10.4
#7 lore raw

PATCH 8/9 staging: rtl81888eu: Remove unused function rtw_os_read_port()

In reply to navin patidar
---
 drivers/staging/rtl8188eu/include/recv_osdep.h |    2 --
 drivers/staging/rtl8188eu/os_dep/recv_linux.c  |   12 ------------
 2 files changed, 14 deletions(-)
drivers/staging/rtl8188eu/include/recv_osdep.h +0 -2
index a52a696..5aabd39 100644
@@ -43,8 +43,6 @@ int rtw_os_recv_resource_alloc(struct adapter *adapt,
 
 int rtw_os_recvbuf_resource_alloc(struct adapter *adapt, struct recv_buf *buf);
 
-void rtw_os_read_port(struct adapter *padapter, struct recv_buf *precvbuf);
-
 void rtw_init_recv_timer(struct recv_reorder_ctrl *preorder_ctrl);
 int _netdev_open(struct net_device *pnetdev);
 int netdev_open(struct net_device *pnetdev);
drivers/staging/rtl8188eu/os_dep/recv_linux.c +0 -12
index f8ac996..f7d53dd 100644
@@ -191,18 +191,6 @@ _recv_indicatepkt_drop:
 	 return _FAIL;
 }
 
-void rtw_os_read_port(struct adapter *padapter, struct recv_buf *precvbuf)
-{
-	struct recv_priv *precvpriv = &padapter->recvpriv;
-
-	/* free skb in recv_buf */
-	dev_kfree_skb_any(precvbuf->pskb);
-	precvbuf->pskb = NULL;
-	precvbuf->reuse = false;
-	usb_read_port(padapter, precvpriv->ff_hwaddr, 0,
-			(unsigned char *)precvbuf);
-}
-
 static void _rtw_reordering_ctrl_timeout_handler(void *func_context)
 {
 	struct recv_reorder_ctrl *preorder_ctrl;
Signature · 1 line
1.7.10.4
#8 lore raw

PATCH 9/9 staging:rtl8188eu:Remove wrapper function _rtw_reordering_ctrl_timeout_handler()

In reply to navin patidar
---
 drivers/staging/rtl8188eu/os_dep/recv_linux.c |   10 +---------
 1 file changed, 1 insertion(+), 9 deletions(-)
drivers/staging/rtl8188eu/os_dep/recv_linux.c +1 -9
index f7d53dd..05427c4 100644
@@ -191,17 +191,9 @@ _recv_indicatepkt_drop:
 	 return _FAIL;
 }
 
-static void _rtw_reordering_ctrl_timeout_handler(void *func_context)
-{
-	struct recv_reorder_ctrl *preorder_ctrl;
-
-	preorder_ctrl = (struct recv_reorder_ctrl *)func_context;
-	rtw_reordering_ctrl_timeout_handler(preorder_ctrl);
-}
-
 void rtw_init_recv_timer(struct recv_reorder_ctrl *preorder_ctrl)
 {
 	struct adapter *padapter = preorder_ctrl->padapter;
 
-	_init_timer(&(preorder_ctrl->reordering_ctrl_timer), padapter->pnetdev, _rtw_reordering_ctrl_timeout_handler, preorder_ctrl);
+	_init_timer(&(preorder_ctrl->reordering_ctrl_timer), padapter->pnetdev, rtw_reordering_ctrl_timeout_handler, preorder_ctrl);
 }
Signature · 1 line
1.7.10.4