wlan: add check for size of cache aligned skb->data

In receive path we check if the memory DMA'd is more
than the allocated memory. alloc_skb() can allocate
more memory than specified if the specified memory
size is not cache aligned, so check for the size
of cache aligned memory for deciding if the data
DMA's was more that allocated memory.

Change-Id: Iaf5b75b73d1f84d6d64ed0975414218a7bb6f591
CRs-Fixed: 717798
wlan: flush cached frames on assoc failure

Prima driver caches RX frames till the peer
is registered in TL. If assocication failure
occurs then free the cached frames so that
the RX resources are returned back to the
system.

Change-Id: I37d6c08075dc77026ad85863e4838eb5e3742fc3
CRs-Fixed: 643670
wlan: avoid race condition while accessing wpalPacketAvailableCB

wpalPacketAvailableCB can be called from the MC_Thread as well
as the RX_Thread, the race condition can occur when the callback
is called from the MC_Thread and immediately set to NULL after
the function returns and in between that the RX_Thread running
on another core has detected a low resource condition and set
wpalPacketAvailableCB before the MC_Thread sets it to NULL.
To avoid the race conditions always set/reset the values to
wpalPacketAvailableCB in RX_thread only.

Change-Id: Idb1700287186df4b3ede45324cfa2062b1b81d9e
CRs-Fixed: 599184