qcacld-3.0: Send disconnect reason code as 0 for beacon miss

Currently, host driver sends disconnect reason code as
WLAN_REASON_UNSPECIFIED(1) when the station disconnects due to
continuous beacon miss and corresponding vendor specific reason
code is also sent to userspace. This change is introduced with
the commit I99bf4573b59dc810e0a1529fcd48061d10acae4e to
provide vendor specific reason codes for all internal
disconnections.
Driver used to send reason code as 0 for beacon miss before
this change. Few applications might still expect the same
reason code(0) and current behavior causes backward compatibility
issues. So, retain the same reason code 0 for beacon miss failure.

Change-Id: I82f215ba15ff6e215cb14ac08933e1491371dfde
CRs-Fixed: 2689257
This commit is contained in:
Srinivas Dasari 2020-05-19 01:20:53 +05:30 • committed by nshrivas
commit ad5a78ee9e
2 changed files with 7 additions and 11 deletions

View file

@ -19586,6 +19586,12 @@ wlan_hdd_get_cfg80211_disconnect_reason(struct hdd_adapter *adapter,
if (reason >= eSIR_MAC_REASON_PROP_START) {
adapter->last_disconnect_reason =
wlan_hdd_sir_mac_to_qca_reason(reason);
/*
* Applications expect reason code as 0 for beacon miss failure
* due to backward compatibility. So send ieee80211_reason as 0.
*/
if (reason == eSIR_MAC_BEACON_MISSED)
ieee80211_reason = 0;
} else {
ieee80211_reason = (enum ieee80211_reasoncode)reason;
adapter->last_disconnect_reason =

View file

@ -3545,18 +3545,8 @@ QDF_STATUS csr_roam_call_callback(struct mac_context *mac, uint32_t sessionId,
csr_connect_info(mac, pSession, roam_info, u2);
if (mac->session_roam_complete_cb) {
if (roam_info) {
if (roam_info)
roam_info->sessionId = (uint8_t) sessionId;
/*
* the reasonCode will be passed to supplicant by
* cfg80211_disconnected. Based on the document,
* the reason code passed to supplicant needs to set
* to 0 if unknown. eSIR_BEACON_MISSED reason code is
* not recognizable so that we set to 0 instead.
*/
if (roam_info->reasonCode == eSIR_MAC_BEACON_MISSED)
roam_info->reasonCode = 0;
}
status = mac->session_roam_complete_cb(mac->psoc, sessionId, roam_info,
roamId, u1, u2);
}