wlan: hdd changes to parse reason-code in del_sta.

del_station callback function in cfg80211 is enhanced to also include
the Deauthentication or Disassociation reason code which shall be
passed by the supplicant. To ensure the host driver interops with the
both versions of del_station implementation, a flag CFG80211_DEL_STA_V2
is defined in the kernel. Enhance the driver to rely on this flag and
thus use the respective del_station callback functionality.
If CFG80211_DEL_STA_V2 flag is defined, pass the reason-code received
from nl-layer to SME layer.

Change-Id: Idbd939201b3d1ae0f24d4cca30d78792c44d4ce9
CRs-Fixed: 746133
diff --git a/CORE/HDD/src/wlan_hdd_main.c b/CORE/HDD/src/wlan_hdd_main.c
index b5858b6..cfd6916 100644
--- a/CORE/HDD/src/wlan_hdd_main.c
+++ b/CORE/HDD/src/wlan_hdd_main.c
@@ -9842,7 +9842,8 @@
 
   --------------------------------------------------------------------------*/
 
-VOS_STATUS hdd_softap_sta_deauth(hdd_adapter_t *pAdapter, v_U8_t *pDestMacAddress)
+VOS_STATUS hdd_softap_sta_deauth(hdd_adapter_t *pAdapter,
+                                 struct tagCsrDelStaParams *pDelStaParams)
 {
     v_CONTEXT_t pVosContext = (WLAN_HDD_GET_CTX(pAdapter))->pvosContext;
     VOS_STATUS vosStatus = VOS_STATUS_E_FAULT;
@@ -9853,10 +9854,10 @@
            (WLAN_HDD_GET_CTX(pAdapter))->pvosContext);
 
     //Ignore request to deauth bcmc station
-    if( pDestMacAddress[0] & 0x1 )
+    if (pDelStaParams->peerMacAddr[0] & 0x1)
        return vosStatus;
 
-    vosStatus = WLANSAP_DeauthSta(pVosContext,pDestMacAddress);
+    vosStatus = WLANSAP_DeauthSta(pVosContext, pDelStaParams);
 
     EXIT();
     return vosStatus;
@@ -9892,12 +9893,13 @@
             if ((pAdapter->aStaInfo[i].isUsed) &&
                 (!pAdapter->aStaInfo[i].isDeauthInProgress))
             {
-                u8 *macAddr = pAdapter->aStaInfo[i].macAddrSTA.bytes;
-                hddLog(VOS_TRACE_LEVEL_ERROR,
-                       "%s: Delete STA with staid = %d and MAC::"
-                        MAC_ADDRESS_STR,
-                        __func__, i, MAC_ADDR_ARRAY(macAddr));
-                vos_status = hdd_softap_sta_deauth(pAdapter, macAddr);
+                struct tagCsrDelStaParams delStaParams;
+
+                WLANSAP_PopulateDelStaParams(
+                            pAdapter->aStaInfo[i].macAddrSTA.bytes,
+                            eCsrForcedDeauthSta, SIR_MAC_MGMT_DEAUTH >> 4,
+                            &delStaParams);
+                vos_status = hdd_softap_sta_deauth(pAdapter, &delStaParams);
                 if (VOS_IS_STATUS_SUCCESS(vos_status))
                     pAdapter->aStaInfo[i].isDeauthInProgress = TRUE;
             }