Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 02981dac authored by Ana Rey's avatar Ana Rey Committed by Greg Kroah-Hartman
Browse files

staging: rtl8187se: Convert ChnlAccessSetting 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: default avatarAna Rey <anarey@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 742af585
Loading
Loading
Loading
Loading
+9 −9
Original line number Diff line number Diff line
@@ -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
+10 −10
Original line number Diff line number Diff line
@@ -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