summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMalcolm Priestley <tvboxspy@gmail.com>2013-08-27 11:32:01 (GMT)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-08-27 23:55:34 (GMT)
commitf6804f337686cc768c05ef4799e250c1a8efd40b (patch)
treeb6e0df186ebbf1818fb18b7525e0e125504cffdb
parent95bfb1ae0d2e4a8c58b45f9ff40f4a71c6bbdc6e (diff)
downloadlinux-fsl-qoriq-f6804f337686cc768c05ef4799e250c1a8efd40b.tar.xz
staging: vt6656: rxtx.c s_vFillTxKey use switch for pTransmitKey->byCipherSuite
Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--drivers/staging/vt6656/rxtx.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/drivers/staging/vt6656/rxtx.c b/drivers/staging/vt6656/rxtx.c
index 54aa576..e4ee352 100644
--- a/drivers/staging/vt6656/rxtx.c
+++ b/drivers/staging/vt6656/rxtx.c
@@ -198,7 +198,8 @@ static void s_vFillTxKey(struct vnt_private *pDevice, u8 *pbyBuf,
*pdwIV = pDevice->dwIVCounter;
pDevice->byKeyIndex = pTransmitKey->dwKeyIndex & 0xf;
- if (pTransmitKey->byCipherSuite == KEY_CTL_WEP) {
+ switch (pTransmitKey->byCipherSuite) {
+ case KEY_CTL_WEP:
if (pTransmitKey->uKeyLength == WLAN_WEP232_KEYLEN) {
memcpy(pDevice->abyPRNG, (u8 *)&dwRevIVCounter, 3);
memcpy(pDevice->abyPRNG + 3, pTransmitKey->abyKey,
@@ -223,7 +224,9 @@ static void s_vFillTxKey(struct vnt_private *pDevice, u8 *pbyBuf,
pDevice->dwIVCounter++;
if (pDevice->dwIVCounter > WEP_IV_MASK)
pDevice->dwIVCounter = 0;
- } else if (pTransmitKey->byCipherSuite == KEY_CTL_TKIP) {
+
+ break;
+ case KEY_CTL_TKIP:
pTransmitKey->wTSC15_0++;
if (pTransmitKey->wTSC15_0 == 0)
pTransmitKey->dwTSC47_16++;
@@ -244,7 +247,8 @@ static void s_vFillTxKey(struct vnt_private *pDevice, u8 *pbyBuf,
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO
"vFillTxKey()---- pdwExtIV: %x\n", *pdwExtIV);
- } else if (pTransmitKey->byCipherSuite == KEY_CTL_CCMP) {
+ break;
+ case KEY_CTL_CCMP:
pTransmitKey->wTSC15_0++;
if (pTransmitKey->wTSC15_0 == 0)
pTransmitKey->dwTSC47_16++;