qcacld-3.0: Create a new function for adapter reference verification

The current HDD callback in hdd_rx_flush_packet_cbk() does not validate
the adapter context properly. Instead of verifying the adapter magic,
verify the adapter itself is still valid through the adapter list.
Create a new function hdd_get_adapter_by_reference() to verify the
adapter reference.

Change-Id: I468bd55b2318635ad89087e6c6ad6097df68d405
CRs-Fixed: 2563654
3 files changed