Incorrect HMAC values are generated in following scenarios. - In case of a single transfer with a packet shorter than the block size, the HMAC generated is incorrect. This is due to the "FIRST" bit in AUTH_CFG register not being set. When calling HMAC_final for a transfer with a single packet (with no prior HMAC updates), the "FIRST" and "LAST" bit in AUTH_CFG register needs to be set. Currently FIRST bit is being cleared incorrectly for all scenarios. - In a scenario of a mac key input larger than block size, the key needs to be hashed. The key hashing operation is crashing. This is due to a NULL, unintialized pointer to the device handle. This is fixed by intializing the pointer correctly. Further more, key size is uninitialized, resulting in corruption of buffer. Change-Id: Iec736f2130e509fcaf631a2c71c5483514666617 Signed-off-by: Mona Hossain <mhossain@codeaurora.org>