Commit 7af94000 authored by Malcolm Priestley's avatar Malcolm Priestley Committed by Greg Kroah-Hartman
Browse files

staging: vt6656: lock changes: Remove spin locks.



Remove atomic paths to usbpipe.c PIPEnsControlOut and PIPEnsControlIn

Remove from
PIPEnsControlOut
PIPEnsControlIn
BSSvSecondCallBack
vt6656_hostap_ioctl
iwctl_siwmode
iwctl_siwencode
iwctl_siwpower
iwctl_siwencodeext
KeyvInitTable
device_init_registers
device_open
device_close

Signed-off-by: default avatarMalcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 30a05b39
Loading
Loading
Loading
Loading
+0 −4
Original line number Diff line number Diff line
@@ -818,8 +818,6 @@ void BSSvSecondCallBack(struct work_struct *work)
	if (pDevice->Flags & fMP_DISCONNECTED)
		return;

	spin_lock_irq(&pDevice->lock);

	pDevice->uAssocCount = 0;

	/* Power Saving Mode Tx Burst */
@@ -1158,8 +1156,6 @@ void BSSvSecondCallBack(struct work_struct *work)
			netif_wake_queue(pDevice->dev);
	}

	spin_unlock_irq(&pDevice->lock);

	schedule_delayed_work(&pDevice->second_callback_work, HZ);
}

+1 −1
Original line number Diff line number Diff line
@@ -44,7 +44,7 @@ static int msglevel = MSG_LEVEL_INFO;

#define FIRMWARE_CHUNK_SIZE	0x400

int FIRMWAREbDownload(struct vnt_private *pDevice) __must_hold(&pDevice->lock)
int FIRMWAREbDownload(struct vnt_private *pDevice)
{
	struct device *dev = &pDevice->usb->dev;
	const struct firmware *fw;
+2 −2
Original line number Diff line number Diff line
@@ -698,9 +698,9 @@ int vt6656_hostap_ioctl(struct vnt_private *pDevice, struct iw_point *p)
	switch (param->cmd) {
	case VIAWGET_HOSTAPD_SET_ENCRYPTION:
	    DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "VIAWGET_HOSTAPD_SET_ENCRYPTION \n");
        spin_lock_irq(&pDevice->lock);

		ret = hostap_set_encryption(pDevice, param, p->length);
        spin_unlock_irq(&pDevice->lock);

		break;
	case VIAWGET_HOSTAPD_GET_ENCRYPTION:
	    DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "VIAWGET_HOSTAPD_GET_ENCRYPTION \n");
+0 −15
Original line number Diff line number Diff line
@@ -441,8 +441,6 @@ int iwctl_siwmode(struct net_device *dev, struct iw_request_info *info,
			DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO
				"Commit the settings\n");

			spin_lock_irq(&pDevice->lock);

			if (pDevice->bLinkPass &&
				memcmp(pMgmt->abyCurrSSID,
					pMgmt->abyDesireSSID,
@@ -471,8 +469,6 @@ int iwctl_siwmode(struct net_device *dev, struct iw_request_info *info,
			bScheduleCommand((void *) pDevice,
				 WLAN_CMD_SSID,
				 NULL);

			spin_unlock_irq(&pDevice->lock);
		}
		pDevice->bCommit = false;
	}
@@ -1212,14 +1208,12 @@ int iwctl_siwencode(struct net_device *dev, struct iw_request_info *info,
			DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "%02x ", pDevice->abyKey[ii]);

		if (pDevice->flags & DEVICE_FLAGS_OPENED) {
			spin_lock_irq(&pDevice->lock);
			KeybSetDefaultKey(pDevice,
					&(pDevice->sKey),
					dwKeyIndex | (1 << 31),
					wrq->length, NULL,
					pDevice->abyKey,
					KEY_CTL_WEP);
			spin_unlock_irq(&pDevice->lock);
		}
		pDevice->byKeyIndex = (u8)dwKeyIndex;
		pDevice->uKeyLength = wrq->length;
@@ -1242,10 +1236,8 @@ int iwctl_siwencode(struct net_device *dev, struct iw_request_info *info,
		pDevice->bEncryptionEnable = false;
		pDevice->eEncryptionStatus = Ndis802_11EncryptionDisabled;
		if (pDevice->flags & DEVICE_FLAGS_OPENED) {
			spin_lock_irq(&pDevice->lock);
			for (uu = 0; uu < MAX_KEY_TABLE; uu++)
				MACvDisableKeyEntry(pDevice, uu);
			spin_unlock_irq(&pDevice->lock);
		}
	}
	if (wrq->flags & IW_ENCODE_RESTRICTED) {
@@ -1342,12 +1334,9 @@ int iwctl_siwpower(struct net_device *dev, struct iw_request_info *info,
		return rc;
	}

	spin_lock_irq(&pDevice->lock);

	if (wrq->disabled) {
		pDevice->ePSMode = WMAC_POWER_CAM;
		PSvDisablePowerSaving(pDevice);
		spin_unlock_irq(&pDevice->lock);
		return rc;
	}
	if ((wrq->flags & IW_POWER_TYPE) == IW_POWER_TIMEOUT) {
@@ -1359,8 +1348,6 @@ int iwctl_siwpower(struct net_device *dev, struct iw_request_info *info,
		PSvEnablePowerSaving((void *)pDevice, pMgmt->wListenInterval);
	}

	spin_unlock_irq(&pDevice->lock);

	switch (wrq->flags & IW_POWER_MODE) {
	case IW_POWER_UNICAST_R:
		DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " SIOCSIWPOWER: IW_POWER_UNICAST_R\n");
@@ -1723,9 +1710,7 @@ int iwctl_siwencodeext(struct net_device *dev, struct iw_request_info *info,
		KeyvInitTable(pDevice, &pDevice->sKey);
	}
/*******/
	spin_lock_irq(&pDevice->lock);
	ret = wpa_set_keys(pDevice, param);
	spin_unlock_irq(&pDevice->lock);

error:
	kfree(buf);
+0 −3
Original line number Diff line number Diff line
@@ -97,7 +97,6 @@ void KeyvInitTable(struct vnt_private *pDevice, PSKeyManagement pTable)
	int i, jj;
	u8 pbyData[MAX_KEY_TABLE+1];

    spin_lock_irq(&pDevice->lock);
    for (i=0;i<MAX_KEY_TABLE;i++) {
        pTable->KeyTable[i].bInUse = false;
        pTable->KeyTable[i].PairwiseKey.bKeyValid = false;
@@ -122,8 +121,6 @@ void KeyvInitTable(struct vnt_private *pDevice, PSKeyManagement pTable)
                        pbyData
                        );

    spin_unlock_irq(&pDevice->lock);

    return;
}

Loading