wlan: Prefer 5G AP over 2.4G by Rssi margin

The objective is to prefer connecting to 5G AP even if its RSSI is lower
by gSelect5GHzMargin dBm than 2.4G AP.
For e.g., if gSelect5GHzMargin=30
2.4G AP is -29 dBm and 5G AP is -59 then prefer 5G AP
2.4G AP is -29 dBm and 5G AP is -61 then prefer 2.4G AP

Current behavior:
1. The current behavior was each BSS is assigned as preference value based
on the RSSI bucket; 0-30 dBm is assigned highest preference value (14)
and then each bucket is formed "gRssiCatGap" width.
31-35 has next preference value(13) and so on.
Only if both the 2.4G and 5G AP falls in the same bucket both will have
same preference value; then check is done for BSS capabilities as
tie breaker. Weight-age of +1 is added for every capability support
like QoS/UAPSD, 11n or 5G.
BSS with higher capability value will be selected.
(If capability is also same, then first AP is selected)

Fix Approach:
1. The highest preference value RSSI bucket is extended to
{Best AP Rssi in the scan result to Best AP Rssi + gSelect5GHzMargin}
In the above example,
first category bucket will be from -29 to -59 dBm and from 2nd bucket
onwards it is same behaviour -60 to -64 dBm.
If the Best AP is 2.4G AP with Rssi -29 then this ensures all APs till
-59 dBm are parked in the same bucket, if the 5G AP falls in this bucket;
then it will be selected.
This feature requires the dependent cfg.ini "gRoamPrefer5GHz" set to 1.
and it is enabled by default.
If "gRoamPrefer5GHz" set to 1, then weightage of +1 is added to 5G AP.
if gSelect5GHzMargin set to 0, then this feature is disabled.
if gSelect5GHzMargin set to non-zero then first category bucket is modified
to (best AP rssi) to (best AP rssi + gSelect5GHzMargin) and capability
checking for 11n, QoS are ignored.

2. After each scanning is complete and get scan result is issued,
Go through the scan list and find out the best AP Rssi; based on this
RSSI modify the category bucket.
Update the preference value for each BSS

3. if gSelect5GHzMargin set to non-zero; then gRoamRssiDiff is implicitly
set to 0, so that firmware returns all the APs above look down threshold

Change-Id: I1410a7a8f99f6b5fad421bd13ef169b8560d4492
CRs-Fixed: 549639
diff --git a/CORE/SME/inc/csrApi.h b/CORE/SME/inc/csrApi.h
index e796291..79a8a6d 100644
--- a/CORE/SME/inc/csrApi.h
+++ b/CORE/SME/inc/csrApi.h
@@ -1124,6 +1124,7 @@
     tANI_U8   enableTxLdpc;
 
     tANI_U8 isAmsduSupportInAMPDU;
+    tANI_U8 nSelect5GHzMargin;
 
 }tCsrConfigParam;