summaryrefslogtreecommitdiffstats
path: root/drivers/staging/vt6656/wcmd.c
diff options
context:
space:
mode:
authorMalcolm Priestley <tvboxspy@gmail.com>2014-06-25 21:14:27 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2014-06-26 20:21:19 -0400
commit30816f838a6589a76bca6d2afd73cafd02343429 (patch)
treec51fc94240172a5da7864819229e23db8a25e27f /drivers/staging/vt6656/wcmd.c
parent110f97e937476d56d595805c7bf5b98260468ea2 (diff)
staging: vt6656: mac80211 conversion: add vnt_init to bScheduleCommand
start driver by linking vnt_init to vt6656_probe use bScheduleCommand to schedule new command WLAN_CMD_INIT_MAC80211 vResetCommandTimer is now used to initiate command timer. Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/vt6656/wcmd.c')
-rw-r--r--drivers/staging/vt6656/wcmd.c19
1 files changed, 17 insertions, 2 deletions
diff --git a/drivers/staging/vt6656/wcmd.c b/drivers/staging/vt6656/wcmd.c
index 4c3790857d3d..85adc1cd33c1 100644
--- a/drivers/staging/vt6656/wcmd.c
+++ b/drivers/staging/vt6656/wcmd.c
@@ -287,7 +287,20 @@ void vRunCommand(struct work_struct *work)
return;
switch (pDevice->eCommandState) {
+ case WLAN_CMD_INIT_MAC80211_START:
+ if (pDevice->mac_hw)
+ break;
+
+ dev_info(&pDevice->usb->dev, "Starting mac80211\n");
+
+ if (vnt_init(pDevice)) {
+ /* If fail all ends TODO retry */
+ dev_err(&pDevice->usb->dev, "failed to start\n");
+ ieee80211_free_hw(pDevice->hw);
+ return;
+ }
+ break;
case WLAN_CMD_SCAN_START:
pDevice->byReAssocCount = 0;
@@ -915,6 +928,10 @@ static int s_bCommandComplete(struct vnt_private *pDevice)
pDevice->cbFreeCmdQueue++;
pDevice->bCmdRunning = true;
switch (pDevice->eCommand) {
+ case WLAN_CMD_INIT_MAC80211:
+ pDevice->eCommandState = WLAN_CMD_INIT_MAC80211_START;
+ break;
+
case WLAN_CMD_BSSID_SCAN:
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"eCommandState= WLAN_CMD_BSSID_SCAN\n");
pDevice->eCommandState = WLAN_CMD_SCAN_START;
@@ -1083,8 +1100,6 @@ static int s_bClearBSSID_SCAN(struct vnt_private *pDevice)
//mike add:reset command timer
void vResetCommandTimer(struct vnt_private *pDevice)
{
- cancel_delayed_work_sync(&pDevice->run_command_work);
-
pDevice->cbFreeCmdQueue = CMD_Q_SIZE;
pDevice->uCmdDequeueIdx = 0;
pDevice->uCmdEnqueueIdx = 0;