staging: rtl8723bs: remove typedefs in rtw_mlme.h
authorMarco Cesati <marcocesati@gmail.com>
Fri, 12 Mar 2021 08:26:07 +0000 (09:26 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 12 Mar 2021 16:25:39 +0000 (17:25 +0100)
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 <marco.cesati@gmail.com>
Link: https://lore.kernel.org/r/20210312082638.25512-3-marco.cesati@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rtl8723bs/core/rtw_mlme_ext.c
drivers/staging/rtl8723bs/hal/hal_btcoex.c
drivers/staging/rtl8723bs/include/rtw_mlme.h
drivers/staging/rtl8723bs/include/rtw_mlme_ext.h

index 3443a57..8ab5b38 100644 (file)
@@ -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;
index 7ac8a17..35d8883 100644 (file)
@@ -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)
index d8655cb..2f9c2a0 100644 (file)
@@ -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;
index 1567831..ed6b03c 100644 (file)
@@ -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);