summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorgaurank kathpalia <gkathpal@codeaurora.org>2018-06-29 14:47:23 +0530
committerGerrit - the friendly Code Review server <code-review@localhost>2018-07-04 21:43:22 -0700
commita8a87510b38fa4c2311016a593e73a1e4a384d47 (patch)
tree81333c65982e972d1597e37383b665c279f761a6
parent85650f499f7857ea7b8ab7298726f4e1276cc044 (diff)
qcacld-3.0: Fix hw mode change issue in case of DBS
The driver stops the oppurtunitistic timer for DBS, when the start AP requests come, which results in HW mode stuck in DBS if the next vdev start request comes on the same MAC This further results in NSS = 1 for the MAC, hence throughput decreases. Fix is to set hw mode to single MAC in case the STA/SAP comes up in the band/channel Change-Id: I85664bb5d64f5ce6506f47da4b62328631f01616 CRs-Fixed: 2267106
-rw-r--r--core/cds/src/cds_concurrency.c7
-rw-r--r--core/hdd/src/wlan_hdd_hostapd.c20
2 files changed, 13 insertions, 14 deletions
diff --git a/core/cds/src/cds_concurrency.c b/core/cds/src/cds_concurrency.c
index 1a35d567b371..984f41f25054 100644
--- a/core/cds/src/cds_concurrency.c
+++ b/core/cds/src/cds_concurrency.c
@@ -10708,6 +10708,8 @@ void cds_checkn_update_hw_mode_single_mac_mode(uint8_t channel)
cds_err("Invalid CDS Context");
return;
}
+ if (QDF_TIMER_STATE_RUNNING == cds_ctx->dbs_opportunistic_timer.state)
+ qdf_mc_timer_stop(&cds_ctx->dbs_opportunistic_timer);
qdf_mutex_acquire(&cds_ctx->qdf_conc_list_lock);
for (i = 0; i < MAX_NUMBER_OF_CONC_CONNECTIONS; i++) {
@@ -10720,11 +10722,6 @@ void cds_checkn_update_hw_mode_single_mac_mode(uint8_t channel)
}
}
qdf_mutex_release(&cds_ctx->qdf_conc_list_lock);
-
- if (QDF_TIMER_STATE_RUNNING ==
- cds_ctx->dbs_opportunistic_timer.state)
- qdf_mc_timer_stop(&cds_ctx->dbs_opportunistic_timer);
-
cds_dbs_opportunistic_timer_handler((void *)cds_ctx);
}
diff --git a/core/hdd/src/wlan_hdd_hostapd.c b/core/hdd/src/wlan_hdd_hostapd.c
index 91abc10131de..d23bc3f9f108 100644
--- a/core/hdd/src/wlan_hdd_hostapd.c
+++ b/core/hdd/src/wlan_hdd_hostapd.c
@@ -9170,16 +9170,18 @@ static int __wlan_hdd_cfg80211_start_ap(struct wiphy *wiphy,
hdd_err("ERR: clear event failed");
/*
- * Stop opportunistic timer here if running as we are already doing
- * hw mode change before vdev start based on the new concurrency
- * situation. If timer is not stopped and if it gets triggered before
- * VDEV_UP, it will reset the hw mode to some wrong value.
+ * For Start Ap, the driver checks whether the SAP comes up in a
+ * different or same band( whether we require DBS or Not).
+ * If we dont require DBS, then the driver does nothing assuming
+ * the state would be already in non DBS mode, and just continues
+ * with vdev up on same MAC, by stoping the opportunistic timer,
+ * which results in a connection of 1x1 if already the state was in
+ * DBS. So first stop timer, and check the current hw mode.
+ * If the SAP comes up in band different from STA, DBS mode is already
+ * set. IF not, then well check for upgrade, and shift the connection
+ * back to single MAC 2x2 (if initial was 2x2).
*/
- status = cds_stop_opportunistic_timer();
- if (status != QDF_STATUS_SUCCESS) {
- hdd_err("Failed to stop DBS opportunistic timer");
- return -EINVAL;
- }
+ cds_checkn_update_hw_mode_single_mac_mode(channel);
status = cds_current_connections_update(pAdapter->sessionId,
channel,