From: Marco Cesati Date: Fri, 12 Mar 2021 08:26:07 +0000 (+0100) Subject: staging: rtl8723bs: remove typedefs in rtw_mlme.h X-Git-Tag: accepted/tizen/unified/20230118.172025~7414^2~595 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=743c5f852e54e8f1937e9f62a0440d0493fa06f7;p=platform%2Fkernel%2Flinux-rpi.git staging: rtl8723bs: remove typedefs in rtw_mlme.h This commit fixes the following checkpatch.pl warnings: WARNING: do not add new typedefs #84: FILE: include/rtw_mlme.h:84: +typedef enum _RT_SCAN_TYPE { WARNING: do not add new typedefs #137: FILE: include/rtw_mlme.h:137: +typedef struct _RT_LINK_DETECT_T { Signed-off-by: Marco Cesati Link: https://lore.kernel.org/r/20210312082638.25512-3-marco.cesati@gmail.com Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/rtl8723bs/core/rtw_mlme_ext.c b/drivers/staging/rtl8723bs/core/rtw_mlme_ext.c index 3443a57..8ab5b38 100644 --- a/drivers/staging/rtl8723bs/core/rtw_mlme_ext.c +++ b/drivers/staging/rtl8723bs/core/rtw_mlme_ext.c @@ -4272,7 +4272,7 @@ Following are some utility functions for WiFi MLME void site_survey(struct adapter *padapter) { unsigned char survey_channel = 0, val8; - RT_SCAN_TYPE ScanType = SCAN_PASSIVE; + enum RT_SCAN_TYPE ScanType = SCAN_PASSIVE; struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv; struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info); u32 initialgain = 0; diff --git a/drivers/staging/rtl8723bs/hal/hal_btcoex.c b/drivers/staging/rtl8723bs/hal/hal_btcoex.c index 7ac8a17..35d8883 100644 --- a/drivers/staging/rtl8723bs/hal/hal_btcoex.c +++ b/drivers/staging/rtl8723bs/hal/hal_btcoex.c @@ -445,7 +445,7 @@ static u8 halbtcoutsrc_Get(void *pBtcContext, u8 getType, void *pOutBuf) case BTC_GET_U4_WIFI_TRAFFIC_DIRECTION: { - PRT_LINK_DETECT_T plinkinfo; + struct RT_LINK_DETECT_T * plinkinfo; plinkinfo = &padapter->mlmepriv.LinkDetectInfo; if (plinkinfo->NumTxOkInPeriod > plinkinfo->NumRxOkInPeriod) diff --git a/drivers/staging/rtl8723bs/include/rtw_mlme.h b/drivers/staging/rtl8723bs/include/rtw_mlme.h index d8655cb..2f9c2a0 100644 --- a/drivers/staging/rtl8723bs/include/rtw_mlme.h +++ b/drivers/staging/rtl8723bs/include/rtw_mlme.h @@ -81,11 +81,11 @@ enum dot11AuthAlgrthmNum { }; /* Scan type including active and passive scan. */ -typedef enum _RT_SCAN_TYPE { +enum RT_SCAN_TYPE { SCAN_PASSIVE, SCAN_ACTIVE, SCAN_MIX, -} RT_SCAN_TYPE, *PRT_SCAN_TYPE; +}; enum _BAND { GHZ24_50 = 0, @@ -134,7 +134,7 @@ struct sitesurvey_ctrl { _timer sitesurvey_ctrl_timer; }; -typedef struct _RT_LINK_DETECT_T { +struct RT_LINK_DETECT_T { u32 NumTxOkInPeriod; u32 NumRxOkInPeriod; u32 NumRxUnicastOkInPeriod; @@ -147,7 +147,7 @@ typedef struct _RT_LINK_DETECT_T { /* u8 TrafficBusyState; */ u8 TrafficTransitionCount; u32 LowPowerTransitionCount; -} RT_LINK_DETECT_T, *PRT_LINK_DETECT_T; +}; struct profile_info { u8 ssidlen; @@ -385,12 +385,12 @@ struct mlme_priv { struct ht_priv htpriv; - RT_LINK_DETECT_T LinkDetectInfo; + struct RT_LINK_DETECT_T LinkDetectInfo; _timer dynamic_chk_timer; /* dynamic/periodic check timer */ u8 acm_mask; /* for wmm acm mask */ u8 ChannelPlan; - RT_SCAN_TYPE scan_mode; /* active: 1, passive: 0 */ + enum RT_SCAN_TYPE scan_mode; /* active: 1, passive: 0 */ u8 *wps_probe_req_ie; u32 wps_probe_req_ie_len; diff --git a/drivers/staging/rtl8723bs/include/rtw_mlme_ext.h b/drivers/staging/rtl8723bs/include/rtw_mlme_ext.h index 1567831..ed6b03c 100644 --- a/drivers/staging/rtl8723bs/include/rtw_mlme_ext.h +++ b/drivers/staging/rtl8723bs/include/rtw_mlme_ext.h @@ -419,7 +419,7 @@ struct mlme_ext_info { /* The channel information about this channel including joining, scanning, and power constraints. */ typedef struct _RT_CHANNEL_INFO { u8 ChannelNum; /* The channel number. */ - RT_SCAN_TYPE ScanType; /* Scan type such as passive or active scan. */ + enum RT_SCAN_TYPE ScanType; /* Scan type such as passive or active scan. */ } RT_CHANNEL_INFO, *PRT_CHANNEL_INFO; int rtw_ch_set_search_ch(RT_CHANNEL_INFO *ch_set, const u32 ch);