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

Staging: w35und: remove memcpy/memcmp wrappers

The OS_MEMORY_CLEAR macro is not used so remove it. Also convert the one
call-site that uses OS_MEMORY_COMPARE to use memcmp() directly and remove the
wrapper macro.
Acked-by: default avatarPavel Machek <pavel@suse.cz>
Signed-off-by: default avatarPekka Enberg <penberg@cs.helsinki.fi>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 44e8541c
...@@ -73,8 +73,5 @@ ...@@ -73,8 +73,5 @@
#define OS_EVENT_INDICATE( _A, _B, _F ) #define OS_EVENT_INDICATE( _A, _B, _F )
#define OS_PMKID_STATUS_EVENT( _A ) #define OS_PMKID_STATUS_EVENT( _A )
#define OS_MEMORY_CLEAR( _A, _S ) memset( (u8 *)_A,0,_S)
#define OS_MEMORY_COMPARE( _A, _B, _S ) (memcmp(_A,_B,_S)? 0 : 1) // Definition is reverse with Ndis 1: the same 0: different
#endif // COMMON_DEF #endif // COMMON_DEF
...@@ -181,12 +181,11 @@ WbWLanInitialize(struct wb35_adapter *adapter) ...@@ -181,12 +181,11 @@ WbWLanInitialize(struct wb35_adapter *adapter)
pMacAddr = adapter->sLocalPara.ThisMacAddress; pMacAddr = adapter->sLocalPara.ThisMacAddress;
pMacAddr2 = adapter->sLocalPara.PermanentAddress; pMacAddr2 = adapter->sLocalPara.PermanentAddress;
hal_get_permanent_address( pHwData, adapter->sLocalPara.PermanentAddress );// Reading ethernet address from EEPROM hal_get_permanent_address( pHwData, adapter->sLocalPara.PermanentAddress );// Reading ethernet address from EEPROM
if (OS_MEMORY_COMPARE(pMacAddr, "\x00\x00\x00\x00\x00\x00", MAC_ADDR_LENGTH )) // Is equal if (memcmp(pMacAddr, "\x00\x00\x00\x00\x00\x00", MAC_ADDR_LENGTH) == 0)
{ memcpy(pMacAddr, pMacAddr2, MAC_ADDR_LENGTH);
memcpy( pMacAddr, pMacAddr2, MAC_ADDR_LENGTH ); else {
} else {
// Set the user define MAC address // Set the user define MAC address
hal_set_ethernet_address( pHwData, adapter->sLocalPara.ThisMacAddress ); hal_set_ethernet_address(pHwData, adapter->sLocalPara.ThisMacAddress);
} }
//get current antenna //get current antenna
......
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