diff --git a/core/hdd/src/wlan_hdd_assoc.c b/core/hdd/src/wlan_hdd_assoc.c index f35fe2360e9a..216020c4a776 100644 --- a/core/hdd/src/wlan_hdd_assoc.c +++ b/core/hdd/src/wlan_hdd_assoc.c @@ -1041,12 +1041,17 @@ static QDF_STATUS hdd_dis_connect_handler(hdd_adapter_t *pAdapter, eSIR_MAC_PEER_STA_REQ_LEAVING_BSS_REASON) pr_info("wlan: disconnected due to poor signal, rssi is %d dB\n", pRoamInfo->rxRssi); cfg80211_disconnected(dev, pRoamInfo-> - reasonCode, NULL, - 0, GFP_KERNEL); + reasonCode, NULL, 0, +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 2, 0)) || defined(WITH_BACKPORTS) + true, +#endif + GFP_KERNEL); } else { cfg80211_disconnected(dev, - WLAN_REASON_UNSPECIFIED, - NULL, 0, + WLAN_REASON_UNSPECIFIED, NULL, 0, +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 2, 0)) || defined(WITH_BACKPORTS) + true, +#endif GFP_KERNEL); } diff --git a/core/hdd/src/wlan_hdd_cfg80211.c b/core/hdd/src/wlan_hdd_cfg80211.c index 77d513eac8ac..e86c52bf79f7 100644 --- a/core/hdd/src/wlan_hdd_cfg80211.c +++ b/core/hdd/src/wlan_hdd_cfg80211.c @@ -9006,8 +9006,11 @@ disconnected: * is handled by __cfg80211_disconnect call to __cfg80211_disconnected */ hddLog(LOG1, FL("Send disconnected event to userspace")); - cfg80211_disconnected(pAdapter->dev, WLAN_REASON_UNSPECIFIED, - NULL, 0, GFP_KERNEL); + cfg80211_disconnected(pAdapter->dev, WLAN_REASON_UNSPECIFIED, NULL, 0, +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 2, 0)) || defined(WITH_BACKPORTS) + false, +#endif + GFP_KERNEL); #endif return result; diff --git a/core/hdd/src/wlan_hdd_main.c b/core/hdd/src/wlan_hdd_main.c index 9f0f4925d893..5d86191b6dde 100644 --- a/core/hdd/src/wlan_hdd_main.c +++ b/core/hdd/src/wlan_hdd_main.c @@ -3127,7 +3127,11 @@ QDF_STATUS hdd_start_all_adapters(hdd_context_t *hdd_ctx) /* indicate disconnected event to nl80211 */ cfg80211_disconnected(adapter->dev, WLAN_REASON_UNSPECIFIED, - NULL, 0, GFP_KERNEL); + NULL, 0, +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 2, 0)) || defined(WITH_BACKPORTS) + true, +#endif + GFP_KERNEL); } else if (eConnectionState_Connecting == connState) { /* * Indicate connect failure to supplicant if we were in the