wlan: Update the TDLS cfg80211 interface for 3.18 support

cfg80211 interface have been  changed since Kernel 3.15.
And also some params passing from cfg80211 are constified.
So make the corresponding change to adapt to the interface change.

Change-Id: I3ba104296a1145c59b024d753b360d53d6b6caba
CRs-fixed: 882885
diff --git a/CORE/HDD/src/wlan_hdd_cfg80211.c b/CORE/HDD/src/wlan_hdd_cfg80211.c
index f91d875..62bf76f 100644
--- a/CORE/HDD/src/wlan_hdd_cfg80211.c
+++ b/CORE/HDD/src/wlan_hdd_cfg80211.c
@@ -9893,7 +9893,11 @@
 
     rssi = (VOS_MIN ((pBssDesc->rssi + pBssDesc->sinr), 0))*100;
 
-    return cfg80211_inform_bss(wiphy, chan, pBssDesc->bssId,
+    return cfg80211_inform_bss(wiphy, chan,
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,18,0))
+                CFG80211_BSS_FTYPE_UNKNOWN,
+#endif
+                pBssDesc->bssId,
                 le64_to_cpu(*(__le64 *)pBssDesc->timeStamp),
                 pBssDesc->capabilityInfo,
                 pBssDesc->beaconInterval, ie, ie_length,
@@ -14927,13 +14931,42 @@
 
 #ifdef FEATURE_WLAN_TDLS
 #if TDLS_MGMT_VERSION2
-static int __wlan_hdd_cfg80211_tdls_mgmt(struct wiphy *wiphy, struct net_device *dev,
-                     u8 *peer, u8 action_code,  u8 dialog_token,
-                      u16 status_code, u32 peer_capability, const u8 *buf, size_t len)
+static int __wlan_hdd_cfg80211_tdls_mgmt(struct wiphy *wiphy,
+                                         struct net_device *dev,
+                                         u8 *peer, u8 action_code,
+                                         u8 dialog_token,
+                                         u16 status_code, u32 peer_capability,
+                                         const u8 *buf, size_t len)
+#else /* TDLS_MGMT_VERSION2 */
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 17, 0)) || defined(WITH_BACKPORTS)
+static int __wlan_hdd_cfg80211_tdls_mgmt(struct wiphy *wiphy,
+                                         struct net_device *dev,
+                                         const u8 *peer, u8 action_code,
+                                         u8 dialog_token, u16 status_code,
+                                         u32 peer_capability, bool initiator,
+                                         const u8 *buf, size_t len)
+#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 16, 0))
+static int __wlan_hdd_cfg80211_tdls_mgmt(struct wiphy *wiphy,
+                                         struct net_device *dev,
+                                         const u8 *peer, u8 action_code,
+                                         u8 dialog_token, u16 status_code,
+                                         u32 peer_capability, const u8 *buf,
+                                         size_t len)
+#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 15, 0))
+static int __wlan_hdd_cfg80211_tdls_mgmt(struct wiphy *wiphy,
+                                         struct net_device *dev,
+                                         u8 *peer, u8 action_code,
+                                         u8 dialog_token,
+                                         u16 status_code, u32 peer_capability,
+                                         const u8 *buf, size_t len)
 #else
-static int __wlan_hdd_cfg80211_tdls_mgmt(struct wiphy *wiphy, struct net_device *dev,
-                     u8 *peer, u8 action_code,  u8 dialog_token,
-                     u16 status_code, const u8 *buf, size_t len)
+static int __wlan_hdd_cfg80211_tdls_mgmt(struct wiphy *wiphy,
+                                         struct net_device *dev,
+                                         u8 *peer, u8 action_code,
+                                         u8 dialog_token,
+                                         u16 status_code, const u8 *buf,
+                                         size_t len)
+#endif
 #endif
 {
 
@@ -15237,17 +15270,33 @@
 {
     int ret;
 
-     vos_ssr_protect(__func__);
+    vos_ssr_protect(__func__);
 #if TDLS_MGMT_VERSION2
-     ret = __wlan_hdd_cfg80211_tdls_mgmt(wiphy, dev, peer, action_code, dialog_token,
-                                         status_code, peer_capability, buf, len);
+    ret = __wlan_hdd_cfg80211_tdls_mgmt(wiphy, dev, peer, action_code,
+                                        dialog_token, status_code,
+                                        peer_capability, buf, len);
+#else /* TDLS_MGMT_VERSION2 */
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 17, 0)) || defined(WITH_BACKPORTS)
+    ret = __wlan_hdd_cfg80211_tdls_mgmt(wiphy, dev, peer, action_code,
+                                        dialog_token, status_code,
+                                        peer_capability, initiator,
+                                        buf, len);
+#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 16, 0))
+    ret = __wlan_hdd_cfg80211_tdls_mgmt(wiphy, dev, peer, action_code,
+                                        dialog_token, status_code,
+                                        peer_capability, buf, len);
+#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 15, 0))
+    ret = __wlan_hdd_cfg80211_tdls_mgmt(wiphy, dev, peer, action_code,
+                                        dialog_token, status_code,
+                                        peer_capability, buf, len);
 #else
-     ret = __wlan_hdd_cfg80211_tdls_mgmt(wiphy, dev, peer, action_code, dialog_token,
-                                         status_code, buf, len);
+    ret = __wlan_hdd_cfg80211_tdls_mgmt(wiphy, dev, peer, action_code,
+                                        dialog_token, status_code, buf, len);
 #endif
-     vos_ssr_unprotect(__func__);
+#endif
+    vos_ssr_unprotect(__func__);
 
-     return ret;
+    return ret;
 }
 
 int wlan_hdd_tdls_extctrl_config_peer(hdd_adapter_t *pAdapter,