staging: rtl8187se: Convert ChnlAccessSetting typedef into a struct.
authorAna Rey <anarey@gmail.com>
Wed, 26 Feb 2014 14:29:03 +0000 (15:29 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 27 Feb 2014 22:49:06 +0000 (14:49 -0800)
The Documentation/CodingStyle doesn't recommend the use of typedef, convert
this to structure.

While at it, I have also renamed the variable names that were used in
this typedef not to use Hungarian notation.

Signed-off-by: Ana Rey <anarey@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rtl8187se/r8180.h
drivers/staging/rtl8187se/r8185b_init.c

index d36470e8f272435a42975cefafb79badbfa7f4c4..2d9accf4ca665c4539874d376e3ac49c5100b23d 100644 (file)
@@ -76,14 +76,14 @@ typedef enum _WIRELESS_MODE {
        WIRELESS_MODE_AUTO = 0x08,
 } WIRELESS_MODE;
 
-typedef struct ChnlAccessSetting {
-       u16 SIFS_Timer;
-       u16 DIFS_Timer;
-       u16 SlotTimeTimer;
-       u16 EIFS_Timer;
-       u16 CWminIndex;
-       u16 CWmaxIndex;
-} *PCHANNEL_ACCESS_SETTING, CHANNEL_ACCESS_SETTING;
+struct chnl_access_setting {
+       u16 sifs_timer;
+       u16 difs_timer;
+       u16 slot_time_timer;
+       u16 eifs_timer;
+       u16 cwmin_index;
+       u16 cwmax_index;
+};
 
 typedef enum {
        NIC_8185 = 1,
@@ -643,7 +643,7 @@ typedef struct r8180_priv {
        u32 ReceiveConfig;
        u32 IntrMask;
 
-       struct ChnlAccessSetting ChannelAccessSetting;
+       struct chnl_access_setting ChannelAccessSetting;
 } r8180_priv;
 
 #define MANAGE_PRIORITY 0
index c8b9baff1dbce491adff7db3aed358bf48464c28..48eda5564ba50cb92e297f9b9ae891d893068adf 100644 (file)
@@ -873,7 +873,7 @@ static u8 GetSupportedWirelessMode8185(struct net_device *dev)
 static void
 ActUpdateChannelAccessSetting(struct net_device *dev,
                              WIRELESS_MODE WirelessMode,
-                             PCHANNEL_ACCESS_SETTING ChnlAccessSetting)
+                             struct chnl_access_setting *chnl_access_setting)
 {
        AC_CODING       eACI;
 
@@ -890,25 +890,25 @@ ActUpdateChannelAccessSetting(struct net_device *dev,
         */
 
        /* Suggested by Jong, 2005.12.08. */
-       ChnlAccessSetting->SIFS_Timer = 0x22;
-       ChnlAccessSetting->DIFS_Timer = 0x1C; /* 2006.06.02, by rcnjko. */
-       ChnlAccessSetting->SlotTimeTimer = 9; /* 2006.06.02, by rcnjko. */
+       chnl_access_setting->sifs_timer = 0x22;
+       chnl_access_setting->difs_timer = 0x1C; /* 2006.06.02, by rcnjko. */
+       chnl_access_setting->slot_time_timer = 9; /* 2006.06.02, by rcnjko. */
        /*
         * Suggested by wcchu, it is the default value of EIFS register,
         * 2005.12.08.
         */
-       ChnlAccessSetting->EIFS_Timer = 0x5B;
-       ChnlAccessSetting->CWminIndex = 3; /* 2006.06.02, by rcnjko. */
-       ChnlAccessSetting->CWmaxIndex = 7; /* 2006.06.02, by rcnjko. */
+       chnl_access_setting->eifs_timer = 0x5B;
+       chnl_access_setting->cwmin_index = 3; /* 2006.06.02, by rcnjko. */
+       chnl_access_setting->cwmax_index = 7; /* 2006.06.02, by rcnjko. */
 
-       write_nic_byte(dev, SIFS, ChnlAccessSetting->SIFS_Timer);
+       write_nic_byte(dev, SIFS, chnl_access_setting->sifs_timer);
        /*
         * Rewrited from directly use PlatformEFIOWrite1Byte(),
         * by Annie, 2006-03-29.
         */
-       write_nic_byte(dev, SLOT, ChnlAccessSetting->SlotTimeTimer);
+       write_nic_byte(dev, SLOT, chnl_access_setting->slot_time_timer);
 
-       write_nic_byte(dev, EIFS, ChnlAccessSetting->EIFS_Timer);
+       write_nic_byte(dev, EIFS, chnl_access_setting->eifs_timer);
 
        /*
         * <RJ_EXPR_QOS> Suggested by wcchu, it is the default value of EIFS