qcacld-3.0: Send proper reason code to Supplicant on beacon miss event
qcacld-2.0 to qcacld-3.0 propagation
Once the beacon miss event is received in driver, sta cleanup
happens and sends deauth reason code as 505 which is internal
value to driver(eSIR_SME_LOST_LINK_WITH_PEER_RESULT_CODE).
Send reason code as zero to Supplicant for Beacon miss kickout.
Cleanup the similar handling in csr_api_roam as it is redundant.
Change-Id: I6df97e05ac20f285646df3d5fe73800138a18d89
CRs-Fixed: 1025871
diff --git a/core/mac/src/pe/lim/lim_send_sme_rsp_messages.c b/core/mac/src/pe/lim/lim_send_sme_rsp_messages.c
index c752006..146bfb1 100644
--- a/core/mac/src/pe/lim/lim_send_sme_rsp_messages.c
+++ b/core/mac/src/pe/lim/lim_send_sme_rsp_messages.c
@@ -958,6 +958,16 @@
sizeof(tSirMacAddr));
sir_sme_dis_ind->session_id = smesessionId;
sir_sme_dis_ind->reason_code = reasonCode;
+ /*
+ * Instead of sending deauth reason code as 505 which is
+ * internal value(eSIR_SME_LOST_LINK_WITH_PEER_RESULT_CODE)
+ * Send reason code as zero to Supplicant
+ */
+ if (reasonCode == eSIR_SME_LOST_LINK_WITH_PEER_RESULT_CODE)
+ sir_sme_dis_ind->reason_code = 0;
+ else
+ sir_sme_dis_ind->reason_code = reasonCode;
+
pMsg = (uint32_t *)sir_sme_dis_ind;
break;
@@ -1424,6 +1434,16 @@
sir_sme_dis_ind->reason_code = reasonCode;
qdf_mem_copy(sir_sme_dis_ind->peer_mac, peerMacAddr,
ETH_ALEN);
+ /*
+ * Instead of sending deauth reason code as 505 which is
+ * internal value(eSIR_SME_LOST_LINK_WITH_PEER_RESULT_CODE)
+ * Send reason code as zero to Supplicant
+ */
+ if (reasonCode == eSIR_SME_LOST_LINK_WITH_PEER_RESULT_CODE)
+ sir_sme_dis_ind->reason_code = 0;
+ else
+ sir_sme_dis_ind->reason_code = reasonCode;
+
pMsg = (uint32_t *)sir_sme_dis_ind;
break;