camel case changes
pDevice -> priv
MSecond -> msecs
Signed-off-by: Malcolm Priestley <[email protected]>
---
drivers/staging/vt6656/wcmd.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/drivers/staging/vt6656/wcmd.c b/drivers/staging/vt6656/wcmd.c
index b62726f..2553cde 100644
--- a/drivers/staging/vt6656/wcmd.c
+++ b/drivers/staging/vt6656/wcmd.c
@@ -54,11 +54,9 @@ static int msglevel = MSG_LEVEL_INFO;
static int s_bCommandComplete(struct vnt_private *);
-static void
-vCommandTimerWait(struct vnt_private *pDevice, unsigned long MSecond)
+static void vCommandTimerWait(struct vnt_private *priv, unsigned long msecs)
{
- schedule_delayed_work(&pDevice->run_command_work,
- msecs_to_jiffies(MSecond));
+ schedule_delayed_work(&priv->run_command_work, msecs_to_jiffies(msecs));
}
void vRunCommand(struct work_struct *work)
--
1.9.1
Signed-off-by: Malcolm Priestley <[email protected]>
---
drivers/staging/vt6656/wcmd.c | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)
diff --git a/drivers/staging/vt6656/wcmd.c b/drivers/staging/vt6656/wcmd.c
index 9130f14..ade0f81 100644
--- a/drivers/staging/vt6656/wcmd.c
+++ b/drivers/staging/vt6656/wcmd.c
@@ -49,9 +49,6 @@
#include "rf.h"
#include "channel.h"
-static int msglevel = MSG_LEVEL_INFO;
-//static int msglevel = MSG_LEVEL_DEBUG;
-
static int s_bCommandComplete(struct vnt_private *);
static void vCommandTimerWait(struct vnt_private *priv, unsigned long msecs)
@@ -108,8 +105,8 @@ void vRunCommand(struct work_struct *work)
break;
case WLAN_CMD_CHANGE_ANTENNA_START:
- DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO
- "Change from Antenna%d to", (int)priv->dwRxAntennaSel);
+ dev_dbg(&priv->usb->dev, "Change from Antenna%d to",
+ priv->dwRxAntennaSel);
if (priv->dwRxAntennaSel == 0) {
priv->dwRxAntennaSel = 1;
--
1.9.1
pDevice -> priv
Signed-off-by: Malcolm Priestley <[email protected]>
---
drivers/staging/vt6656/wcmd.c | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/drivers/staging/vt6656/wcmd.c b/drivers/staging/vt6656/wcmd.c
index 76e7f78..9130f14 100644
--- a/drivers/staging/vt6656/wcmd.c
+++ b/drivers/staging/vt6656/wcmd.c
@@ -207,12 +207,12 @@ int bScheduleCommand(struct vnt_private *priv, CMD_CODE command, u8 *item0)
}
-void vResetCommandTimer(struct vnt_private *pDevice)
+void vResetCommandTimer(struct vnt_private *priv)
{
- pDevice->cbFreeCmdQueue = CMD_Q_SIZE;
- pDevice->uCmdDequeueIdx = 0;
- pDevice->uCmdEnqueueIdx = 0;
- pDevice->eCommandState = WLAN_CMD_IDLE;
- pDevice->bCmdRunning = false;
- pDevice->bCmdClear = false;
+ priv->cbFreeCmdQueue = CMD_Q_SIZE;
+ priv->uCmdDequeueIdx = 0;
+ priv->uCmdEnqueueIdx = 0;
+ priv->eCommandState = WLAN_CMD_IDLE;
+ priv->bCmdRunning = false;
+ priv->bCmdClear = false;
}
--
1.9.1
Camel case changes
pDevice -> priv
eCommand -> command
pbyItem0 -> item0
Signed-off-by: Malcolm Priestley <[email protected]>
---
drivers/staging/vt6656/wcmd.c | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/drivers/staging/vt6656/wcmd.c b/drivers/staging/vt6656/wcmd.c
index cdd828c..76e7f78 100644
--- a/drivers/staging/vt6656/wcmd.c
+++ b/drivers/staging/vt6656/wcmd.c
@@ -189,19 +189,19 @@ static int s_bCommandComplete(struct vnt_private *priv)
return true;
}
-int bScheduleCommand(struct vnt_private *pDevice,
- CMD_CODE eCommand, u8 *pbyItem0)
+int bScheduleCommand(struct vnt_private *priv, CMD_CODE command, u8 *item0)
{
- if (pDevice->cbFreeCmdQueue == 0)
+ if (priv->cbFreeCmdQueue == 0)
return false;
- pDevice->eCmdQueue[pDevice->uCmdEnqueueIdx].eCmd = eCommand;
- ADD_ONE_WITH_WRAP_AROUND(pDevice->uCmdEnqueueIdx, CMD_Q_SIZE);
- pDevice->cbFreeCmdQueue--;
+ priv->eCmdQueue[priv->uCmdEnqueueIdx].eCmd = command;
- if (pDevice->bCmdRunning == false)
- s_bCommandComplete(pDevice);
+ ADD_ONE_WITH_WRAP_AROUND(priv->uCmdEnqueueIdx, CMD_Q_SIZE);
+ priv->cbFreeCmdQueue--;
+
+ if (priv->bCmdRunning == false)
+ s_bCommandComplete(priv);
return true;
--
1.9.1
pDevice -> priv
Signed-off-by: Malcolm Priestley <[email protected]>
---
drivers/staging/vt6656/wcmd.c | 34 +++++++++++++++++-----------------
1 file changed, 17 insertions(+), 17 deletions(-)
diff --git a/drivers/staging/vt6656/wcmd.c b/drivers/staging/vt6656/wcmd.c
index cc9d50a..cdd828c 100644
--- a/drivers/staging/vt6656/wcmd.c
+++ b/drivers/staging/vt6656/wcmd.c
@@ -139,52 +139,52 @@ void vRunCommand(struct work_struct *work)
return;
}
-static int s_bCommandComplete(struct vnt_private *pDevice)
+static int s_bCommandComplete(struct vnt_private *priv)
{
- pDevice->eCommandState = WLAN_CMD_IDLE;
- if (pDevice->cbFreeCmdQueue == CMD_Q_SIZE) {
- //Command Queue Empty
- pDevice->bCmdRunning = false;
+ priv->eCommandState = WLAN_CMD_IDLE;
+ if (priv->cbFreeCmdQueue == CMD_Q_SIZE) {
+ /* Command Queue Empty */
+ priv->bCmdRunning = false;
return true;
}
- pDevice->eCommand = pDevice->eCmdQueue[pDevice->uCmdDequeueIdx].eCmd;
+ priv->eCommand = priv->eCmdQueue[priv->uCmdDequeueIdx].eCmd;
- ADD_ONE_WITH_WRAP_AROUND(pDevice->uCmdDequeueIdx, CMD_Q_SIZE);
- pDevice->cbFreeCmdQueue++;
- pDevice->bCmdRunning = true;
+ ADD_ONE_WITH_WRAP_AROUND(priv->uCmdDequeueIdx, CMD_Q_SIZE);
+ priv->cbFreeCmdQueue++;
+ priv->bCmdRunning = true;
- switch (pDevice->eCommand) {
+ switch (priv->eCommand) {
case WLAN_CMD_INIT_MAC80211:
- pDevice->eCommandState = WLAN_CMD_INIT_MAC80211_START;
+ priv->eCommandState = WLAN_CMD_INIT_MAC80211_START;
break;
case WLAN_CMD_TBTT_WAKEUP:
- pDevice->eCommandState = WLAN_CMD_TBTT_WAKEUP_START;
+ priv->eCommandState = WLAN_CMD_TBTT_WAKEUP_START;
break;
case WLAN_CMD_BECON_SEND:
- pDevice->eCommandState = WLAN_CMD_BECON_SEND_START;
+ priv->eCommandState = WLAN_CMD_BECON_SEND_START;
break;
case WLAN_CMD_SETPOWER:
- pDevice->eCommandState = WLAN_CMD_SETPOWER_START;
+ priv->eCommandState = WLAN_CMD_SETPOWER_START;
break;
case WLAN_CMD_CHANGE_ANTENNA:
- pDevice->eCommandState = WLAN_CMD_CHANGE_ANTENNA_START;
+ priv->eCommandState = WLAN_CMD_CHANGE_ANTENNA_START;
break;
case WLAN_CMD_11H_CHSW:
- pDevice->eCommandState = WLAN_CMD_11H_CHSW_START;
+ priv->eCommandState = WLAN_CMD_11H_CHSW_START;
break;
default:
break;
}
- vCommandTimerWait(pDevice, 0);
+ vCommandTimerWait(priv, 0);
return true;
}
--
1.9.1
WLAN_CMD_CHANGE_BBSENSITIVITY and WLAN_CMD_MAC_DISPOWERSAVING
are already implemented and don't need the command timer.
Signed-off-by: Malcolm Priestley <[email protected]>
---
drivers/staging/vt6656/wcmd.c | 34 ----------------------------------
drivers/staging/vt6656/wcmd.h | 24 ------------------------
2 files changed, 58 deletions(-)
diff --git a/drivers/staging/vt6656/wcmd.c b/drivers/staging/vt6656/wcmd.c
index 0b87486..5001193 100644
--- a/drivers/staging/vt6656/wcmd.c
+++ b/drivers/staging/vt6656/wcmd.c
@@ -63,7 +63,6 @@ void vRunCommand(struct work_struct *work)
{
struct vnt_private *pDevice =
container_of(work, struct vnt_private, run_command_work.work);
- u8 byData;
if (pDevice->Flags & fMP_DISCONNECTED)
return;
@@ -87,15 +86,6 @@ void vRunCommand(struct work_struct *work)
break;
- case WLAN_CMD_CHANGE_BBSENSITIVITY_START:
-
- pDevice->bStopDataPkt = true;
- pDevice->byBBVGACurrent = pDevice->byBBVGANew;
- BBvSetVGAGainOffset(pDevice, pDevice->byBBVGACurrent);
- DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"Change sensitivity pDevice->byBBVGACurrent = %x\n", pDevice->byBBVGACurrent);
- pDevice->bStopDataPkt = false;
- break;
-
case WLAN_CMD_TBTT_WAKEUP_START:
vnt_next_tbtt_wakeup(pDevice);
break;
@@ -134,26 +124,10 @@ void vRunCommand(struct work_struct *work)
}
break;
- case WLAN_CMD_MAC_DISPOWERSAVING_START:
- vnt_control_in_u8(pDevice, MESSAGE_REQUEST_MACREG, MAC_REG_PSCTL, &byData);
- if ((byData & PSCTL_PS) != 0) {
- // disable power saving hw function
- vnt_control_out(pDevice,
- MESSAGE_TYPE_DISABLE_PS,
- 0,
- 0,
- 0,
- NULL
- );
- }
- break;
-
case WLAN_CMD_11H_CHSW_START:
vnt_set_channel(pDevice, pDevice->hw->conf.chandef.chan->hw_value);
break;
- case WLAN_CMD_CONFIGURE_FILTER_START:
- break;
default:
break;
} //switch
@@ -185,10 +159,6 @@ static int s_bCommandComplete(struct vnt_private *pDevice)
pDevice->eCommandState = WLAN_CMD_INIT_MAC80211_START;
break;
- case WLAN_CMD_CHANGE_BBSENSITIVITY:
- pDevice->eCommandState = WLAN_CMD_CHANGE_BBSENSITIVITY_START;
- break;
-
case WLAN_CMD_TBTT_WAKEUP:
pDevice->eCommandState = WLAN_CMD_TBTT_WAKEUP_START;
break;
@@ -205,10 +175,6 @@ static int s_bCommandComplete(struct vnt_private *pDevice)
pDevice->eCommandState = WLAN_CMD_CHANGE_ANTENNA_START;
break;
- case WLAN_CMD_MAC_DISPOWERSAVING:
- pDevice->eCommandState = WLAN_CMD_MAC_DISPOWERSAVING_START;
- break;
-
case WLAN_CMD_11H_CHSW:
pDevice->eCommandState = WLAN_CMD_11H_CHSW_START;
break;
diff --git a/drivers/staging/vt6656/wcmd.h b/drivers/staging/vt6656/wcmd.h
index eb2e972..4fe34b5 100644
--- a/drivers/staging/vt6656/wcmd.h
+++ b/drivers/staging/vt6656/wcmd.h
@@ -37,21 +37,11 @@
// Command code
typedef enum tagCMD_CODE {
WLAN_CMD_INIT_MAC80211,
- WLAN_CMD_BSSID_SCAN,
- WLAN_CMD_SSID,
- WLAN_CMD_DISASSOCIATE,
- WLAN_CMD_DEAUTH,
- WLAN_CMD_RX_PSPOLL,
- WLAN_CMD_CHANGE_BBSENSITIVITY,
WLAN_CMD_SETPOWER,
WLAN_CMD_TBTT_WAKEUP,
WLAN_CMD_BECON_SEND,
WLAN_CMD_CHANGE_ANTENNA,
- WLAN_CMD_REMOVE_ALLKEY,
- WLAN_CMD_MAC_DISPOWERSAVING,
WLAN_CMD_11H_CHSW,
- WLAN_CMD_RUN_AP,
- WLAN_CMD_CONFIGURE_FILTER
} CMD_CODE, *PCMD_CODE;
#define CMD_Q_SIZE 32
@@ -77,25 +67,11 @@ typedef struct tagCMD_ITEM {
// Command state
typedef enum tagCMD_STATE {
WLAN_CMD_INIT_MAC80211_START,
- WLAN_CMD_SCAN_START,
- WLAN_CMD_SCAN_END,
- WLAN_CMD_DISASSOCIATE_START,
- WLAN_CMD_DEAUTHEN_START,
- WLAN_CMD_SSID_START,
- WLAN_AUTHENTICATE_WAIT,
- WLAN_ASSOCIATE_WAIT,
- WLAN_DISASSOCIATE_WAIT,
- WLAN_CMD_TX_PSPACKET_START,
- WLAN_CMD_CHANGE_BBSENSITIVITY_START,
WLAN_CMD_SETPOWER_START,
- WLAN_CMD_AP_MODE_START,
WLAN_CMD_TBTT_WAKEUP_START,
WLAN_CMD_BECON_SEND_START,
WLAN_CMD_CHANGE_ANTENNA_START,
- WLAN_CMD_REMOVE_ALLKEY_START,
- WLAN_CMD_MAC_DISPOWERSAVING_START,
WLAN_CMD_11H_CHSW_START,
- WLAN_CMD_CONFIGURE_FILTER_START,
WLAN_CMD_IDLE
} CMD_STATE, *PCMD_STATE;
--
1.9.1
Part of it has already been removed. checking isr1 & ISR_GPIO3
serves no purpose.
Signed-off-by: Malcolm Priestley <[email protected]>
---
drivers/staging/vt6656/int.c | 6 ------
drivers/staging/vt6656/wcmd.c | 14 --------------
drivers/staging/vt6656/wcmd.h | 2 --
3 files changed, 22 deletions(-)
diff --git a/drivers/staging/vt6656/int.c b/drivers/staging/vt6656/int.c
index 1cc9364..77bd9dd 100644
--- a/drivers/staging/vt6656/int.c
+++ b/drivers/staging/vt6656/int.c
@@ -197,12 +197,6 @@ void INTnsProcessData(struct vnt_private *priv)
low_stats->dot11FCSErrorCount += int_data->fcs_err;
}
- if (int_data->isr1 != 0)
- if (int_data->isr1 & ISR_GPIO3)
- bScheduleCommand((void *) priv,
- WLAN_CMD_RADIO,
- NULL);
-
priv->int_buf.in_use = false;
stats->tx_errors = priv->wstats.discard.retries;
diff --git a/drivers/staging/vt6656/wcmd.c b/drivers/staging/vt6656/wcmd.c
index 2553cde..0b87486 100644
--- a/drivers/staging/vt6656/wcmd.c
+++ b/drivers/staging/vt6656/wcmd.c
@@ -185,10 +185,6 @@ static int s_bCommandComplete(struct vnt_private *pDevice)
pDevice->eCommandState = WLAN_CMD_INIT_MAC80211_START;
break;
- case WLAN_CMD_RADIO:
- pDevice->eCommandState = WLAN_CMD_RADIO_START;
- pDevice->bRadioCmd = bRadioCmd;
- break;
case WLAN_CMD_CHANGE_BBSENSITIVITY:
pDevice->eCommandState = WLAN_CMD_CHANGE_BBSENSITIVITY_START;
break;
@@ -234,16 +230,6 @@ int bScheduleCommand(struct vnt_private *pDevice,
return false;
pDevice->eCmdQueue[pDevice->uCmdEnqueueIdx].eCmd = eCommand;
pDevice->eCmdQueue[pDevice->uCmdEnqueueIdx].bForceSCAN = true;
- if (pbyItem0 != NULL) {
- switch (eCommand) {
- case WLAN_CMD_RADIO:
- pDevice->eCmdQueue[pDevice->uCmdEnqueueIdx].bRadioCmd = *((int *)pbyItem0);
- break;
-
- default:
- break;
- }
- }
ADD_ONE_WITH_WRAP_AROUND(pDevice->uCmdEnqueueIdx, CMD_Q_SIZE);
pDevice->cbFreeCmdQueue--;
diff --git a/drivers/staging/vt6656/wcmd.h b/drivers/staging/vt6656/wcmd.h
index 1e5b739..eb2e972 100644
--- a/drivers/staging/vt6656/wcmd.h
+++ b/drivers/staging/vt6656/wcmd.h
@@ -42,7 +42,6 @@ typedef enum tagCMD_CODE {
WLAN_CMD_DISASSOCIATE,
WLAN_CMD_DEAUTH,
WLAN_CMD_RX_PSPOLL,
- WLAN_CMD_RADIO,
WLAN_CMD_CHANGE_BBSENSITIVITY,
WLAN_CMD_SETPOWER,
WLAN_CMD_TBTT_WAKEUP,
@@ -87,7 +86,6 @@ typedef enum tagCMD_STATE {
WLAN_ASSOCIATE_WAIT,
WLAN_DISASSOCIATE_WAIT,
WLAN_CMD_TX_PSPACKET_START,
- WLAN_CMD_RADIO_START,
WLAN_CMD_CHANGE_BBSENSITIVITY_START,
WLAN_CMD_SETPOWER_START,
WLAN_CMD_AP_MODE_START,
--
1.9.1
Also remove local variables
Signed-off-by: Malcolm Priestley <[email protected]>
---
drivers/staging/vt6656/wcmd.c | 6 +-----
drivers/staging/vt6656/wcmd.h | 4 ----
2 files changed, 1 insertion(+), 9 deletions(-)
diff --git a/drivers/staging/vt6656/wcmd.c b/drivers/staging/vt6656/wcmd.c
index 5621c14..1987d5c 100644
--- a/drivers/staging/vt6656/wcmd.c
+++ b/drivers/staging/vt6656/wcmd.c
@@ -141,8 +141,6 @@ void vRunCommand(struct work_struct *work)
static int s_bCommandComplete(struct vnt_private *pDevice)
{
- int bRadioCmd = false;
- int bForceSCAN = true;
pDevice->eCommandState = WLAN_CMD_IDLE;
if (pDevice->cbFreeCmdQueue == CMD_Q_SIZE) {
@@ -151,8 +149,7 @@ static int s_bCommandComplete(struct vnt_private *pDevice)
return true;
} else {
pDevice->eCommand = pDevice->eCmdQueue[pDevice->uCmdDequeueIdx].eCmd;
- bRadioCmd = pDevice->eCmdQueue[pDevice->uCmdDequeueIdx].bRadioCmd;
- bForceSCAN = pDevice->eCmdQueue[pDevice->uCmdDequeueIdx].bForceSCAN;
+
ADD_ONE_WITH_WRAP_AROUND(pDevice->uCmdDequeueIdx, CMD_Q_SIZE);
pDevice->cbFreeCmdQueue++;
pDevice->bCmdRunning = true;
@@ -197,7 +194,6 @@ int bScheduleCommand(struct vnt_private *pDevice,
if (pDevice->cbFreeCmdQueue == 0)
return false;
pDevice->eCmdQueue[pDevice->uCmdEnqueueIdx].eCmd = eCommand;
- pDevice->eCmdQueue[pDevice->uCmdEnqueueIdx].bForceSCAN = true;
ADD_ONE_WITH_WRAP_AROUND(pDevice->uCmdEnqueueIdx, CMD_Q_SIZE);
pDevice->cbFreeCmdQueue--;
diff --git a/drivers/staging/vt6656/wcmd.h b/drivers/staging/vt6656/wcmd.h
index 4fe34b5..98387f3 100644
--- a/drivers/staging/vt6656/wcmd.h
+++ b/drivers/staging/vt6656/wcmd.h
@@ -58,10 +58,6 @@ typedef enum tagCMD_STATUS {
typedef struct tagCMD_ITEM {
CMD_CODE eCmd;
- bool bNeedRadioOFF;
- bool bRadioCmd;
- bool bForceSCAN;
- u16 wDeAuthenReason;
} CMD_ITEM, *PCMD_ITEM;
// Command state
--
1.9.1
pDevice -> priv
Signed-off-by: Malcolm Priestley <[email protected]>
---
drivers/staging/vt6656/wcmd.c | 56 ++++++++++++++++++++++---------------------
1 file changed, 29 insertions(+), 27 deletions(-)
diff --git a/drivers/staging/vt6656/wcmd.c b/drivers/staging/vt6656/wcmd.c
index 5001193..5621c14 100644
--- a/drivers/staging/vt6656/wcmd.c
+++ b/drivers/staging/vt6656/wcmd.c
@@ -61,78 +61,80 @@ static void vCommandTimerWait(struct vnt_private *priv, unsigned long msecs)
void vRunCommand(struct work_struct *work)
{
- struct vnt_private *pDevice =
+ struct vnt_private *priv =
container_of(work, struct vnt_private, run_command_work.work);
- if (pDevice->Flags & fMP_DISCONNECTED)
+ if (priv->Flags & fMP_DISCONNECTED)
return;
- if (pDevice->bCmdRunning != true)
+ if (priv->bCmdRunning != true)
return;
- switch (pDevice->eCommandState) {
+ switch (priv->eCommandState) {
case WLAN_CMD_INIT_MAC80211_START:
- if (pDevice->mac_hw)
+ if (priv->mac_hw)
break;
- dev_info(&pDevice->usb->dev, "Starting mac80211\n");
+ dev_info(&priv->usb->dev, "Starting mac80211\n");
- if (vnt_init(pDevice)) {
+ if (vnt_init(priv)) {
/* If fail all ends TODO retry */
- dev_err(&pDevice->usb->dev, "failed to start\n");
- ieee80211_free_hw(pDevice->hw);
+ dev_err(&priv->usb->dev, "failed to start\n");
+ ieee80211_free_hw(priv->hw);
return;
}
break;
case WLAN_CMD_TBTT_WAKEUP_START:
- vnt_next_tbtt_wakeup(pDevice);
+ vnt_next_tbtt_wakeup(priv);
break;
case WLAN_CMD_BECON_SEND_START:
- if (!pDevice->vif)
+ if (!priv->vif)
break;
- vnt_beacon_make(pDevice, pDevice->vif);
+ vnt_beacon_make(priv, priv->vif);
- vnt_mac_reg_bits_on(pDevice, MAC_REG_TCR, TCR_AUTOBCNTX);
+ vnt_mac_reg_bits_on(priv, MAC_REG_TCR, TCR_AUTOBCNTX);
break;
case WLAN_CMD_SETPOWER_START:
- vnt_rf_setpower(pDevice, pDevice->wCurrentRate,
- pDevice->hw->conf.chandef.chan->hw_value);
+ vnt_rf_setpower(priv, priv->wCurrentRate,
+ priv->hw->conf.chandef.chan->hw_value);
break;
case WLAN_CMD_CHANGE_ANTENNA_START:
- DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"Change from Antenna%d to", (int)pDevice->dwRxAntennaSel);
- if (pDevice->dwRxAntennaSel == 0) {
- pDevice->dwRxAntennaSel = 1;
- if (pDevice->bTxRxAntInv == true)
- BBvSetAntennaMode(pDevice, ANT_RXA);
+ DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO
+ "Change from Antenna%d to", (int)priv->dwRxAntennaSel);
+
+ if (priv->dwRxAntennaSel == 0) {
+ priv->dwRxAntennaSel = 1;
+ if (priv->bTxRxAntInv == true)
+ BBvSetAntennaMode(priv, ANT_RXA);
else
- BBvSetAntennaMode(pDevice, ANT_RXB);
+ BBvSetAntennaMode(priv, ANT_RXB);
} else {
- pDevice->dwRxAntennaSel = 0;
- if (pDevice->bTxRxAntInv == true)
- BBvSetAntennaMode(pDevice, ANT_RXB);
+ priv->dwRxAntennaSel = 0;
+ if (priv->bTxRxAntInv == true)
+ BBvSetAntennaMode(priv, ANT_RXB);
else
- BBvSetAntennaMode(pDevice, ANT_RXA);
+ BBvSetAntennaMode(priv, ANT_RXA);
}
break;
case WLAN_CMD_11H_CHSW_START:
- vnt_set_channel(pDevice, pDevice->hw->conf.chandef.chan->hw_value);
+ vnt_set_channel(priv, priv->hw->conf.chandef.chan->hw_value);
break;
default:
break;
} //switch
- s_bCommandComplete(pDevice);
+ s_bCommandComplete(priv);
return;
}
--
1.9.1
if returns out so remove else
Signed-off-by: Malcolm Priestley <[email protected]>
---
drivers/staging/vt6656/wcmd.c | 60 ++++++++++++++++++++++---------------------
1 file changed, 31 insertions(+), 29 deletions(-)
diff --git a/drivers/staging/vt6656/wcmd.c b/drivers/staging/vt6656/wcmd.c
index 1987d5c..cc9d50a 100644
--- a/drivers/staging/vt6656/wcmd.c
+++ b/drivers/staging/vt6656/wcmd.c
@@ -147,43 +147,45 @@ static int s_bCommandComplete(struct vnt_private *pDevice)
//Command Queue Empty
pDevice->bCmdRunning = false;
return true;
- } else {
- pDevice->eCommand = pDevice->eCmdQueue[pDevice->uCmdDequeueIdx].eCmd;
-
- ADD_ONE_WITH_WRAP_AROUND(pDevice->uCmdDequeueIdx, CMD_Q_SIZE);
- pDevice->cbFreeCmdQueue++;
- pDevice->bCmdRunning = true;
- switch (pDevice->eCommand) {
- case WLAN_CMD_INIT_MAC80211:
- pDevice->eCommandState = WLAN_CMD_INIT_MAC80211_START;
- break;
+ }
- case WLAN_CMD_TBTT_WAKEUP:
- pDevice->eCommandState = WLAN_CMD_TBTT_WAKEUP_START;
- break;
+ pDevice->eCommand = pDevice->eCmdQueue[pDevice->uCmdDequeueIdx].eCmd;
- case WLAN_CMD_BECON_SEND:
- pDevice->eCommandState = WLAN_CMD_BECON_SEND_START;
- break;
+ ADD_ONE_WITH_WRAP_AROUND(pDevice->uCmdDequeueIdx, CMD_Q_SIZE);
+ pDevice->cbFreeCmdQueue++;
+ pDevice->bCmdRunning = true;
- case WLAN_CMD_SETPOWER:
- pDevice->eCommandState = WLAN_CMD_SETPOWER_START;
- break;
+ switch (pDevice->eCommand) {
+ case WLAN_CMD_INIT_MAC80211:
+ pDevice->eCommandState = WLAN_CMD_INIT_MAC80211_START;
+ break;
- case WLAN_CMD_CHANGE_ANTENNA:
- pDevice->eCommandState = WLAN_CMD_CHANGE_ANTENNA_START;
- break;
+ case WLAN_CMD_TBTT_WAKEUP:
+ pDevice->eCommandState = WLAN_CMD_TBTT_WAKEUP_START;
+ break;
- case WLAN_CMD_11H_CHSW:
- pDevice->eCommandState = WLAN_CMD_11H_CHSW_START;
- break;
+ case WLAN_CMD_BECON_SEND:
+ pDevice->eCommandState = WLAN_CMD_BECON_SEND_START;
+ break;
- default:
- break;
- }
- vCommandTimerWait(pDevice, 0);
+ case WLAN_CMD_SETPOWER:
+ pDevice->eCommandState = WLAN_CMD_SETPOWER_START;
+ break;
+
+ case WLAN_CMD_CHANGE_ANTENNA:
+ pDevice->eCommandState = WLAN_CMD_CHANGE_ANTENNA_START;
+ break;
+
+ case WLAN_CMD_11H_CHSW:
+ pDevice->eCommandState = WLAN_CMD_11H_CHSW_START;
+ break;
+
+ default:
+ break;
}
+ vCommandTimerWait(pDevice, 0);
+
return true;
}
--
1.9.1