|
@@ -1759,6 +1759,8 @@ static QDF_STATUS hdd_dis_connect_handler(struct hdd_adapter *adapter,
|
|
|
* by kernel
|
|
|
*/
|
|
|
if (sendDisconInd) {
|
|
|
+ int reason = WLAN_REASON_UNSPECIFIED;
|
|
|
+
|
|
|
if (roam_info && roam_info->disconnect_ies) {
|
|
|
disconnect_ies.data =
|
|
|
roam_info->disconnect_ies->data;
|
|
@@ -1769,28 +1771,21 @@ static QDF_STATUS hdd_dis_connect_handler(struct hdd_adapter *adapter,
|
|
|
* To avoid wpa_supplicant sending "HANGED" CMD
|
|
|
* to ICS UI.
|
|
|
*/
|
|
|
- if (eCSR_ROAM_LOSTLINK == roam_status) {
|
|
|
- if (roam_info && roam_info->reasonCode ==
|
|
|
+ if (roam_info && eCSR_ROAM_LOSTLINK == roam_status) {
|
|
|
+ reason = roam_info->reasonCode;
|
|
|
+ if (reason ==
|
|
|
eSIR_MAC_PEER_STA_REQ_LEAVING_BSS_REASON)
|
|
|
pr_info("wlan: disconnected due to poor signal, rssi is %d dB\n",
|
|
|
roam_info->rxRssi);
|
|
|
- wlan_hdd_cfg80211_indicate_disconnect(
|
|
|
- dev, false,
|
|
|
- roam_info->reasonCode,
|
|
|
- disconnect_ies.data,
|
|
|
- disconnect_ies.len);
|
|
|
- } else {
|
|
|
- wlan_hdd_cfg80211_indicate_disconnect(
|
|
|
+ }
|
|
|
+ wlan_hdd_cfg80211_indicate_disconnect(
|
|
|
dev, false,
|
|
|
- WLAN_REASON_UNSPECIFIED,
|
|
|
+ reason,
|
|
|
disconnect_ies.data,
|
|
|
disconnect_ies.len);
|
|
|
- }
|
|
|
|
|
|
hdd_debug("sent disconnected event to nl80211, reason code %d",
|
|
|
- (eCSR_ROAM_LOSTLINK == roam_status) ?
|
|
|
- roam_info->reasonCode :
|
|
|
- WLAN_REASON_UNSPECIFIED);
|
|
|
+ reason);
|
|
|
}
|
|
|
|
|
|
/* update P2P connection status */
|