Commit 60cc2747 authored by Malcolm Priestley's avatar Malcolm Priestley Committed by Greg Kroah-Hartman
Browse files

staging: vt6656: Remove 10 second timer and move to BSSvSecondCallBack



Remove sTimerTxData 10 second timer which triggers PSbSendNullPacket
every 40 seconds when bLinkPass == true.

Move the 40 second timer to the existing BSSvSecondCallBack
one second delayed workqueue and trigger every 40 seconds when
bLinkPass == true.

Signed-off-by: default avatarMalcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 17f3ced0
Loading
Loading
Loading
Loading
+17 −4
Original line number Diff line number Diff line
@@ -57,6 +57,7 @@
#include "control.h"
#include "rndis.h"
#include "iowpa.h"
#include "power.h"

static int          msglevel                =MSG_LEVEL_INFO;
//static int          msglevel                =MSG_LEVEL_DEBUG;
@@ -1125,6 +1126,18 @@ else {
    }

	if (pDevice->bLinkPass == true) {
		if (pMgmt->eAuthenMode < WMAC_AUTH_WPA ||
			pDevice->fWPA_Authened == true) {
			if (++pDevice->tx_data_time_out > 40) {
				pDevice->tx_trigger = true;

				PSbSendNullPacket(pDevice);

				pDevice->tx_trigger = false;
				pDevice->tx_data_time_out = 0;
			}
		}

		if (netif_queue_stopped(pDevice->dev))
			netif_wake_queue(pDevice->dev);
	}
+2 −5
Original line number Diff line number Diff line
@@ -711,11 +711,8 @@ struct vnt_private {
	/* One second callback */
	struct delayed_work second_callback_work;

	struct timer_list sTimerTxData;
	unsigned long nTxDataTimeCout;
	int fTxDataInSleep;
	int IsTxDataTrigger;

	u8 tx_data_time_out;
	bool tx_trigger;
	int fWPA_Authened; /*is WPA/WPA-PSK or WPA2/WPA2-PSK authen?? */
	u8 byReAssocCount;
	u8 byLinkWaitCount;
+0 −2
Original line number Diff line number Diff line
@@ -1081,8 +1081,6 @@ static int device_close(struct net_device *dev)
	cancel_delayed_work_sync(&pDevice->run_command_work);
	cancel_delayed_work_sync(&pDevice->second_callback_work);

    del_timer(&pDevice->sTimerTxData);

    if (pDevice->bDiversityRegCtlON) {
        del_timer(&pDevice->TimerSQ3Tmax1);
        del_timer(&pDevice->TimerSQ3Tmax2);
+2 −4
Original line number Diff line number Diff line
@@ -257,10 +257,8 @@ int PSbSendNullPacket(struct vnt_private *pDevice)
	if (pDevice->bLinkPass == false)
		return false;

	if ((pDevice->bEnablePSMode == false) &&
		(pDevice->fTxDataInSleep == false)) {
	if (pDevice->bEnablePSMode == false && pDevice->tx_trigger == false)
		return false;
	}

	memset(pMgmt->pbyPSPacketPool, 0, sizeof(struct vnt_tx_mgmt)
		+ WLAN_NULLDATA_FR_MAXLEN);
+0 −2
Original line number Diff line number Diff line
@@ -656,8 +656,6 @@ static void s_nsBulkOutIoCompleteWrite(struct urb *urb)
        DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"Write %d bytes\n",(int)ulBufLen);
        pDevice->ulBulkOutBytesWrite += ulBufLen;
        pDevice->ulBulkOutContCRCError = 0;
	pDevice->nTxDataTimeCout = 0;

    } else {
        DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"BULK Out failed %d\n", status);
        pDevice->ulBulkOutError++;
Loading