summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorAna Rey <anarey@gmail.com>2014-03-10 18:56:44 +0100
committerPeter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>2014-03-13 15:41:42 -0700
commit066ad08efe16be0178e7565a2cfb6b6268ac264a (patch)
treebbd49127fb1681498e6ea6ba99533a78551f47b9 /drivers
parent4379cad104bc00c61bbbe934ce103a3b8abbec41 (diff)
staging: rtl8187se: Convert _WIRELESS_MODE into a enum.
The Documentation/CodingStyle doesn't recommend the use of typedef, convert this to enum. 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: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/staging/rtl8187se/r8180.h4
-rw-r--r--drivers/staging/rtl8187se/r8180_rtl8225z2.c8
-rw-r--r--drivers/staging/rtl8187se/r8185b_init.c6
3 files changed, 9 insertions, 9 deletions
diff --git a/drivers/staging/rtl8187se/r8180.h b/drivers/staging/rtl8187se/r8180.h
index 00e38b5cb1be..9e4b5450ceb7 100644
--- a/drivers/staging/rtl8187se/r8180.h
+++ b/drivers/staging/rtl8187se/r8180.h
@@ -68,13 +68,13 @@
/* +by amy 080312. */
#define RATE_ADAPTIVE_TIMER_PERIOD 300
-typedef enum _WIRELESS_MODE {
+enum wireless_mode {
WIRELESS_MODE_UNKNOWN = 0x00,
WIRELESS_MODE_A = 0x01,
WIRELESS_MODE_B = 0x02,
WIRELESS_MODE_G = 0x04,
WIRELESS_MODE_AUTO = 0x08,
-} WIRELESS_MODE;
+};
struct chnl_access_setting {
u16 sifs_timer;
diff --git a/drivers/staging/rtl8187se/r8180_rtl8225z2.c b/drivers/staging/rtl8187se/r8180_rtl8225z2.c
index 7c9a8bfe6d88..0677ae37d70c 100644
--- a/drivers/staging/rtl8187se/r8180_rtl8225z2.c
+++ b/drivers/staging/rtl8187se/r8180_rtl8225z2.c
@@ -279,8 +279,8 @@ void rtl8225z2_rf_close(struct net_device *dev)
* Map dBm into Tx power index according to current HW model, for example,
* RF and PA, and current wireless mode.
*/
-static s8 DbmToTxPwrIdx(struct r8180_priv *priv, WIRELESS_MODE WirelessMode,
- s32 PowerInDbm)
+static s8 DbmToTxPwrIdx(struct r8180_priv *priv,
+ enum wireless_mode mode, s32 PowerInDbm)
{
bool bUseDefault = true;
s8 TxPwrIdx = 0;
@@ -291,7 +291,7 @@ static s8 DbmToTxPwrIdx(struct r8180_priv *priv, WIRELESS_MODE WirelessMode,
*/
s32 tmp = 0;
- if (WirelessMode == WIRELESS_MODE_G) {
+ if (mode == WIRELESS_MODE_G) {
bUseDefault = false;
tmp = (2 * PowerInDbm);
@@ -301,7 +301,7 @@ static s8 DbmToTxPwrIdx(struct r8180_priv *priv, WIRELESS_MODE WirelessMode,
TxPwrIdx = 40;
else
TxPwrIdx = (s8)tmp;
- } else if (WirelessMode == WIRELESS_MODE_B) {
+ } else if (mode == WIRELESS_MODE_B) {
bUseDefault = false;
tmp = (4 * PowerInDbm) - 52;
diff --git a/drivers/staging/rtl8187se/r8185b_init.c b/drivers/staging/rtl8187se/r8185b_init.c
index 48eda5564ba5..9c8b57f1f3be 100644
--- a/drivers/staging/rtl8187se/r8185b_init.c
+++ b/drivers/staging/rtl8187se/r8185b_init.c
@@ -872,7 +872,7 @@ static u8 GetSupportedWirelessMode8185(struct net_device *dev)
static void
ActUpdateChannelAccessSetting(struct net_device *dev,
- WIRELESS_MODE WirelessMode,
+ enum wireless_mode mode,
struct chnl_access_setting *chnl_access_setting)
{
AC_CODING eACI;
@@ -959,7 +959,7 @@ static void ActSetWirelessMode8185(struct net_device *dev, u8 btWirelessMode)
* wireless mode if we switch to specified band successfully.
*/
- ieee->mode = (WIRELESS_MODE)btWirelessMode;
+ ieee->mode = (enum wireless_mode)btWirelessMode;
/* 3. Change related setting. */
if (ieee->mode == WIRELESS_MODE_A)
@@ -1385,7 +1385,7 @@ void rtl8185b_adapter_start(struct net_device *dev)
/* Initialize RegWirelessMode if it is not a valid one. */
if (bInvalidWirelessMode)
- ieee->mode = (WIRELESS_MODE)InitWirelessMode;
+ ieee->mode = (enum wireless_mode)InitWirelessMode;
} else {
/* One of B, G, A. */