From 56f1411415355ff8df7613a02c919a8877f9c092 Mon Sep 17 00:00:00 2001 From: Ana Rey Date: Tue, 25 Feb 2014 14:37:01 +0100 Subject: [PATCH] staging: rtl8187se: Convert CHANNEL_LIST typedef into a struct. 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 Signed-off-by: Greg Kroah-Hartman --- drivers/staging/rtl8187se/ieee80211/ieee80211.h | 8 ++++---- drivers/staging/rtl8187se/r8180_core.c | 10 +++++----- drivers/staging/rtl8187se/r8180_wx.c | 8 ++++---- 3 files changed, 13 insertions(+), 13 deletions(-) diff --git a/drivers/staging/rtl8187se/ieee80211/ieee80211.h b/drivers/staging/rtl8187se/ieee80211/ieee80211.h index 09ffd9bc8991..4978b2bba186 100644 --- a/drivers/staging/rtl8187se/ieee80211/ieee80211.h +++ b/drivers/staging/rtl8187se/ieee80211/ieee80211.h @@ -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 diff --git a/drivers/staging/rtl8187se/r8180_core.c b/drivers/staging/rtl8187se/r8180_core.c index 42c1ee324d2f..ebdcdea0e826 100644 --- a/drivers/staging/rtl8187se/r8180_core.c +++ b/drivers/staging/rtl8187se/r8180_core.c @@ -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; diff --git a/drivers/staging/rtl8187se/r8180_wx.c b/drivers/staging/rtl8187se/r8180_wx.c index 9b676e027cad..498da41c408b 100644 --- a/drivers/staging/rtl8187se/r8180_wx.c +++ b/drivers/staging/rtl8187se/r8180_wx.c @@ -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); -- 2.20.1