From: Malcolm Priestley Date: Fri, 23 May 2014 17:00:03 +0000 (+0100) Subject: staging: vt6656: MACvDisableKeyEntry fix sizeof uEntryIdx to u8 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=9190c4d2867a31f1023a22b3555648bbc038ef75;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git staging: vt6656: MACvDisableKeyEntry fix sizeof uEntryIdx to u8 Remove byData and change all callers to u8. Signed-off-by: Malcolm Priestley Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/vt6656/iwctl.c b/drivers/staging/vt6656/iwctl.c index de2ae1d46434..3edeb2f44f6a 100644 --- a/drivers/staging/vt6656/iwctl.c +++ b/drivers/staging/vt6656/iwctl.c @@ -1150,7 +1150,7 @@ int iwctl_siwencode(struct net_device *dev, struct iw_request_info *info, struct iw_point *wrq = &wrqu->encoding; u32 dwKeyIndex = (u32)(wrq->flags & IW_ENCODE_INDEX); int ii; - int uu; + u8 uu; int rc = 0; int index = (wrq->flags & IW_ENCODE_INDEX); diff --git a/drivers/staging/vt6656/mac.c b/drivers/staging/vt6656/mac.c index 0e14aabca736..a341eab8986b 100644 --- a/drivers/staging/vt6656/mac.c +++ b/drivers/staging/vt6656/mac.c @@ -102,19 +102,15 @@ void MACvSetBBType(struct vnt_private *priv, u8 type) * Return Value: none * */ -void MACvDisableKeyEntry(struct vnt_private *pDevice, u32 uEntryIdx) +void MACvDisableKeyEntry(struct vnt_private *pDevice, u8 uEntryIdx) { - u8 byData; - - byData = (u8) uEntryIdx; - //issue write misc fifo command to device CONTROLnsRequestOut(pDevice, MESSAGE_TYPE_CLRKEYENTRY, 0, 0, - 1, - &byData + sizeof(uEntryIdx), + &uEntryIdx ); } diff --git a/drivers/staging/vt6656/mac.h b/drivers/staging/vt6656/mac.h index 4053e431ef99..2084d4b1e532 100644 --- a/drivers/staging/vt6656/mac.h +++ b/drivers/staging/vt6656/mac.h @@ -406,7 +406,7 @@ void MACvWriteMultiAddr(struct vnt_private *, u64); void MACbShutdown(struct vnt_private *); void MACvSetBBType(struct vnt_private *, u8); -void MACvDisableKeyEntry(struct vnt_private *, u32); +void MACvDisableKeyEntry(struct vnt_private *, u8); void MACvSetKeyEntry(struct vnt_private *, u16, u32, u32, u8 *, u32 *); void MACvRegBitsOff(struct vnt_private *, u8, u8); void MACvRegBitsOn(struct vnt_private *, u8, u8); diff --git a/drivers/staging/vt6656/main_usb.c b/drivers/staging/vt6656/main_usb.c index 09e444d8aceb..ed04804d1d50 100644 --- a/drivers/staging/vt6656/main_usb.c +++ b/drivers/staging/vt6656/main_usb.c @@ -984,7 +984,7 @@ static int device_close(struct net_device *dev) { struct vnt_private *pDevice = netdev_priv(dev); struct vnt_manager *pMgmt = &pDevice->vnt_mgmt; - int uu; + u8 uu; DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "device_close1\n"); if (pDevice == NULL) diff --git a/drivers/staging/vt6656/wpactl.c b/drivers/staging/vt6656/wpactl.c index b6885a91d1a4..587e1117b8c7 100644 --- a/drivers/staging/vt6656/wpactl.c +++ b/drivers/staging/vt6656/wpactl.c @@ -66,7 +66,7 @@ int wpa_set_keys(struct vnt_private *pDevice, void *ctx) u64 KeyRSC; u8 byKeyDecMode = KEY_CTL_WEP; int ret = 0; - int uu; + u8 uu; int ii; if (param->u.wpa_key.alg_name > WPA_ALG_CCMP)