staging: rtl8187se: Convert CHANNEL_LIST typedef into a struct.
authorAna Rey <anarey@gmail.com>
Tue, 25 Feb 2014 13:37:01 +0000 (14:37 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 27 Feb 2014 20:16:50 +0000 (12:16 -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/ieee80211/ieee80211.h
drivers/staging/rtl8187se/r8180_core.c
drivers/staging/rtl8187se/r8180_wx.c

index 09ffd9bc89918240d33947c795f347610193be97..4978b2bba1869660290808467ac053f267481431 100644 (file)
@@ -709,10 +709,10 @@ enum {WMM_all_frame, WMM_two_frame, WMM_four_frame, WMM_six_frame};
 
 #define MAX_IE_LEN                                             0xFF //+YJ,080625
 
-typedef struct _CHANNEL_LIST{
-       u8      Channel[MAX_CHANNEL_NUMBER + 1];
-       u8      Len;
-}CHANNEL_LIST, *PCHANNEL_LIST;
+struct rtl8187se_channel_list {
+       u8      channel[MAX_CHANNEL_NUMBER + 1];
+       u8      len;
+};
 
 //by amy for ps
 #define IEEE80211_WATCH_DOG_TIME    2000
index 42c1ee324d2fe13d11fce7a0f026479a537c36d7..ebdcdea0e826f542ee694c0e9a08e5eebd254998 100644 (file)
@@ -2176,7 +2176,7 @@ static void watch_dog_adaptive(unsigned long data)
        add_timer(&priv->watch_dog_timer);
 }
 
-static CHANNEL_LIST ChannelPlan[] = {
+static struct rtl8187se_channel_list channel_plan_list[] = {
        {{1,2,3,4,5,6,7,8,9,10,11,36,40,44,48,52,56,60,64},19},         /* FCC */
        {{1,2,3,4,5,6,7,8,9,10,11},11},                                 /* IC */
        {{1,2,3,4,5,6,7,8,9,10,11,12,13,36,40,44,48,52,56,60,64},21},   /* ETSI */
@@ -2212,13 +2212,13 @@ static void rtl8180_set_channel_map(u8 channel_plan,
                {
                        Dot11d_Init(ieee);
                        ieee->bGlobalDomain = false;
-                       if (ChannelPlan[channel_plan].Len != 0) {
+                       if (channel_plan_list[channel_plan].len != 0) {
                                /* Clear old channel map */
                                memset(GET_DOT11D_INFO(ieee)->channel_map, 0, sizeof(GET_DOT11D_INFO(ieee)->channel_map));
                                /* Set new channel map */
-                               for (i = 0; i < ChannelPlan[channel_plan].Len; i++) {
-                                       if (ChannelPlan[channel_plan].Channel[i] <= 14)
-                                               GET_DOT11D_INFO(ieee)->channel_map[ChannelPlan[channel_plan].Channel[i]] = 1;
+                               for (i = 0; i < channel_plan_list[channel_plan].len; i++) {
+                                       if (channel_plan_list[channel_plan].channel[i] <= 14)
+                                               GET_DOT11D_INFO(ieee)->channel_map[channel_plan_list[channel_plan].channel[i]] = 1;
                                }
                        }
                        break;
index 9b676e027cadbc40f5916f3b9094be477c379b30..498da41c408b6a5e293f2f0679c05f686c396fc8 100644 (file)
@@ -29,7 +29,7 @@ static u32 rtl8180_rates[] = {1000000, 2000000, 5500000, 11000000,
 
 #define RATE_COUNT ARRAY_SIZE(rtl8180_rates)
 
-static CHANNEL_LIST DefaultChannelPlan[] = {
+static struct rtl8187se_channel_list default_channel_plan[] = {
        {{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 36, 40, 44, 48, 52, 56, 60, 64}, 19},              /* FCC */
        {{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11}, 11},                                              /* IC */
        {{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 36, 40, 44, 48, 52, 56, 60, 64}, 21},      /* ETSI */
@@ -1030,15 +1030,15 @@ static int r8180_wx_set_channelplan(struct net_device *dev,
 
        /* unsigned long flags; */
        down(&priv->wx_sem);
-       if (DefaultChannelPlan[*val].Len != 0)  {
+       if (default_channel_plan[*val].len != 0) {
                priv->channel_plan = *val;
                /* Clear old channel map 8 */
                for (i = 1; i <= MAX_CHANNEL_NUMBER; i++)
                        GET_DOT11D_INFO(priv->ieee80211)->channel_map[i] = 0;
 
                /* Set new channel map */
-               for (i = 1; i <= DefaultChannelPlan[*val].Len; i++)
-                       GET_DOT11D_INFO(priv->ieee80211)->channel_map[DefaultChannelPlan[*val].Channel[i-1]] = 1;
+               for (i = 1; i <= default_channel_plan[*val].len; i++)
+                       GET_DOT11D_INFO(priv->ieee80211)->channel_map[default_channel_plan[*val].channel[i-1]] = 1;
 
        }
        up(&priv->wx_sem);