staging: rtl8188eu: Remove rtw_deinit_intf_priv()
PATCH 2/13 staging: rtl8188eu: Remove rtw_deinit_intf_priv()
--- drivers/staging/rtl8188eu/os_dep/usb_intf.c | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-)
drivers/staging/rtl8188eu/os_dep/usb_intf.c +3 -10
@@ -62,15 +62,6 @@ static u8 rtw_init_intf_priv(struct dvobj_priv *dvobj)return _SUCCESS; } -static u8 rtw_deinit_intf_priv (struct dvobj_priv *dvobj) -{ -u8 rst = _SUCCESS; - -kfree (dvobj->usb_vendor_req_buf); -mutex_destroy (&dvobj->usb_vendor_req_mutex); -return rst; -} -static struct dvobj_priv *usb_dvobj_init (struct usb_interface *usb_intf) {int i;
@@ -175,7 +166,9 @@ static void usb_dvobj_deinit(struct usb_interface *usb_intf)usb_reset_device (interface_to_usbdev (usb_intf)); } } -rtw_deinit_intf_priv (dvobj); + +kfree (dvobj->usb_vendor_req_buf); +mutex_destroy (&dvobj->usb_vendor_req_mutex);kfree (dvobj); }
--
1.7.10.4
PATCH 3/13 staging: rtl8188eu: Remove rtw_init_intf_priv()
--- drivers/staging/rtl8188eu/os_dep/usb_intf.c | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-)
drivers/staging/rtl8188eu/os_dep/usb_intf.c +4 -11
@@ -52,16 +52,6 @@ static struct usb_device_id rtw_usb_id_tbl[] = {MODULE_DEVICE_TABLE (usb, rtw_usb_id_tbl); -static u8 rtw_init_intf_priv (struct dvobj_priv *dvobj) -{ -mutex_init (&dvobj->usb_vendor_req_mutex); - dvobj->usb_vendor_req_buf =rtw_zmalloc (MAX_USB_IO_CTL_SIZE ); -if (!dvobj->usb_vendor_req_buf) -return _FAIL; - -return _SUCCESS; -} -static struct dvobj_priv *usb_dvobj_init (struct usb_interface *usb_intf) {int i;
@@ -125,7 +115,10 @@ static struct dvobj_priv *usb_dvobj_init(struct usb_interface *usb_intf)else pdvobjpriv->ishighspeed = false; -if (rtw_init_intf_priv (pdvobjpriv) == _FAIL) +mutex_init (&pdvobjpriv->usb_vendor_req_mutex); + pdvobjpriv->usb_vendor_req_buf =rtw_zmalloc (MAX_USB_IO_CTL_SIZE ); + +if (!pdvobjpriv->usb_vendor_req_buf) goto free_dvobj;rtw_reset_continual_urb_error (pdvobjpriv);
Signature · 1 line
1.7.10.4
PATCH 4/13 staging: rtl8188eu:Move rtw_hw_[suspend,resume]() to rtw_pwrctrl.c
In reply to navin patidarrtw_hw_[suspend,resume]() functions are used only in rtw_pwrctrl.c, so move these functions there.
--- drivers/staging/rtl8188eu/core/rtw_pwrctrl.c | 103 ++++++++++++++++++++++++ drivers/staging/rtl8188eu/include/osdep_intf.h | 2 - drivers/staging/rtl8188eu/os_dep/usb_intf.c | 102 ----------------------- 3 files changed, 103 insertions(+), 104 deletions(-)
drivers/staging/rtl8188eu/core/rtw_pwrctrl.c +103 -0
@@ -23,6 +23,109 @@#include <drv_types.h> #include <osdep_intf.h> #include <linux/usb.h> +#include <usb_osintf.h> + +static int rtw_hw_suspend (struct adapter *padapter) +{ +struct pwrctrl_priv *pwrpriv = &padapter->pwrctrlpriv; +struct net_device *pnetdev = padapter->pnetdev; + + +if ((!padapter->bup) || (padapter->bDriverStopped) || + (padapter->bSurpriseRemoved)) { +DBG_88E ("padapter->bup=%d bDriverStopped=%d bSurpriseRemoved = %d\n" , + padapter->bup, padapter->bDriverStopped, + padapter->bSurpriseRemoved); + goto error_exit; + } + +/* system suspend */ +LeaveAllPowerSaveMode (padapter); + +DBG_88E ("==> rtw_hw_suspend\n" ); +_enter_pwrlock (&pwrpriv->lock); + pwrpriv->bips_processing = true; +/* s1. */ +if (pnetdev) { +netif_carrier_off (pnetdev); +netif_tx_stop_all_queues (pnetdev); + } + +/* s2. */ +rtw_disassoc_cmd (padapter,500 , false); + +/* s2-2. indicate disconnect to os */ + { +struct mlme_priv *pmlmepriv = &padapter->mlmepriv; + +if (check_fwstate (pmlmepriv, _FW_LINKED)) { +_clr_fwstate_ (pmlmepriv, _FW_LINKED); + +rtw_led_control (padapter,LED_CTL_NO_LINK ); + +rtw_os_indicate_disconnect (padapter); + +/* donnot enqueue cmd */ +rtw_lps_ctrl_wk_cmd (padapter,LPS_CTRL_DISCONNECT ,0 ); + } + } +/* s2-3. */ +rtw_free_assoc_resources (padapter,1 ); + +/* s2-4. */ +rtw_free_network_queue (padapter, true); +rtw_ips_dev_unload (padapter); + pwrpriv->rf_pwrstate = rf_off; + pwrpriv->bips_processing = false; + +_exit_pwrlock (&pwrpriv->lock); + +return 0 ; + +error_exit: +DBG_88E ("%s, failed\n" , __func__); +return -1 ; +} + +static int rtw_hw_resume (struct adapter *padapter) +{ +struct pwrctrl_priv *pwrpriv = &padapter->pwrctrlpriv; +struct net_device *pnetdev = padapter->pnetdev; + + +/* system resume */ +DBG_88E ("==> rtw_hw_resume\n" ); +_enter_pwrlock (&pwrpriv->lock); + pwrpriv->bips_processing = true; +rtw_reset_drv_sw (padapter); + +if (pm_netdev_open (pnetdev, false) !=0 ) { +_exit_pwrlock (&pwrpriv->lock); + goto error_exit; + } + +netif_device_attach (pnetdev); +netif_carrier_on (pnetdev); + +if (!netif_queue_stopped (pnetdev)) +netif_start_queue (pnetdev); +else +netif_wake_queue (pnetdev); + + pwrpriv->bkeepfwalive = false; + pwrpriv->brfoffbyhw = false; + + pwrpriv->rf_pwrstate = rf_on; + pwrpriv->bips_processing = false; + +_exit_pwrlock (&pwrpriv->lock); + + +return 0 ; +error_exit: +DBG_88E ("%s, Open net dev failed\n" , __func__); +return -1 ; +}void ips_enter (struct adapter *padapter) {
drivers/staging/rtl8188eu/include/osdep_intf.h +0 -2
@@ -77,7 +77,5 @@ void rtw_ips_dev_unload(struct adapter *padapter);int rtw_ips_pwr_up (struct adapter *padapter);void rtw_ips_pwr_down (struct adapter *padapter); -int rtw_hw_suspend (struct adapter *padapter); -int rtw_hw_resume (struct adapter *padapter);#endif /* _OSDEP_INTF_H_ */
drivers/staging/rtl8188eu/os_dep/usb_intf.c +0 -102
108 lines not on this page · raw message
Signature · 1 line
1.7.10.4
PATCH 5/13 staging: rtl8188eu: Remove unused struct intf_priv
In reply to navin patidar--- drivers/staging/rtl8188eu/include/osdep_intf.h | 33 ------------------------ 1 file changed, 33 deletions(-)
drivers/staging/rtl8188eu/include/osdep_intf.h +0 -33
@@ -24,39 +24,6 @@#include <osdep_service.h> #include <drv_types.h> -struct intf_priv { -u8 *intf_dev; -u32 max_iosz;/* USB2.0: 128, USB1.1: 64, SDIO:64 */ -u32 max_xmitsz;/* USB2.0: unlimited, SDIO:512 */ -u32 max_recvsz;/* USB2.0: unlimited, SDIO:512 */ - -u8 *io_rwmem; -u8 *allocated_io_rwmem; -u32 io_wsz;/* unit: 4bytes */ -u32 io_rsz;/* unit: 4bytes */ -u8 intf_status; - -void (*_bus_io)(u8 *priv); - -/* -Under Sync. IRP (SDIO/USB) -A protection mechanism is necessary for the io_rwmem(read/write protocol) - -Under Async. IRP (SDIO/USB) -The protection mechanism is through the pending queue. -*/ -struct mutex ioctl_mutex; -/* when in USB, IO is through interrupt in/out endpoints */ -struct usb_device *udev; -struct urb *piorw_urb; -u8 io_irp_cnt; -u8 bio_irp_pending; -struct semaphore io_retevt; -struct timer_list io_timer; -u8 bio_irp_timeout; -u8 bio_timer_cancel; -}; -u8 rtw_init_drv_sw (struct adapter *padapter);u8 rtw_free_drv_sw (struct adapter *padapter);u8 rtw_reset_drv_sw (struct adapter *padapter);
Signature · 1 line
1.7.10.4
PATCH 6/13 staging: rtl8188eu: Remove unused funtion _rtw_read_mem()
In reply to navin patidar--- drivers/staging/rtl8188eu/core/rtw_io.c | 15 --------------- drivers/staging/rtl8188eu/hal/usb_ops_linux.c | 1 - drivers/staging/rtl8188eu/include/rtw_io.h | 2 -- drivers/staging/rtl8188eu/os_dep/usb_ops_linux.c | 4 ---- 4 files changed, 22 deletions(-)
drivers/staging/rtl8188eu/core/rtw_io.c +0 -15
@@ -177,21 +177,6 @@ int _rtw_write32_async(struct adapter *adapter, u32 addr, u32 val)return RTW_STATUS_CODE (ret); } -void _rtw_read_mem (struct adapter *adapter,u32 addr,u32 cnt,u8 *pmem) -{ -void (*_read_mem)(struct intf_hdl *pintfhdl,u32 addr,u32 cnt,u8 *pmem); -struct io_priv *pio_priv = &adapter->iopriv; -struct intf_hdl *pintfhdl = &(pio_priv->intf); - -if (adapter->bDriverStopped || adapter->bSurpriseRemoved) { -RT_TRACE (_module_rtl871x_io_c_, _drv_info_, - ("rtw_read_mem:bDriverStopped(%d) OR bSurpriseRemoved(%d)" , - adapter->bDriverStopped, adapter->bSurpriseRemoved)); -return ; - } - _read_mem = pintfhdl->io_ops._read_mem; -_read_mem (pintfhdl, addr, cnt, pmem); -}void _rtw_write_mem (struct adapter *adapter,u32 addr,u32 cnt,u8 *pmem) {
drivers/staging/rtl8188eu/hal/usb_ops_linux.c +0 -1
@@ -671,7 +671,6 @@ void rtl8188eu_set_intf_ops(struct _io_ops *pops) pops->_read8 = &usb_read8; pops->_read16 = &usb_read16; pops->_read32 = &usb_read32; - pops->_read_mem = &usb_read_mem; pops->_read_port = &usb_read_port; pops->_write8 = &usb_write8; pops->_write16 = &usb_write16;
drivers/staging/rtl8188eu/include/rtw_io.h +0 -2
@@ -112,8 +112,6 @@ struct _io_ops {int (*_write8_async)(struct intf_hdl *pintfhdl,u32 addr,u8 val);int (*_write16_async)(struct intf_hdl *pintfhdl,u32 addr,u16 val);int (*_write32_async)(struct intf_hdl *pintfhdl,u32 addr,u32 val); -void (*_read_mem)(struct intf_hdl *pintfhdl,u32 addr,u32 cnt, -u8 *pmem);void (*_write_mem)(struct intf_hdl *pintfhdl,u32 addr,u32 cnt,u8 *pmem);u32 (*_read_interrupt)(struct intf_hdl *pintfhdl,u32 addr);
drivers/staging/rtl8188eu/os_dep/usb_ops_linux.c +0 -4
@@ -39,10 +39,6 @@ unsigned int ffaddr2pipehdl(struct dvobj_priv *pdvobj, u32 addr)return pipe; } -void usb_read_mem (struct intf_hdl *pintfhdl,u32 addr,u32 cnt,u8 *rmem) -{ -} -void usb_write_mem (struct intf_hdl *pintfhdl,u32 addr,u32 cnt,u8 *wmem) { }
Signature · 1 line
1.7.10.4
Re: [PATCH 06/13] staging: rtl8188eu: Remove unused funtion _rtw_read_mem()
Thanks. This is much nicer to review when they are all folded together like this.
regards,
dan carpenter
Re: [PATCH 06/13] staging: rtl8188eu: Remove unused funtion _rtw_read_mem()
some times i get confused by one patch should do only one thing policy, for example this patch removes
many other things along _rtw_read_mem().
But you are also right it's much easier to review when they are all folded together.
I'm glad, i did it right this time. :)
regards,
navin patidar
Quoted 6 lines · Dan Carpenter
Thanks. This is much nicer to review when they are all folded together like this.
regards,
dan carpenter
PATCH 7/13 staging: rtl8188eu: Remove unused function _rtw_write_mem()
In reply to navin patidar--- drivers/staging/rtl8188eu/core/rtw_io.c | 14 -------------- drivers/staging/rtl8188eu/hal/usb_ops_linux.c | 1 - drivers/staging/rtl8188eu/include/rtw_io.h | 5 ----- drivers/staging/rtl8188eu/os_dep/usb_ops_linux.c | 4 ---- 4 files changed, 24 deletions(-)
drivers/staging/rtl8188eu/core/rtw_io.c +0 -14
@@ -177,20 +177,6 @@ int _rtw_write32_async(struct adapter *adapter, u32 addr, u32 val)return RTW_STATUS_CODE (ret); } - -void _rtw_write_mem (struct adapter *adapter,u32 addr,u32 cnt,u8 *pmem) -{ -void (*_write_mem)(struct intf_hdl *pintfhdl,u32 addr,u32 cnt,u8 *pmem); -struct io_priv *pio_priv = &adapter->iopriv; -struct intf_hdl *pintfhdl = &(pio_priv->intf); - - - _write_mem = pintfhdl->io_ops._write_mem; - -_write_mem (pintfhdl, addr, cnt, pmem); - -} -void _rtw_read_port (struct adapter *adapter,u32 addr,u32 cnt,u8 *pmem) {u32 (*_read_port)(struct intf_hdl *pintfhdl,u32 addr,u32 cnt,u8 *pmem);
drivers/staging/rtl8188eu/hal/usb_ops_linux.c +0 -1
@@ -676,7 +676,6 @@ void rtl8188eu_set_intf_ops(struct _io_ops *pops) pops->_write16 = &usb_write16; pops->_write32 = &usb_write32; pops->_writeN = &usb_writeN; - pops->_write_mem = &usb_write_mem; pops->_write_port = &usb_write_port; pops->_read_port_cancel = &usb_read_port_cancel; pops->_write_port_cancel = &usb_write_port_cancel;
drivers/staging/rtl8188eu/include/rtw_io.h +0 -5
@@ -112,8 +112,6 @@ struct _io_ops {int (*_write8_async)(struct intf_hdl *pintfhdl,u32 addr,u8 val);int (*_write16_async)(struct intf_hdl *pintfhdl,u32 addr,u16 val);int (*_write32_async)(struct intf_hdl *pintfhdl,u32 addr,u32 val); -void (*_write_mem)(struct intf_hdl *pintfhdl,u32 addr,u32 cnt, -u8 *pmem);u32 (*_read_interrupt)(struct intf_hdl *pintfhdl,u32 addr);u32 (*_read_port)(struct intf_hdl *pintfhdl,u32 addr,u32 cnt,u8 *pmem);
@@ -254,7 +252,6 @@ int _rtw_write8_async(struct adapter *adapter, u32 addr, u8 val);int _rtw_write16_async (struct adapter *adapter,u32 addr,u16 val);int _rtw_write32_async (struct adapter *adapter,u32 addr,u32 val); -void _rtw_write_mem (struct adapter *adapter,u32 addr,u32 cnt,u8 *pmem);u32 _rtw_write_port (struct adapter *adapter,u32 addr,u32 cnt,u8 *pmem);u32 _rtw_write_port_and_wait (struct adapter *adapter,u32 addr,u32 cnt,u8 *pmem,int timeout_ms);
@@ -283,8 +280,6 @@ void _rtw_write_port_cancel(struct adapter *adapter); _rtw_write16_async((adapter), (addr), (val))#define rtw_write32_async (adapter, addr, val) \ _rtw_write32_async((adapter), (addr), (val)) -#define rtw_write_mem (adapter, addr, cnt, mem) \ - _rtw_write_mem((adapter), (addr), (cnt), (mem))#define rtw_write_port (adapter, addr, cnt, mem) \ _rtw_write_port((adapter), (addr), (cnt), (mem))#define rtw_write_port_and_wait (adapter, addr, cnt, mem, timeout_ms) \
drivers/staging/rtl8188eu/os_dep/usb_ops_linux.c +0 -4
@@ -39,10 +39,6 @@ unsigned int ffaddr2pipehdl(struct dvobj_priv *pdvobj, u32 addr)return pipe; } -void usb_write_mem (struct intf_hdl *pintfhdl,u32 addr,u32 cnt,u8 *wmem) -{ -} -void usb_read_port_cancel (struct intf_hdl *pintfhdl) {int i;
Signature · 1 line
1.7.10.4
PATCH 8/13 staging: rtl8188eu: Remove unused function declaration and macro
In reply to navin patidar--- drivers/staging/rtl8188eu/include/rtw_io.h | 3 --- 1 file changed, 3 deletions(-)
drivers/staging/rtl8188eu/include/rtw_io.h +0 -3
@@ -239,7 +239,6 @@ struct io_priv {u8 _rtw_read8 (struct adapter *adapter,u32 addr);u16 _rtw_read16 (struct adapter *adapter,u32 addr);u32 _rtw_read32 (struct adapter *adapter,u32 addr); -void _rtw_read_mem (struct adapter *adapter,u32 addr,u32 cnt,u8 *pmem);void _rtw_read_port (struct adapter *adapter,u32 addr,u32 cnt,u8 *pmem);void _rtw_read_port_cancel (struct adapter *adapter);
@@ -260,8 +259,6 @@ void _rtw_write_port_cancel(struct adapter *adapter);#define rtw_read8 (adapter, addr) _rtw_read8((adapter), (addr))#define rtw_read16 (adapter, addr) _rtw_read16((adapter), (addr))#define rtw_read32 (adapter, addr) _rtw_read32((adapter), (addr)) -#define rtw_read_mem (adapter, addr, cnt, mem) \ - _rtw_read_mem((adapter), (addr), (cnt), (mem))#define rtw_read_port (adapter, addr, cnt, mem) \ _rtw_read_port((adapter), (addr), (cnt), (mem))#define rtw_read_port_cancel (adapter) _rtw_read_port_cancel((adapter))
Signature · 1 line
1.7.10.4
PATCH 9/13 staging: rtl8188eu: rtw_io.h: Remove unused structures
In reply to navin patidar--- drivers/staging/rtl8188eu/include/rtw_io.h | 85 ---------------------------- 1 file changed, 85 deletions(-)
drivers/staging/rtl8188eu/include/rtw_io.h +0 -85
@@ -142,91 +142,6 @@ struct intf_hdl {struct _io_ops io_ops; }; -struct reg_protocol_rd { -#ifdef __LITTLE_ENDIAN -/* DW1 */ -u32 NumOfTrans:4 ; -u32 Reserved1:4 ; -u32 Reserved2:24 ; -/* DW2 */ -u32 ByteCount:7 ; -u32 WriteEnable:1 ;/* 0:read, 1:write */ -u32 FixOrContinuous:1 ;/* 0:continuous, 1: Fix */ -u32 BurstMode:1 ; -u32 Byte1Access:1 ; -u32 Byte2Access:1 ; -u32 Byte4Access:1 ; -u32 Reserved3:3 ; -u32 Reserved4:16 ; -/* DW3 */ -u32 BusAddress; -/* DW4 */ -/* u32 Value; */ -#else -/* DW1 */ -u32 Reserved1:4 ; -u32 NumOfTrans:4 ; -u32 Reserved2:24 ; -/* DW2 */ -u32 WriteEnable:1 ; -u32 ByteCount:7 ; -u32 Reserved3:3 ; -u32 Byte4Access:1 ; - -u32 Byte2Access:1 ; -u32 Byte1Access:1 ; -u32 BurstMode:1 ; -u32 FixOrContinuous:1 ; -u32 Reserved4:16 ; -/* DW3 */ -u32 BusAddress; - -/* DW4 */ -#endif -}; - -struct reg_protocol_wt { -#ifdef __LITTLE_ENDIAN -/* DW1 */ -u32 NumOfTrans:4 ; -u32 Reserved1:4 ; -u32 Reserved2:24 ; -/* DW2 */ -u32 ByteCount:7 ; -u32 WriteEnable:1 ;/* 0:read, 1:write */ -u32 FixOrContinuous:1 ;/* 0:continuous, 1: Fix */ -u32 BurstMode:1 ; -u32 Byte1Access:1 ; -u32 Byte2Access:1 ; -u32 Byte4Access:1 ; -u32 Reserved3:3 ; -u32 Reserved4:16 ; -/* DW3 */ -u32 BusAddress; -/* DW4 */ -u32 Value; -#else -/* DW1 */ -u32 Reserved1:4 ; -u32 NumOfTrans:4 ; -u32 Reserved2:24 ; -/* DW2 */ -u32 WriteEnable:1 ; -u32 ByteCount:7 ; -u32 Reserved3:3 ; -u32 Byte4Access:1 ; -u32 Byte2Access:1 ; -u32 Byte1Access:1 ; -u32 BurstMode:1 ; -u32 FixOrContinuous:1 ; -u32 Reserved4:16 ; -/* DW3 */ -u32 BusAddress; -/* DW4 */ -u32 Value; -#endif -}; -/* Below is the data structure used by _io_handler */
Signature · 1 line
1.7.10.4
PATCH 10/13 staging: rtl8188eu: HalPhyRf_8188e.c: Remove unused macro
In reply to navin patidar--- drivers/staging/rtl8188eu/hal/HalPhyRf_8188e.c | 1 - 1 file changed, 1 deletion(-)
drivers/staging/rtl8188eu/hal/HalPhyRf_8188e.c +0 -1
@@ -489,7 +489,6 @@ odm_TXPowerTrackingCallback_ThermalMeter_8188E(/* 1 7. IQK */ #define MAX_TOLERANCE 5 -#define IQK_DELAY_TIME 1/* ms */ static u8 /* bit0 = 1 => Tx OK, bit1 = 1 => Rx OK */ phy_PathA_IQK_8188E (struct adapter *adapt,bool configPathB)
Signature · 1 line
1.7.10.4
PATCH 11/13 staging: rtl8188eu: HalPhyRf_8188e.c: Remove unnecessary comments
In reply to navin patidar--- drivers/staging/rtl8188eu/hal/HalPhyRf_8188e.c | 37 ++++-------------------- 1 file changed, 6 insertions(+), 31 deletions(-)
drivers/staging/rtl8188eu/hal/HalPhyRf_8188e.c +6 -31
@@ -1,5 +1,4 @@ - -/****************************************************************************** +/* * * Copyright(c) 2007 - 2011 Realtek Corporation. All rights reserved. *
@@ -15,17 +14,13 @@* You should have received a copy of the GNU General Public License along with * this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA -* -* -******************************************************************************/ +*/ #include "odm_precomp.h" -/*---------------------------Define Local Constant---------------------------*/ /* 2010/04/25 MH Define the max tx power tracking tx agc power. */ #define ODM_TXPWRTRACK_MAX_IDX_88E 6 -/*---------------------------Define Local Constant---------------------------*/ u8 ODM_GetRightChnlPlaceforIQK (u8 chnl) {
@@ -47,27 +42,19 @@ u8 ODM_GetRightChnlPlaceforIQK(u8 chnl)return 0 ; } -/* 3============================================================ */ /* 3 Tx Power Tracking */ -/* 3============================================================ */ -/*----------------------------------------------------------------------------- +/* * Function: ODM_TxPwrTrackAdjust88E() * * Overview: 88E we can not write 0xc80/c94/c4c/ 0xa2x. Instead of write TX agc. * No matter OFDM & CCK use the same method. * -* Input: NONE -* -* Output: NONE -* -* Return: NONE -* * Revised History: * When Who Remark * 04/23/2012 MHC Create Version 0. * 04/23/2012 MHC Adjust TX agc directly not throughput BB digital. * -*---------------------------------------------------------------------------*/ +*/ void ODM_TxPwrTrackAdjust88E (struct odm_dm_struct *dm_odm,u8 Type,/* 0 = OFDM, 1 = CCK */ u8 *pDirection,/* 1 = +(increase) 2 = -(decrease) */ u32 *pOutWriteVal /* Tx tracking CCK/OFDM BB swing index adjust */
@@ -116,23 +103,12 @@ void ODM_TxPwrTrackAdjust88E(struct odm_dm_struct *dm_odm, u8 Type,/* 0 = OFDM, *pOutWriteVal = pwr_value | (pwr_value<<8 ) | (pwr_value<<16 ) | (pwr_value<<24 ); }/* ODM_TxPwrTrackAdjust88E */ -/*----------------------------------------------------------------------------- +/* * Function: odm_TxPwrTrackSetPwr88E() * * Overview: 88E change all channel tx power accordign to flag. * OFDM & CCK are all different. -* -* Input: NONE -* -* Output: NONE -* -* Return: NONE -* -* Revised History: -* When Who Remark -* 04/23/2012 MHC Create Version 0. -* -*---------------------------------------------------------------------------*/ +*/ static void odm_TxPwrTrackSetPwr88E (struct odm_dm_struct *dm_odm) {if (dm_odm->BbSwingFlagOfdm || dm_odm->BbSwingFlagCck) {
@@ -143,7 +119,6 @@ static void odm_TxPwrTrackSetPwr88E(struct odm_dm_struct *dm_odm) } }/* odm_TxPwrTrackSetPwr88E */ -/* 091212 chiyokolin */ void odm_TXPowerTrackingCallback_ThermalMeter_8188E ( struct adapter *Adapter
Signature · 1 line
1.7.10.4
PATCH 1/1 staging: rtl8188eu: os_dep: usb_intf.c: Cleaning up unnecessary code
In reply to navin patidarFrom: Rickard Strandqvist <[email protected]>
Removes unnecessary code that does not do anything useful.
This was partly found using a static code analysis program called cppcheck.
--- drivers/staging/rtl8188eu/os_dep/usb_intf.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-)
drivers/staging/rtl8188eu/os_dep/usb_intf.c +1 -7
@@ -563,14 +563,8 @@ static int rtw_resume(struct usb_interface *pusb_intf) {struct dvobj_priv *dvobj =usb_get_intfdata (pusb_intf);struct adapter *padapter = dvobj->if1; -struct pwrctrl_priv *pwrpriv = &padapter->pwrctrlpriv; -int ret =0 ; -if (pwrpriv->bInternalAutoSuspend) - ret =rtw_resume_process (padapter); -else - ret =rtw_resume_process (padapter); -return ret; +return rtw_resume_process (padapter); }int rtw_resume_process (struct adapter *padapter)
Signature · 1 line
1.7.10.4
Re: [PATCH] staging: rtl8188eu: os_dep: usb_intf.c: Cleaning up unnecessary code
sorry, my script picked up Rickard's patch and send it out again along my patches.
I need to fix my script.
regards,
navin patidar
Quoted 33 lines · navin patidar
From: Rickard Strandqvist <[email protected]>
Removes unnecessary code that does not do anything useful.
This was partly found using a static code analysis program called cppcheck.
Signed-off-by Rickard Strandqvist <[email protected]>--- drivers/staging/rtl8188eu/os_dep/usb_intf.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-)drivers/staging/rtl8188eu/os_dep/usb_intf.c +1
-8@@ -563,14 +563,8 @@ static int rtw_resume(struct usb_interface *pusb_intf) {struct dvobj_priv *dvobj =usb_get_intfdata (pusb_intf);struct adapter *padapter = dvobj->if1; -struct pwrctrl_priv *pwrpriv = &padapter->pwrctrlpriv; -int ret =0 ; -if (pwrpriv->bInternalAutoSuspend) - ret =rtw_resume_process (padapter); -else - ret =rtw_resume_process (padapter); -return ret; +return rtw_resume_process (padapter); }int rtw_resume_process (struct adapter *padapter) --1.7.10.4