forked from Minki/linux
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>
This commit is contained in:
parent
4379cad104
commit
066ad08efe
@ -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;
|
||||
|
@ -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;
|
||||
|
||||
|
@ -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. */
|
||||
|
Loading…
Reference in New Issue
Block a user