diff options
author | Pekka Enberg <penberg@cs.helsinki.fi> | 2008-10-27 22:14:14 (GMT) |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2009-01-06 21:51:44 (GMT) |
commit | 3c01ec0d82885d4764d066c9a1e3a431e6fb0f04 (patch) | |
tree | 2a4c9cd60de9e1a1b195c7e224207630631e3547 /drivers | |
parent | 4af12e55a5f5e8d0d6d9390a592daa789a181e36 (diff) | |
download | linux-fsl-qoriq-3c01ec0d82885d4764d066c9a1e3a431e6fb0f04.tar.xz |
Staging: w35und: remove macro magic from MLME_GetNextPacket()
This removes the macro magic from MLME_GetNextPacket() to de-obfuscate the
code.
Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
Acked-by: Pavel Machek <pavel@suse.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/staging/winbond/mlmetxrx.c | 22 |
1 files changed, 8 insertions, 14 deletions
diff --git a/drivers/staging/winbond/mlmetxrx.c b/drivers/staging/winbond/mlmetxrx.c index eab562a..a071855 100644 --- a/drivers/staging/winbond/mlmetxrx.c +++ b/drivers/staging/winbond/mlmetxrx.c @@ -96,21 +96,15 @@ u8 MLMESendFrame(struct wb35_adapter * adapter, u8 *pMMPDU, u16 len, u8 DataType return true; } -void -MLME_GetNextPacket(struct wb35_adapter * adapter, PDESCRIPTOR pDes) +void MLME_GetNextPacket(struct wb35_adapter *adapter, PDESCRIPTOR desc) { -#define DESCRIPTOR_ADD_BUFFER( _D, _A, _S ) \ -{\ - _D->InternalUsed = _D->buffer_start_index + _D->buffer_number; \ - _D->InternalUsed %= MAX_DESCRIPTOR_BUFFER_INDEX; \ - _D->buffer_address[ _D->InternalUsed ] = _A; \ - _D->buffer_size[ _D->InternalUsed ] = _S; \ - _D->buffer_total_size += _S; \ - _D->buffer_number++;\ -} - - DESCRIPTOR_ADD_BUFFER( pDes, adapter->sMlmeFrame.pMMPDU, adapter->sMlmeFrame.len ); - pDes->Type = adapter->sMlmeFrame.DataType; + desc->InternalUsed = desc->buffer_start_index + desc->buffer_number; + desc->InternalUsed %= MAX_DESCRIPTOR_BUFFER_INDEX; + desc->buffer_address[desc->InternalUsed] = adapter->sMlmeFrame.pMMPDU; + desc->buffer_size[desc->InternalUsed] = adapter->sMlmeFrame.len; + desc->buffer_total_size += adapter->sMlmeFrame.len; + desc->buffer_number++; + desc->Type = adapter->sMlmeFrame.DataType; } void MLMEfreeMMPDUBuffer(struct wb35_adapter * adapter, s8 *pData) |