staging: wilc1000: remove typedef from the struct tstrWILC_AddStaParam
authorTony Cho <tony.cho@atmel.com>
Mon, 21 Sep 2015 03:16:46 +0000 (12:16 +0900)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 21 Sep 2015 05:59:38 +0000 (22:59 -0700)
This patch removes typedef from the struct tstrWILC_AddStaParam and
renames it to add_sta_param in oder to comply with the Linux coding
style.

Signed-off-by: Tony Cho <tony.cho@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/wilc1000/host_interface.c
drivers/staging/wilc1000/host_interface.h
drivers/staging/wilc1000/wilc_wfi_cfgoperations.c

index b2f04a50a662476e33972885c4e7693588fb0020..93c4d7a2f97c1a8a368eca1f7a2eadbe281cfa55 100644 (file)
@@ -425,9 +425,9 @@ union message_body {
        struct get_channel strHostIFGetChan;
        struct set_beacon strHostIFSetBeacon;                 /*!< Set beacon message body */
        struct del_beacon strHostIFDelBeacon;                 /*!< Del beacon message body */
-       tstrWILC_AddStaParam strAddStaParam;                    /*!< Add station message body */
+       struct add_sta_param strAddStaParam;                    /*!< Add station message body */
        tstrHostIFDelSta strDelStaParam;                                /*!< Del Station message body */
-       tstrWILC_AddStaParam strEditStaParam;                           /*!< Edit station message body */
+       struct add_sta_param strEditStaParam;                           /*!< Edit station message body */
        /* tstrScanComplete             strScanComplete;                / *Received Async. Scan Complete message body* / */
        tstrTimerCb strTimerCb;                                                 /*!< Timer callback message body */
        tstrHostIfPowerMgmtParam strPowerMgmtparam;     /*!< Power Management message body */
@@ -3533,13 +3533,14 @@ static void Handle_DelBeacon(tstrWILC_WFIDrv *drvHandler,
 /**
  *  @brief WILC_HostIf_PackStaParam
  *  @details       Handling packing of the station params in a buffer
- *  @param[in]   u8* pu8Buffer, tstrWILC_AddStaParam* pstrStationParam
+ *  @param[in]   u8* pu8Buffer, struct add_sta_param *pstrStationParam
  *  @return         NONE
  *  @author
  *  @date
  *  @version   1.0
  */
-static u32 WILC_HostIf_PackStaParam(u8 *pu8Buffer, tstrWILC_AddStaParam *pstrStationParam)
+static u32 WILC_HostIf_PackStaParam(u8 *pu8Buffer,
+                                   struct add_sta_param *pstrStationParam)
 {
        u8 *pu8CurrByte;
 
@@ -3587,13 +3588,14 @@ static u32 WILC_HostIf_PackStaParam(u8 *pu8Buffer, tstrWILC_AddStaParam *pstrSta
 /**
  *  @brief Handle_AddStation
  *  @details       Sending config packet to add station
- *  @param[in]   tstrWILC_AddStaParam* pstrStationParam
+ *  @param[in]   struct add_sta_param *pstrStationParam
  *  @return         NONE
  *  @author
  *  @date
  *  @version   1.0
  */
-static void Handle_AddStation(tstrWILC_WFIDrv *drvHandler, tstrWILC_AddStaParam *pstrStationParam)
+static void Handle_AddStation(tstrWILC_WFIDrv *drvHandler,
+                             struct add_sta_param *pstrStationParam)
 {
        s32 s32Error = 0;
        tstrWID strWID;
@@ -3722,13 +3724,14 @@ ERRORHANDLER:
 /**
  *  @brief Handle_EditStation
  *  @details        Sending config packet to edit station
- *  @param[in]   tstrWILC_AddStaParam* pstrStationParam
+ *  @param[in]   struct add_sta_param *pstrStationParam
  *  @return         NONE
  *  @author
  *  @date
  *  @version   1.0
  */
-static void Handle_EditStation(tstrWILC_WFIDrv *drvHandler, tstrWILC_AddStaParam *pstrStationParam)
+static void Handle_EditStation(tstrWILC_WFIDrv *drvHandler,
+                              struct add_sta_param *pstrStationParam)
 {
        s32 s32Error = 0;
        tstrWID strWID;
@@ -7012,18 +7015,19 @@ s32 host_int_del_beacon(tstrWILC_WFIDrv *hWFIDrv)
 /**
  *  @brief host_int_add_station
  *  @details       Setting add station params in message queue
- *  @param[in]    WILC_WFIDrvHandle hWFIDrv, tstrWILC_AddStaParam* pstrStaParams
+ *  @param[in]    WILC_WFIDrvHandle hWFIDrv, struct add_sta_param *pstrStaParams
  *  @return         Error code.
  *  @author
  *  @date
  *  @version   1.0
  */
-s32 host_int_add_station(tstrWILC_WFIDrv *hWFIDrv, tstrWILC_AddStaParam *pstrStaParams)
+s32 host_int_add_station(tstrWILC_WFIDrv *hWFIDrv,
+                        struct add_sta_param *pstrStaParams)
 {
        s32 s32Error = 0;
        tstrWILC_WFIDrv *pstrWFIDrv = (tstrWILC_WFIDrv *)hWFIDrv;
        struct host_if_msg msg;
-       tstrWILC_AddStaParam *pstrAddStationMsg = &msg.body.strAddStaParam;
+       struct add_sta_param *pstrAddStationMsg = &msg.body.strAddStaParam;
 
 
        if (pstrWFIDrv == NULL) {
@@ -7040,7 +7044,7 @@ s32 host_int_add_station(tstrWILC_WFIDrv *hWFIDrv, tstrWILC_AddStaParam *pstrSta
        msg.id = HOST_IF_MSG_ADD_STATION;
        msg.drvHandler = hWFIDrv;
 
-       memcpy(pstrAddStationMsg, pstrStaParams, sizeof(tstrWILC_AddStaParam));
+       memcpy(pstrAddStationMsg, pstrStaParams, sizeof(struct add_sta_param));
        if (pstrAddStationMsg->u8NumRates > 0) {
                u8 *rates = kmalloc(pstrAddStationMsg->u8NumRates, GFP_KERNEL);
 
@@ -7162,18 +7166,19 @@ s32 host_int_del_allstation(tstrWILC_WFIDrv *hWFIDrv, u8 pu8MacAddr[][ETH_ALEN])
 /**
  *  @brief host_int_edit_station
  *  @details       Setting edit station params in message queue
- *  @param[in]    WILC_WFIDrvHandle hWFIDrv, tstrWILC_AddStaParam* pstrStaParams
+ *  @param[in]    WILC_WFIDrvHandle hWFIDrv, struct add_sta_param *pstrStaParams
  *  @return         Error code.
  *  @author
  *  @date
  *  @version   1.0
  */
-s32 host_int_edit_station(tstrWILC_WFIDrv *hWFIDrv, tstrWILC_AddStaParam *pstrStaParams)
+s32 host_int_edit_station(tstrWILC_WFIDrv *hWFIDrv,
+                         struct add_sta_param *pstrStaParams)
 {
        s32 s32Error = 0;
        tstrWILC_WFIDrv *pstrWFIDrv = (tstrWILC_WFIDrv *)hWFIDrv;
        struct host_if_msg msg;
-       tstrWILC_AddStaParam *pstrAddStationMsg = &msg.body.strAddStaParam;
+       struct add_sta_param *pstrAddStationMsg = &msg.body.strAddStaParam;
 
        if (pstrWFIDrv == NULL) {
                PRINT_ER("driver is null\n");
@@ -7189,7 +7194,7 @@ s32 host_int_edit_station(tstrWILC_WFIDrv *hWFIDrv, tstrWILC_AddStaParam *pstrSt
        msg.id = HOST_IF_MSG_EDIT_STATION;
        msg.drvHandler = hWFIDrv;
 
-       memcpy(pstrAddStationMsg, pstrStaParams, sizeof(tstrWILC_AddStaParam));
+       memcpy(pstrAddStationMsg, pstrStaParams, sizeof(struct add_sta_param));
        if (pstrAddStationMsg->u8NumRates > 0) {
                u8 *rates = kmalloc(pstrAddStationMsg->u8NumRates, GFP_KERNEL);
 
index 537845e9d077692cbac07d3e7c1830307a8a5947..b24eeb6841cbaaf8af2ef05aaab0827493e05e43 100644 (file)
@@ -369,7 +369,7 @@ typedef enum {
        WILC_STA_FLAG_AUTHENTICATED             /*!< station is authenticated*/
 } tenuWILC_StaFlag;
 
-typedef struct {
+struct add_sta_param {
        u8 au8BSSID[ETH_ALEN];
        u16 u16AssocID;
        u8 u8NumRates;
@@ -383,7 +383,7 @@ typedef struct {
        u8 u8ASELCap;
        u16 u16FlagsMask;               /*<! Determines which of u16FlagsSet were changed>*/
        u16 u16FlagsSet;                /*<! Decoded according to tenuWILC_StaFlag */
-} tstrWILC_AddStaParam;
+};
 
 /*****************************************************************************/
 /*                                                                                                                                                      */
@@ -1049,7 +1049,8 @@ s32 host_int_add_beacon(tstrWILC_WFIDrv *hWFIDrv, u32 u32Interval,
 s32 host_int_del_beacon(tstrWILC_WFIDrv *hWFIDrv);
 
 /*!
- *  @fn                s32 host_int_add_station(WILC_WFIDrvHandle hWFIDrv, tstrWILC_AddStaParam strStaParams)
+ *  @fn                s32 host_int_add_station(WILC_WFIDrvHandle hWFIDrv,
+ *                                      struct add_sta_param *pstrStaParams)
  *  @brief             Notifies the firmware with a new associated stations
  *  @details
  *  @param[in,out]     hWFIDrv         handle to the wifi driver
@@ -1061,7 +1062,8 @@ s32 host_int_del_beacon(tstrWILC_WFIDrv *hWFIDrv);
  *  @date              12 July 2012
  *  @version           1.0 Description
  */
-s32 host_int_add_station(tstrWILC_WFIDrv *hWFIDrv, tstrWILC_AddStaParam *pstrStaParams);
+s32 host_int_add_station(tstrWILC_WFIDrv *hWFIDrv,
+                        struct add_sta_param *pstrStaParams);
 
 /*!
  *  @fn                s32 host_int_del_allstation(WILC_WFIDrvHandle hWFIDrv, const u8* pu8MacAddr)
@@ -1094,7 +1096,8 @@ s32 host_int_del_allstation(tstrWILC_WFIDrv *hWFIDrv, u8 pu8MacAddr[][ETH_ALEN])
 s32 host_int_del_station(tstrWILC_WFIDrv *hWFIDrv, const u8 *pu8MacAddr);
 
 /*!
- *  @fn                s32 host_int_edit_station(WILC_WFIDrvHandle hWFIDrv, tstrWILC_AddStaParam strStaParams)
+ *  @fn                s32 host_int_edit_station(WILC_WFIDrvHandle hWFIDrv,
+ *                                       struct add_sta_param *pstrStaParams)
  *  @brief             Notifies the firmware with new parameters of an already associated station
  *  @details
  *  @param[in,out]     hWFIDrv         handle to the wifi driver
@@ -1106,7 +1109,8 @@ s32 host_int_del_station(tstrWILC_WFIDrv *hWFIDrv, const u8 *pu8MacAddr);
  *  @date              15 July 2012
  *  @version           1.0 Description
  */
-s32 host_int_edit_station(tstrWILC_WFIDrv *hWFIDrv, tstrWILC_AddStaParam *pstrStaParams);
+s32 host_int_edit_station(tstrWILC_WFIDrv *hWFIDrv,
+                         struct add_sta_param *pstrStaParams);
 
 /*!
  *  @fn                s32 host_int_set_power_mgmt(WILC_WFIDrvHandle hWFIDrv, bool bIsEnabled, u32 u32Timeout)
index 7874c9e3a6540bb661ec874ca4b284b7fae5393e..a51560f85ba93ed49f8a1651fe7c04ac87d8d2c3 100644 (file)
@@ -3155,7 +3155,7 @@ static int add_station(struct wiphy *wiphy, struct net_device *dev,
 {
        s32 s32Error = 0;
        struct wilc_priv *priv;
-       tstrWILC_AddStaParam strStaParams = { {0} };
+       struct add_sta_param strStaParams = { {0} };
        perInterface_wlan_t *nic;
 
        if (!wiphy)
@@ -3266,7 +3266,7 @@ static int change_station(struct wiphy *wiphy, struct net_device *dev,
 {
        s32 s32Error = 0;
        struct wilc_priv *priv;
-       tstrWILC_AddStaParam strStaParams = { {0} };
+       struct add_sta_param strStaParams = { {0} };
        perInterface_wlan_t *nic;