wlan: Possible buffer Overflow in limSendSetStaKeyReq.

In the function limProcessMlmSetKeysReq, limSendSetStaKeyReq
is called with parameter "defWEPIdx" which can take value 255.
And defWEPIdx is used as index for array pSetStaKeyParams->key
whose size is only 4. Added a condition check so that "defWEPIdx"
is used as index only when its value is less than 4.

Change-Id: Ibf38d776665e8826aeeea925c31943f3e2881964
CRs-Fixed: 658550
wlan: WDA: prevent null pointer dereference

Made change to avoid null pointer dereference.

Change-Id: Iffcb4df0f5b283c4d283272e3fc9d05d92f745a4
Crs-Fixed: 658814
wlan: power save statistics

In the current implementation statistics about
various power modes are not being maintained. In
this fix, we are keeping track of the power save mode
statistics and we extended the "getStats" interface
to display the power save statistics.

CRs-Fixed: 656091
Change-Id: I29168c87f79c478093a5748d743a18b32296c2b4
prima: NULL pointer dereference in sapFsm.c

Cuurently, pointer macList passed to functions sapSortMacList and
sapPrintACL may be NULL which is dereferenced in both these functions.
Added a NULL check before dereferencing the pointer. Also, variable size
passed to these functions may exceeds maximum addresses. Added a sanity
check against MAX_ACL_MAC_ADDRESS to fix this.

Change-Id: I04170a7a555107a266a9353c375e7d184fe73b58
CRs-Fixed: 642554
Wlan: Revision 3.2.3.318

Revision 3.2.3.318

Change-Id: I8d9d709fe5abed715758645a55814b6f1d8fcf9f