Staging: bcm: Shortened lines in StoreCmControlResponseMessage()

Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
Matthias Beyer 2014-05-23 22:23:48 +02:00 committed by Greg Kroah-Hartman
parent f61d1d554d
commit c61f404478

View File

@ -1291,7 +1291,8 @@ static ULONG StoreSFParam(struct bcm_mini_adapter *Adapter, PUCHAR pucSrcBuffer,
return 1; return 1;
} }
ULONG StoreCmControlResponseMessage(struct bcm_mini_adapter *Adapter, PVOID pvBuffer, UINT *puBufferLength) ULONG StoreCmControlResponseMessage(struct bcm_mini_adapter *Adapter,
PVOID pvBuffer, UINT *puBufferLength)
{ {
struct bcm_add_indication_alt *pstAddIndicationAlt = NULL; struct bcm_add_indication_alt *pstAddIndicationAlt = NULL;
struct bcm_add_indication *pstAddIndication = NULL; struct bcm_add_indication *pstAddIndication = NULL;
@ -1325,13 +1326,15 @@ ULONG StoreCmControlResponseMessage(struct bcm_mini_adapter *Adapter, PVOID pvBu
} }
/* For DSA_REQ, only up to "psfAuthorizedSet" parameter should be accessed by driver! */ /* For DSA_REQ, only up to "psfAuthorizedSet" parameter should be accessed by driver! */
pstAddIndication = kmalloc(sizeof(struct bcm_add_indication), GFP_KERNEL); pstAddIndication = kmalloc(sizeof(struct bcm_add_indication),
GFP_KERNEL);
if (pstAddIndication == NULL) if (pstAddIndication == NULL)
return 0; return 0;
/* AUTHORIZED SET */ /* AUTHORIZED SET */
pstAddIndication->psfAuthorizedSet = (struct bcm_connect_mgr_params *) pstAddIndication->psfAuthorizedSet = (struct bcm_connect_mgr_params *)
GetNextTargetBufferLocation(Adapter, pstAddIndicationAlt->u16TID); GetNextTargetBufferLocation(Adapter,
pstAddIndicationAlt->u16TID);
if (!pstAddIndication->psfAuthorizedSet) { if (!pstAddIndication->psfAuthorizedSet) {
kfree(pstAddIndication); kfree(pstAddIndication);
return 0; return 0;
@ -1344,7 +1347,9 @@ ULONG StoreCmControlResponseMessage(struct bcm_mini_adapter *Adapter, PVOID pvBu
} }
/* this can't possibly be right */ /* this can't possibly be right */
pstAddIndication->psfAuthorizedSet = (struct bcm_connect_mgr_params *)ntohl((ULONG)pstAddIndication->psfAuthorizedSet); pstAddIndication->psfAuthorizedSet =
(struct bcm_connect_mgr_params *) ntohl(
(ULONG)pstAddIndication->psfAuthorizedSet);
if (pstAddIndicationAlt->u8Type == DSA_REQ) { if (pstAddIndicationAlt->u8Type == DSA_REQ) {
struct bcm_add_request AddRequest; struct bcm_add_request AddRequest;
@ -1373,31 +1378,39 @@ ULONG StoreCmControlResponseMessage(struct bcm_mini_adapter *Adapter, PVOID pvBu
/* ADMITTED SET */ /* ADMITTED SET */
pstAddIndication->psfAdmittedSet = (struct bcm_connect_mgr_params *) pstAddIndication->psfAdmittedSet = (struct bcm_connect_mgr_params *)
GetNextTargetBufferLocation(Adapter, pstAddIndicationAlt->u16TID); GetNextTargetBufferLocation(Adapter,
pstAddIndicationAlt->u16TID);
if (!pstAddIndication->psfAdmittedSet) { if (!pstAddIndication->psfAdmittedSet) {
kfree(pstAddIndication); kfree(pstAddIndication);
return 0; return 0;
} }
if (StoreSFParam(Adapter, (PUCHAR)&pstAddIndicationAlt->sfAdmittedSet, (ULONG)pstAddIndication->psfAdmittedSet) != 1) { if (StoreSFParam(Adapter, (PUCHAR)&pstAddIndicationAlt->sfAdmittedSet,
(ULONG)pstAddIndication->psfAdmittedSet) != 1) {
kfree(pstAddIndication); kfree(pstAddIndication);
return 0; return 0;
} }
pstAddIndication->psfAdmittedSet = (struct bcm_connect_mgr_params *)ntohl((ULONG)pstAddIndication->psfAdmittedSet); pstAddIndication->psfAdmittedSet =
(struct bcm_connect_mgr_params *) ntohl(
(ULONG) pstAddIndication->psfAdmittedSet);
/* ACTIVE SET */ /* ACTIVE SET */
pstAddIndication->psfActiveSet = (struct bcm_connect_mgr_params *) pstAddIndication->psfActiveSet = (struct bcm_connect_mgr_params *)
GetNextTargetBufferLocation(Adapter, pstAddIndicationAlt->u16TID); GetNextTargetBufferLocation(Adapter,
pstAddIndicationAlt->u16TID);
if (!pstAddIndication->psfActiveSet) { if (!pstAddIndication->psfActiveSet) {
kfree(pstAddIndication); kfree(pstAddIndication);
return 0; return 0;
} }
if (StoreSFParam(Adapter, (PUCHAR)&pstAddIndicationAlt->sfActiveSet, (ULONG)pstAddIndication->psfActiveSet) != 1) { if (StoreSFParam(Adapter, (PUCHAR)&pstAddIndicationAlt->sfActiveSet,
(ULONG)pstAddIndication->psfActiveSet) != 1) {
kfree(pstAddIndication); kfree(pstAddIndication);
return 0; return 0;
} }
pstAddIndication->psfActiveSet = (struct bcm_connect_mgr_params *)ntohl((ULONG)pstAddIndication->psfActiveSet); pstAddIndication->psfActiveSet =
(struct bcm_connect_mgr_params *) ntohl(
(ULONG)pstAddIndication->psfActiveSet);
(*puBufferLength) = sizeof(struct bcm_add_indication); (*puBufferLength) = sizeof(struct bcm_add_indication);
*(struct bcm_add_indication *)pvBuffer = *pstAddIndication; *(struct bcm_add_indication *)pvBuffer = *pstAddIndication;