Commit 3c01ec0d authored by Pekka Enberg's avatar Pekka Enberg Committed by Greg Kroah-Hartman

Staging: w35und: remove macro magic from MLME_GetNextPacket()

This removes the macro magic from MLME_GetNextPacket() to de-obfuscate the
code.
Signed-off-by: default avatarPekka Enberg <penberg@cs.helsinki.fi>
Acked-by: default avatarPavel Machek <pavel@suse.cz>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 4af12e55
...@@ -96,21 +96,15 @@ u8 MLMESendFrame(struct wb35_adapter * adapter, u8 *pMMPDU, u16 len, u8 DataType ...@@ -96,21 +96,15 @@ u8 MLMESendFrame(struct wb35_adapter * adapter, u8 *pMMPDU, u16 len, u8 DataType
return true; return true;
} }
void void MLME_GetNextPacket(struct wb35_adapter *adapter, PDESCRIPTOR desc)
MLME_GetNextPacket(struct wb35_adapter * adapter, PDESCRIPTOR pDes)
{ {
#define DESCRIPTOR_ADD_BUFFER( _D, _A, _S ) \ desc->InternalUsed = desc->buffer_start_index + desc->buffer_number;
{\ desc->InternalUsed %= MAX_DESCRIPTOR_BUFFER_INDEX;
_D->InternalUsed = _D->buffer_start_index + _D->buffer_number; \ desc->buffer_address[desc->InternalUsed] = adapter->sMlmeFrame.pMMPDU;
_D->InternalUsed %= MAX_DESCRIPTOR_BUFFER_INDEX; \ desc->buffer_size[desc->InternalUsed] = adapter->sMlmeFrame.len;
_D->buffer_address[ _D->InternalUsed ] = _A; \ desc->buffer_total_size += adapter->sMlmeFrame.len;
_D->buffer_size[ _D->InternalUsed ] = _S; \ desc->buffer_number++;
_D->buffer_total_size += _S; \ desc->Type = adapter->sMlmeFrame.DataType;
_D->buffer_number++;\
}
DESCRIPTOR_ADD_BUFFER( pDes, adapter->sMlmeFrame.pMMPDU, adapter->sMlmeFrame.len );
pDes->Type = adapter->sMlmeFrame.DataType;
} }
void MLMEfreeMMPDUBuffer(struct wb35_adapter * adapter, s8 *pData) void MLMEfreeMMPDUBuffer(struct wb35_adapter * adapter, s8 *pData)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment