staging: rtl8723bs: remove DBG_8192C tracing macro
cover staging: rtl8723bs: remove DBG_8192C tracing macro
This patchset remove from rtl8723bs driver the tracing macro DBG_8192C.
This macro belongs to a verbose private tracing family, which by default is set to _do nothing_. The only way to activate the tracing is to manually define a symbol in code.
First patch applies the following semantic patch:
@@
expression a, b, c, d, e, f, g, h, i, j, k;
constant B, C, D, E;
@@
(
- DBG_8192C(a);
|
- DBG_8192C(a, b);
|
- DBG_8192C(a, B);
|
- DBG_8192C(a, b, c);
|
- DBG_8192C(a, B, c);
|
- DBG_8192C(a, b, C);
|
- DBG_8192C(a, B, C);
|
- DBG_8192C(a, b, c, d);
|
- DBG_8192C(a, B, c, d);
|
- DBG_8192C(a, b, C, d);
|
- DBG_8192C(a, b, c, D);
|
- DBG_8192C(a, B, C, d);
|
- DBG_8192C(a, B, c, D);
|
- DBG_8192C(a, b, C, D);
|
- DBG_8192C(a, B, C, D);
|
- DBG_8192C(a, b, c, d, e);
|
- DBG_8192C(a, B, c, d, e);
|
- DBG_8192C(a, b, C, d, e);
|
- DBG_8192C(a, b, c, D, e);
|
- DBG_8192C(a, b, c, d, E);
|
- DBG_8192C(a, B, C, d, e);
|
- DBG_8192C(a, B, c, D, e);
|
- DBG_8192C(a, B, c, d, E);
|
- DBG_8192C(a, b, C, D, e);
|
- DBG_8192C(a, b, C, d, E);
|
- DBG_8192C(a, b, c, D, E);
|
- DBG_8192C(a, B, C, D, e);
|
- DBG_8192C(a, B, C, d, E);
|
- DBG_8192C(a, B, c, D, E);
|
- DBG_8192C(a, b, C, D, E);
|
- DBG_8192C(a, B, C, D, E);
|
- DBG_8192C(a, b, c, d, e, f);
|
- DBG_8192C(a, b, c, d, e, f, g);
|
- DBG_8192C(a, b, c, d, e, f, g, h);
|
- DBG_8192C(a, b, c, d, e, f, g, h, i);
|
- DBG_8192C(a, b, c, d, e, f, g, h, i, j);
|
- DBG_8192C(a, b, c, d, e, f, g, h, i, j, k);
)
Second patch removes all commented out call of macro.
Third patch removes macro definitions.
All subsequent patches do some code cleaning in all places left empty by deleted macro, such as empty #ifdef blocks, conditional code blocks guarded by never defined symbols if-else blocks, for cycles, commented debug symbol definitions, unnecessary parentheses and some other checkpatch issues.
Fabio Aiuto (25):
staging: rtl8723bs: remove all DBG_8192C logs
staging: rtl8723bs: remove all commented out DBG_8192C logs
staging: rtl8723bs: remove DBG_8192C macro definitions
staging: rtl8723bs: remove all if-blocks left empty by
DBG_8192C-remove coccinelle script
staging: rtl8723bs: put spaces around operators
staging: rtl8723bs: remove unused code blocks guarded by DEBUG_RTL871X
staging: rtl8723bs: remove commented out DEBUG_RTL871X definition
staging: rtl8723bs: remove code blocks guarded by DEBUG symbol
staging: rtl8723bs: remove empty code block guarded by DBG_CCX
staging: rtl8723bs: remove code block guarded by undefined
SDIO_DEBUG_IO
staging: rtl8723bs: remove commented out SDIO_DEBUG_IO symbol
definition
staging: rtl8723bs: remove empty ifdef blocks conditioned to
DEBUG_CFG80211 definition
staging: rtl8723bs: remove commented out DEBUG_CFG80211 symbol
definition
staging: rtl8723bs: remove unnecessary bracks
staging: rtl8723bs: fix comparison to null
staging: rtl8723bs: put spaces around operators
staging: rtl8723bs: split long line
staging: rtl8723bs: put constant on the right side of the test
staging: rtl8723bs: remove empty if and else blocks
staging: rtl8723bs: put constant on the right side of a test in
os_dep/ioctl_cfg80211.c
staging: rtl8723bs: remove unnecessary parentheses in
os_dep/ioctl_cfg80211.c staging: rtl8723bs: remove empty else block in os_dep/ioctl_cfg80211.c
staging: rtl8723bs: fix comparison to true issue
staging: rtl8723bs: remove more unnecessary parentheses
staging: rtl8723bs: remove more empty if blocks after DBG_8192C
deletion
drivers/staging/rtl8723bs/core/rtw_debug.c | 35 --- .../staging/rtl8723bs/core/rtw_ieee80211.c | 1 - drivers/staging/rtl8723bs/core/rtw_mlme_ext.c | 21 -- drivers/staging/rtl8723bs/core/rtw_pwrctrl.c | 7 - .../staging/rtl8723bs/core/rtw_wlan_util.c | 3 - drivers/staging/rtl8723bs/core/rtw_xmit.c | 7 +- drivers/staging/rtl8723bs/hal/hal_com.c | 10 +- drivers/staging/rtl8723bs/hal/odm.c | 1 - drivers/staging/rtl8723bs/hal/rtl8723b_cmd.c | 48 +--- .../staging/rtl8723bs/hal/rtl8723b_hal_init.c | 263 +++--------------- .../staging/rtl8723bs/hal/rtl8723b_phycfg.c | 2 - .../staging/rtl8723bs/hal/rtl8723b_rxdesc.c | 3 - .../staging/rtl8723bs/hal/rtl8723bs_recv.c | 15 +- drivers/staging/rtl8723bs/hal/sdio_halinit.c | 19 +- drivers/staging/rtl8723bs/hal/sdio_ops.c | 39 +-- drivers/staging/rtl8723bs/include/autoconf.h | 7 - drivers/staging/rtl8723bs/include/rtw_debug.h | 10 - .../staging/rtl8723bs/os_dep/ioctl_cfg80211.c | 216 +------------- .../staging/rtl8723bs/os_dep/ioctl_linux.c | 6 - drivers/staging/rtl8723bs/os_dep/sdio_intf.c | 35 +-- 20 files changed, 69 insertions(+), 679 deletions(-)
Signature · 1 line
2.20.1
PATCH 1/25 staging: rtl8723bs: remove all DBG_8192C logs
remove all DBG_8192C logs.
Macro DBG_8192C belongs to a family of verbose
private tracing macros.
The default behaviour is _do nothing_, to activate it one should define DEBUG symbol by hand.
So just remove it with the following semantic patch:
@@
expression a, b, c, d, e, f, g, h, i, j, k;
constant B, C, D, E;
@@
(
- DBG_8192C(a);
|
- DBG_8192C(a, b);
|
- DBG_8192C(a, B);
|
- DBG_8192C(a, b, c);
|
- DBG_8192C(a, B, c);
|
- DBG_8192C(a, b, C);
|
- DBG_8192C(a, B, C);
|
- DBG_8192C(a, b, c, d);
|
- DBG_8192C(a, B, c, d);
|
- DBG_8192C(a, b, C, d);
|
- DBG_8192C(a, b, c, D);
|
- DBG_8192C(a, B, C, d);
|
- DBG_8192C(a, B, c, D);
|
- DBG_8192C(a, b, C, D);
|
- DBG_8192C(a, B, C, D);
|
- DBG_8192C(a, b, c, d, e);
|
- DBG_8192C(a, B, c, d, e);
|
- DBG_8192C(a, b, C, d, e);
|
- DBG_8192C(a, b, c, D, e);
|
- DBG_8192C(a, b, c, d, E);
|
- DBG_8192C(a, B, C, d, e);
|
- DBG_8192C(a, B, c, D, e);
|
- DBG_8192C(a, B, c, d, E);
|
- DBG_8192C(a, b, C, D, e);
|
- DBG_8192C(a, b, C, d, E);
|
- DBG_8192C(a, b, c, D, E);
|
- DBG_8192C(a, B, C, D, e);
|
- DBG_8192C(a, B, C, d, E);
|
- DBG_8192C(a, B, c, D, E);
|
- DBG_8192C(a, b, C, D, E);
|
- DBG_8192C(a, B, C, D, E);
|
- DBG_8192C(a, b, c, d, e, f);
|
- DBG_8192C(a, b, c, d, e, f, g);
|
- DBG_8192C(a, b, c, d, e, f, g, h);
|
- DBG_8192C(a, b, c, d, e, f, g, h, i);
|
- DBG_8192C(a, b, c, d, e, f, g, h, i, j);
|
- DBG_8192C(a, b, c, d, e, f, g, h, i, j, k);
)
--- drivers/staging/rtl8723bs/core/rtw_mlme_ext.c | 1 - drivers/staging/rtl8723bs/core/rtw_pwrctrl.c | 7 - drivers/staging/rtl8723bs/core/rtw_xmit.c | 4 - drivers/staging/rtl8723bs/hal/hal_com.c | 7 - drivers/staging/rtl8723bs/hal/rtl8723b_cmd.c | 21 --- .../staging/rtl8723bs/hal/rtl8723b_hal_init.c | 123 ----------------- .../staging/rtl8723bs/hal/rtl8723b_phycfg.c | 2 - .../staging/rtl8723bs/hal/rtl8723bs_recv.c | 9 -- drivers/staging/rtl8723bs/hal/sdio_halinit.c | 7 - drivers/staging/rtl8723bs/hal/sdio_ops.c | 17 +-- .../staging/rtl8723bs/os_dep/ioctl_cfg80211.c | 124 +----------------- .../staging/rtl8723bs/os_dep/ioctl_linux.c | 6 - drivers/staging/rtl8723bs/os_dep/sdio_intf.c | 6 - 13 files changed, 9 insertions(+), 325 deletions(-)
drivers/staging/rtl8723bs/core/rtw_mlme_ext.c +0 -1
@@ -4405,7 +4405,6 @@ static void process_80211d(struct adapter *padapter, struct wlan_bssid_ex *bssid#ifdef DEBUG_RTL871X i =0 ;while ((i < chplan_ap.Len) && (chplan_ap.Channel[i] !=0 )) { -DBG_8192C ("%02d," , chplan_ap.Channel[i]); i++; }#endif
drivers/staging/rtl8723bs/core/rtw_pwrctrl.c +0 -7
@@ -1072,9 +1072,7 @@ int _rtw_pwr_wakeup(struct adapter *padapter, u32 ips_deffer_ms, const char *calif (rf_off == pwrpriv->rf_pwrstate) { { -DBG_8192C ("%s call ips_leave....\n" , __func__);if (ips_leave (padapter) == _FAIL) { -DBG_8192C ("======> ips_leave fail.............\n" ); ret = _FAIL; goto exit; }
@@ -1083,11 +1081,6 @@ int _rtw_pwr_wakeup(struct adapter *padapter, u32 ips_deffer_ms, const char *cal/* TODO: the following checking need to be merged... */ if (padapter->bDriverStopped || !padapter->bup || !padapter->hw_init_completed) { -DBG_8192C ("%s: bDriverStopped =%d, bup =%d, hw_init_completed =%u\n" - , caller - , padapter->bDriverStopped - , padapter->bup - , padapter->hw_init_completed); ret = false; goto exit; }
drivers/staging/rtl8723bs/core/rtw_xmit.c +0 -4
@@ -1036,7 +1036,6 @@ s32 rtw_xmitframe_coalesce(struct adapter *padapter, struct sk_buff *pkt, structs32 res = _SUCCESS;if (!pxmitframe->buf_addr) { -DBG_8192C ("==> %s buf_addr == NULL\n" , __func__);return _FAIL; }
@@ -1046,7 +1045,6 @@ s32 rtw_xmitframe_coalesce(struct adapter *padapter, struct sk_buff *pkt, struct mem_start = pbuf_start + hw_hdr_offset;if (rtw_make_wlanhdr (padapter, mem_start, pattrib) == _FAIL) { -DBG_8192C ("rtw_xmitframe_coalesce: rtw_make_wlanhdr fail; drop pkt\n" ); res = _FAIL; goto exit; }
@@ -1121,7 +1119,6 @@ s32 rtw_xmitframe_coalesce(struct adapter *padapter, struct sk_buff *pkt, struct }if (xmitframe_addmic (padapter, pxmitframe) == _FAIL) { -DBG_8192C ("xmitframe_addmic(padapter, pxmitframe) == _FAIL\n" ); res = _FAIL; goto exit; }
@@ -1808,7 +1805,6 @@ s32 rtw_xmit_classifier(struct adapter *padapter, struct xmit_frame *pxmitframe)if (!psta) { res = _FAIL; -DBG_8192C ("rtw_xmit_classifier: psta == NULL\n" ); goto exit; }
drivers/staging/rtl8723bs/hal/hal_com.c +0 -7
@@ -19,7 +19,6 @@ u8 rtw_hal_data_init(struct adapter *padapter) padapter->hal_data_sz =sizeof (struct hal_com_data ); padapter->HalData =vzalloc (padapter->hal_data_sz);if (!padapter->HalData) { -DBG_8192C ("cannot alloc memory for HAL DATA\n" );return _FAIL; } }
@@ -1129,15 +1128,12 @@ u8 SetHalDefVar(if (dm_func ==0 ) {/* disable all dynamic func */ odm->SupportAbility =DYNAMIC_FUNC_DISABLE ; -DBG_8192C ("==> Disable all dynamic function...\n" ); }else if (dm_func ==1 ) {/* disable DIG */ odm->SupportAbility &= (~DYNAMIC_BB_DIG ); -DBG_8192C ("==> Disable DIG...\n" ); }else if (dm_func ==2 ) {/* disable High power */ odm->SupportAbility &= (~DYNAMIC_BB_DYNAMIC_TXPWR ); }else if (dm_func ==3 ) {/* disable tx power tracking */ odm->SupportAbility &= (~DYNAMIC_RF_CALIBRATION ); -DBG_8192C ("==> Disable tx power tracking...\n" ); }else if (dm_func ==4 ) {/* disable BT coexistence */ dm->DMFlag &= (~DYNAMIC_FUNC_BT ); }else if (dm_func ==5 ) {/* disable antenna diversity */
@@ -1149,7 +1145,6 @@ u8 SetHalDefVar( } dm->DMFlag |=DYNAMIC_FUNC_BT ; odm->SupportAbility =DYNAMIC_ALL_FUNC_ENABLE ; -DBG_8192C ("==> Turn on all dynamic function...\n" ); } }break ;
@@ -1254,10 +1249,8 @@ void SetHalODMVar( {struct sta_info *psta = pValue1;if (bSet) { -DBG_8192C ("### Set STA_(%d) info ###\n" , psta->mac_id);ODM_CmnInfoPtrArrayHook (podmpriv,ODM_CMNINFO_STA_STATUS , psta->mac_id, psta); }else { -DBG_8192C ("### Clean STA_(%d) info ###\n" , psta->mac_id);/* spin_lock_bh(&pHalData->odm_stainfo_lock); */ ODM_CmnInfoPtrArrayHook (podmpriv,ODM_CMNINFO_STA_STATUS , psta->mac_id,NULL );
drivers/staging/rtl8723bs/hal/rtl8723b_cmd.c +0 -21
@@ -77,7 +77,6 @@ s32 FillH2CCmd8723B(struct adapter *padapter, u8 ElementID, u32 CmdLen, u8 *pCmd h2c_box_num = pHalData->LastHMEBoxNum;if (!_is_fw_read_cmd_down (padapter, h2c_box_num)) { -DBG_8192C (" fw read cmd failed...\n" );/* DBG_8192C(" 0x1c0: 0x%8x\n", rtw_read32(padapter, 0x1c0)); */ /* DBG_8192C(" 0x1c4: 0x%8x\n", rtw_read32(padapter, 0x1c4)); */ goto exit;
@@ -667,9 +666,6 @@ void rtl8723b_download_rsvd_page(struct adapter *padapter, u8 mstatus)u32 poll =0 ;u8 val8; -DBG_8192C ("+" FUNC_ADPT_FMT ": iface_type =%d mstatus(%x)\n" , -FUNC_ADPT_ARG (padapter),get_iface_type (padapter), mstatus); -if (mstatus ==RT_MEDIA_CONNECT ) {bool bRecover = false;u8 v8;
@@ -869,7 +865,6 @@ static void SetFwRsvdPagePkt_BTCoex(struct adapter *padapter) pcmdframe =rtw_alloc_cmdxmitframe (pxmitpriv);if (!pcmdframe) { -DBG_8192C ("%s: alloc ReservedPagePacket fail!\n" , __func__);return ; }
@@ -913,8 +908,6 @@ static void SetFwRsvdPagePkt_BTCoex(struct adapter *padapter) TotalPacketLen = BufIndex + BTQosNullLength;if (TotalPacketLen > MaxRsvdPageBufSize) { -DBG_8192C (FUNC_ADPT_FMT ": ERROR: The rsvd page size is not enough!!TotalPacketLen %d, MaxRsvdPageBufSize %d\n" , -FUNC_ADPT_ARG (padapter), TotalPacketLen, MaxRsvdPageBufSize); goto error; }
@@ -947,14 +940,8 @@ void rtl8723b_download_BTCoex_AP_mode_rsvd_page(struct adapter *padapter)u32 poll =0 ;u8 val8; - -DBG_8192C ("+" FUNC_ADPT_FMT ": iface_type =%d fw_state = 0x%08X\n" , -FUNC_ADPT_ARG (padapter),get_iface_type (padapter),get_fwstate (&padapter->mlmepriv)); -#ifdef DEBUG if (check_fwstate (&padapter->mlmepriv,WIFI_AP_STATE ) == false) { -DBG_8192C (FUNC_ADPT_FMT ": [WARNING] not in AP mode!!\n" , -FUNC_ADPT_ARG (padapter)); }#endif /* DEBUG */
@@ -1008,15 +995,7 @@ void rtl8723b_download_BTCoex_AP_mode_rsvd_page(struct adapter *padapter)if (bcn_valid) {struct pwrctrl_priv *pwrctl =adapter_to_pwrctl (padapter); pwrctl->fw_psmode_iface_id = padapter->iface_id; -DBG_8192C ("%s: DL RSVD page success! DLBcnCount:%d, poll:%d\n" , -ADPT_ARG (padapter), DLBcnCount, poll); }else { -DBG_8192C ("%s: DL RSVD page fail! DLBcnCount:%d, poll:%d\n" , -ADPT_ARG (padapter), DLBcnCount, poll); -DBG_8192C ("%s: DL RSVD page fail! bSurpriseRemoved =%d\n" , -ADPT_ARG (padapter), padapter->bSurpriseRemoved); -DBG_8192C ("%s: DL RSVD page fail! bDriverStopped =%d\n" , -ADPT_ARG (padapter), padapter->bDriverStopped); }/* 2010.05.11. Added by tynli. */
drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c +0 -123
488 lines not on this page · raw message
drivers/staging/rtl8723bs/hal/rtl8723b_phycfg.c +0 -2
@@ -733,8 +733,6 @@ static void phy_SwChnl8723B(struct adapter *padapter) pHalData->RfRegChnlVal[0 ] = ((pHalData->RfRegChnlVal[0 ] &0xfffff00 ) | channelToSW);PHY_SetRFReg (padapter,ODM_RF_PATH_A ,RF_CHNLBW ,0x3FF , pHalData->RfRegChnlVal[0 ]);PHY_SetRFReg (padapter,ODM_RF_PATH_B ,RF_CHNLBW ,0x3FF , pHalData->RfRegChnlVal[0 ]); - -DBG_8192C ("===>phy_SwChnl8723B: Channel = %d\n" , channelToSW); }static void phy_SwChnlAndSetBwMode8723B (struct adapter *Adapter)
drivers/staging/rtl8723bs/hal/rtl8723bs_recv.c +0 -9
@@ -183,7 +183,6 @@ static inline union recv_frame *try_alloc_recvframe(struct recv_priv *precvpriv, precvframe =rtw_alloc_recvframe (&precvpriv->free_recv_queue);if (!precvframe) { -DBG_8192C ("%s: no enough recv frame!\n" , __func__);rtw_enqueue_recvbuf_to_head (precvbuf, &precvpriv->recv_buf_pending_queue);
@@ -202,8 +201,6 @@ static inline bool rx_crc_err(struct recv_priv *precvpriv, {/* fix Hardware RX data error, drop whole recv_buffer */ if ((!(p_hal_data->ReceiveConfig &RCR_ACRC32 )) && pattrib->crc_err) { -DBG_8192C ("%s()-%d: RX Warning! rx CRC ERROR !!\n" , - __func__, __LINE__);rtw_free_recvframe (precvframe, &precvpriv->free_recv_queue);return true; }
@@ -216,8 +213,6 @@ static inline bool pkt_exceeds_tail(struct recv_priv *precvpriv, union recv_frame *precvframe) {if (end > tail) { -DBG_8192C ("%s()-%d: : next pkt len(%p,%d) exceed ptail(%p)!\n" , - __func__, __LINE__, ptr, pkt_offset, precvbuf->ptail);rtw_free_recvframe (precvframe, &precvpriv->free_recv_queue);return true; }
@@ -276,9 +271,6 @@ static void rtl8723bs_recv_tasklet(struct tasklet_struct *t)break ;if ((pattrib->crc_err) || (pattrib->icv_err)) { -DBG_8192C ("%s: crc_err =%d icv_err =%d, skip!\n" , - __func__, pattrib->crc_err, - pattrib->icv_err);rtw_free_recvframe (precvframe, &precvpriv->free_recv_queue); }else {
@@ -307,7 +299,6 @@ static void rtl8723bs_recv_tasklet(struct tasklet_struct *t) pkt_copy =rtw_skb_alloc (alloc_sz);if (!pkt_copy) { -DBG_8192C ("%s: alloc_skb fail, drop frame\n" , __func__);rtw_free_recvframe (precvframe, &precvpriv->free_recv_queue);break ; }
drivers/staging/rtl8723bs/hal/sdio_halinit.c +0 -7
@@ -133,7 +133,6 @@ static void _init_available_page_threshold(struct adapter *padapter, u8 numHQ, urtw_write16 (padapter,0x218 , HQ_threshold);rtw_write16 (padapter,0x21A , NQ_threshold);rtw_write16 (padapter,0x21C , LQ_threshold); -DBG_8192C ("%s(): Enable Tx FIFO Page Threshold H:0x%x, N:0x%x, L:0x%x\n" , __func__, HQ_threshold, NQ_threshold, LQ_threshold); }static void _InitQueueReservedPage (struct adapter *padapter)
@@ -579,7 +578,6 @@ static void _InitRFType(struct adapter *padapter) pHalData->rf_chip =RF_6052 ; pHalData->rf_type =RF_1T1R ; -DBG_8192C ("Set RF Chip ID to RF_6052 and RF type to 1T1R.\n" ); }static void _RfPowerSave (struct adapter *padapter)
@@ -605,8 +603,6 @@ static bool HalDetectPwrDownMode(struct adapter *Adapter)else pHalData->pwrdown = false; -DBG_8192C ("HalDetectPwrDownMode(): PDN =%d\n" , pHalData->pwrdown); -return pHalData->pwrdown; }/* HalDetectPwrDownMode */
@@ -743,7 +739,6 @@ static u32 rtl8723bs_hal_init(struct adapter *padapter)/* init LLT after tx buffer boundary is defined */ ret =rtl8723b_InitLLTTable (padapter);if (_SUCCESS != ret) { -DBG_8192C ("%s: Failed to init LLT Table!\n" , __func__);return _FAIL; }/* */
@@ -891,7 +886,6 @@ static void CardDisableRTL8723BSdio(struct adapter *padapter)/* Run LPS WL RFOFF flow */ ret =HalPwrSeqCmdParsing (padapter,PWR_CUT_ALL_MSK ,PWR_FAB_ALL_MSK ,PWR_INTF_SDIO_MSK , rtl8723B_enter_lps_flow);if (ret == _FAIL) { -DBG_8192C (KERN_ERR "%s: run RF OFF flow fail!\n" , __func__); }/* ==== Reset digital sequence ====== */
@@ -924,7 +918,6 @@ static void CardDisableRTL8723BSdio(struct adapter *padapter)rtw_hal_set_hwreg (padapter,HW_VAR_APFM_ON_MAC , &bMacPwrCtrlOn); ret =HalPwrSeqCmdParsing (padapter,PWR_CUT_ALL_MSK ,PWR_FAB_ALL_MSK ,PWR_INTF_SDIO_MSK , rtl8723B_card_disable_flow);if (!ret) { -DBG_8192C (KERN_ERR "%s: run CARD DISABLE flow fail!\n" , __func__); } }
drivers/staging/rtl8723bs/hal/sdio_ops.c +6 -11
@@ -183,7 +183,6 @@ static u32 sdio_read32(struct intf_hdl *intfhdl, u32 addr) #ifdef SDIO_DEBUG_IO } -DBG_8192C (KERN_ERR "%s: Mac Power off, Read FAIL(%d)! addr = 0x%x\n" , __func__, err, addr);return SDIO_ERR_VAL32 ;#endif }
@@ -197,7 +196,6 @@ static u32 sdio_read32(struct intf_hdl *intfhdl, u32 addr) tmpbuf =rtw_malloc (8 );if (!tmpbuf) { -DBG_8192C (KERN_ERR "%s: Allocate memory FAIL!(size =8) addr = 0x%x\n" , __func__, addr);return SDIO_ERR_VAL32 ; }
@@ -599,10 +597,10 @@ s32 sdio_local_write(u8 *tmpbuf;if (addr &0x3 ) -DBG_8192C ("%s, address must be 4 bytes alignment\n" , __func__); + {}if (cnt &0x3 ) -DBG_8192C ("%s, size must be the multiple of 4\n" , __func__); + {} intfhdl = &adapter->iopriv.intf;
@@ -923,22 +921,19 @@ void sd_int_dpc(struct adapter *adapter)hal_sdio_get_cmd_addr_8723b (adapter,WLAN_IOREG_DEVICE_ID , addr, &addr);_sd_read (intfhdl, addr,4 , status);_sd_write (intfhdl, addr,4 , status); -DBG_8192C ("%s: SDIO_HISR_TXERR (0x%08x)\n" , __func__,le32_to_cpu (*(u32 *)status));kfree (status); }else { -DBG_8192C ("%s: SDIO_HISR_TXERR, but can't allocate memory to read status!\n" , __func__); } }if (hal->sdio_hisr &SDIO_HISR_TXBCNOK ) -DBG_8192C ("%s: SDIO_HISR_TXBCNOK\n" , __func__); + {}if (hal->sdio_hisr &SDIO_HISR_TXBCNERR ) -DBG_8192C ("%s: SDIO_HISR_TXBCNERR\n" , __func__); + {}if (hal->sdio_hisr &SDIO_HISR_C2HCMD ) {struct c2h_evt_hdr_88xx *c2h_evt; -DBG_8192C ("%s: C2H Command\n" , __func__); c2h_evt =rtw_zmalloc (16 );if (c2h_evt) {if (c2h_evt_read_88xx (adapter, (u8 *)c2h_evt) == _SUCCESS) {
@@ -958,10 +953,10 @@ void sd_int_dpc(struct adapter *adapter) }if (hal->sdio_hisr &SDIO_HISR_RXFOVW ) -DBG_8192C ("%s: Rx Overflow\n" , __func__); + {}if (hal->sdio_hisr &SDIO_HISR_RXERR ) -DBG_8192C ("%s: Rx Error\n" , __func__); + {}if (hal->sdio_hisr &SDIO_HISR_RX_REQUEST ) {struct recv_buf *recvbuf;
drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c +3 -121
527 lines not on this page · raw message
drivers/staging/rtl8723bs/os_dep/ioctl_linux.c +0 -6
@@ -4248,14 +4248,12 @@ static int rtw_ioctl_wext_private(struct net_device *dev, union iwreq_data *wrq_sscanf (ptr,"%16s" , cmdname); cmdlen =strlen (cmdname); -DBG_8192C ("%s: cmd =%s\n" , __func__, cmdname);/* skip command string */ if (cmdlen >0 ) cmdlen +=1 ;/* skip one space */ ptr += cmdlen; len -= cmdlen; -DBG_8192C ("%s: parameters =%s\n" , __func__, ptr); priv = rtw_private_handler; priv_args = rtw_private_args;
@@ -4366,15 +4364,12 @@ static int rtw_ioctl_wext_private(struct net_device *dev, union iwreq_data *wrq_break ;default : -DBG_8192C ("%s: Not yet implemented...\n" , __func__); err =-1 ; goto exit; }if ((priv_args[k].set_args &IW_PRIV_SIZE_FIXED ) && (wdata.data.length != (priv_args[k].set_args &IW_PRIV_SIZE_MASK ))) { -DBG_8192C ("%s: The command %s needs exactly %d argument(s)...\n" , - __func__, cmdname, priv_args[k].set_args &IW_PRIV_SIZE_MASK ); err = -EINVAL ; goto exit; }
@@ -4492,7 +4487,6 @@ static int rtw_ioctl_wext_private(struct net_device *dev, union iwreq_data *wrq_break ;default : -DBG_8192C ("%s: Not yet implemented...\n" , __func__); err =-1 ; goto exit; }
drivers/staging/rtl8723bs/os_dep/sdio_intf.c +0 -6
@@ -130,14 +130,12 @@ static u32 sdio_init(struct dvobj_priv *dvobj) err =sdio_enable_func (func);if (err) { dvobj->drv_dbg.dbg_sdio_init_error_cnt++; -DBG_8192C (KERN_CRIT "%s: sdio_enable_func FAIL(%d)!\n" , __func__, err); goto release; } err =sdio_set_block_size (func,512 );if (err) { dvobj->drv_dbg.dbg_sdio_init_error_cnt++; -DBG_8192C (KERN_CRIT "%s: sdio_set_block_size FAIL(%d)!\n" , __func__, err); goto release; } psdio_data->block_transfer_len =512 ;
@@ -164,14 +162,12 @@ static void sdio_deinit(struct dvobj_priv *dvobj) err =sdio_disable_func (func);if (err) { dvobj->drv_dbg.dbg_sdio_deinit_error_cnt++; -DBG_8192C (KERN_ERR "%s: sdio_disable_func(%d)\n" , __func__, err); }if (dvobj->irq_alloc) { err =sdio_release_irq (func);if (err) { dvobj->drv_dbg.dbg_sdio_free_irq_error_cnt++; -DBG_8192C (KERN_ERR "%s: sdio_release_irq(%d)\n" , __func__, err); }else dvobj->drv_dbg.dbg_sdio_free_irq_cnt++; }
@@ -235,7 +231,6 @@ void rtw_set_hal_ops(struct adapter *padapter)static void sd_intf_start (struct adapter *padapter) {if (padapter ==NULL ) { -DBG_8192C (KERN_ERR "%s: padapter is NULL!\n" , __func__);return ; }
@@ -246,7 +241,6 @@ static void sd_intf_start(struct adapter *padapter)static void sd_intf_stop (struct adapter *padapter) {if (padapter ==NULL ) { -DBG_8192C (KERN_ERR "%s: padapter is NULL!\n" , __func__);return ; }
Signature · 1 line
2.20.1
PATCH 2/25 staging: rtl8723bs: remove all commented out DBG_8192C logs
In reply to Fabio Aiutoremove all commented out DBG_8192C logs.
Macro DBG_8192C belongs to a family of verbose
private tracing macros.
The default behaviour is _do nothing_, to activate it one should define DEBUG symbol by hand.
So just remove it
--- .../staging/rtl8723bs/core/rtw_ieee80211.c | 1 - .../staging/rtl8723bs/core/rtw_wlan_util.c | 3 --- drivers/staging/rtl8723bs/hal/odm.c | 1 - drivers/staging/rtl8723bs/hal/rtl8723b_cmd.c | 12 ----------- .../staging/rtl8723bs/hal/rtl8723b_hal_init.c | 21 ------------------- .../staging/rtl8723bs/hal/rtl8723b_rxdesc.c | 3 --- .../staging/rtl8723bs/hal/rtl8723bs_recv.c | 2 -- drivers/staging/rtl8723bs/hal/sdio_halinit.c | 4 ---- .../staging/rtl8723bs/os_dep/ioctl_cfg80211.c | 5 ----- 9 files changed, 52 deletions(-)
drivers/staging/rtl8723bs/core/rtw_ieee80211.c +0 -1
@@ -672,7 +672,6 @@ u8 rtw_is_wps_ie(u8 *ie_ptr, uint *wps_ielen) eid = ie_ptr[0 ];if ((eid ==WLAN_EID_VENDOR_SPECIFIC ) && (!memcmp (&ie_ptr[2 ], wps_oui,4 ))) { -/* DBG_8192C("==> found WPS_IE.....\n"); */ *wps_ielen = ie_ptr[1 ]+2 ; match = true; }
drivers/staging/rtl8723bs/core/rtw_wlan_util.c +0 -3
@@ -504,14 +504,11 @@ void read_cam(struct adapter *padapter, u8 entry, u8 *get_key) addr = entry <<3 ; -/* DBG_8192C("********* DUMP CAM Entry_#%02d***************\n", entry); */ for (j =0 ; j <6 ; j++) { cmd =_ReadCAM (padapter, addr+j); -/* DBG_8192C("offset:0x%02x => 0x%08x\n", addr+j, cmd); */ if (j >1 )/* get key from cam */ memcpy (get_key+(j-2 )*4 , &cmd,4 ); } -/* DBG_8192C("*********************************\n"); */ }void _write_cam (struct adapter *padapter,u8 entry,u16 ctrl,u8 *mac,u8 *key)
drivers/staging/rtl8723bs/hal/odm.c +0 -1
@@ -635,7 +635,6 @@ static void FindMinimumRSSI(struct adapter *padapter) }else pdmpriv->MinUndecoratedPWDBForDM = pdmpriv->EntryMinUndecoratedSmoothedPWDB; -/* DBG_8192C("%s =>MinUndecoratedPWDBForDM(%d)\n", __func__, pdmpriv->MinUndecoratedPWDBForDM); */ /* ODM_RT_TRACE(pDM_Odm, COMP_DIG, DBG_LOUD, ("MinUndecoratedPWDBForDM =%d\n", pHalData->MinUndecoratedPWDBForDM)); */ }
drivers/staging/rtl8723bs/hal/rtl8723b_cmd.c +0 -12
@@ -24,8 +24,6 @@ static u8 _is_fw_read_cmd_down(struct adapter *padapter, u8 msgbox_num)u8 valid; -/* DBG_8192C(" _is_fw_read_cmd_down , reg_1cc(%x), msg_box(%d)...\n", rtw_read8(padapter, REG_HMETFR), msgbox_num); */ - do { valid = rtw_read8(padapter, REG_HMETFR) & BIT(msgbox_num); if (0 == valid) {
@@ -77,8 +75,6 @@ s32 FillH2CCmd8723B(struct adapter *padapter, u8 ElementID, u32 CmdLen, u8 *pCmd h2c_box_num = pHalData->LastHMEBoxNum;if (!_is_fw_read_cmd_down (padapter, h2c_box_num)) { -/* DBG_8192C(" 0x1c0: 0x%8x\n", rtw_read32(padapter, 0x1c0)); */ -/* DBG_8192C(" 0x1c4: 0x%8x\n", rtw_read32(padapter, 0x1c4)); */ goto exit; }
@@ -99,9 +95,6 @@ s32 FillH2CCmd8723B(struct adapter *padapter, u8 ElementID, u32 CmdLen, u8 *pCmd msgbox_addr =REG_HMEBOX_0 + (h2c_box_num*MESSAGE_BOX_SIZE );rtw_write32 (padapter, msgbox_addr, h2c_cmd); -/* DBG_8192C("MSG_BOX:%d, CmdLen(%d), CmdID(0x%x), reg:0x%x =>h2c_cmd:0x%.8x, reg:0x%x =>h2c_cmd_ex:0x%.8x\n" */ -/* , pHalData->LastHMEBoxNum , CmdLen, ElementID, msgbox_addr, h2c_cmd, msgbox_ex_addr, h2c_cmd_ex); */ - pHalData->LastHMEBoxNum = (h2c_box_num+1 ) %MAX_H2C_BOX_NUMS ; }while (0 );
@@ -852,9 +845,6 @@ static void SetFwRsvdPagePkt_BTCoex(struct adapter *padapter)u32 TotalPacketLen, MaxRsvdPageBufSize =0 ;struct rsvdpage_loc RsvdPageLoc; - -/* DBG_8192C("+" FUNC_ADPT_FMT "\n", FUNC_ADPT_ARG(padapter)); */ - pxmitpriv = &padapter->xmitpriv; TxDescLen =TXDESC_SIZE ; TxDescOffset =TXDESC_OFFSET ;
@@ -918,8 +908,6 @@ static void SetFwRsvdPagePkt_BTCoex(struct adapter *padapter) pattrib->pktlen = pattrib->last_txcmdsz = TotalPacketLen - TxDescOffset;dump_mgntframe_and_wait (padapter, pcmdframe,100 ); -/* DBG_8192C(FUNC_ADPT_FMT ": Set RSVD page location to Fw, TotalPacketLen(%d), TotalPageNum(%d)\n", */ -/* FUNC_ADPT_ARG(padapter), TotalPacketLen, TotalPageNum); */ rtl8723b_set_FwRsvdPage_cmd (padapter, &RsvdPageLoc);rtl8723b_set_FwAoacRsvdPage_cmd (padapter, &RsvdPageLoc);
drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c +0 -21
@@ -777,15 +777,12 @@ if (0) {if (efuseHeader ==0xFF ) {break ; } -/* DBG_8192C("%s: efuse[0x%X]= 0x%02X\n", __func__, eFuse_Addr-1, efuseHeader); */ /* Check PG header for section num. */ if (EXT_HEADER (efuseHeader)) {/* extended header */ offset =GET_HDR_OFFSET_2_0 (efuseHeader); -/* DBG_8192C("%s: extended header offset = 0x%X\n", __func__, offset); */ efuse_OneByteRead (padapter, eFuse_Addr++, &efuseExtHdr, bPseudoTest); -/* DBG_8192C("%s: efuse[0x%X]= 0x%02X\n", __func__, eFuse_Addr-1, efuseExtHdr); */ if (ALL_WORDS_DISABLED (efuseExtHdr))continue ;
@@ -795,23 +792,19 @@ if (0) { offset = ((efuseHeader >>4 ) &0x0f ); wden = (efuseHeader &0x0f ); } -/* DBG_8192C("%s: Offset =%d Worden = 0x%X\n", __func__, offset, wden); */ if (offset <EFUSE_MAX_SECTION_8723B ) {u16 addr;/* Get word enable value from PG header */ -/* DBG_8192C("%s: Offset =%d Worden = 0x%X\n", __func__, offset, wden); */ addr = offset *PGPKT_DATA_SIZE ;for (i =0 ; i <EFUSE_MAX_WORD_UNIT ; i++) {/* Check word enable condition in the section */ if (!(wden & (0x01 <<i))) {efuse_OneByteRead (padapter, eFuse_Addr++, &efuseData, bPseudoTest); -/* DBG_8192C("%s: efuse[%#X]= 0x%02X\n", __func__, eFuse_Addr-1, efuseData); */ efuseTbl[addr] = efuseData;efuse_OneByteRead (padapter, eFuse_Addr++, &efuseData, bPseudoTest); -/* DBG_8192C("%s: efuse[%#X]= 0x%02X\n", __func__, eFuse_Addr-1, efuseData); */ efuseTbl[addr+1 ] = efuseData; } addr +=2 ;
@@ -1225,8 +1218,6 @@ static u8 Hal_EfuseWordEnableDataWrite(u8 badworden =0x0F ;u8 tmpdata[PGPKT_DATA_SIZE ]; - -/* DBG_8192C("%s: efuse_addr =%#x word_en =%#x\n", __func__, efuse_addr, word_en); */ memset (tmpdata,0xFF ,PGPKT_DATA_SIZE );if (!(word_en &BIT (0 ))) {
@@ -1338,11 +1329,9 @@ static s32 Hal_EfusePgPacketRead(/* Check word enable condition in the section */ if (!(hworden & (0x01 <<i))) {efuse_OneByteRead (padapter, efuse_addr++, &efuse_data, bPseudoTest); -/* DBG_8192C("%s: efuse[%#X]= 0x%02X\n", __func__, efuse_addr+tmpidx, efuse_data); */ data[i*2 ] = efuse_data;efuse_OneByteRead (padapter, efuse_addr++, &efuse_data, bPseudoTest); -/* DBG_8192C("%s: efuse[%#X]= 0x%02X\n", __func__, efuse_addr+tmpidx, efuse_data); */ data[(i*2 )+1 ] = efuse_data; } }
@@ -1364,7 +1353,6 @@ static u8 hal_EfusePgCheckAvailableAddr(EFUSE_GetEfuseDefinition (padapter, efuseType,TYPE_AVAILABLE_EFUSE_BYTES_TOTAL , &max_available, bPseudoTest); -/* DBG_8192C("%s: max_available =%d\n", __func__, max_available); */ current_size =Efuse_GetCurrentSize (padapter, efuseType, bPseudoTest);if (current_size >= max_available) {
@@ -1441,7 +1429,6 @@ static u8 hal_EfusePartialWriteCheck( startAddr++;efuse_OneByteRead (padapter, startAddr, &efuse_data, bPseudoTest);if (ALL_WORDS_DISABLED (efuse_data)) { -DBG_8192C ("%s: Error condition, all words disabled!" , __func__); bRet = false;break ; }else {
@@ -1462,7 +1449,6 @@ static u8 hal_EfusePartialWriteCheck( (hal_EfuseCheckIfDatafollowed(padapter, curPkt.word_cnts, startAddr+1, bPseudoTest) == false) && wordEnMatched(pTargetPkt, &curPkt, &matched_wden) == true ) { -DBG_8192C ("%s: Need to partial write data by the previous wrote header\n" , __func__);/* Here to write partial data */ badworden =Efuse_WordEnableDataWrite (padapter, startAddr+1 , matched_wden, pTargetPkt->data, bPseudoTest);if (badworden !=0x0F ) {
@@ -1492,7 +1478,6 @@ static u8 hal_EfusePartialWriteCheck( }else {/* not used header, 0xff */ *pAddr = startAddr; -/* DBG_8192C("%s: Started from unused header offset =%d\n", __func__, startAddr)); */ bRet = true;break ; }
@@ -1554,7 +1539,6 @@ static u8 hal_EfusePgPacketWrite2ByteHeader( } pg_header = ((pTargetPkt->offset &0x07 ) <<5 ) |0x0F ; -/* DBG_8192C("%s: pg_header = 0x%x\n", __func__, pg_header); */ do { efuse_OneByteWrite(padapter, efuse_addr, pg_header, bPseudoTest);
@@ -1629,7 +1613,6 @@ static u8 hal_EfusePgPacketWriteData(return false; } -/* DBG_8192C("%s: ok\n", __func__); */ return true; }
@@ -2683,8 +2666,6 @@ static u8 fill_txdesc_sectype(struct pkt_attrib *pattrib)static void fill_txdesc_vcs_8723b (struct adapter *padapter,struct pkt_attrib *pattrib,struct txdesc_8723b *ptxdesc) { -/* DBG_8192C("cvs_mode =%d\n", pattrib->vcs_mode); */ -if (pattrib->vcs_mode) {switch (pattrib->vcs_mode) {case RTS_CTS :
@@ -2716,8 +2697,6 @@ static void fill_txdesc_vcs_8723b(struct adapter *padapter, struct pkt_attrib *pstatic void fill_txdesc_phy_8723b (struct adapter *padapter,struct pkt_attrib *pattrib,struct txdesc_8723b *ptxdesc) { -/* DBG_8192C("bwmode =%d, ch_off =%d\n", pattrib->bwmode, pattrib->ch_offset); */ -if (pattrib->ht_en) { ptxdesc->data_bw =BWMapping_8723B (padapter, pattrib);
drivers/staging/rtl8723bs/hal/rtl8723b_rxdesc.c +0 -3
@@ -13,7 +13,6 @@ static void process_rssi(struct adapter *padapter, union recv_frame *prframe)struct rx_pkt_attrib *pattrib = &prframe->u.hdr.attrib;struct signal_stat *signal_stat = &padapter->recvpriv.signal_strength_data; -/* DBG_8192C("process_rssi => pattrib->rssil(%d) signal_strength(%d)\n ", pattrib->RecvSignalPower, pattrib->signal_strength); */ /* if (pRfd->Status.bPacketToSelf || pRfd->Status.bPacketBeacon) */ {if (signal_stat->update_req) {
@@ -40,8 +39,6 @@ static void process_link_qual(struct adapter *padapter, union recv_frame *prfram pattrib = &prframe->u.hdr.attrib; signal_stat = &padapter->recvpriv.signal_qual_data; -/* DBG_8192C("process_link_qual => pattrib->signal_qual(%d)\n ", pattrib->signal_qual); */ -if (signal_stat->update_req) { signal_stat->total_num =0 ; signal_stat->total_val =0 ;
drivers/staging/rtl8723bs/hal/rtl8723bs_recv.c +0 -2
@@ -125,8 +125,6 @@ static void update_recvframe_phyinfo(union recv_frame *precvframe, psta =rtw_get_stainfo (pstapriv, sa);if (psta) { pkt_info.station_id = psta->mac_id; -/* DBG_8192C("%s ==> StationID(%d)\n", -* __func__, pkt_info.station_id); */ } pkt_info.data_rate = pattrib->data_rate;
drivers/staging/rtl8723bs/hal/sdio_halinit.c +0 -4
@@ -101,17 +101,14 @@ u8 _InitPowerOn_8723BS(struct adapter *padapter)/* Switch the control of EESK, EECS to RFC for DPDT or Antenna switch */ value16 |=BIT (11 );/* BIT_EEPRPAD_RFE_CTRL_EN */ rtw_write16 (padapter,REG_PWR_DATA , value16); -/* DBG_8192C("%s: REG_PWR_DATA(0x%x) = 0x%04X\n", __func__, REG_PWR_DATA, rtw_read16(padapter, REG_PWR_DATA)); */ value32 =rtw_read32 (padapter,REG_LEDCFG0 ); value32 |=BIT (23 );/* DPDT_SEL_EN, 1 for SW control */ rtw_write32 (padapter,REG_LEDCFG0 , value32); -/* DBG_8192C("%s: REG_LEDCFG0(0x%x) = 0x%08X\n", __func__, REG_LEDCFG0, rtw_read32(padapter, REG_LEDCFG0)); */ value8 =rtw_read8 (padapter,REG_PAD_CTRL1_8723B ); value8 &= ~BIT (0 );/* BIT_SW_DPDT_SEL_DATA, DPDT_SEL default configuration */ rtw_write8 (padapter,REG_PAD_CTRL1_8723B , value8); -/* DBG_8192C("%s: REG_PAD_CTRL1(0x%x) = 0x%02X\n", __func__, REG_PAD_CTRL1_8723B, rtw_read8(padapter, REG_PAD_CTRL1_8723B)); */ return _SUCCESS; }
@@ -1263,7 +1260,6 @@ static void SetHwRegWithBuf8723B(struct adapter *padapter, u8 variable, u8 *pbuf {switch (variable) {case HW_VAR_C2H_HANDLE : -/* DBG_8192C("%s len =%d\n", __func__, len); */ C2HPacketHandler_8723B (padapter, pbuf, len);break ;default :
drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c +0 -5
@@ -855,8 +855,6 @@ static int rtw_cfg80211_set_encryption(struct net_device *dev, struct ieee_paramstruct sta_info *psta, *pbcmc_sta;struct sta_priv *pstapriv = &padapter->stapriv; -/* DBG_8192C("%s, : dot11AuthAlgrthm == dot11AuthAlgrthm_8021X\n", __func__); */ -if (check_fwstate (pmlmepriv,WIFI_STATION_STATE |WIFI_MP_STATE ) == true)/* sta mode */ { psta =rtw_get_stainfo (pstapriv,get_bssid (pmlmepriv));
@@ -1028,7 +1026,6 @@ static int cfg80211_rtw_add_key(struct wiphy *wiphy, struct net_device *ndev,else if (check_fwstate (pmlmepriv,WIFI_ADHOC_STATE ) == true ||check_fwstate (pmlmepriv,WIFI_ADHOC_MASTER_STATE ) == true) { -/* DBG_8192C("@@@@@@@@@@ fw_state = 0x%x, iftype =%d\n", pmlmepriv->fw_state, rtw_wdev->iftype); */ ret =rtw_cfg80211_set_encryption (ndev, param, param_len); }else
@@ -1785,8 +1782,6 @@ static int cfg80211_rtw_join_ibss(struct wiphy *wiphy, struct net_device *ndev, ndis_ssid.SsidLength = params->ssid_len;memcpy (ndis_ssid.Ssid, (u8 *)params->ssid, params->ssid_len); -/* DBG_8192C("ssid =%s, len =%zu\n", ndis_ssid.Ssid, params->ssid_len); */ - psecuritypriv->ndisencryptstatus = Ndis802_11EncryptionDisabled; psecuritypriv->dot11PrivacyAlgrthm = _NO_PRIVACY_; psecuritypriv->dot118021XGrpPrivacy = _NO_PRIVACY_;
Signature · 1 line
2.20.1
PATCH 3/25 staging: rtl8723bs: remove DBG_8192C macro definitions
In reply to Fabio Aiutoremove all DBG_8192C macro definitions.
Macro DBG_8192C belongs to a family of verbose
private tracing macros.
The default behaviour is _do nothing_, to activate it one should define DEBUG symbol by hand.
So just remove it
--- drivers/staging/rtl8723bs/include/rtw_debug.h | 10 ---------- 1 file changed, 10 deletions(-)
drivers/staging/rtl8723bs/include/rtw_debug.h +0 -10
@@ -131,7 +131,6 @@#define _MODULE_DEFINE_ _module_efuse_#endif -#define DBG_8192C (x, ...) do {} while (0)#define DBG_871X_LEVEL (x, ...) do {} while (0)#undef _dbgdump
@@ -193,15 +192,6 @@#endif /* defined(_dbgdump) */ -#ifdef DEBUG -#if defined(_dbgdump) -#undef DBG_8192C -#define DBG_8192C (...) do {\ - _dbgdump(DRIVER_PREFIX __VA_ARGS__);\ - } while (0) -#endif /* defined(_dbgdump) */ -#endif /* DEBUG */ -void dump_drv_version (void *sel);void dump_log_level (void *sel);
Signature · 1 line
2.20.1
PATCH 4/25 staging: rtl8723bs: remove all if-blocks left empty by DBG_8192C-remove coccinelle script
In reply to Fabio Aiutoremove all empty if blocks left empty by coccinelle script for DBG_8192C macro removal.
--- drivers/staging/rtl8723bs/hal/sdio_ops.c | 17 ----------------- .../staging/rtl8723bs/os_dep/ioctl_cfg80211.c | 15 +-------------- 2 files changed, 1 insertion(+), 31 deletions(-)
drivers/staging/rtl8723bs/hal/sdio_ops.c +0 -17
@@ -596,12 +596,6 @@ s32 sdio_local_write(s32 err;u8 *tmpbuf; -if (addr &0x3 ) - {} - -if (cnt &0x3 ) - {} - intfhdl = &adapter->iopriv.intf;hal_sdio_get_cmd_addr_8723b (adapter,SDIO_LOCAL_DEVICE_ID , addr, &addr);
@@ -926,11 +920,6 @@ void sd_int_dpc(struct adapter *adapter) } } -if (hal->sdio_hisr &SDIO_HISR_TXBCNOK ) - {} - -if (hal->sdio_hisr &SDIO_HISR_TXBCNERR ) - {}if (hal->sdio_hisr &SDIO_HISR_C2HCMD ) {struct c2h_evt_hdr_88xx *c2h_evt;
@@ -952,12 +941,6 @@ void sd_int_dpc(struct adapter *adapter) } } -if (hal->sdio_hisr &SDIO_HISR_RXFOVW ) - {} - -if (hal->sdio_hisr &SDIO_HISR_RXERR ) - {} -if (hal->sdio_hisr &SDIO_HISR_RX_REQUEST ) {struct recv_buf *recvbuf;int alloc_fail_time =0 ;
drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c +1 -14
@@ -1635,13 +1635,6 @@ static int rtw_cfg80211_set_wpa_ie(struct adapter *padapter, u8 *pie, size_t ielmemcpy (buf, pie, ielen); -/* dump */ - { -int i; -for (i =0 ; i < ielen; i = i +8 ) - {} - } -if (ielen <RSN_HEADER_LEN ) { ret =-1 ; goto exit;
@@ -1874,11 +1867,6 @@ static int cfg80211_rtw_connect(struct wiphy *wiphy, struct net_device *ndev, ndis_ssid.SsidLength = sme->ssid_len;memcpy (ndis_ssid.Ssid, (u8 *)sme->ssid, sme->ssid_len); - -if (sme->bssid) - {} - -if (check_fwstate (pmlmepriv, _FW_UNDER_LINKING) == true) { ret = -EBUSY ; goto exit;
@@ -2440,8 +2428,7 @@ static int rtw_add_beacon(struct adapter *adapter, const u8 *head, size_t head_l len = head_len+tail_len-24 ;/* check wps ie if inclued */ -if (rtw_get_wps_ie (pbuf+_FIXED_IE_LENGTH_, len-_FIXED_IE_LENGTH_,NULL , &wps_ielen)) - {} +rtw_get_wps_ie (pbuf+_FIXED_IE_LENGTH_, len-_FIXED_IE_LENGTH_,NULL , &wps_ielen);/* pbss_network->IEs will not include p2p_ie, wfd ie */ rtw_ies_remove_ie (pbuf, &len, _BEACON_IE_OFFSET_,WLAN_EID_VENDOR_SPECIFIC ,P2P_OUI ,4 );
Signature · 1 line
2.20.1
PATCH 5/25 staging: rtl8723bs: put spaces around operators
In reply to Fabio Aiutofix following post-commit hook checkpatch issue:
CHECK: spaces preferred around that '+' (ctx:VxV)
89: FILE: drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c:2431:
+ rtw_get_wps_ie(pbuf+_FIXED_IE_LENGTH_, ;
^
len-_FIXED_IE_LENGTH_, NULL, &wps_ielen)
CHECK: spaces preferred around that '-' (ctx:VxV)
89: FILE: drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c:2431:
+ rtw_get_wps_ie(pbuf+_FIXED_IE_LENGTH_, len-_FIXED_IE_LENGTH_,
^
NULL, &wps_ielen);
--- drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c +1 -1
@@ -2428,7 +2428,7 @@ static int rtw_add_beacon(struct adapter *adapter, const u8 *head, size_t head_l len = head_len+tail_len-24 ;/* check wps ie if inclued */ -rtw_get_wps_ie (pbuf+_FIXED_IE_LENGTH_, len-_FIXED_IE_LENGTH_,NULL , &wps_ielen); +rtw_get_wps_ie (pbuf + _FIXED_IE_LENGTH_, len - _FIXED_IE_LENGTH_,NULL , &wps_ielen);/* pbss_network->IEs will not include p2p_ie, wfd ie */ rtw_ies_remove_ie (pbuf, &len, _BEACON_IE_OFFSET_,WLAN_EID_VENDOR_SPECIFIC ,P2P_OUI ,4 );
Signature · 1 line
2.20.1
PATCH 6/25 staging: rtl8723bs: remove unused code blocks guarded by DEBUG_RTL871X
In reply to Fabio Aiutoremove unused code blocks guarded by never set DEBUG_RTL871X
--- drivers/staging/rtl8723bs/core/rtw_debug.c | 35 ------------------- drivers/staging/rtl8723bs/core/rtw_mlme_ext.c | 20 ----------- 2 files changed, 55 deletions(-)
drivers/staging/rtl8723bs/core/rtw_debug.c +0 -35
@@ -12,41 +12,6 @@u32 GlobalDebugLevel = _drv_err_; -#ifdef DEBUG_RTL871X - -u64 GlobalDebugComponents = \ - _module_rtl871x_xmit_c_ | - _module_xmit_osdep_c_ | - _module_rtl871x_recv_c_ | - _module_recv_osdep_c_ | - _module_rtl871x_mlme_c_ | - _module_mlme_osdep_c_ | - _module_rtl871x_sta_mgt_c_ | - _module_rtl871x_cmd_c_ | - _module_cmd_osdep_c_ | - _module_rtl871x_io_c_ | - _module_io_osdep_c_ | - _module_os_intfs_c_| - _module_rtl871x_security_c_| - _module_rtl871x_eeprom_c_| - _module_hal_init_c_| - _module_hci_hal_init_c_| - _module_rtl871x_ioctl_c_| - _module_rtl871x_ioctl_set_c_| - _module_rtl871x_ioctl_query_c_| - _module_rtl871x_pwrctrl_c_| - _module_hci_intfs_c_| - _module_hci_ops_c_| - _module_hci_ops_os_c_| - _module_rtl871x_ioctl_os_c| - _module_rtl8712_cmd_c_| - _module_hal_xmit_c_| - _module_rtl8712_recv_c_ | - _module_mp_ | - _module_efuse_; - -#endif /* DEBUG_RTL871X */ -#include <rtw_version.h> void dump_drv_version (void *sel)
drivers/staging/rtl8723bs/core/rtw_mlme_ext.c +0 -20
@@ -4402,20 +4402,7 @@ static void process_80211d(struct adapter *padapter, struct wlan_bssid_ex *bssid } chplan_ap.Len = i; -#ifdef DEBUG_RTL871X - i =0 ; -while ((i < chplan_ap.Len) && (chplan_ap.Channel[i] !=0 )) { - i++; - } -#endif -memcpy (chplan_sta, pmlmeext->channel_set,sizeof (chplan_sta)); -#ifdef DEBUG_RTL871X - i =0 ; -while ((i <MAX_CHANNEL_NUM ) && (chplan_sta[i].ChannelNum !=0 )) { - i++; - } -#endif memset (pmlmeext->channel_set,0 ,sizeof (pmlmeext->channel_set)); chplan_new = pmlmeext->channel_set;
@@ -4543,13 +4530,6 @@ static void process_80211d(struct adapter *padapter, struct wlan_bssid_ex *bssid } pmlmeext->update_channel_plan_by_ap_done =1 ; - -#ifdef DEBUG_RTL871X - k =0 ; -while ((k <MAX_CHANNEL_NUM ) && (chplan_new[k].ChannelNum !=0 )) { - k++; - } -#endif }/* If channel is used by AP, set channel scan type to active */
Signature · 1 line
2.20.1
PATCH 7/25 staging: rtl8723bs: remove commented out DEBUG_RTL871X definition
In reply to Fabio Aiutoremove commented out DEBUG_RTL871X definition
--- drivers/staging/rtl8723bs/include/autoconf.h | 1 - 1 file changed, 1 deletion(-)
drivers/staging/rtl8723bs/include/autoconf.h +0 -1
@@ -48,7 +48,6 @@#ifdef DEBUG #define DBG 1/* for ODM & BTCOEX debug */ -/*#define DEBUG_RTL871X */ #else /* !DEBUG */ #define DBG 0/* for ODM & BTCOEX debug */ #endif /* !DEBUG */
Signature · 1 line
2.20.1
PATCH 8/25 staging: rtl8723bs: remove code blocks guarded by DEBUG symbol
In reply to Fabio Aiutoremove code blocks guarded by DEBUG symbol
remove undefinition of DEBUG
--- drivers/staging/rtl8723bs/hal/rtl8723b_cmd.c | 5 ---- .../staging/rtl8723bs/hal/rtl8723b_hal_init.c | 25 ------------------- drivers/staging/rtl8723bs/include/autoconf.h | 5 ---- 3 files changed, 35 deletions(-)
drivers/staging/rtl8723bs/hal/rtl8723b_cmd.c +0 -5
@@ -928,11 +928,6 @@ void rtl8723b_download_BTCoex_AP_mode_rsvd_page(struct adapter *padapter)u32 poll =0 ;u8 val8; -#ifdef DEBUG -if (check_fwstate (&padapter->mlmepriv,WIFI_AP_STATE ) == false) { - } -#endif /* DEBUG */ - pHalData =GET_HAL_DATA (padapter); pmlmeext = &padapter->mlmeextpriv; pmlmeinfo = &pmlmeext->mlmext_info;
drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c +0 -25
@@ -754,21 +754,6 @@ static void hal_ReadEFuse_WiFi(/* 0xff will be efuse default value instead of 0x00. */ memset (efuseTbl,0xFF ,EFUSE_MAX_MAP_LEN ); - -#ifdef DEBUG -if (0 ) { -for (i =0 ; i <256 ; i++) -efuse_OneByteRead (padapter, i, &efuseTbl[i], false); -for (i =0 ; i <256 ; i++) { -if (i %16 ==0 ) -printk ("\n" ); -printk ("%02X " , efuseTbl[i]); - } -printk ("\n" ); -} -#endif - -/* switch bank back to bank 0 for later BT and wifi use. */ hal_EfuseSwitchToBank (padapter,0 , bPseudoTest);
@@ -818,16 +803,6 @@ if (0) {for (i =0 ; i < _size_byte; i++) pbuf[i] = efuseTbl[_offset+i]; -#ifdef DEBUG -if (1 ) { -for (i =0 ; i < _size_byte; i++) { -if (i %16 ==0 ) -printk ("\n" ); -printk ("%02X " , pbuf[i]); - } -printk ("\n" ); -} -#endif /* Calculate Efuse utilization */ EFUSE_GetEfuseDefinition (padapter,EFUSE_WIFI ,TYPE_AVAILABLE_EFUSE_BYTES_TOTAL , &total, bPseudoTest); used = eFuse_Addr -1 ;
drivers/staging/rtl8723bs/include/autoconf.h +0 -5
@@ -44,13 +44,8 @@/* * Debug Related Config */ -#undef DEBUG -#ifdef DEBUG -#define DBG 1/* for ODM & BTCOEX debug */ -#else /* !DEBUG */ #define DBG 0/* for ODM & BTCOEX debug */ -#endif /* !DEBUG */ /* define DBG_XMIT_BUF */ /* define DBG_XMIT_BUF_EXT */
Signature · 1 line
2.20.1
PATCH 9/25 staging: rtl8723bs: remove empty code block guarded by DBG_CCX
In reply to Fabio Aiutoremove code block guarded by DBG_CCX symbol, left empty after DBG_8192C removal.
--- drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c | 2 -- 1 file changed, 2 deletions(-)
drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c +0 -2
@@ -2792,8 +2792,6 @@ static void rtl8723b_fill_default_txdesc(/* CCX-TXRPT ack for xmit mgmt frames. */ if (pxmitframe->ack_report) { -#ifdef DBG_CCX -#endif ptxdesc->spe_rpt =1 ; ptxdesc->sw_define = (u8)(GET_PRIMARY_ADAPTER (padapter)->xmitpriv.seq_no); }
Signature · 1 line
2.20.1
PATCH 10/25 staging: rtl8723bs: remove code block guarded by undefined SDIO_DEBUG_IO
In reply to Fabio Aiutoremove code block guarded by SDIO_DEBUG_IO symbol.
--- drivers/staging/rtl8723bs/hal/sdio_ops.c | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-)
drivers/staging/rtl8723bs/hal/sdio_ops.c +1 -9
@@ -176,15 +176,7 @@ static u32 sdio_read32(struct intf_hdl *intfhdl, u32 addr) (adapter_to_pwrctl(adapter)->bFwCurrentInPSMode) ) { err =sd_cmd52_read (intfhdl, ftaddr,4 , (u8 *)&le_tmp); -#ifdef SDIO_DEBUG_IO -if (!err) { -#endif -return le32_to_cpu (le_tmp); -#ifdef SDIO_DEBUG_IO - } - -return SDIO_ERR_VAL32 ; -#endif +return le32_to_cpu (le_tmp); }/* 4 bytes alignment */
Signature · 1 line
2.20.1
PATCH 11/25 staging: rtl8723bs: remove commented out SDIO_DEBUG_IO symbol definition
In reply to Fabio Aiutoremove commented out SDIO_DEBUG_IO symbol definition.
--- drivers/staging/rtl8723bs/hal/sdio_ops.c | 3 --- 1 file changed, 3 deletions(-)
drivers/staging/rtl8723bs/hal/sdio_ops.c +0 -3
@@ -10,9 +10,6 @@#include <rtw_debug.h> #include <rtl8723b_hal.h> -/* define SDIO_DEBUG_IO 1 */ - -/* */ /* Description: */ /* The following mapping is for SDIO host local register space. */
Signature · 1 line
2.20.1
PATCH 12/25 staging: rtl8723bs: remove empty ifdef blocks conditioned to DEBUG_CFG80211 definition
In reply to Fabio Aiutoremove empty ifdef blocks conditioned to DEBUG_CFG80211 definition.
--- drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c | 15 --------------- 1 file changed, 15 deletions(-)
drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c +0 -15
@@ -1310,17 +1310,11 @@ static int rtw_cfg80211_set_probe_req_wpsp2pie(struct adapter *padapter, char *bu8 *wps_ie;struct mlme_priv *pmlmepriv = &(padapter->mlmepriv); -#ifdef DEBUG_CFG80211 -#endif -if (len >0 ) { wps_ie =rtw_get_wps_ie (buf, len,NULL , &wps_ielen);if (wps_ie) { -#ifdef DEBUG_CFG80211 -#endif -if (pmlmepriv->wps_probe_req_ie) { pmlmepriv->wps_probe_req_ie_len =0 ;
@@ -1435,8 +1429,6 @@ static int cfg80211_rtw_scan(struct wiphy *wiphy/* parsing request ssids, n_ssids */ for (i =0 ; i < request->n_ssids && i <RTW_SSID_SCAN_AMOUNT ; i++) { -#ifdef DEBUG_CFG80211 -#endif memcpy (ssid[i].Ssid, ssids[i].ssid, ssids[i].ssid_len); ssid[i].SsidLength = ssids[i].ssid_len; }
@@ -2681,21 +2673,14 @@ static int _cfg80211_rtw_mgmt_tx(struct adapter *padapter, u8 tx_ch, const u8 *b ack = false; ret = _FAIL; -#ifdef DEBUG_CFG80211 -#endif }else {msleep (50 ); -#ifdef DEBUG_CFG80211 -#endif ret = _SUCCESS; } exit: -#ifdef DEBUG_CFG80211 -#endif -return ret; }
Signature · 1 line
2.20.1
PATCH 13/25 staging: rtl8723bs: remove commented out DEBUG_CFG80211 symbol definition
In reply to Fabio Aiutoremove commented out DEBUG_CFG80211 symbol definition.
--- drivers/staging/rtl8723bs/include/autoconf.h | 1 - 1 file changed, 1 deletion(-)
drivers/staging/rtl8723bs/include/autoconf.h +0 -1
@@ -12,7 +12,6 @@/* * Functions Config */ -/* define DEBUG_CFG80211 */ #ifndef CONFIG_WIRELESS_EXT #error CONFIG_WIRELESS_EXT needs to be enabled for this driver to work
Signature · 1 line
2.20.1
PATCH 14/25 staging: rtl8723bs: remove unnecessary bracks
In reply to Fabio Aiutoremove unnecessary bracks in if-else blocks
--- drivers/staging/rtl8723bs/core/rtw_xmit.c | 3 +- drivers/staging/rtl8723bs/hal/hal_com.c | 3 +- drivers/staging/rtl8723bs/hal/rtl8723b_cmd.c | 9 +-- .../staging/rtl8723bs/hal/rtl8723b_hal_init.c | 63 ++++++++----------- drivers/staging/rtl8723bs/hal/sdio_halinit.c | 4 +- drivers/staging/rtl8723bs/hal/sdio_ops.c | 3 +- .../staging/rtl8723bs/os_dep/ioctl_cfg80211.c | 33 +++------- drivers/staging/rtl8723bs/os_dep/sdio_intf.c | 29 ++++----- 8 files changed, 52 insertions(+), 95 deletions(-)
drivers/staging/rtl8723bs/core/rtw_xmit.c +1 -2
@@ -1035,9 +1035,8 @@ s32 rtw_xmitframe_coalesce(struct adapter *padapter, struct sk_buff *pkt, structs32 bmcst =IS_MCAST (pattrib->ra);s32 res = _SUCCESS; -if (!pxmitframe->buf_addr) { +if (!pxmitframe->buf_addr)return _FAIL; - } pbuf_start = pxmitframe->buf_addr;
drivers/staging/rtl8723bs/hal/hal_com.c +1 -2
@@ -18,9 +18,8 @@ u8 rtw_hal_data_init(struct adapter *padapter)if (is_primary_adapter (padapter)) {/* if (padapter->isprimary) */ padapter->hal_data_sz =sizeof (struct hal_com_data ); padapter->HalData =vzalloc (padapter->hal_data_sz); -if (!padapter->HalData) { +if (!padapter->HalData)return _FAIL; - } }return _SUCCESS; }
drivers/staging/rtl8723bs/hal/rtl8723b_cmd.c +3 -6
@@ -74,9 +74,8 @@ s32 FillH2CCmd8723B(struct adapter *padapter, u8 ElementID, u32 CmdLen, u8 *pCmd do { h2c_box_num = pHalData->LastHMEBoxNum; - if (!_is_fw_read_cmd_down(padapter, h2c_box_num)) { + if (!_is_fw_read_cmd_down(padapter, h2c_box_num)) goto exit; - } if (CmdLen <= 3) memcpy((u8 *)(&h2c_cmd)+1, pCmdBuffer, CmdLen);
@@ -854,9 +853,8 @@ static void SetFwRsvdPagePkt_BTCoex(struct adapter *padapter) MaxRsvdPageBufSize = RsvdPageNum*PageSize; pcmdframe =rtw_alloc_cmdxmitframe (pxmitpriv); -if (!pcmdframe) { +if (!pcmdframe)return ; - } ReservedPagePacket = pcmdframe->buf_addr;memset (&RsvdPageLoc,0 ,sizeof (struct rsvdpage_loc ));
@@ -897,9 +895,8 @@ static void SetFwRsvdPagePkt_BTCoex(struct adapter *padapter) TotalPageNum += CurtPktPageNum; TotalPacketLen = BufIndex + BTQosNullLength; -if (TotalPacketLen > MaxRsvdPageBufSize) { +if (TotalPacketLen > MaxRsvdPageBufSize) goto error; - }/* update attribute */ pattrib = &pcmdframe->attrib;
drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c +25 -38
182 lines not on this page · raw message
drivers/staging/rtl8723bs/hal/sdio_halinit.c +2 -2
@@ -735,9 +735,9 @@ static u32 rtl8723bs_hal_init(struct adapter *padapter)/* init LLT after tx buffer boundary is defined */ ret =rtl8723b_InitLLTTable (padapter); -if (_SUCCESS != ret) { +if (_SUCCESS != ret)return _FAIL; - } +/* */ _InitQueuePriority (padapter);_InitPageBoundary (padapter);
drivers/staging/rtl8723bs/hal/sdio_ops.c +1 -2
@@ -184,9 +184,8 @@ static u32 sdio_read32(struct intf_hdl *intfhdl, u32 addr)u8 *tmpbuf; tmpbuf =rtw_malloc (8 ); -if (!tmpbuf) { +if (!tmpbuf)return SDIO_ERR_VAL32 ; - } ftaddr &= ~(u16 )0x3 ;sd_read (intfhdl, ftaddr,8 , tmpbuf);
drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c +8 -25
@@ -332,9 +332,8 @@ struct cfg80211_bss *rtw_cfg80211_inform_bss(struct adapter *padapter, struct wl bss =cfg80211_inform_bss_frame (wiphy, notify_channel, (struct ieee80211_mgmt *)buf, len, notify_signal,GFP_ATOMIC ); -if (unlikely (!bss)) { +if (unlikely (!bss)) goto exit; - }cfg80211_put_bss (wiphy, bss);kfree (buf);
@@ -548,18 +547,12 @@ static int rtw_cfg80211_ap_set_encryption(struct net_device *dev, struct ieee_pa { psta =rtw_get_stainfo (pstapriv, param->sta_addr);if (!psta) - {/* ret = -EINVAL; */ goto exit; - } }if (strcmp (param->u.crypt.alg,"none" ) ==0 && (psta ==NULL )) - { - goto exit; - } -if (strcmp (param->u.crypt.alg,"WEP" ) ==0 && (psta ==NULL )) {
@@ -1323,10 +1316,9 @@ static int rtw_cfg80211_set_probe_req_wpsp2pie(struct adapter *padapter, char *b } pmlmepriv->wps_probe_req_ie =rtw_malloc (wps_ielen); -if (pmlmepriv->wps_probe_req_ie ==NULL ) { +if (pmlmepriv->wps_probe_req_ie ==NULL )return -EINVAL ; - }memcpy (pmlmepriv->wps_probe_req_ie, wps_ie, wps_ielen); pmlmepriv->wps_probe_req_ie_len = wps_ielen; }
@@ -1389,9 +1381,7 @@ static int cfg80211_rtw_scan(struct wiphy *wiphy }if (request->ie && request->ie_len >0 ) - {rtw_cfg80211_set_probe_req_wpsp2pie (padapter, (u8 *)request->ie, request->ie_len); - }if (check_fwstate (pmlmepriv, _FW_UNDER_SURVEY) == true) { need_indicate_scan_done = true;
@@ -2164,9 +2154,8 @@ static netdev_tx_t rtw_cfg80211_monitor_if_xmit_entry(struct sk_buff *skb, strucif (unlikely (skb->len < rtap_len)) goto fail; -if (rtap_len !=14 ) { +if (rtap_len !=14 ) goto fail; - }/* Skip the ratio tap header */ skb_pull (skb, rtap_len);
@@ -2212,9 +2201,8 @@ static netdev_tx_t rtw_cfg80211_monitor_if_xmit_entry(struct sk_buff *skb, strucu32 len = skb->len;u8 category, action; -if (rtw_action_frame_parse (buf, len, &category, &action) == false) { +if (rtw_action_frame_parse (buf, len, &category, &action) == false) goto fail; - }/* starting alloc mgmt frame to dump it */ pmgntframe =alloc_mgtxmitframe (pxmitpriv);
@@ -2494,10 +2482,8 @@ static int cfg80211_rtw_del_station(struct wiphy *wiphy, struct net_device *ndevstruct sta_priv *pstapriv = &padapter->stapriv;const u8 *mac = params->mac; -if (check_fwstate (pmlmepriv, (_FW_LINKED|WIFI_AP_STATE )) != true) { +if (check_fwstate (pmlmepriv, (_FW_LINKED|WIFI_AP_STATE )) != true)return -EINVAL ; - } -if (!mac) {flush_all_cam_entry (padapter);/* clear CAM */
@@ -2719,9 +2705,8 @@ static int cfg80211_rtw_mgmt_tx(struct wiphy *wiphy,/* indicate ack before issue frame to avoid racing with rsp frame */ rtw_cfg80211_mgmt_tx_status (padapter, *cookie, buf, len, ack,GFP_KERNEL ); -if (rtw_action_frame_parse (buf, len, &category, &action) == false) { +if (rtw_action_frame_parse (buf, len, &category, &action) == false) goto exit; - }rtw_ps_deny (padapter,PS_DENY_MGNT_TX );if (_FAIL ==rtw_pwr_wakeup (padapter)) {
@@ -2925,9 +2910,8 @@ int rtw_wdev_alloc(struct adapter *padapter, struct device *dev)rtw_regd_init (wiphy, rtw_reg_notifier); ret =wiphy_register (wiphy); -if (ret <0 ) { +if (ret <0 ) goto free_wiphy; - }/* wdev */ wdev =rtw_zmalloc (sizeof (struct wireless_dev ));
@@ -3005,9 +2989,8 @@ void rtw_wdev_unregister(struct wireless_dev *wdev)rtw_cfg80211_indicate_scan_done (adapter, true); -if (pwdev_priv->pmon_ndev) { +if (pwdev_priv->pmon_ndev)unregister_netdev (pwdev_priv->pmon_ndev); - }wiphy_unregister (wdev->wiphy); }
drivers/staging/rtl8723bs/os_dep/sdio_intf.c +11 -18
@@ -160,15 +160,14 @@ static void sdio_deinit(struct dvobj_priv *dvobj)if (func) {sdio_claim_host (func); err =sdio_disable_func (func); -if (err) { +if (err) dvobj->drv_dbg.dbg_sdio_deinit_error_cnt++; - }if (dvobj->irq_alloc) { err =sdio_release_irq (func); -if (err) { +if (err) dvobj->drv_dbg.dbg_sdio_free_irq_error_cnt++; - }else +else dvobj->drv_dbg.dbg_sdio_free_irq_cnt++; }
@@ -182,9 +181,8 @@ static struct dvobj_priv *sdio_dvobj_init(struct sdio_func *func)struct sdio_data *psdio; dvobj =devobj_init (); -if (dvobj ==NULL ) { +if (dvobj ==NULL ) goto exit; - }sdio_set_drvdata (func, dvobj);
@@ -230,9 +228,8 @@ void rtw_set_hal_ops(struct adapter *padapter)static void sd_intf_start (struct adapter *padapter) { -if (padapter ==NULL ) { +if (padapter ==NULL )return ; - }/* hal dep */ rtw_hal_enable_interrupt (padapter);
@@ -240,9 +237,8 @@ static void sd_intf_start(struct adapter *padapter)static void sd_intf_stop (struct adapter *padapter) { -if (padapter ==NULL ) { +if (padapter ==NULL )return ; - }/* hal dep */ rtw_hal_disable_interrupt (padapter);
@@ -257,9 +253,8 @@ static struct adapter *rtw_sdio_if1_init(struct dvobj_priv *dvobj, const structstruct sdio_data *psdio = &dvobj->intf_data; padapter =vzalloc (sizeof (*padapter)); -if (padapter ==NULL ) { +if (padapter ==NULL ) goto exit; - } padapter->dvobj = dvobj; dvobj->if1 = padapter;
@@ -354,9 +349,8 @@ static void rtw_sdio_if1_deinit(struct adapter *if1)rtw_dev_unload (if1); -if (if1->rtw_wdev) { +if (if1->rtw_wdev)rtw_wdev_free (if1->rtw_wdev); - }rtw_free_drv_sw (if1);
@@ -400,9 +394,9 @@ static int rtw_drv_init( free_if2:if (status != _SUCCESS && if2) { } -if (status != _SUCCESS && if1) { +if (status != _SUCCESS && if1)rtw_sdio_if1_deinit (if1); - } + free_dvobj:if (status != _SUCCESS)sdio_dvobj_deinit (func);
@@ -426,9 +420,8 @@ static void rtw_dev_remove(struct sdio_func *func)sdio_claim_host (func);sdio_readb (func,0 , &err);sdio_release_host (func); -if (err == -ENOMEDIUM ) { +if (err == -ENOMEDIUM ) padapter->bSurpriseRemoved = true; - } }rtw_ps_deny (padapter,PS_DENY_DRV_REMOVE );
Signature · 1 line
2.20.1
PATCH 15/25 staging: rtl8723bs: fix comparison to null
In reply to Fabio Aiutofix following post-commit hook checkpatch issues:
CHECK: Comparison to NULL could be written "!pmlmepriv->wps_probe_req_ie" 348: FILE: drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c:1319:
+ if (pmlmepriv->wps_probe_req_ie == NULL)
CHECK: Comparison to NULL could be written "!dvobj" 459: FILE: drivers/staging/rtl8723bs/os_dep/sdio_intf.c:184:
+ if (dvobj == NULL)
CHECK: Comparison to NULL could be written "!padapter" 470: FILE: drivers/staging/rtl8723bs/os_dep/sdio_intf.c:231:
+ if (padapter == NULL)
CHECK: Comparison to NULL could be written "!padapter" 481: FILE: drivers/staging/rtl8723bs/os_dep/sdio_intf.c:240:
+ if (padapter == NULL)
CHECK: Comparison to NULL could be written "!padapter" 492: FILE: drivers/staging/rtl8723bs/os_dep/sdio_intf.c:256:
+ if (padapter == NULL)
--- drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c | 2 +- drivers/staging/rtl8723bs/os_dep/sdio_intf.c | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-)
drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c +1 -1
@@ -1316,7 +1316,7 @@ static int rtw_cfg80211_set_probe_req_wpsp2pie(struct adapter *padapter, char *b } pmlmepriv->wps_probe_req_ie =rtw_malloc (wps_ielen); -if (pmlmepriv->wps_probe_req_ie ==NULL ) +if (!pmlmepriv->wps_probe_req_ie)return -EINVAL ;memcpy (pmlmepriv->wps_probe_req_ie, wps_ie, wps_ielen);
drivers/staging/rtl8723bs/os_dep/sdio_intf.c +4 -4
@@ -181,7 +181,7 @@ static struct dvobj_priv *sdio_dvobj_init(struct sdio_func *func)struct sdio_data *psdio; dvobj =devobj_init (); -if (dvobj ==NULL ) +if (!dvobj) goto exit;sdio_set_drvdata (func, dvobj);
@@ -228,7 +228,7 @@ void rtw_set_hal_ops(struct adapter *padapter)static void sd_intf_start (struct adapter *padapter) { -if (padapter ==NULL ) +if (!padapter)return ;/* hal dep */
@@ -237,7 +237,7 @@ static void sd_intf_start(struct adapter *padapter)static void sd_intf_stop (struct adapter *padapter) { -if (padapter ==NULL ) +if (!padapter)return ;/* hal dep */
@@ -253,7 +253,7 @@ static struct adapter *rtw_sdio_if1_init(struct dvobj_priv *dvobj, const structstruct sdio_data *psdio = &dvobj->intf_data; padapter =vzalloc (sizeof (*padapter)); -if (padapter ==NULL ) +if (!padapter) goto exit; padapter->dvobj = dvobj;
Signature · 1 line
2.20.1
PATCH 16/25 staging: rtl8723bs: put spaces around operators
In reply to Fabio Aiutofix following post-commit hook checkpatch issues:
CHECK: spaces preferred around that '+' (ctx:VxV)
87: FILE: drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c:746:
+ if ((_offset+_size_byte) > EFUSE_MAX_MAP_LEN)
--
CHECK: spaces preferred around that '+' (ctx:VxV)
105: FILE: drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c:847:
+ if ((_offset+_size_byte) > EFUSE_BT_MAP_LEN)
--
CHECK: spaces preferred around that '-' (ctx:VxV)
133: FILE: drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c:906:
+ if ((eFuse_Addr-1) < total)
--
CHECK: spaces preferred around that '|' (ctx:VxV)
392: FILE: drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c:2485:
+ if (check_fwstate(pmlmepriv, (_FW_LINKED|WIFI_AP_STATE)) != true)
--- drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c | 6 +++--- drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-)
drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c +3 -3
@@ -743,7 +743,7 @@ static void hal_ReadEFuse_WiFi(/* */ /* Do NOT excess total size of EFuse table. Added by Roger, 2008.11.10. */ /* */ -if ((_offset+_size_byte) >EFUSE_MAX_MAP_LEN ) +if ((_offset + _size_byte) >EFUSE_MAX_MAP_LEN )return ; efuseTbl =rtw_malloc (EFUSE_MAX_MAP_LEN );
@@ -844,7 +844,7 @@ static void hal_ReadEFuse_BT(/* */ /* Do NOT excess total size of EFuse table. Added by Roger, 2008.11.10. */ /* */ -if ((_offset+_size_byte) >EFUSE_BT_MAP_LEN ) +if ((_offset + _size_byte) >EFUSE_BT_MAP_LEN )return ; efuseTbl =rtw_malloc (EFUSE_BT_MAP_LEN );
@@ -903,7 +903,7 @@ static void hal_ReadEFuse_BT( } } -if ((eFuse_Addr-1 ) < total) +if ((eFuse_Addr -1 ) < total)break ; }
drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c +1 -1
@@ -2482,7 +2482,7 @@ static int cfg80211_rtw_del_station(struct wiphy *wiphy, struct net_device *ndevstruct sta_priv *pstapriv = &padapter->stapriv;const u8 *mac = params->mac; -if (check_fwstate (pmlmepriv, (_FW_LINKED|WIFI_AP_STATE )) != true) +if (check_fwstate (pmlmepriv, (_FW_LINKED |WIFI_AP_STATE )) != true)return -EINVAL ;if (!mac) {
Signature · 1 line
2.20.1
PATCH 17/25 staging: rtl8723bs: split long line
In reply to Fabio Aiutofix following post-commit hook checkpatch issue:
WARNING: line length of 103 exceeds 100 columns
168: FILE: drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c:1086:
+ if (efuse_OneByteRead(padapter, efuse_addr, &efuse_data, bPseudoTest) == false)
--- drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c +2 -1
@@ -1083,7 +1083,8 @@ static u16 hal_EfuseGetCurrentSize_BT(struct adapter *padapter, u8 bPseudoTest)#if 1 while (AVAILABLE_EFUSE_ADDR (efuse_addr)) { -if (efuse_OneByteRead (padapter, efuse_addr, &efuse_data, bPseudoTest) == false) +if (efuse_OneByteRead (padapter, efuse_addr, + &efuse_data, bPseudoTest) == false)/* bank = EFUSE_MAX_BANK; */ break ;
Signature · 1 line
2.20.1
PATCH 18/25 staging: rtl8723bs: put constant on the right side of the test
In reply to Fabio Aiutofix following post-commit hook checpatch issues:
WARNING: Comparisons should place the constant on the right side of the test 287: FILE: drivers/staging/rtl8723bs/hal/sdio_halinit.c:738:
+ if (_SUCCESS != ret)
--- drivers/staging/rtl8723bs/hal/sdio_halinit.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/rtl8723bs/hal/sdio_halinit.c +1 -1
@@ -735,7 +735,7 @@ static u32 rtl8723bs_hal_init(struct adapter *padapter)/* init LLT after tx buffer boundary is defined */ ret =rtl8723b_InitLLTTable (padapter); -if (_SUCCESS != ret) +if (ret != _SUCCESS)return _FAIL;/* */
Signature · 1 line
2.20.1
PATCH 19/25 staging: rtl8723bs: remove empty if and else blocks
In reply to Fabio Aiutoremove if and else blocks after DBG_8192C removal
--- drivers/staging/rtl8723bs/hal/rtl8723b_cmd.c | 1 - .../staging/rtl8723bs/hal/rtl8723b_hal_init.c | 7 ----- drivers/staging/rtl8723bs/hal/sdio_ops.c | 1 - .../staging/rtl8723bs/os_dep/ioctl_cfg80211.c | 27 +++---------------- 4 files changed, 3 insertions(+), 33 deletions(-)
drivers/staging/rtl8723bs/hal/rtl8723b_cmd.c +0 -1
@@ -975,7 +975,6 @@ void rtl8723b_download_BTCoex_AP_mode_rsvd_page(struct adapter *padapter)if (bcn_valid) {struct pwrctrl_priv *pwrctl =adapter_to_pwrctl (padapter); pwrctl->fw_psmode_iface_id = padapter->iface_id; - }else { }/* 2010.05.11. Added by tynli. */
drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c +0 -7
@@ -678,10 +678,6 @@ static void Hal_EfusePowerSwitch(mdelay (10 ); }while (1 ); - -if (count >=100 ) { - }else { - } }rtw_write8 (padapter,REG_EFUSE_ACCESS_8723 ,EFUSE_ACCESS_ON_8723 );
@@ -3671,9 +3667,6 @@ void SetHwReg8723B(struct adapter *padapter, u8 variable, u8 *val)break ; }while (--trycnt); -if (trycnt ==0 ) { - } -/* RQPN Load 0 */ rtw_write16 (padapter,REG_RQPN_NPQ ,0 );rtw_write32 (padapter,REG_RQPN ,0x80000000 );
drivers/staging/rtl8723bs/hal/sdio_ops.c +0 -1
@@ -904,7 +904,6 @@ void sd_int_dpc(struct adapter *adapter)_sd_read (intfhdl, addr,4 , status);_sd_write (intfhdl, addr,4 , status);kfree (status); - }else { } }
drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c +3 -24
@@ -851,10 +851,7 @@ static int rtw_cfg80211_set_encryption(struct net_device *dev, struct ieee_paramif (check_fwstate (pmlmepriv,WIFI_STATION_STATE |WIFI_MP_STATE ) == true)/* sta mode */ { psta =rtw_get_stainfo (pstapriv,get_bssid (pmlmepriv)); -if (psta ==NULL ) { - } -else - { +if (psta !=NULL ) {/* Jeff: don't disable ieee8021x_blocked while clearing key */ if (strcmp (param->u.crypt.alg,"none" ) !=0 ) psta->ieee8021x_blocked = false;
@@ -1021,9 +1018,6 @@ static int cfg80211_rtw_add_key(struct wiphy *wiphy, struct net_device *ndev, { ret =rtw_cfg80211_set_encryption (ndev, param, param_len); } - else - { - } addkey_end:kfree (param);
@@ -1228,10 +1222,7 @@ void rtw_cfg80211_indicate_scan_done(struct adapter *adapter, bool aborted)spin_lock_bh (&pwdev_priv->scan_req_lock);if (pwdev_priv->scan_request) {/* avoid WARN_ON(request != wiphy_to_dev(request->wiphy)->scan_req); */ -if (pwdev_priv->scan_request->wiphy != pwdev_priv->rtw_wdev->wiphy) - { - } -else +if (pwdev_priv->scan_request->wiphy == pwdev_priv->rtw_wdev->wiphy) {cfg80211_scan_done (pwdev_priv->scan_request, &info); }
@@ -1365,10 +1356,6 @@ static int cfg80211_rtw_scan(struct wiphy *wiphy {if (check_fwstate (pmlmepriv,WIFI_UNDER_WPS |_FW_UNDER_SURVEY|_FW_UNDER_LINKING) == true) { -if (check_fwstate (pmlmepriv,WIFI_UNDER_WPS )) - { - } - need_indicate_scan_done = true; goto check_need_indicate_scan_done; }
@@ -1581,9 +1568,6 @@ static int rtw_cfg80211_set_key_mgt(struct security_priv *psecuritypriv, u32 keyelse if (key_mgt ==WLAN_AKM_SUITE_PSK ) { psecuritypriv->dot11AuthAlgrthm = dot11AuthAlgrthm_8021X; } -else { -/* return -EINVAL; */ - }return 0 ; }
@@ -2232,10 +2216,8 @@ static netdev_tx_t rtw_cfg80211_monitor_if_xmit_entry(struct sk_buff *skb, strucdump_mgntframe (padapter, pmgntframe); - }else { } - fail:dev_kfree_skb_any (skb);
@@ -2512,8 +2494,7 @@ static int cfg80211_rtw_del_station(struct wiphy *wiphy, struct net_device *ndev plist =get_next (plist);if (!memcmp ((u8 *)mac, psta->hwaddr,ETH_ALEN )) { -if (psta->dot8021xalg ==1 && psta->bpairwise_key_installed == false) { - }else { +if (psta->dot8021xalg !=1 || psta->bpairwise_key_installed == true) {list_del_init (&psta->asoc_list); pstapriv->asoc_list_cnt--;
@@ -2783,9 +2764,7 @@ static void rtw_cfg80211_init_ht_capab(struct ieee80211_sta_ht_cap *ht_cap, enum ht_cap->mcs.rx_mask[4 ] =0x01 ; ht_cap->mcs.rx_highest =cpu_to_le16 (MAX_BIT_RATE_40MHZ_MCS15 ); - }else { } - }void rtw_cfg80211_init_wiphy (struct adapter *padapter)
Signature · 1 line
2.20.1
PATCH 20/25 staging: rtl8723bs: put constant on the right side of a test in os_dep/ioctl_cfg80211.c
In reply to Fabio Aiutofix following post-commit hook checkpatch issue:
CHECK: Comparison to NULL could be written "psta"
72: FILE: drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c:854:
+ if (psta != NULL) {
--- drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c +1 -1
@@ -851,7 +851,7 @@ static int rtw_cfg80211_set_encryption(struct net_device *dev, struct ieee_paramif (check_fwstate (pmlmepriv,WIFI_STATION_STATE |WIFI_MP_STATE ) == true)/* sta mode */ { psta =rtw_get_stainfo (pstapriv,get_bssid (pmlmepriv)); -if (psta !=NULL ) { +if (psta) {/* Jeff: don't disable ieee8021x_blocked while clearing key */ if (strcmp (param->u.crypt.alg,"none" ) !=0 ) psta->ieee8021x_blocked = false;
Signature · 1 line
2.20.1
PATCH 21/25 staging: rtl8723bs: remove unnecessary parentheses in os_dep/ioctl_cfg80211.c
In reply to Fabio Aiutofix following post-commit hook checkpatch issue:
WARNING: braces {} are not necessary for single statement blocks 94: FILE: drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c:1225:
+ if (pwdev_priv->scan_request->wiphy == pwdev_priv->rtw_wdev->wiphy)
{
cfg80211_scan_done(pwdev_priv->scan_request, &info);
}
--- drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c | 2 -- 1 file changed, 2 deletions(-)
drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c +0 -2
@@ -1223,9 +1223,7 @@ void rtw_cfg80211_indicate_scan_done(struct adapter *adapter, bool aborted)if (pwdev_priv->scan_request) {/* avoid WARN_ON(request != wiphy_to_dev(request->wiphy)->scan_req); */ if (pwdev_priv->scan_request->wiphy == pwdev_priv->rtw_wdev->wiphy) - {cfg80211_scan_done (pwdev_priv->scan_request, &info); - } pwdev_priv->scan_request =NULL ; }else {
Signature · 1 line
2.20.1
PATCH 22/25 staging: rtl8723bs: remove empty else block in os_dep/ioctl_cfg80211.c
In reply to Fabio Aiutoremove empty else-block
--- drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c | 1 - 1 file changed, 1 deletion(-)
drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c +0 -1
@@ -1226,7 +1226,6 @@ void rtw_cfg80211_indicate_scan_done(struct adapter *adapter, bool aborted)cfg80211_scan_done (pwdev_priv->scan_request, &info); pwdev_priv->scan_request =NULL ; - }else { }spin_unlock_bh (&pwdev_priv->scan_req_lock); }
Signature · 1 line
2.20.1
PATCH 23/25 staging: rtl8723bs: fix comparison to true issue
In reply to Fabio Aiutofix following post-commit hook checkpatch issue:
CHECK: Using comparison to true is error prone
136: FILE: drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c:
2497:
+ if (psta->dot8021xalg != 1 ||
psta->bpairwise_key_installed == true) {--- drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c +1 -1
@@ -2491,7 +2491,7 @@ static int cfg80211_rtw_del_station(struct wiphy *wiphy, struct net_device *ndev plist =get_next (plist);if (!memcmp ((u8 *)mac, psta->hwaddr,ETH_ALEN )) { -if (psta->dot8021xalg !=1 || psta->bpairwise_key_installed == true) { +if (psta->dot8021xalg !=1 || psta->bpairwise_key_installed) {list_del_init (&psta->asoc_list); pstapriv->asoc_list_cnt--;
Signature · 1 line
2.20.1
PATCH 24/25 staging: rtl8723bs: remove more unnecessary parentheses
In reply to Fabio Aiutoremove more unnecessary parentheses afterDBG_8192C deletion.
--- .../staging/rtl8723bs/hal/rtl8723b_hal_init.c | 21 ++++++++----------- .../staging/rtl8723bs/hal/rtl8723bs_recv.c | 4 ++-- 2 files changed, 11 insertions(+), 14 deletions(-)
drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c +9 -12
@@ -754,9 +754,8 @@ static void hal_ReadEFuse_WiFi(while (AVAILABLE_EFUSE_ADDR (eFuse_Addr)) {efuse_OneByteRead (padapter, eFuse_Addr++, &efuseHeader, bPseudoTest); -if (efuseHeader ==0xFF ) { +if (efuseHeader ==0xFF )break ; - }/* Check PG header for section num. */ if (EXT_HEADER (efuseHeader)) {/* extended header */
@@ -1319,9 +1318,9 @@ static u8 hal_EfusePgCheckAvailableAddr(EFUSE_GetEfuseDefinition (padapter, efuseType,TYPE_AVAILABLE_EFUSE_BYTES_TOTAL , &max_available, bPseudoTest); current_size =Efuse_GetCurrentSize (padapter, efuseType, bPseudoTest); -if (current_size >= max_available) { +if (current_size >= max_available)return false; - } +return true; }
@@ -1469,14 +1468,13 @@ static u8 hal_EfusePgPacketWrite1ByteHeader(efuse_OneByteRead (padapter, efuse_addr, &tmp_header, bPseudoTest);if (tmp_header !=0xFF )break ; -if (repeatcnt++ >EFUSE_REPEAT_THRESHOLD_ ) { +if (repeatcnt++ >EFUSE_REPEAT_THRESHOLD_ )return false; - } + }while (1 ); -if (tmp_header != pg_header) { +if (tmp_header != pg_header)return false; - } *pAddr = efuse_addr;
@@ -1498,9 +1496,8 @@ static u8 hal_EfusePgPacketWrite2ByteHeader(EFUSE_GetEfuseDefinition (padapter, efuseType,TYPE_AVAILABLE_EFUSE_BYTES_BANK , &efuse_max_available_len, bPseudoTest); efuse_addr = *pAddr; -if (efuse_addr >= efuse_max_available_len) { +if (efuse_addr >= efuse_max_available_len)return false; - } pg_header = ((pTargetPkt->offset &0x07 ) <<5 ) |0x0F ;
@@ -3734,9 +3731,9 @@ void SetHwReg8723B(struct adapter *padapter, u8 variable, u8 *val)case HW_VAR_MACID_SLEEP :/* Input is MACID */ val32 = *(u32 *)val; -if (val32 >31 ) { +if (val32 >31 )break ; - } + val8 = (u8 )val32;/* macid is between 0~31 */ val32 =rtw_read32 (padapter,REG_MACID_SLEEP );
drivers/staging/rtl8723bs/hal/rtl8723bs_recv.c +2 -2
@@ -123,9 +123,9 @@ static void update_recvframe_phyinfo(union recv_frame *precvframe, pstapriv = &padapter->stapriv; psta =rtw_get_stainfo (pstapriv, sa); -if (psta) { +if (psta) pkt_info.station_id = psta->mac_id; - } + pkt_info.data_rate = pattrib->data_rate;/* rtl8723b_query_rx_phy_status(precvframe, pphy_status); */
Signature · 1 line
2.20.1
PATCH 25/25 staging: rtl8723bs: remove more empty if blocks after DBG_8192C deletion
In reply to Fabio Aiutoremove more empty if-blocks after DBG_8192C deletion.
--- drivers/staging/rtl8723bs/hal/sdio_halinit.c | 4 ---- 1 file changed, 4 deletions(-)
drivers/staging/rtl8723bs/hal/sdio_halinit.c +0 -4
@@ -882,8 +882,6 @@ static void CardDisableRTL8723BSdio(struct adapter *padapter)/* Run LPS WL RFOFF flow */ ret =HalPwrSeqCmdParsing (padapter,PWR_CUT_ALL_MSK ,PWR_FAB_ALL_MSK ,PWR_INTF_SDIO_MSK , rtl8723B_enter_lps_flow); -if (ret == _FAIL) { - }/* ==== Reset digital sequence ====== */
@@ -914,8 +912,6 @@ static void CardDisableRTL8723BSdio(struct adapter *padapter) ret = false;rtw_hal_set_hwreg (padapter,HW_VAR_APFM_ON_MAC , &bMacPwrCtrlOn); ret =HalPwrSeqCmdParsing (padapter,PWR_CUT_ALL_MSK ,PWR_FAB_ALL_MSK ,PWR_INTF_SDIO_MSK , rtl8723B_card_disable_flow); -if (!ret) { - } }static u32 rtl8723bs_hal_deinit (struct adapter *padapter)
Signature · 1 line
2.20.1
kernel test robot
build botRe: [PATCH 25/25] staging: rtl8723bs: remove more empty if blocks after DBG_8192C deletion
Thank you for the patch! Perhaps something to improve:
Hi Fabio,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on staging/staging-testing]
url: https://github.com/0day-ci/linux/commits/Fabio-Aiuto/staging-rtl8723bs-remove-DBG_8192C-tracing-macro/20210410-222529 base: https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git 32abcac8037da5dc570c22abf266cbb92eee9fc9 config: powerpc-allyesconfig (attached as .config) compiler: powerpc64-linux-gcc (GCC) 9.3.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross
# https://github.com/0day-ci/linux/commit/a140b646e0cc8d3db3e30fc46b3491ecbb2d0b47
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Fabio-Aiuto/staging-rtl8723bs-remove-DBG_8192C-tracing-macro/20210410-222529 git checkout a140b646e0cc8d3db3e30fc46b3491ecbb2d0b47
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=powerpc
If you fix the issue, kindly add following tag as appropriate
All warnings (new ones prefixed by >>):
drivers/staging/rtl8723bs/hal/sdio_halinit.c: In function 'CardDisableRTL8723BSdio':
>> drivers/staging/rtl8723bs/hal/sdio_halinit.c:881:5: warning: variable 'ret' set but not used [-Wunused-but-set-variable]
881 | u8 ret = _FAIL;
| ^~~
drivers/staging/rtl8723bs/hal/sdio_halinit.c: In function '_ReadAdapterInfo8723BS':
drivers/staging/rtl8723bs/hal/sdio_halinit.c:1156:16: warning: variable 'start' set but not used [-Wunused-but-set-variable]
1156 | unsigned long start;
| ^~~~~vim +/ret +881 drivers/staging/rtl8723bs/hal/sdio_halinit.c
554c0a3abf216c Hans de Goede 2017-03-29 870
554c0a3abf216c Hans de Goede 2017-03-29 871 /* */
554c0a3abf216c Hans de Goede 2017-03-29 872 /* Description: */
554c0a3abf216c Hans de Goede 2017-03-29 873 /* RTL8723e card disable power sequence v003 which suggested by Scott. */
554c0a3abf216c Hans de Goede 2017-03-29 874 /* */
554c0a3abf216c Hans de Goede 2017-03-29 875 /* First created by tynli. 2011.01.28. */
554c0a3abf216c Hans de Goede 2017-03-29 876 /* */
554c0a3abf216c Hans de Goede 2017-03-29 877 static void CardDisableRTL8723BSdio(struct adapter *padapter)
554c0a3abf216c Hans de Goede 2017-03-29 878 {
554c0a3abf216c Hans de Goede 2017-03-29 879 u8 u1bTmp;
554c0a3abf216c Hans de Goede 2017-03-29 880 u8 bMacPwrCtrlOn;
554c0a3abf216c Hans de Goede 2017-03-29 @881 u8 ret = _FAIL;
554c0a3abf216c Hans de Goede 2017-03-29 882
554c0a3abf216c Hans de Goede 2017-03-29 883 /* Run LPS WL RFOFF flow */
554c0a3abf216c Hans de Goede 2017-03-29 884 ret = HalPwrSeqCmdParsing(padapter, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_SDIO_MSK, rtl8723B_enter_lps_flow);
554c0a3abf216c Hans de Goede 2017-03-29 885
554c0a3abf216c Hans de Goede 2017-03-29 886 /* ==== Reset digital sequence ====== */
554c0a3abf216c Hans de Goede 2017-03-29 887
554c0a3abf216c Hans de Goede 2017-03-29 888 u1bTmp = rtw_read8(padapter, REG_MCUFWDL);
554c0a3abf216c Hans de Goede 2017-03-29 889 if ((u1bTmp & RAM_DL_SEL) && padapter->bFWReady) /* 8051 RAM code */
554c0a3abf216c Hans de Goede 2017-03-29 890 rtl8723b_FirmwareSelfReset(padapter);
554c0a3abf216c Hans de Goede 2017-03-29 891
554c0a3abf216c Hans de Goede 2017-03-29 892 /* Reset MCU 0x2[10]= 0. Suggested by Filen. 2011.01.26. by tynli. */
554c0a3abf216c Hans de Goede 2017-03-29 893 u1bTmp = rtw_read8(padapter, REG_SYS_FUNC_EN + 1);
554c0a3abf216c Hans de Goede 2017-03-29 894 u1bTmp &= ~BIT(2); /* 0x2[10], FEN_CPUEN */
554c0a3abf216c Hans de Goede 2017-03-29 895 rtw_write8(padapter, REG_SYS_FUNC_EN + 1, u1bTmp);
554c0a3abf216c Hans de Goede 2017-03-29 896
554c0a3abf216c Hans de Goede 2017-03-29 897 /* MCUFWDL 0x80[1:0]= 0 */
554c0a3abf216c Hans de Goede 2017-03-29 898 /* reset MCU ready status */
554c0a3abf216c Hans de Goede 2017-03-29 899 rtw_write8(padapter, REG_MCUFWDL, 0);
554c0a3abf216c Hans de Goede 2017-03-29 900
554c0a3abf216c Hans de Goede 2017-03-29 901 /* Reset MCU IO Wrapper, added by Roger, 2011.08.30 */
554c0a3abf216c Hans de Goede 2017-03-29 902 u1bTmp = rtw_read8(padapter, REG_RSV_CTRL + 1);
554c0a3abf216c Hans de Goede 2017-03-29 903 u1bTmp &= ~BIT(0);
554c0a3abf216c Hans de Goede 2017-03-29 904 rtw_write8(padapter, REG_RSV_CTRL + 1, u1bTmp);
554c0a3abf216c Hans de Goede 2017-03-29 905 u1bTmp = rtw_read8(padapter, REG_RSV_CTRL + 1);
554c0a3abf216c Hans de Goede 2017-03-29 906 u1bTmp |= BIT(0);
554c0a3abf216c Hans de Goede 2017-03-29 907 rtw_write8(padapter, REG_RSV_CTRL+1, u1bTmp);
554c0a3abf216c Hans de Goede 2017-03-29 908
554c0a3abf216c Hans de Goede 2017-03-29 909 /* ==== Reset digital sequence end ====== */
554c0a3abf216c Hans de Goede 2017-03-29 910
554c0a3abf216c Hans de Goede 2017-03-29 911 bMacPwrCtrlOn = false; /* Disable CMD53 R/W */
554c0a3abf216c Hans de Goede 2017-03-29 912 ret = false;
554c0a3abf216c Hans de Goede 2017-03-29 913 rtw_hal_set_hwreg(padapter, HW_VAR_APFM_ON_MAC, &bMacPwrCtrlOn);
554c0a3abf216c Hans de Goede 2017-03-29 914 ret = HalPwrSeqCmdParsing(padapter, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_SDIO_MSK, rtl8723B_card_disable_flow);
554c0a3abf216c Hans de Goede 2017-03-29 915 }
554c0a3abf216c Hans de Goede 2017-03-29 916 ---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org