Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

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

staging: vt6656: rxtx.c: s_vFillTxKey Replace dwRevIVCounter



Fix base type to __le32 and remove camel case.

Camel case change
dwRevIVCounter -> rev_iv_counter

Signed-off-by: default avatarMalcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 038dcf12
Loading
Loading
Loading
Loading
+5 −5
Original line number Original line Diff line number Diff line
@@ -184,28 +184,28 @@ static void s_vFillTxKey(struct vnt_private *pDevice,
	u32 *pdwIV = (u32 *)pbyIVHead;
	u32 *pdwIV = (u32 *)pbyIVHead;
	u32 *pdwExtIV = (u32 *)((u8 *)pbyIVHead + 4);
	u32 *pdwExtIV = (u32 *)((u8 *)pbyIVHead + 4);
	struct ieee80211_hdr *pMACHeader = (struct ieee80211_hdr *)pbyHdrBuf;
	struct ieee80211_hdr *pMACHeader = (struct ieee80211_hdr *)pbyHdrBuf;
	u32 dwRevIVCounter;
	__le32 rev_iv_counter;


	/* Fill TXKEY */
	/* Fill TXKEY */
	if (pTransmitKey == NULL)
	if (pTransmitKey == NULL)
		return;
		return;


	dwRevIVCounter = cpu_to_le32(pDevice->dwIVCounter);
	rev_iv_counter = cpu_to_le32(pDevice->dwIVCounter);
	*pdwIV = pDevice->dwIVCounter;
	*pdwIV = pDevice->dwIVCounter;
	pDevice->byKeyIndex = pTransmitKey->dwKeyIndex & 0xf;
	pDevice->byKeyIndex = pTransmitKey->dwKeyIndex & 0xf;


	switch (pTransmitKey->byCipherSuite) {
	switch (pTransmitKey->byCipherSuite) {
	case KEY_CTL_WEP:
	case KEY_CTL_WEP:
		if (pTransmitKey->uKeyLength == WLAN_WEP232_KEYLEN) {
		if (pTransmitKey->uKeyLength == WLAN_WEP232_KEYLEN) {
			memcpy(pDevice->abyPRNG, (u8 *)&dwRevIVCounter, 3);
			memcpy(pDevice->abyPRNG, (u8 *)&rev_iv_counter, 3);
			memcpy(pDevice->abyPRNG + 3, pTransmitKey->abyKey,
			memcpy(pDevice->abyPRNG + 3, pTransmitKey->abyKey,
						pTransmitKey->uKeyLength);
						pTransmitKey->uKeyLength);
		} else {
		} else {
			memcpy(pbyBuf, (u8 *)&dwRevIVCounter, 3);
			memcpy(pbyBuf, (u8 *)&rev_iv_counter, 3);
			memcpy(pbyBuf + 3, pTransmitKey->abyKey,
			memcpy(pbyBuf + 3, pTransmitKey->abyKey,
						pTransmitKey->uKeyLength);
						pTransmitKey->uKeyLength);
			if (pTransmitKey->uKeyLength == WLAN_WEP40_KEYLEN) {
			if (pTransmitKey->uKeyLength == WLAN_WEP40_KEYLEN) {
				memcpy(pbyBuf+8, (u8 *)&dwRevIVCounter, 3);
				memcpy(pbyBuf+8, (u8 *)&rev_iv_counter, 3);
			memcpy(pbyBuf+11, pTransmitKey->abyKey,
			memcpy(pbyBuf+11, pTransmitKey->abyKey,
						pTransmitKey->uKeyLength);
						pTransmitKey->uKeyLength);
			}
			}