staging: vt6656: replace typedef enum tagCMD_CODE with enum vnt_cmd
Replacing the variables. Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
Родитель
f6a7125c82
Коммит
80f0d0923f
|
@ -400,7 +400,7 @@ struct vnt_private {
|
||||||
|
|
||||||
CMD_STATE eCommandState;
|
CMD_STATE eCommandState;
|
||||||
|
|
||||||
CMD_CODE eCommand;
|
enum vnt_cmd command;
|
||||||
|
|
||||||
int bStopDataPkt;
|
int bStopDataPkt;
|
||||||
|
|
||||||
|
|
|
@ -146,13 +146,13 @@ static int s_bCommandComplete(struct vnt_private *priv)
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
priv->eCommand = priv->eCmdQueue[priv->uCmdDequeueIdx].eCmd;
|
priv->command = priv->eCmdQueue[priv->uCmdDequeueIdx].cmd;
|
||||||
|
|
||||||
ADD_ONE_WITH_WRAP_AROUND(priv->uCmdDequeueIdx, CMD_Q_SIZE);
|
ADD_ONE_WITH_WRAP_AROUND(priv->uCmdDequeueIdx, CMD_Q_SIZE);
|
||||||
priv->cbFreeCmdQueue++;
|
priv->cbFreeCmdQueue++;
|
||||||
priv->bCmdRunning = true;
|
priv->bCmdRunning = true;
|
||||||
|
|
||||||
switch (priv->eCommand) {
|
switch (priv->command) {
|
||||||
case WLAN_CMD_INIT_MAC80211:
|
case WLAN_CMD_INIT_MAC80211:
|
||||||
priv->eCommandState = WLAN_CMD_INIT_MAC80211_START;
|
priv->eCommandState = WLAN_CMD_INIT_MAC80211_START;
|
||||||
break;
|
break;
|
||||||
|
@ -186,13 +186,13 @@ static int s_bCommandComplete(struct vnt_private *priv)
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
int bScheduleCommand(struct vnt_private *priv, CMD_CODE command, u8 *item0)
|
int bScheduleCommand(struct vnt_private *priv, enum vnt_cmd command, u8 *item0)
|
||||||
{
|
{
|
||||||
|
|
||||||
if (priv->cbFreeCmdQueue == 0)
|
if (priv->cbFreeCmdQueue == 0)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
priv->eCmdQueue[priv->uCmdEnqueueIdx].eCmd = command;
|
priv->eCmdQueue[priv->uCmdEnqueueIdx].cmd = command;
|
||||||
|
|
||||||
ADD_ONE_WITH_WRAP_AROUND(priv->uCmdEnqueueIdx, CMD_Q_SIZE);
|
ADD_ONE_WITH_WRAP_AROUND(priv->uCmdEnqueueIdx, CMD_Q_SIZE);
|
||||||
priv->cbFreeCmdQueue--;
|
priv->cbFreeCmdQueue--;
|
||||||
|
|
|
@ -34,15 +34,15 @@
|
||||||
#define AUTHENTICATE_TIMEOUT 1000 //ms
|
#define AUTHENTICATE_TIMEOUT 1000 //ms
|
||||||
#define ASSOCIATE_TIMEOUT 1000 //ms
|
#define ASSOCIATE_TIMEOUT 1000 //ms
|
||||||
|
|
||||||
// Command code
|
/* Command code */
|
||||||
typedef enum tagCMD_CODE {
|
enum vnt_cmd {
|
||||||
WLAN_CMD_INIT_MAC80211,
|
WLAN_CMD_INIT_MAC80211,
|
||||||
WLAN_CMD_SETPOWER,
|
WLAN_CMD_SETPOWER,
|
||||||
WLAN_CMD_TBTT_WAKEUP,
|
WLAN_CMD_TBTT_WAKEUP,
|
||||||
WLAN_CMD_BECON_SEND,
|
WLAN_CMD_BECON_SEND,
|
||||||
WLAN_CMD_CHANGE_ANTENNA,
|
WLAN_CMD_CHANGE_ANTENNA,
|
||||||
WLAN_CMD_11H_CHSW,
|
WLAN_CMD_11H_CHSW,
|
||||||
} CMD_CODE, *PCMD_CODE;
|
};
|
||||||
|
|
||||||
#define CMD_Q_SIZE 32
|
#define CMD_Q_SIZE 32
|
||||||
|
|
||||||
|
@ -57,7 +57,7 @@ typedef enum tagCMD_STATUS {
|
||||||
} CMD_STATUS, *PCMD_STATUS;
|
} CMD_STATUS, *PCMD_STATUS;
|
||||||
|
|
||||||
typedef struct tagCMD_ITEM {
|
typedef struct tagCMD_ITEM {
|
||||||
CMD_CODE eCmd;
|
enum vnt_cmd cmd;
|
||||||
} CMD_ITEM, *PCMD_ITEM;
|
} CMD_ITEM, *PCMD_ITEM;
|
||||||
|
|
||||||
// Command state
|
// Command state
|
||||||
|
@ -75,7 +75,7 @@ struct vnt_private;
|
||||||
|
|
||||||
void vResetCommandTimer(struct vnt_private *);
|
void vResetCommandTimer(struct vnt_private *);
|
||||||
|
|
||||||
int bScheduleCommand(struct vnt_private *, CMD_CODE eCommand, u8 *pbyItem0);
|
int bScheduleCommand(struct vnt_private *, enum vnt_cmd, u8 *);
|
||||||
|
|
||||||
void vRunCommand(struct work_struct *work);
|
void vRunCommand(struct work_struct *work);
|
||||||
|
|
||||||
|
|
Загрузка…
Ссылка в новой задаче