staging: vt6656: replace typedef enum tagCMD_CODE with enum vnt_cmd
PATCH 1/13 staging: vt6656: replace typedef enum tagCMD_CODE with enum vnt_cmd
Replacing the variables.
--- drivers/staging/vt6656/device.h | 2 +- drivers/staging/vt6656/wcmd.c | 8 ++++---- drivers/staging/vt6656/wcmd.h | 22 +++++++++++----------- 3 files changed, 16 insertions(+), 16 deletions(-)
drivers/staging/vt6656/device.h +1 -1
@@ -400,7 +400,7 @@ struct vnt_private {CMD_STATE eCommandState; -CMD_CODE eCommand; +enum vnt_cmd command;int bStopDataPkt;
drivers/staging/vt6656/wcmd.c +4 -4
@@ -146,13 +146,13 @@ static int s_bCommandComplete(struct vnt_private *priv)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 ); priv->cbFreeCmdQueue++; priv->bCmdRunning = true; -switch (priv->eCommand) { +switch (priv->command) {case WLAN_CMD_INIT_MAC80211 : priv->eCommandState =WLAN_CMD_INIT_MAC80211_START ;break ;
@@ -186,13 +186,13 @@ static int s_bCommandComplete(struct vnt_private *priv)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 )return false; - priv->eCmdQueue[priv->uCmdEnqueueIdx].eCmd = command; + priv->eCmdQueue[priv->uCmdEnqueueIdx].cmd = command;ADD_ONE_WITH_WRAP_AROUND (priv->uCmdEnqueueIdx,CMD_Q_SIZE ); priv->cbFreeCmdQueue--;
drivers/staging/vt6656/wcmd.h +11 -11
@@ -34,15 +34,15 @@#define AUTHENTICATE_TIMEOUT 1000 //ms#define ASSOCIATE_TIMEOUT 1000 //ms -// Command code -typedef enum tagCMD_CODE { -WLAN_CMD_INIT_MAC80211 , -WLAN_CMD_SETPOWER , -WLAN_CMD_TBTT_WAKEUP , -WLAN_CMD_BECON_SEND , -WLAN_CMD_CHANGE_ANTENNA , -WLAN_CMD_11H_CHSW , -}CMD_CODE , *PCMD_CODE ; +/* Command code */ +enum vnt_cmd { +WLAN_CMD_INIT_MAC80211 , +WLAN_CMD_SETPOWER , +WLAN_CMD_TBTT_WAKEUP , +WLAN_CMD_BECON_SEND , +WLAN_CMD_CHANGE_ANTENNA , +WLAN_CMD_11H_CHSW , +};#define CMD_Q_SIZE 32
@@ -57,7 +57,7 @@ typedef enum tagCMD_STATUS { }CMD_STATUS , *PCMD_STATUS ;typedef struct tagCMD_ITEM { -CMD_CODE eCmd; +enum vnt_cmd cmd; }CMD_ITEM , *PCMD_ITEM ;// Command state
@@ -75,7 +75,7 @@ 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);
Signature · 1 line
1.9.1
PATCH 2/13 staging: vt6656: replace typedef enum tagCMD_STATE with enum vnt_cmd_state
Replacing variables.
--- drivers/staging/vt6656/device.h | 2 +- drivers/staging/vt6656/wcmd.c | 18 +++++++++--------- drivers/staging/vt6656/wcmd.h | 20 ++++++++++---------- 3 files changed, 20 insertions(+), 20 deletions(-)
drivers/staging/vt6656/device.h +1 -1
@@ -398,7 +398,7 @@ struct vnt_private {/* Beacon releated */ u16 wSeqCounter; -CMD_STATE eCommandState; +enum vnt_cmd_state command_state;enum vnt_cmd command;
drivers/staging/vt6656/wcmd.c +9 -9
@@ -67,7 +67,7 @@ void vRunCommand(struct work_struct *work)if (priv->bCmdRunning != true)return ; -switch (priv->eCommandState) { +switch (priv->command_state) {case WLAN_CMD_INIT_MAC80211_START :if (priv->mac_hw)break ;
@@ -139,7 +139,7 @@ void vRunCommand(struct work_struct *work)static int s_bCommandComplete (struct vnt_private *priv) { - priv->eCommandState =WLAN_CMD_IDLE ; + priv->command_state =WLAN_CMD_IDLE ;if (priv->cbFreeCmdQueue ==CMD_Q_SIZE ) {/* Command Queue Empty */ priv->bCmdRunning = false;
@@ -154,27 +154,27 @@ static int s_bCommandComplete(struct vnt_private *priv)switch (priv->command) {case WLAN_CMD_INIT_MAC80211 : - priv->eCommandState =WLAN_CMD_INIT_MAC80211_START ; + priv->command_state =WLAN_CMD_INIT_MAC80211_START ;break ;case WLAN_CMD_TBTT_WAKEUP : - priv->eCommandState =WLAN_CMD_TBTT_WAKEUP_START ; + priv->command_state =WLAN_CMD_TBTT_WAKEUP_START ;break ;case WLAN_CMD_BECON_SEND : - priv->eCommandState =WLAN_CMD_BECON_SEND_START ; + priv->command_state =WLAN_CMD_BECON_SEND_START ;break ;case WLAN_CMD_SETPOWER : - priv->eCommandState =WLAN_CMD_SETPOWER_START ; + priv->command_state =WLAN_CMD_SETPOWER_START ;break ;case WLAN_CMD_CHANGE_ANTENNA : - priv->eCommandState =WLAN_CMD_CHANGE_ANTENNA_START ; + priv->command_state =WLAN_CMD_CHANGE_ANTENNA_START ;break ;case WLAN_CMD_11H_CHSW : - priv->eCommandState =WLAN_CMD_11H_CHSW_START ; + priv->command_state =WLAN_CMD_11H_CHSW_START ;break ;default :
@@ -209,7 +209,7 @@ void vResetCommandTimer(struct vnt_private *priv) priv->cbFreeCmdQueue =CMD_Q_SIZE ; priv->uCmdDequeueIdx =0 ; priv->uCmdEnqueueIdx =0 ; - priv->eCommandState =WLAN_CMD_IDLE ; + priv->command_state =WLAN_CMD_IDLE ; priv->bCmdRunning = false; priv->bCmdClear = false; }
drivers/staging/vt6656/wcmd.h +10 -10
@@ -60,16 +60,16 @@ typedef struct tagCMD_ITEM {enum vnt_cmd cmd; }CMD_ITEM , *PCMD_ITEM ; -// Command state -typedef enum tagCMD_STATE { -WLAN_CMD_INIT_MAC80211_START , -WLAN_CMD_SETPOWER_START , -WLAN_CMD_TBTT_WAKEUP_START , -WLAN_CMD_BECON_SEND_START , -WLAN_CMD_CHANGE_ANTENNA_START , -WLAN_CMD_11H_CHSW_START , -WLAN_CMD_IDLE -}CMD_STATE , *PCMD_STATE ; +/* Command state */ +enum vnt_cmd_state { +WLAN_CMD_INIT_MAC80211_START , +WLAN_CMD_SETPOWER_START , +WLAN_CMD_TBTT_WAKEUP_START , +WLAN_CMD_BECON_SEND_START , +WLAN_CMD_CHANGE_ANTENNA_START , +WLAN_CMD_11H_CHSW_START , +WLAN_CMD_IDLE +};struct vnt_private ;
Signature · 1 line
1.9.1
PATCH 3/13 staging: vt6656: remove typedef struct tagCMD_ITEM
In reply to Malcolm PriestleySince enum vnt_cmd is only member replace with array enum vnt_cmd cmd_queue with size of CMD_Q_SIZE
--- drivers/staging/vt6656/device.h | 2 +- drivers/staging/vt6656/wcmd.c | 4 ++-- drivers/staging/vt6656/wcmd.h | 4 ---- 3 files changed, 3 insertions(+), 7 deletions(-)
drivers/staging/vt6656/device.h +1 -1
@@ -406,7 +406,7 @@ struct vnt_private {/* 802.11 counter */ -CMD_ITEM eCmdQueue[CMD_Q_SIZE ]; +enum vnt_cmd cmd_queue[CMD_Q_SIZE ];u32 uCmdDequeueIdx;u32 uCmdEnqueueIdx;u32 cbFreeCmdQueue;
drivers/staging/vt6656/wcmd.c +2 -2
@@ -146,7 +146,7 @@ static int s_bCommandComplete(struct vnt_private *priv)return true; } - priv->command = priv->eCmdQueue[priv->uCmdDequeueIdx].cmd; + priv->command = priv->cmd_queue[priv->uCmdDequeueIdx];ADD_ONE_WITH_WRAP_AROUND (priv->uCmdDequeueIdx,CMD_Q_SIZE ); priv->cbFreeCmdQueue++;
@@ -192,7 +192,7 @@ int bScheduleCommand(struct vnt_private *priv, enum vnt_cmd command, u8 *item0)if (priv->cbFreeCmdQueue ==0 )return false; - priv->eCmdQueue[priv->uCmdEnqueueIdx].cmd = command; + priv->cmd_queue[priv->uCmdEnqueueIdx] = command;ADD_ONE_WITH_WRAP_AROUND (priv->uCmdEnqueueIdx,CMD_Q_SIZE ); priv->cbFreeCmdQueue--;
drivers/staging/vt6656/wcmd.h +0 -4
@@ -56,10 +56,6 @@ typedef enum tagCMD_STATUS { }CMD_STATUS , *PCMD_STATUS ; -typedef struct tagCMD_ITEM { -enum vnt_cmd cmd; -}CMD_ITEM , *PCMD_ITEM ; -/* Command state */ enum vnt_cmd_state {WLAN_CMD_INIT_MAC80211_START ,
Signature · 1 line
1.9.1
PATCH 4/13 staging: vt6656: remove unused variables bCmdClear and bNeedRadioOFF
In reply to Malcolm Priestley--- drivers/staging/vt6656/device.h | 2 -- drivers/staging/vt6656/wcmd.c | 1 - 2 files changed, 3 deletions(-)
drivers/staging/vt6656/device.h +0 -2
@@ -411,8 +411,6 @@ struct vnt_private {u32 uCmdEnqueueIdx;u32 cbFreeCmdQueue;int bCmdRunning; -int bCmdClear; -int bNeedRadioOFF;unsigned long key_entry_inuse;
drivers/staging/vt6656/wcmd.c +0 -1
@@ -211,5 +211,4 @@ void vResetCommandTimer(struct vnt_private *priv) priv->uCmdEnqueueIdx =0 ; priv->command_state =WLAN_CMD_IDLE ; priv->bCmdRunning = false; - priv->bCmdClear = false; }
Signature · 1 line
1.9.1
PATCH 5/13 staging: vt6656: replace camel case from command variables
In reply to Malcolm Priestleycamel case changes
uCmdDequeueIdx -> cmd_dequeue_idx
uCmdEnqueueIdx -> cmd_enqueue_idx
cbFreeCmdQueue -> free_cmd_queue
bCmdRunning -> cmd_running
--- drivers/staging/vt6656/device.h | 8 ++++---- drivers/staging/vt6656/main_usb.c | 2 +- drivers/staging/vt6656/wcmd.c | 32 ++++++++++++++++---------------- 3 files changed, 21 insertions(+), 21 deletions(-)
drivers/staging/vt6656/device.h +4 -4
@@ -407,10 +407,10 @@ struct vnt_private {/* 802.11 counter */ enum vnt_cmd cmd_queue[CMD_Q_SIZE ]; -u32 uCmdDequeueIdx; -u32 uCmdEnqueueIdx; -u32 cbFreeCmdQueue; -int bCmdRunning; +u32 cmd_dequeue_idx; +u32 cmd_enqueue_idx; +u32 free_cmd_queue; +int cmd_running;unsigned long key_entry_inuse;
drivers/staging/vt6656/main_usb.c +1 -1
@@ -708,7 +708,7 @@ static void vnt_stop(struct ieee80211_hw *hw)cancel_delayed_work_sync (&priv->run_command_work); - priv->bCmdRunning = false; + priv->cmd_running = false; priv->flags &= ~DEVICE_FLAGS_OPENED ;
drivers/staging/vt6656/wcmd.c +16 -16
@@ -64,7 +64,7 @@ void vRunCommand(struct work_struct *work)if (priv->Flags & fMP_DISCONNECTED)return ; -if (priv->bCmdRunning != true) +if (priv->cmd_running != true)return ;switch (priv->command_state) {
@@ -140,17 +140,17 @@ static int s_bCommandComplete(struct vnt_private *priv) { priv->command_state =WLAN_CMD_IDLE ; -if (priv->cbFreeCmdQueue ==CMD_Q_SIZE ) { +if (priv->free_cmd_queue ==CMD_Q_SIZE ) {/* Command Queue Empty */ - priv->bCmdRunning = false; + priv->cmd_running = false;return true; } - priv->command = priv->cmd_queue[priv->uCmdDequeueIdx]; + priv->command = priv->cmd_queue[priv->cmd_dequeue_idx]; -ADD_ONE_WITH_WRAP_AROUND (priv->uCmdDequeueIdx,CMD_Q_SIZE ); - priv->cbFreeCmdQueue++; - priv->bCmdRunning = true; +ADD_ONE_WITH_WRAP_AROUND (priv->cmd_dequeue_idx,CMD_Q_SIZE ); + priv->free_cmd_queue++; + priv->cmd_running = true;switch (priv->command) {case WLAN_CMD_INIT_MAC80211 :
@@ -189,15 +189,15 @@ static int s_bCommandComplete(struct vnt_private *priv)int bScheduleCommand (struct vnt_private *priv,enum vnt_cmd command,u8 *item0) { -if (priv->cbFreeCmdQueue ==0 ) +if (priv->free_cmd_queue ==0 )return false; - priv->cmd_queue[priv->uCmdEnqueueIdx] = command; + priv->cmd_queue[priv->cmd_enqueue_idx] = command; -ADD_ONE_WITH_WRAP_AROUND (priv->uCmdEnqueueIdx,CMD_Q_SIZE ); - priv->cbFreeCmdQueue--; +ADD_ONE_WITH_WRAP_AROUND (priv->cmd_enqueue_idx,CMD_Q_SIZE ); + priv->free_cmd_queue--; -if (priv->bCmdRunning == false) +if (priv->cmd_running == false)s_bCommandComplete (priv);return true;
@@ -206,9 +206,9 @@ int bScheduleCommand(struct vnt_private *priv, enum vnt_cmd command, u8 *item0)void vResetCommandTimer (struct vnt_private *priv) { - priv->cbFreeCmdQueue =CMD_Q_SIZE ; - priv->uCmdDequeueIdx =0 ; - priv->uCmdEnqueueIdx =0 ; + priv->free_cmd_queue =CMD_Q_SIZE ; + priv->cmd_dequeue_idx =0 ; + priv->cmd_enqueue_idx =0 ; priv->command_state =WLAN_CMD_IDLE ; - priv->bCmdRunning = false; + priv->cmd_running = false; }
Signature · 1 line
1.9.1
PATCH 6/13 staging: vt6656: dead code remove typedef enum tagCMD_STATUS
In reply to Malcolm Priestley--- drivers/staging/vt6656/wcmd.h | 10 ---------- 1 file changed, 10 deletions(-)
drivers/staging/vt6656/wcmd.h +0 -10
@@ -46,16 +46,6 @@ enum vnt_cmd {#define CMD_Q_SIZE 32 -typedef enum tagCMD_STATUS { - -CMD_STATUS_SUCCESS =0 , -CMD_STATUS_FAILURE , -CMD_STATUS_RESOURCES , -CMD_STATUS_TIMEOUT , -CMD_STATUS_PENDING - -}CMD_STATUS , *PCMD_STATUS ; -/* Command state */ enum vnt_cmd_state {WLAN_CMD_INIT_MAC80211_START ,
Signature · 1 line
1.9.1
PATCH 7/13 staging: vt6656: Move and rename s_bCommandComplete to vnt_cmd_complete
In reply to Malcolm PriestleyRemove static declaration and moving for function visibility
--- drivers/staging/vt6656/wcmd.c | 108 +++++++++++++++++++++--------------------- 1 file changed, 53 insertions(+), 55 deletions(-)
drivers/staging/vt6656/wcmd.c +53 -55
@@ -28,7 +28,7 @@* s_vProbeChannel - Active scan channel * s_MgrMakeProbeRequest - Make ProbeRequest packet * CommandTimer - Timer function to handle command -* s_bCommandComplete - Command Complete function +* vnt_cmd_complete - Command Complete function * bScheduleCommand - Push Command and wait Command Scheduler to do * vCommandTimer- Command call back functions * vCommandTimerWait- Call back timer
@@ -49,13 +49,61 @@#include "rf.h" #include "channel.h" -static int s_bCommandComplete (struct vnt_private *); -static void vCommandTimerWait (struct vnt_private *priv,unsigned long msecs) {schedule_delayed_work (&priv->run_command_work,msecs_to_jiffies (msecs)); } +static int vnt_cmd_complete (struct vnt_private *priv) +{ + + priv->command_state =WLAN_CMD_IDLE ; +if (priv->free_cmd_queue ==CMD_Q_SIZE ) { +/* Command Queue Empty */ + priv->cmd_running = false; +return true; + } + + priv->command = priv->cmd_queue[priv->cmd_dequeue_idx]; + +ADD_ONE_WITH_WRAP_AROUND (priv->cmd_dequeue_idx,CMD_Q_SIZE ); + priv->free_cmd_queue++; + priv->cmd_running = true; + +switch (priv->command) { +case WLAN_CMD_INIT_MAC80211 : + priv->command_state =WLAN_CMD_INIT_MAC80211_START ; +break ; + +case WLAN_CMD_TBTT_WAKEUP : + priv->command_state =WLAN_CMD_TBTT_WAKEUP_START ; +break ; + +case WLAN_CMD_BECON_SEND : + priv->command_state =WLAN_CMD_BECON_SEND_START ; +break ; + +case WLAN_CMD_SETPOWER : + priv->command_state =WLAN_CMD_SETPOWER_START ; +break ; + +case WLAN_CMD_CHANGE_ANTENNA : + priv->command_state =WLAN_CMD_CHANGE_ANTENNA_START ; +break ; + +case WLAN_CMD_11H_CHSW : + priv->command_state =WLAN_CMD_11H_CHSW_START ; +break ; + +default : +break ; + } + +vCommandTimerWait (priv,0 ); + +return true; +} +void vRunCommand (struct work_struct *work) { struct vnt_private *priv =
@@ -131,61 +179,11 @@ void vRunCommand(struct work_struct *work)break ; }//switch -s_bCommandComplete (priv); +vnt_cmd_complete (priv);return ; } -static int s_bCommandComplete (struct vnt_private *priv) -{ - - priv->command_state =WLAN_CMD_IDLE ; -if (priv->free_cmd_queue ==CMD_Q_SIZE ) { -/* Command Queue Empty */ - priv->cmd_running = false; -return true; - } - - priv->command = priv->cmd_queue[priv->cmd_dequeue_idx]; - -ADD_ONE_WITH_WRAP_AROUND (priv->cmd_dequeue_idx,CMD_Q_SIZE ); - priv->free_cmd_queue++; - priv->cmd_running = true; - -switch (priv->command) { -case WLAN_CMD_INIT_MAC80211 : - priv->command_state =WLAN_CMD_INIT_MAC80211_START ; -break ; - -case WLAN_CMD_TBTT_WAKEUP : - priv->command_state =WLAN_CMD_TBTT_WAKEUP_START ; -break ; - -case WLAN_CMD_BECON_SEND : - priv->command_state =WLAN_CMD_BECON_SEND_START ; -break ; - -case WLAN_CMD_SETPOWER : - priv->command_state =WLAN_CMD_SETPOWER_START ; -break ; - -case WLAN_CMD_CHANGE_ANTENNA : - priv->command_state =WLAN_CMD_CHANGE_ANTENNA_START ; -break ; - -case WLAN_CMD_11H_CHSW : - priv->command_state =WLAN_CMD_11H_CHSW_START ; -break ; - -default : -break ; - } - -vCommandTimerWait (priv,0 ); - -return true; -} -int bScheduleCommand (struct vnt_private *priv,enum vnt_cmd command,u8 *item0) {
@@ -198,7 +196,7 @@ int bScheduleCommand(struct vnt_private *priv, enum vnt_cmd command, u8 *item0) priv->free_cmd_queue--;if (priv->cmd_running == false) -s_bCommandComplete (priv); +vnt_cmd_complete (priv);return true;
Signature · 1 line
1.9.1
PATCH 8/13 staging: vt6656: rename vCommandTimerWait to vnt_cmd_timer_wait
In reply to Malcolm Priestley--- drivers/staging/vt6656/wcmd.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/staging/vt6656/wcmd.c +3 -3
@@ -31,7 +31,7 @@* vnt_cmd_complete - Command Complete function * bScheduleCommand - Push Command and wait Command Scheduler to do * vCommandTimer- Command call back functions -* vCommandTimerWait- Call back timer +* vnt_cmd_timer_wait- Call back timer * s_bClearBSSID_SCAN- Clear BSSID_SCAN cmd in CMD Queue * * Revision History:
@@ -49,7 +49,7 @@#include "rf.h" #include "channel.h" -static void vCommandTimerWait (struct vnt_private *priv,unsigned long msecs) +static void vnt_cmd_timer_wait (struct vnt_private *priv,unsigned long msecs) {schedule_delayed_work (&priv->run_command_work,msecs_to_jiffies (msecs)); }
@@ -99,7 +99,7 @@ static int vnt_cmd_complete(struct vnt_private *priv)break ; } -vCommandTimerWait (priv,0 ); +vnt_cmd_timer_wait (priv,0 );return true; }
Signature · 1 line
1.9.1
PATCH 9/13 staging: vt6656: rename vRunCommand to vnt_run_command
In reply to Malcolm Priestley--- drivers/staging/vt6656/main_usb.c | 2 +- drivers/staging/vt6656/wcmd.c | 2 +- drivers/staging/vt6656/wcmd.h | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-)
drivers/staging/vt6656/main_usb.c +1 -1
@@ -1111,7 +1111,7 @@ vt6656_probe(struct usb_interface *intf, const struct usb_device_id *id)spin_lock_init (&priv->lock);mutex_init (&priv->usb_lock); -INIT_DELAYED_WORK (&priv->run_command_work, vRunCommand); +INIT_DELAYED_WORK (&priv->run_command_work, vnt_run_command);usb_set_intfdata (intf, priv);
drivers/staging/vt6656/wcmd.c +1 -1
@@ -104,7 +104,7 @@ static int vnt_cmd_complete(struct vnt_private *priv)return true; } -void vRunCommand (struct work_struct *work) +void vnt_run_command (struct work_struct *work) {struct vnt_private *priv = container_of(work, struct vnt_private, run_command_work.work);
drivers/staging/vt6656/wcmd.h +1 -1
@@ -63,6 +63,6 @@ void vResetCommandTimer(struct vnt_private *);int bScheduleCommand (struct vnt_private *,enum vnt_cmd ,u8 *); -void vRunCommand (struct work_struct *work); +void vnt_run_command (struct work_struct *work);#endif /* __WCMD_H__ */
Signature · 1 line
1.9.1
PATCH 10/13 staging: vt6656: Drop u8 pointer and rename bScheduleCommand.
In reply to Malcolm PriestleyRename to vnt_schedule_command removing unused u8 pointer.
--- drivers/staging/vt6656/int.c | 12 +++++------- drivers/staging/vt6656/main_usb.c | 2 +- drivers/staging/vt6656/rxtx.c | 2 +- drivers/staging/vt6656/wcmd.c | 4 ++-- drivers/staging/vt6656/wcmd.h | 2 +- 5 files changed, 10 insertions(+), 12 deletions(-)
drivers/staging/vt6656/int.c +5 -7
@@ -172,20 +172,18 @@ void INTnsProcessData(struct vnt_private *priv)if (int_data->isr0 !=0 ) {if (int_data->isr0 &ISR_BNTX && priv->op_mode ==NL80211_IFTYPE_AP ) -bScheduleCommand (priv,WLAN_CMD_BECON_SEND ,NULL ); +vnt_schedule_command (priv,WLAN_CMD_BECON_SEND );if (int_data->isr0 &ISR_TBTT ) {if (priv->hw->conf.flags &IEEE80211_CONF_PS ) -bScheduleCommand ((void *) priv, -WLAN_CMD_TBTT_WAKEUP , -NULL ); +vnt_schedule_command (priv, +WLAN_CMD_TBTT_WAKEUP );#if 0 /* TODO channel switch */ if (priv->bChannelSwitch) { priv->byChannelSwitchCount--;if (priv->byChannelSwitchCount ==0 ) -bScheduleCommand ((void *) priv, -WLAN_CMD_11H_CHSW , -NULL ); +vnt_schedule_command (priv, +WLAN_CMD_11H_CHSW ); }#endif }
drivers/staging/vt6656/main_usb.c +1 -1
@@ -1137,7 +1137,7 @@ vt6656_probe(struct usb_interface *intf, const struct usb_device_id *id)MP_CLEAR_FLAG (priv, fMP_DISCONNECTED);vResetCommandTimer (priv); -bScheduleCommand (priv,WLAN_CMD_INIT_MAC80211 ,NULL ); +vnt_schedule_command (priv,WLAN_CMD_INIT_MAC80211 );return 0 ;
drivers/staging/vt6656/rxtx.c +1 -1
@@ -767,7 +767,7 @@ int vnt_tx_packet(struct vnt_private *priv, struct sk_buff *skb)if (priv->wCurrentRate != current_rate && !(priv->hw->conf.flags &IEEE80211_CONF_OFFCHANNEL )) { priv->wCurrentRate = current_rate; -bScheduleCommand (priv,WLAN_CMD_SETPOWER ,NULL ); +vnt_schedule_command (priv,WLAN_CMD_SETPOWER ); }if (current_rate >RATE_11M )
drivers/staging/vt6656/wcmd.c +2 -2
@@ -29,7 +29,7 @@* s_MgrMakeProbeRequest - Make ProbeRequest packet * CommandTimer - Timer function to handle command * vnt_cmd_complete - Command Complete function -* bScheduleCommand - Push Command and wait Command Scheduler to do +* vnt_schedule_command - Push Command and wait Command Scheduler to do * vCommandTimer- Command call back functions * vnt_cmd_timer_wait- Call back timer * s_bClearBSSID_SCAN- Clear BSSID_SCAN cmd in CMD Queue
@@ -184,7 +184,7 @@ void vnt_run_command(struct work_struct *work)return ; } -int bScheduleCommand (struct vnt_private *priv,enum vnt_cmd command,u8 *item0) +int vnt_schedule_command (struct vnt_private *priv,enum vnt_cmd command) {if (priv->free_cmd_queue ==0 )
drivers/staging/vt6656/wcmd.h +1 -1
@@ -61,7 +61,7 @@ struct vnt_private;void vResetCommandTimer (struct vnt_private *); -int bScheduleCommand (struct vnt_private *,enum vnt_cmd ,u8 *); +int vnt_schedule_command (struct vnt_private *,enum vnt_cmd );void vnt_run_command (struct work_struct *work);
Signature · 1 line
1.9.1
PATCH 11/13 staging: vt6656: rename vResetCommandTimer to vnt_reset_command_timer
In reply to Malcolm Priestley--- drivers/staging/vt6656/main_usb.c | 2 +- drivers/staging/vt6656/wcmd.c | 2 +- drivers/staging/vt6656/wcmd.h | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-)
drivers/staging/vt6656/main_usb.c +1 -1
@@ -1135,7 +1135,7 @@ vt6656_probe(struct usb_interface *intf, const struct usb_device_id *id)usb_device_reset (priv);MP_CLEAR_FLAG (priv, fMP_DISCONNECTED); -vResetCommandTimer (priv); +vnt_reset_command_timer (priv);vnt_schedule_command (priv,WLAN_CMD_INIT_MAC80211 );
drivers/staging/vt6656/wcmd.c +1 -1
@@ -202,7 +202,7 @@ int vnt_schedule_command(struct vnt_private *priv, enum vnt_cmd command) } -void vResetCommandTimer (struct vnt_private *priv) +void vnt_reset_command_timer (struct vnt_private *priv) { priv->free_cmd_queue =CMD_Q_SIZE ; priv->cmd_dequeue_idx =0 ;
drivers/staging/vt6656/wcmd.h +1 -1
@@ -59,7 +59,7 @@ enum vnt_cmd_state {struct vnt_private ; -void vResetCommandTimer (struct vnt_private *); +void vnt_reset_command_timer (struct vnt_private *);int vnt_schedule_command (struct vnt_private *,enum vnt_cmd );
Signature · 1 line
1.9.1
PATCH 12/13 staging: vt6656: wcmd remove unneeded headers
In reply to Malcolm Priestley--- drivers/staging/vt6656/wcmd.c | 3 --- 1 file changed, 3 deletions(-)
drivers/staging/vt6656/wcmd.c +0 -3
@@ -40,14 +40,11 @@#include "device.h" #include "mac.h" -#include "card.h" #include "wcmd.h" #include "power.h" -#include "baseband.h" #include "usbpipe.h" #include "rxtx.h" #include "rf.h" -#include "channel.h" static void vnt_cmd_timer_wait (struct vnt_private *priv,unsigned long msecs) {
Signature · 1 line
1.9.1
PATCH 13/13 staging: vt6656: wcnd.c clean up comments
In reply to Malcolm PriestleyRemoving old functions and comments.
--- drivers/staging/vt6656/wcmd.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-)
drivers/staging/vt6656/wcmd.c +2 -7
@@ -25,14 +25,9 @@* Date: May 8, 2003 * * Functions: -* s_vProbeChannel - Active scan channel -* s_MgrMakeProbeRequest - Make ProbeRequest packet -* CommandTimer - Timer function to handle command * vnt_cmd_complete - Command Complete function -* vnt_schedule_command - Push Command and wait Command Scheduler to do -* vCommandTimer- Command call back functions +* vnt_schedule_command - Push Command and wait Command Scheduler to do * vnt_cmd_timer_wait- Call back timer -* s_bClearBSSID_SCAN- Clear BSSID_SCAN cmd in CMD Queue * * Revision History: *
@@ -174,7 +169,7 @@ void vnt_run_command(struct work_struct *work)default :break ; - }//switch + }vnt_cmd_complete (priv);
Signature · 1 line
1.9.1