|
@@ -3799,7 +3799,7 @@ static void lim_process_sme_update_config(tpAniSirGlobal mac_ctx,
|
|
|
|
|
|
if (LIM_IS_AP_ROLE(pe_session)) {
|
|
|
sch_set_fixed_beacon_fields(mac_ctx, pe_session);
|
|
|
- lim_send_beacon_ind(mac_ctx, pe_session);
|
|
|
+ lim_send_beacon_ind(mac_ctx, pe_session, REASON_CONFIG_UPDATE);
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -4091,7 +4091,7 @@ static void __lim_process_sme_set_ht2040_mode(tpAniSirGlobal pMac,
|
|
|
|
|
|
/* Update beacon */
|
|
|
sch_set_fixed_beacon_fields(pMac, psessionEntry);
|
|
|
- lim_send_beacon_ind(pMac, psessionEntry);
|
|
|
+ lim_send_beacon_ind(pMac, psessionEntry, REASON_SET_HT2040);
|
|
|
|
|
|
/* update OP Mode for each associated peer */
|
|
|
for (staId = 0; staId < psessionEntry->dph.dphHashTable.size; staId++) {
|
|
@@ -5900,6 +5900,56 @@ static void lim_process_ext_change_channel(tpAniSirGlobal mac_ctx,
|
|
|
0, session_entry);
|
|
|
}
|
|
|
|
|
|
+/**
|
|
|
+ * lim_nss_update_rsp() - send NSS update response to SME
|
|
|
+ * @mac_ctx Pointer to Global MAC structure
|
|
|
+ * @vdev_id: vdev id
|
|
|
+ * @status: nss update status
|
|
|
+ *
|
|
|
+ * Return: None
|
|
|
+ */
|
|
|
+static void lim_nss_update_rsp(tpAniSirGlobal mac_ctx,
|
|
|
+ uint8_t vdev_id, QDF_STATUS status)
|
|
|
+{
|
|
|
+ struct scheduler_msg msg = {0};
|
|
|
+ struct sir_bcn_update_rsp *nss_rsp;
|
|
|
+ QDF_STATUS qdf_status;
|
|
|
+
|
|
|
+ nss_rsp = qdf_mem_malloc(sizeof(*nss_rsp));
|
|
|
+ if (!nss_rsp) {
|
|
|
+ pe_err("AllocateMemory failed for nss_rsp");
|
|
|
+ return;
|
|
|
+ }
|
|
|
+
|
|
|
+ nss_rsp->vdev_id = vdev_id;
|
|
|
+ nss_rsp->status = status;
|
|
|
+ nss_rsp->reason = REASON_NSS_UPDATE;
|
|
|
+
|
|
|
+ msg.type = eWNI_SME_NSS_UPDATE_RSP;
|
|
|
+ msg.bodyptr = nss_rsp;
|
|
|
+ msg.bodyval = 0;
|
|
|
+ qdf_status = scheduler_post_message(QDF_MODULE_ID_PE, QDF_MODULE_ID_SME,
|
|
|
+ QDF_MODULE_ID_SME, &msg);
|
|
|
+ if (QDF_IS_STATUS_ERROR(qdf_status)) {
|
|
|
+ pe_err("Failed to post eWNI_SME_NSS_UPDATE_RSP");
|
|
|
+ qdf_mem_free(nss_rsp);
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+void lim_send_bcn_rsp(tpAniSirGlobal mac_ctx, tpSendbeaconParams rsp)
|
|
|
+{
|
|
|
+ if (!rsp) {
|
|
|
+ pe_err("rsp is NULL");
|
|
|
+ return;
|
|
|
+ }
|
|
|
+
|
|
|
+ pe_debug("Send beacon resp status %d for reason %d",
|
|
|
+ rsp->status, rsp->reason);
|
|
|
+
|
|
|
+ if (rsp->reason == REASON_NSS_UPDATE)
|
|
|
+ lim_nss_update_rsp(mac_ctx, rsp->vdev_id, rsp->status);
|
|
|
+}
|
|
|
+
|
|
|
/**
|
|
|
* lim_process_nss_update_request() - process sme nss update req
|
|
|
*
|
|
@@ -5916,25 +5966,28 @@ static void lim_process_nss_update_request(tpAniSirGlobal mac_ctx,
|
|
|
{
|
|
|
struct sir_nss_update_request *nss_update_req_ptr;
|
|
|
tpPESession session_entry = NULL;
|
|
|
+ QDF_STATUS status = QDF_STATUS_E_FAILURE;
|
|
|
+ uint8_t vdev_id;
|
|
|
|
|
|
- if (msg_buf == NULL) {
|
|
|
+ if (!msg_buf) {
|
|
|
pe_err("Buffer is Pointing to NULL");
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
nss_update_req_ptr = (struct sir_nss_update_request *)msg_buf;
|
|
|
+ vdev_id = nss_update_req_ptr->vdev_id;
|
|
|
session_entry = pe_find_session_by_sme_session_id(mac_ctx,
|
|
|
nss_update_req_ptr->vdev_id);
|
|
|
- if (session_entry == NULL) {
|
|
|
+ if (!session_entry) {
|
|
|
pe_err("Session not found for given session_id %d",
|
|
|
nss_update_req_ptr->vdev_id);
|
|
|
- return;
|
|
|
+ goto end;
|
|
|
}
|
|
|
|
|
|
if (session_entry->valid && !LIM_IS_AP_ROLE(session_entry)) {
|
|
|
pe_err("Invalid SystemRole %d",
|
|
|
GET_LIM_SYSTEM_ROLE(session_entry));
|
|
|
- return;
|
|
|
+ goto end;
|
|
|
}
|
|
|
|
|
|
/* populate nss field in the beacon */
|
|
@@ -5946,16 +5999,28 @@ static void lim_process_nss_update_request(tpAniSirGlobal mac_ctx,
|
|
|
(session_entry->ch_width > CH_WIDTH_80MHZ))
|
|
|
session_entry->gLimOperatingMode.chanWidth = CH_WIDTH_80MHZ;
|
|
|
|
|
|
- pe_debug("ch width %hu", session_entry->gLimOperatingMode.chanWidth);
|
|
|
+ pe_debug("ch width %d Rx NSS %d",
|
|
|
+ session_entry->gLimOperatingMode.chanWidth,
|
|
|
+ session_entry->gLimOperatingMode.rxNSS);
|
|
|
|
|
|
/* Send nss update request from here */
|
|
|
- if (sch_set_fixed_beacon_fields(mac_ctx, session_entry) !=
|
|
|
- QDF_STATUS_SUCCESS) {
|
|
|
+ status = sch_set_fixed_beacon_fields(mac_ctx, session_entry);
|
|
|
+ if (QDF_IS_STATUS_ERROR(status)) {
|
|
|
pe_err("Unable to set op mode IE in beacon");
|
|
|
- return;
|
|
|
+ goto end;
|
|
|
}
|
|
|
|
|
|
- lim_send_beacon_ind(mac_ctx, session_entry);
|
|
|
+ status = lim_send_beacon_ind(mac_ctx, session_entry, REASON_NSS_UPDATE);
|
|
|
+ if (QDF_IS_STATUS_SUCCESS(status))
|
|
|
+ return;
|
|
|
+
|
|
|
+ pe_err("Unable to send beacon");
|
|
|
+end:
|
|
|
+ /*
|
|
|
+ * send resp only in case of failure,
|
|
|
+ * success case response will be from wma.
|
|
|
+ */
|
|
|
+ lim_nss_update_rsp(mac_ctx, vdev_id, status);
|
|
|
}
|
|
|
|
|
|
/**
|