summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--core/bmi/src/ol_fw.c3
-rw-r--r--core/cds/inc/cds_config.h2
-rw-r--r--core/cds/inc/cds_regdomain.h1
-rw-r--r--core/cds/src/cds_concurrency.c5
-rw-r--r--core/cds/src/cds_regdomain.c1
-rw-r--r--core/dp/txrx/ol_txrx.c15
-rw-r--r--core/hdd/inc/wlan_hdd_ipa.h2
-rw-r--r--core/hdd/inc/wlan_hdd_main.h21
-rw-r--r--core/hdd/inc/wlan_hdd_tx_rx.h2
-rw-r--r--core/hdd/src/wlan_hdd_assoc.c6
-rw-r--r--core/hdd/src/wlan_hdd_cfg80211.c8
-rw-r--r--core/hdd/src/wlan_hdd_hostapd.c94
-rw-r--r--core/hdd/src/wlan_hdd_ipa.c10
-rw-r--r--core/hdd/src/wlan_hdd_main.c31
-rw-r--r--core/hdd/src/wlan_hdd_power.c4
-rw-r--r--core/hdd/src/wlan_hdd_scan.c13
-rw-r--r--core/hdd/src/wlan_hdd_softap_tx_rx.c8
-rw-r--r--core/hdd/src/wlan_hdd_tx_rx.c29
-rw-r--r--core/hdd/src/wlan_hdd_wext.c2
-rw-r--r--core/mac/inc/qwlan_version.h4
-rw-r--r--core/mac/src/cfg/cfg_proc_msg.c7
-rw-r--r--core/mac/src/pe/lim/lim_send_sme_rsp_messages.c5
-rw-r--r--core/sap/src/sap_fsm.c6
-rw-r--r--core/sme/src/common/sme_power_save.c10
-rw-r--r--core/sme/src/csr/csr_api_roam.c92
-rw-r--r--core/sme/src/csr/csr_cmd_process.c3
-rw-r--r--core/utils/logging/src/wlan_logging_sock_svc.c5
-rw-r--r--core/wma/src/wma_dev_if.c6
-rw-r--r--core/wma/src/wma_features.c53
-rw-r--r--core/wma/src/wma_main.c6
-rw-r--r--core/wma/src/wma_mgmt.c12
-rw-r--r--core/wma/src/wma_scan_roam.c6
-rw-r--r--core/wma/src/wma_utils.c6
33 files changed, 283 insertions, 195 deletions
diff --git a/core/bmi/src/ol_fw.c b/core/bmi/src/ol_fw.c
index 2f8abdc9f947..5ec9ce12260f 100644
--- a/core/bmi/src/ol_fw.c
+++ b/core/bmi/src/ol_fw.c
@@ -1487,6 +1487,9 @@ static int ol_diag_read_reg_loc(struct hif_opaque_softc *scn, uint8_t *buffer,
struct hif_target_info *tgt_info = hif_get_target_info_handle(scn);
uint32_t target_version = tgt_info->target_version;
+ reg_table.section = NULL;
+ reg_table.section_size = 0;
+
section_len = ol_ath_get_reg_table(scn, target_version, &reg_table);
if (!reg_table.section || !reg_table.section_size || !section_len) {
diff --git a/core/cds/inc/cds_config.h b/core/cds/inc/cds_config.h
index 96b5763cc736..33bb3b73a721 100644
--- a/core/cds/inc/cds_config.h
+++ b/core/cds/inc/cds_config.h
@@ -150,6 +150,7 @@ enum cds_auto_pwr_detect_failure_mode_t {
* @active_mc_bc_apf_mode: Setting that determines how APF is applied in
* active mode for MC/BC packets
* @rps_enabled: RPS enabled in SAP mode
+ * @delay_before_vdev_stop: wait time for tx complete before vdev stop
* @ito_repeat_count: Indicates ito repeated count
* @bandcapability: Configured band by user
* @etsi_srd_chan_in_master_mode: Use of ETSI SRD chan in SAP/P2P-GO ACS/PCL
@@ -214,6 +215,7 @@ struct cds_config_info {
enum active_apf_mode active_uc_apf_mode;
enum active_apf_mode active_mc_bc_apf_mode;
bool rps_enabled;
+ uint8_t delay_before_vdev_stop;
enum cds_auto_pwr_detect_failure_mode_t auto_power_save_fail_mode;
uint8_t ito_repeat_count;
uint8_t bandcapability;
diff --git a/core/cds/inc/cds_regdomain.h b/core/cds/inc/cds_regdomain.h
index dc90727e9df0..e0c45eaa569f 100644
--- a/core/cds/inc/cds_regdomain.h
+++ b/core/cds/inc/cds_regdomain.h
@@ -183,6 +183,7 @@ enum country_code {
CTRY_MONGOLIA = 496,
CTRY_MONTENEGRO = 499,
CTRY_MOROCCO = 504,
+ CTRY_MYANMAR = 104,
CTRY_NAMIBIA = 516,
CTRY_NEPAL = 524,
CTRY_NETHERLANDS = 528,
diff --git a/core/cds/src/cds_concurrency.c b/core/cds/src/cds_concurrency.c
index 0979b1dcadda..3b0affd4d499 100644
--- a/core/cds/src/cds_concurrency.c
+++ b/core/cds/src/cds_concurrency.c
@@ -9007,6 +9007,11 @@ QDF_STATUS cds_decr_connection_count_utfw(uint32_t del_all,
sme_cbacks.sme_get_valid_channels = sme_cfg_get_str;
sme_cbacks.sme_get_nss_for_vdev = sme_get_vdev_type_nss;
if (del_all) {
+ status = cds_deinit_policy_mgr();
+ if (!QDF_IS_STATUS_SUCCESS(status)) {
+ cds_err("Policy manager initialization failed");
+ return QDF_STATUS_E_FAILURE;
+ }
status = cds_init_policy_mgr(&sme_cbacks);
if (!QDF_IS_STATUS_SUCCESS(status)) {
cds_err("Policy manager initialization failed");
diff --git a/core/cds/src/cds_regdomain.c b/core/cds/src/cds_regdomain.c
index e6013f0563b5..b00e3fa883c6 100644
--- a/core/cds/src/cds_regdomain.c
+++ b/core/cds/src/cds_regdomain.c
@@ -317,6 +317,7 @@ static const struct country_code_to_reg_dmn g_all_countries[] = {
{CTRY_MONGOLIA, FCC3_WORLD, "MN", "MONGOLIA"},
{CTRY_MONTENEGRO, ETSI13_WORLD, "ME", "MONTENEGRO"},
{CTRY_MOROCCO, ETSI3_WORLD, "MA", "MOROCCO"},
+ {CTRY_MYANMAR, APL1_WORLD, "MM", "MYANMAR"},
{CTRY_NAMIBIA, APL20_WORLD, "NA", "NAMIBIA"},
{CTRY_NEPAL, APL23_WORLD, "NP", "NEPAL"},
{CTRY_NETHERLANDS, ETSI13_WORLD, "NL", "NETHERLANDS"},
diff --git a/core/dp/txrx/ol_txrx.c b/core/dp/txrx/ol_txrx.c
index 54c85e517a7f..d9a8a341819d 100644
--- a/core/dp/txrx/ol_txrx.c
+++ b/core/dp/txrx/ol_txrx.c
@@ -3839,10 +3839,7 @@ void peer_unmap_timer_handler(unsigned long data)
peer->mac_addr.raw[4], peer->mac_addr.raw[5]);
if (!cds_is_driver_recovering() && !cds_is_fw_down()) {
wma_peer_debug_dump();
- if (cds_is_self_recovery_enabled())
- cds_trigger_recovery(CDS_PEER_UNMAP_TIMEDOUT);
- else
- QDF_BUG(0);
+ cds_trigger_recovery(CDS_PEER_UNMAP_TIMEDOUT);
} else {
WMA_LOGE("%s: Recovery is in progress, ignore!", __func__);
}
@@ -5282,6 +5279,11 @@ void ol_txrx_ipa_uc_set_quota(ol_txrx_pdev_handle pdev, uint64_t quota_bytes)
{
htt_h2t_ipa_uc_set_quota(pdev->htt_pdev, quota_bytes);
}
+
+int ol_txrx_rx_hash_smmu_map(ol_txrx_pdev_handle pdev, bool map)
+{
+ return htt_rx_hash_smmu_map_update(pdev->htt_pdev, map);
+}
#endif /* IPA_UC_OFFLOAD */
QDF_STATUS ol_txrx_display_stats(uint16_t value,
@@ -6198,8 +6200,3 @@ QDF_STATUS ol_txrx_set_wisa_mode(ol_txrx_vdev_handle vdev, bool enable)
vdev->is_wisa_mode_enable = enable;
return QDF_STATUS_SUCCESS;
}
-
-int ol_txrx_rx_hash_smmu_map(ol_txrx_pdev_handle pdev, bool map)
-{
- return htt_rx_hash_smmu_map_update(pdev->htt_pdev, map);
-}
diff --git a/core/hdd/inc/wlan_hdd_ipa.h b/core/hdd/inc/wlan_hdd_ipa.h
index e1a0d41e10fa..9db92f432b71 100644
--- a/core/hdd/inc/wlan_hdd_ipa.h
+++ b/core/hdd/inc/wlan_hdd_ipa.h
@@ -365,7 +365,7 @@ static inline void hdd_ipa_clean_adapter_iface(hdd_adapter_t *adapter)
{
}
-static int hdd_ipa_uc_disconnect_ap(hdd_adapter_t *adapter)
+static inline int hdd_ipa_uc_disconnect_ap(hdd_adapter_t *adapter)
{
return 0;
}
diff --git a/core/hdd/inc/wlan_hdd_main.h b/core/hdd/inc/wlan_hdd_main.h
index 6455573a5d27..abb496e2c189 100644
--- a/core/hdd/inc/wlan_hdd_main.h
+++ b/core/hdd/inc/wlan_hdd_main.h
@@ -1080,6 +1080,7 @@ typedef struct {
uint64_t rx_bytes;
qdf_time_t last_tx_rx_ts;
qdf_time_t assoc_ts;
+ qdf_time_t disassoc_ts;
uint32_t tx_rate;
uint32_t rx_rate;
bool ampdu;
@@ -2463,19 +2464,19 @@ void hdd_bus_bandwidth_destroy(hdd_context_t *hdd_ctx);
#define GET_BW_COMPUTE_INTV(config) ((config)->busBandwidthComputeInterval)
#else
-void hdd_bus_bw_compute_timer_start(hdd_context_t *hdd_ctx)
+static inline void hdd_bus_bw_compute_timer_start(hdd_context_t *hdd_ctx)
{
}
-void hdd_bus_bw_compute_timer_try_start(hdd_context_t *hdd_ctx)
+static inline void hdd_bus_bw_compute_timer_try_start(hdd_context_t *hdd_ctx)
{
}
-void hdd_bus_bw_compute_timer_stop(hdd_context_t *hdd_ctx)
+static inline void hdd_bus_bw_compute_timer_stop(hdd_context_t *hdd_ctx)
{
}
-void hdd_bus_bw_compute_timer_try_stop(hdd_context_t *hdd_ctx)
+static inline void hdd_bus_bw_compute_timer_try_stop(hdd_context_t *hdd_ctx)
{
}
@@ -2483,12 +2484,12 @@ static inline void hdd_stop_bus_bw_computer_timer(hdd_adapter_t *pAdapter)
{
}
-int hdd_bus_bandwidth_init(hdd_context_t *hdd_ctx)
+static inline int hdd_bus_bandwidth_init(hdd_context_t *hdd_ctx)
{
return 0;
}
-void hdd_bus_bandwidth_destroy(hdd_context_t *hdd_ctx)
+static inline void hdd_bus_bandwidth_destroy(hdd_context_t *hdd_ctx)
{
}
@@ -2727,7 +2728,11 @@ static inline void hdd_set_tso_flags(hdd_context_t *hdd_ctx,
}
#else
static inline void hdd_set_tso_flags(hdd_context_t *hdd_ctx,
- struct net_device *wlan_dev){}
+ struct net_device *wlan_dev)
+{
+ hdd_debug("SG Enabled");
+ wlan_dev->features |= NETIF_F_SG;
+}
#endif /* FEATURE_TSO */
#if defined(FEATURE_WLAN_MCC_TO_SCC_SWITCH) || \
@@ -3183,4 +3188,6 @@ void hdd_update_hw_sw_info(hdd_context_t *hdd_ctx);
*/
void hdd_get_nud_stats_cb(void *data, struct rsp_stats *rsp, void *context);
+void hdd_sched_scan_results(struct wiphy *wiphy, uint64_t reqid);
+
#endif /* end #if !defined(WLAN_HDD_MAIN_H) */
diff --git a/core/hdd/inc/wlan_hdd_tx_rx.h b/core/hdd/inc/wlan_hdd_tx_rx.h
index b48f4959356f..361bdbeed4a9 100644
--- a/core/hdd/inc/wlan_hdd_tx_rx.h
+++ b/core/hdd/inc/wlan_hdd_tx_rx.h
@@ -194,8 +194,10 @@ void wlan_hdd_classify_pkt(struct sk_buff *skb);
#ifdef MSM_PLATFORM
void hdd_reset_tcp_delack(hdd_context_t *hdd_ctx);
+#define HDD_MSM_CFG(msm_cfg) msm_cfg
#else
static inline void hdd_reset_tcp_delack(hdd_context_t *hdd_ctx) {}
+#define HDD_MSM_CFG(msm_cfg) 0
#endif
#ifdef FEATURE_WLAN_DIAG_SUPPORT
diff --git a/core/hdd/src/wlan_hdd_assoc.c b/core/hdd/src/wlan_hdd_assoc.c
index 2347bb49db0f..fc669066af40 100644
--- a/core/hdd/src/wlan_hdd_assoc.c
+++ b/core/hdd/src/wlan_hdd_assoc.c
@@ -1344,6 +1344,11 @@ static void hdd_send_association_event(struct net_device *dev,
hdd_wext_state_t *pWextState = WLAN_HDD_GET_WEXT_STATE_PTR(pAdapter);
tCsrRoamProfile *pRoamProfile = &(pWextState->roamProfile);
+ if (!pHddCtx) {
+ hdd_err("HDD context is NULL");
+ return;
+ }
+
memset(&wrqu, '\0', sizeof(wrqu));
wrqu.ap_addr.sa_family = ARPHRD_ETHER;
we_event = SIOCGIWAP;
@@ -6006,6 +6011,7 @@ int hdd_set_csr_auth_type(hdd_adapter_t *pAdapter, eCsrAuthType RSNAuthType)
switch (pHddStaCtx->conn_info.authType) {
case eCSR_AUTH_TYPE_OPEN_SYSTEM:
+ case eCSR_AUTH_TYPE_AUTOSWITCH:
#ifdef FEATURE_WLAN_ESE
case eCSR_AUTH_TYPE_CCKM_WPA:
case eCSR_AUTH_TYPE_CCKM_RSN:
diff --git a/core/hdd/src/wlan_hdd_cfg80211.c b/core/hdd/src/wlan_hdd_cfg80211.c
index e61ef00b2e4b..2ed23470d770 100644
--- a/core/hdd/src/wlan_hdd_cfg80211.c
+++ b/core/hdd/src/wlan_hdd_cfg80211.c
@@ -1521,7 +1521,15 @@ static int wlan_hdd_cfg80211_start_acs(hdd_adapter_t *adapter)
return -EINVAL;
}
hdd_ctx = WLAN_HDD_GET_CTX(adapter);
+ if (!hdd_ctx) {
+ hdd_err("hdd_ctx is NULL");
+ return -EINVAL;
+ }
sap_config = &adapter->sessionCtx.ap.sapConfig;
+ if (!sap_config) {
+ hdd_err("SAP config is NULL");
+ return -EINVAL;
+ }
if (hdd_ctx->acs_policy.acs_channel)
sap_config->channel = hdd_ctx->acs_policy.acs_channel;
else
diff --git a/core/hdd/src/wlan_hdd_hostapd.c b/core/hdd/src/wlan_hdd_hostapd.c
index 863313648f8a..839bb386ebe1 100644
--- a/core/hdd/src/wlan_hdd_hostapd.c
+++ b/core/hdd/src/wlan_hdd_hostapd.c
@@ -1441,7 +1441,9 @@ static void hdd_fill_station_info(hdd_adapter_t *pHostapdAdapter,
tSap_StationAssocReassocCompleteEvent *event)
{
hdd_station_info_t *stainfo;
- uint8_t i = 0;
+ uint8_t i = 0, oldest_disassoc_sta_idx = WLAN_MAX_STA_COUNT + 1;
+ qdf_time_t oldest_disassoc_sta_ts = 0;
+
if (event->staId >= WLAN_MAX_STA_COUNT) {
hdd_err("invalid sta id");
@@ -1503,8 +1505,6 @@ static void hdd_fill_station_info(hdd_adapter_t *pHostapdAdapter,
cache_sta_info[i].macAddrSTA.bytes,
event->staMac.bytes,
QDF_MAC_ADDR_SIZE)) {
- qdf_mem_zero(&pHostapdAdapter->cache_sta_info[i],
- sizeof(*stainfo));
break;
}
i++;
@@ -1515,14 +1515,36 @@ static void hdd_fill_station_info(hdd_adapter_t *pHostapdAdapter,
while (i < WLAN_MAX_STA_COUNT) {
if (pHostapdAdapter->cache_sta_info[i].isUsed != TRUE)
break;
+
+ if (pHostapdAdapter->
+ cache_sta_info[i].disassoc_ts &&
+ (!oldest_disassoc_sta_ts ||
+ (qdf_system_time_after(
+ oldest_disassoc_sta_ts,
+ pHostapdAdapter->
+ cache_sta_info[i].disassoc_ts)))) {
+ oldest_disassoc_sta_ts =
+ pHostapdAdapter->
+ cache_sta_info[i].disassoc_ts;
+ oldest_disassoc_sta_idx = i;
+ }
i++;
}
}
- if (i < WLAN_MAX_STA_COUNT)
+
+ if ((i == WLAN_MAX_STA_COUNT) && oldest_disassoc_sta_ts) {
+ hdd_debug("reached max cached staid, removing oldest stainfo");
+ i = oldest_disassoc_sta_idx;
+ }
+ if (i < WLAN_MAX_STA_COUNT) {
+ qdf_mem_zero(&pHostapdAdapter->cache_sta_info[i],
+ sizeof(*stainfo));
qdf_mem_copy(&pHostapdAdapter->cache_sta_info[i],
- stainfo, sizeof(hdd_station_info_t));
- else
+ stainfo, sizeof(hdd_station_info_t));
+
+ } else {
hdd_debug("reached max staid, stainfo can't be cached");
+ }
hdd_debug("cap %d %d %d %d %d %d %d %d %d %x %d",
stainfo->ampdu,
@@ -1654,7 +1676,7 @@ QDF_STATUS hdd_hostapd_sap_event_cb(tpSap_Event pSapEvent,
eCsrPhyMode phy_mode;
bool legacy_phymode;
tSap_StationDisassocCompleteEvent *disassoc_comp;
- hdd_station_info_t *stainfo;
+ hdd_station_info_t *stainfo, *cache_stainfo;
cds_context_type *cds_ctx;
hdd_adapter_t *sta_adapter;
tsap_Config_t *sap_config;
@@ -2110,6 +2132,12 @@ QDF_STATUS hdd_hostapd_sap_event_cb(tpSap_Event pSapEvent,
case eSAP_STA_ASSOC_EVENT:
case eSAP_STA_REASSOC_EVENT:
event = &pSapEvent->sapevt.sapStationAssocReassocCompleteEvent;
+ if (eSAP_STATUS_FAILURE == event->status) {
+ hdd_notice("assoc failure: " MAC_ADDRESS_STR,
+ MAC_ADDR_ARRAY(wrqu.addr.sa_data));
+ break;
+ }
+
wrqu.addr.sa_family = ARPHRD_ETHER;
memcpy(wrqu.addr.sa_data,
&event->staMac, QDF_MAC_ADDR_SIZE);
@@ -2264,22 +2292,21 @@ QDF_STATUS hdd_hostapd_sap_event_cb(tpSap_Event pSapEvent,
memcpy(wrqu.addr.sa_data,
&disassoc_comp->staMac, QDF_MAC_ADDR_SIZE);
- stainfo = hdd_get_stainfo(pHostapdAdapter->cache_sta_info,
+ cache_stainfo = hdd_get_stainfo(pHostapdAdapter->cache_sta_info,
disassoc_comp->staMac);
- if (!stainfo) {
- hdd_err("peer " MAC_ADDRESS_STR " not found",
- MAC_ADDR_ARRAY(wrqu.addr.sa_data));
- return -EINVAL;
+ if (cache_stainfo) {
+ /* Cache the disassoc info */
+ cache_stainfo->rssi = disassoc_comp->rssi;
+ cache_stainfo->tx_rate = disassoc_comp->tx_rate;
+ cache_stainfo->rx_rate = disassoc_comp->rx_rate;
+ cache_stainfo->rx_mc_bc_cnt =
+ disassoc_comp->rx_mc_bc_cnt;
+ cache_stainfo->reason_code = disassoc_comp->reason_code;
+ cache_stainfo->disassoc_ts = qdf_system_ticks();
}
hdd_notice(" disassociated " MAC_ADDRESS_STR,
MAC_ADDR_ARRAY(wrqu.addr.sa_data));
- stainfo->rssi = disassoc_comp->rssi;
- stainfo->tx_rate = disassoc_comp->tx_rate;
- stainfo->rx_rate = disassoc_comp->rx_rate;
- stainfo->rx_mc_bc_cnt = disassoc_comp->rx_mc_bc_cnt;
- stainfo->reason_code = disassoc_comp->reason_code;
-
qdf_status = qdf_event_set(&pHostapdState->qdf_sta_disassoc_event);
if (!QDF_IS_STATUS_SUCCESS(qdf_status))
hdd_err("Station Deauth event Set failed");
@@ -2304,14 +2331,17 @@ QDF_STATUS hdd_hostapd_sap_event_cb(tpSap_Event pSapEvent,
pHostapdAdapter->sessionId,
QDF_PROTO_TYPE_MGMT, QDF_PROTO_MGMT_DISASSOC));
- /* Send DHCP STOP indication to FW */
- stainfo->dhcp_phase = DHCP_PHASE_ACK;
- if (stainfo->dhcp_nego_status ==
- DHCP_NEGO_IN_PROGRESS)
- hdd_post_dhcp_ind(pHostapdAdapter, staId,
- WMA_DHCP_STOP_IND);
- stainfo->dhcp_nego_status = DHCP_NEGO_STOP;
-
+ stainfo = hdd_get_stainfo(pHostapdAdapter->aStaInfo,
+ disassoc_comp->staMac);
+ if (stainfo) {
+ /* Send DHCP STOP indication to FW */
+ stainfo->dhcp_phase = DHCP_PHASE_ACK;
+ if (stainfo->dhcp_nego_status ==
+ DHCP_NEGO_IN_PROGRESS)
+ hdd_post_dhcp_ind(pHostapdAdapter, staId,
+ WMA_DHCP_STOP_IND);
+ stainfo->dhcp_nego_status = DHCP_NEGO_STOP;
+ }
hdd_softap_deregister_sta(pHostapdAdapter, staId);
pHddApCtx->bApActive = false;
@@ -8389,6 +8419,12 @@ int wlan_hdd_cfg80211_start_bss(hdd_adapter_t *pHostapdAdapter,
if (pIe != NULL) {
pIe++;
+ if (pIe[0] > SIR_MAC_RATESET_EID_MAX) {
+ hdd_err("Invalid supported rates %d",
+ pIe[0]);
+ ret = -EINVAL;
+ goto error;
+ }
pConfig->supported_rates.numRates = pIe[0];
pIe++;
for (i = 0;
@@ -8405,6 +8441,12 @@ int wlan_hdd_cfg80211_start_bss(hdd_adapter_t *pHostapdAdapter,
WLAN_EID_EXT_SUPP_RATES);
if (pIe != NULL) {
pIe++;
+ if (pIe[0] > SIR_MAC_RATESET_EID_MAX) {
+ hdd_err("Invalid supported rates %d",
+ pIe[0]);
+ ret = -EINVAL;
+ goto error;
+ }
pConfig->extended_rates.numRates = pIe[0];
pIe++;
for (i = 0; i < pConfig->extended_rates.numRates; i++) {
diff --git a/core/hdd/src/wlan_hdd_ipa.c b/core/hdd/src/wlan_hdd_ipa.c
index 3c4cc3d9efee..e6ae0ac7a4e4 100644
--- a/core/hdd/src/wlan_hdd_ipa.c
+++ b/core/hdd/src/wlan_hdd_ipa.c
@@ -85,7 +85,7 @@
#define HDD_IPA_MAX_PENDING_EVENT_COUNT 20
-#define IPA_WLAN_RX_SOFTIRQ_THRESH 16
+#define IPA_WLAN_RX_SOFTIRQ_THRESH 32
#define HDD_IPA_MAX_BANDWIDTH 800
@@ -1174,6 +1174,11 @@ static int hdd_ipa_wdi_conn_pipes(struct hdd_ipa_priv *hdd_ipa,
int ret;
int i;
+ if (qdf_unlikely(NULL == osdev)) {
+ HDD_IPA_LOG(QDF_TRACE_LEVEL_ERROR, "osdev is NULL");
+ return QDF_STATUS_E_FAILURE;
+ }
+
in = qdf_mem_malloc(sizeof(*in));
if (!in) {
HDD_IPA_LOG(QDF_TRACE_LEVEL_ERROR,
@@ -5614,7 +5619,8 @@ static void hdd_ipa_send_skb_to_network(qdf_nbuf_t skb,
if (!enabled)
hdd_ipa_set_wake_up_idle(true);
- if (adapter->device_mode == QDF_SAP_MODE) {
+ if ((adapter->device_mode == QDF_SAP_MODE) &&
+ (qdf_nbuf_is_ipv4_dhcp_pkt(skb) == true)) {
/* Send DHCP Indication to FW */
qdf_mem_copy(&src_mac, skb->data + QDF_NBUF_SRC_MAC_OFFSET,
sizeof(src_mac));
diff --git a/core/hdd/src/wlan_hdd_main.c b/core/hdd/src/wlan_hdd_main.c
index e78516c0f6f2..63957aa89356 100644
--- a/core/hdd/src/wlan_hdd_main.c
+++ b/core/hdd/src/wlan_hdd_main.c
@@ -9408,6 +9408,8 @@ static int hdd_update_cds_config(hdd_context_t *hdd_ctx)
cds_cfg->ito_repeat_count = hdd_ctx->config->ito_repeat_count;
cds_cfg->bandcapability = hdd_ctx->config->nBandCapability;
+ cds_cfg->delay_before_vdev_stop =
+ hdd_ctx->config->delay_before_vdev_stop;
hdd_ra_populate_cds_config(cds_cfg, hdd_ctx);
hdd_txrx_populate_cds_config(cds_cfg, hdd_ctx);
@@ -10658,6 +10660,19 @@ void hdd_set_rx_mode_rps(hdd_context_t *hdd_ctx, void *padapter,
}
}
+#ifdef MSM_PLATFORM
+static void hdd_register_lro_callbacks(struct cds_dp_cbacks *dp_cbacks)
+{
+ dp_cbacks->hdd_en_lro_in_cc_cb = hdd_enable_rx_ol_in_concurrency;
+ dp_cbacks->hdd_disble_lro_in_cc_cb = hdd_disable_rx_ol_in_concurrency;
+}
+#else
+static void hdd_register_lro_callbacks(struct cds_dp_cbacks *dp_cbacks)
+{
+ dp_cbacks->hdd_en_lro_in_cc_cb = NULL;
+ dp_cbacks->hdd_disble_lro_in_cc_cb = NULL;
+}
+#endif
/**
* hdd_configure_cds() - Configure cds modules
@@ -10724,9 +10739,7 @@ int hdd_configure_cds(hdd_context_t *hdd_ctx, hdd_adapter_t *adapter)
}
if (hdd_ctx->ol_enable) {
- dp_cbacks.hdd_en_lro_in_cc_cb = hdd_enable_rx_ol_in_concurrency;
- dp_cbacks.hdd_disble_lro_in_cc_cb =
- hdd_disable_rx_ol_in_concurrency;
+ hdd_register_lro_callbacks(&dp_cbacks);
}
dp_cbacks.hdd_set_rx_mode_rps_cb = hdd_set_rx_mode_rps;
@@ -12929,12 +12942,7 @@ static int __con_mode_handler(const char *kmessage,
hdd_info("con_mode handler: %s", kmessage);
- ret = wlan_hdd_validate_context(hdd_ctx);
- if (ret)
- return ret;
-
qdf_atomic_set(&hdd_ctx->con_mode_flag, 1);
- cds_set_load_in_progress(true);
mutex_lock(&hdd_init_deinit_lock);
ret = param_set_int(kmessage, kp);
@@ -13011,7 +13019,6 @@ static int __con_mode_handler(const char *kmessage,
ret = 0;
reset_flags:
- cds_set_load_in_progress(false);
mutex_unlock(&hdd_init_deinit_lock);
qdf_atomic_set(&hdd_ctx->con_mode_flag, 0);
return ret;
@@ -13028,15 +13035,19 @@ static int con_mode_handler(const char *kmessage, const struct kernel_param *kp)
if (ret)
return ret;
+ cds_set_load_in_progress(true);
if (!cds_wait_for_external_threads_completion(__func__)) {
hdd_warn("External threads are still active, can not change mode");
- return -EAGAIN;
+ ret = -EAGAIN;
+ goto err;
}
cds_ssr_protect(__func__);
ret = __con_mode_handler(kmessage, kp, hdd_ctx);
cds_ssr_unprotect(__func__);
+err:
+ cds_set_load_in_progress(false);
return ret;
}
diff --git a/core/hdd/src/wlan_hdd_power.c b/core/hdd/src/wlan_hdd_power.c
index f53b4f58805a..afe9fe350f3d 100644
--- a/core/hdd/src/wlan_hdd_power.c
+++ b/core/hdd/src/wlan_hdd_power.c
@@ -1806,13 +1806,13 @@ void wlan_hdd_inc_suspend_stats(hdd_context_t *hdd_ctx,
}
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 12, 0)
-static inline void
+void
hdd_sched_scan_results(struct wiphy *wiphy, uint64_t reqid)
{
cfg80211_sched_scan_results(wiphy);
}
#else
-static inline void
+void
hdd_sched_scan_results(struct wiphy *wiphy, uint64_t reqid)
{
cfg80211_sched_scan_results(wiphy, reqid);
diff --git a/core/hdd/src/wlan_hdd_scan.c b/core/hdd/src/wlan_hdd_scan.c
index bca41d89111b..d98686b83a21 100644
--- a/core/hdd/src/wlan_hdd_scan.c
+++ b/core/hdd/src/wlan_hdd_scan.c
@@ -761,17 +761,8 @@ static void hdd_scan_inactivity_timer_handler(unsigned long scan_req)
if (cds_is_load_or_unload_in_progress())
hdd_err("%s: Module (un)loading; Ignore hdd scan req timeout",
__func__);
- else if (cds_is_driver_recovering())
- hdd_err("%s: Module recovering; Ignore hdd scan req timeout",
- __func__);
- else if (cds_is_driver_in_bad_state())
- hdd_err("%s: Module in bad state; Ignore hdd scan req timeout",
- __func__);
- else if (cds_is_self_recovery_enabled())
- cds_trigger_recovery(CDS_SCAN_REQ_EXPIRED);
else
- QDF_BUG(0);
-
+ cds_trigger_recovery(CDS_SCAN_REQ_EXPIRED);
}
/**
@@ -3219,7 +3210,7 @@ hdd_sched_scan_callback(void *callbackContext,
hdd_prevent_suspend_timeout(HDD_WAKELOCK_TIMEOUT_CONNECT,
WIFI_POWER_EVENT_WAKELOCK_SCAN);
- cfg80211_sched_scan_results(pHddCtx->wiphy);
+ hdd_sched_scan_results(pHddCtx->wiphy, 0);
hdd_debug("cfg80211 scan result database updated");
}
diff --git a/core/hdd/src/wlan_hdd_softap_tx_rx.c b/core/hdd/src/wlan_hdd_softap_tx_rx.c
index fb60e3759682..c66a8ab5b65b 100644
--- a/core/hdd/src/wlan_hdd_softap_tx_rx.c
+++ b/core/hdd/src/wlan_hdd_softap_tx_rx.c
@@ -342,10 +342,8 @@ bool hdd_dhcp_indication(hdd_adapter_t *adapter,
{
enum qdf_proto_subtype subtype = QDF_PROTO_INVALID;
hdd_station_info_t *hdd_sta_info;
-
bool notify_tx_comp = false;
- hdd_debug("adapter=%p, sta_id=%d, dir=%d", adapter, sta_id, dir);
if (((adapter->device_mode == QDF_SAP_MODE) ||
(adapter->device_mode == QDF_P2P_GO_MODE)) &&
@@ -435,9 +433,11 @@ static netdev_tx_t __hdd_softap_hard_start_xmit(struct sk_buff *skb,
* context may not be reinitialized at this time which may
* lead to a crash.
*/
- if (cds_is_driver_recovering() || cds_is_driver_in_bad_state()) {
+ if (cds_is_driver_recovering() || cds_is_driver_in_bad_state() ||
+ cds_is_load_or_unload_in_progress()) {
QDF_TRACE(QDF_MODULE_ID_HDD_SAP_DATA, QDF_TRACE_LEVEL_INFO_HIGH,
- "%s: Recovery in Progress. Ignore!!!", __func__);
+ "%s: Recovery/(Un)load in Progress. Ignore!!!",
+ __func__);
goto drop_pkt;
}
diff --git a/core/hdd/src/wlan_hdd_tx_rx.c b/core/hdd/src/wlan_hdd_tx_rx.c
index b99ee753da58..18f5925bd172 100644
--- a/core/hdd/src/wlan_hdd_tx_rx.c
+++ b/core/hdd/src/wlan_hdd_tx_rx.c
@@ -902,9 +902,10 @@ static netdev_tx_t __hdd_hard_start_xmit(struct sk_buff *skb,
hdd_tx_rx_collect_connectivity_stats_info(skb, pAdapter,
PKT_TYPE_REQ, &pkt_type);
- if (cds_is_driver_recovering() || cds_is_driver_in_bad_state()) {
+ if (cds_is_driver_recovering() || cds_is_driver_in_bad_state() ||
+ cds_is_load_or_unload_in_progress()) {
QDF_TRACE(QDF_MODULE_ID_HDD_DATA, QDF_TRACE_LEVEL_INFO_HIGH,
- "Recovery in progress, dropping the packet");
+ "Recovery/(Un)load in progress, dropping the packet");
goto drop_pkt;
}
@@ -1577,7 +1578,7 @@ static inline void hdd_resolve_rx_ol_mode(hdd_context_t *hdd_ctx)
}
}
-#ifdef HELIUMPLUS
+#if defined(MSM_PLATFORM) && defined(HELIUMPLUS)
/**
* hdd_gro_rx() - Handle Rx procesing via GRO
* @pAdapter: pointer to adapter context
@@ -1692,7 +1693,7 @@ static inline void hdd_register_rx_ol(void)
if (hdd_ctx->enableRxThread)
hdd_create_napi_for_rxthread();
hdd_debug("GRO is enabled");
- } else if (hdd_ctx->config->enable_tcp_delack) {
+ } else if (HDD_MSM_CFG(hdd_ctx->config->enable_tcp_delack)) {
hdd_ctx->tcp_delack_on = 1;
}
}
@@ -1730,7 +1731,23 @@ void hdd_gro_destroy(void)
ol_deregister_offld_flush_cb(hdd_deinit_gro_mgr);
}
#else /* HELIUMPLUS */
-static inline void hdd_register_rx_ol(void) { }
+static inline void hdd_register_rx_ol(void)
+{
+ hdd_context_t *hdd_ctx = cds_get_context(QDF_MODULE_ID_HDD);
+
+ if (!hdd_ctx) {
+ hdd_err("HDD context is NULL");
+ return;
+ }
+
+ if (HDD_MSM_CFG(hdd_ctx->config->enable_tcp_delack))
+ hdd_ctx->tcp_delack_on = 1;
+ else
+ hdd_ctx->tcp_delack_on = 0;
+
+ hdd_debug("TCP delack ack is %s",
+ hdd_ctx->tcp_delack_on ? "enabled" : "disabled");
+}
void hdd_gro_destroy(void)
{
@@ -1782,6 +1799,7 @@ int hdd_rx_ol_init(hdd_context_t *hdd_ctx)
return 0;
}
+#ifdef MSM_PLATFORM
/**
* hdd_enable_rx_ol_in_concurrency() - Enable Rx offload
* @hdd_ctx: hdd context
@@ -1820,6 +1838,7 @@ void hdd_disable_rx_ol_in_concurrency(hdd_context_t *hdd_ctx)
}
qdf_atomic_set(&hdd_ctx->disable_lro_in_concurrency, 1);
}
+#endif
/**
* hdd_disable_rx_ol_for_low_tput() - Disable Rx offload in low TPUT scenario
diff --git a/core/hdd/src/wlan_hdd_wext.c b/core/hdd/src/wlan_hdd_wext.c
index 1038acc975bd..5015e21ae277 100644
--- a/core/hdd/src/wlan_hdd_wext.c
+++ b/core/hdd/src/wlan_hdd_wext.c
@@ -5754,7 +5754,7 @@ static void hdd_get_station_statistics_cb(void *stats, void *context)
struct csr_per_chain_rssi_stats_info *per_chain_rssi_stats;
if (NULL == stats) {
- hdd_err("Bad param, pStats [%p]", stats);
+ hdd_err("Bad param, pStats [%pK]", stats);
return;
}
diff --git a/core/mac/inc/qwlan_version.h b/core/mac/inc/qwlan_version.h
index 94ca59ea36ee..5cbb071906f8 100644
--- a/core/mac/inc/qwlan_version.h
+++ b/core/mac/inc/qwlan_version.h
@@ -32,9 +32,9 @@
#define QWLAN_VERSION_MAJOR 5
#define QWLAN_VERSION_MINOR 1
#define QWLAN_VERSION_PATCH 1
-#define QWLAN_VERSION_EXTRA "D"
+#define QWLAN_VERSION_EXTRA "W"
#define QWLAN_VERSION_BUILD 67
-#define QWLAN_VERSIONSTR "5.1.1.67D"
+#define QWLAN_VERSIONSTR "5.1.1.67W"
#endif /* QWLAN_VERSION_H */
diff --git a/core/mac/src/cfg/cfg_proc_msg.c b/core/mac/src/cfg/cfg_proc_msg.c
index 14c64325eb38..acc40f750048 100644
--- a/core/mac/src/cfg/cfg_proc_msg.c
+++ b/core/mac/src/cfg/cfg_proc_msg.c
@@ -1540,6 +1540,13 @@ static void proc_dnld_rsp(tpAniSirGlobal pMac, uint16_t length, uint32_t *pParam
pHdr->controlSize, pHdr->iBufSize, pHdr->sBufSize,
pMac->cfg.gCfgMaxSBufSize);
+ if (pHdr->sBufSize > (UINT_MAX -
+ (((CFG_PARAM_MAX_NUM + 3 * pMac->cfg.gCfgMaxIBufSize) << 2) +
+ sizeof(tCfgBinHdr)))) {
+ pe_warn("Invalid sBufSize coming from fw %d", pHdr->sBufSize);
+ retVal = WNI_CFG_INVALID_LEN;
+ goto end;
+ }
expLen =
((CFG_PARAM_MAX_NUM + 3 * pMac->cfg.gCfgMaxIBufSize) << 2) +
pHdr->sBufSize + sizeof(tCfgBinHdr);
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 d884e66494c3..fbba7473c912 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
@@ -2395,7 +2395,10 @@ void lim_handle_delete_bss_rsp(tpAniSirGlobal pMac, tpSirMsgQ MsgQ)
if (psessionEntry == NULL) {
pe_err("Session Does not exist for given sessionID: %d",
pDelBss->sessionId);
- qdf_mem_free(MsgQ->bodyptr);
+ if (MsgQ->bodyptr) {
+ qdf_mem_free(MsgQ->bodyptr);
+ MsgQ->bodyptr = NULL;
+ }
return;
}
diff --git a/core/sap/src/sap_fsm.c b/core/sap/src/sap_fsm.c
index 28c99dc6c5c7..f5243a4953bc 100644
--- a/core/sap/src/sap_fsm.c
+++ b/core/sap/src/sap_fsm.c
@@ -3003,6 +3003,12 @@ QDF_STATUS sap_signal_hdd_event(ptSapContext sap_ctx,
FL("Invalid CSR Roam Info"));
return QDF_STATUS_E_INVAL;
}
+ if (eSAP_DISCONNECTING == sap_ctx->sapsMachine) {
+ QDF_TRACE(QDF_MODULE_ID_SAP, QDF_TRACE_LEVEL_ERROR,
+ "SAP is disconnecting, not able to handle any incoming (re)assoc req");
+ return QDF_STATUS_E_ABORTED;
+ }
+
reassoc_complete =
&sap_ap_event.sapevt.sapStationAssocReassocCompleteEvent;
diff --git a/core/sme/src/common/sme_power_save.c b/core/sme/src/common/sme_power_save.c
index a39a2de27e61..56198afbab10 100644
--- a/core/sme/src/common/sme_power_save.c
+++ b/core/sme/src/common/sme_power_save.c
@@ -520,11 +520,13 @@ QDF_STATUS sme_ps_enable_disable(tHalHandle hal_ctx, uint32_t session_id,
status = sme_enable_sta_ps_check(mac_ctx, session_id);
if (status != QDF_STATUS_SUCCESS) {
/*
- * In non associated state ps state will be disabled in FW.
- * Hence, return success if ps disable is requested
- * in disconnected state.
+ * In non associated state driver wont handle the power save
+ * But kernel expects return status success even
+ * in the disconnected state.
+ * TODO: If driver to remember the ps state to further use
+ * after connection.
*/
- if (command == SME_PS_DISABLE)
+ if (!csr_is_conn_state_connected_infra(mac_ctx, session_id))
status = QDF_STATUS_SUCCESS;
return status;
}
diff --git a/core/sme/src/csr/csr_api_roam.c b/core/sme/src/csr/csr_api_roam.c
index e5611fb880fe..2c3da0f6aaf9 100644
--- a/core/sme/src/csr/csr_api_roam.c
+++ b/core/sme/src/csr/csr_api_roam.c
@@ -6306,6 +6306,12 @@ QDF_STATUS csr_roam_process_command(tpAniSirGlobal pMac, tSmeCmd *pCommand)
switch (pCommand->u.roamCmd.roamReason) {
case eCsrForcedDisassoc:
+ if (eCSR_ROAMING_STATE_IDLE ==
+ sme_get_current_roam_state(pMac, sessionId)) {
+ sme_err("Ignore eCsrForcedDisassoc cmd on roam state %d",
+ eCSR_ROAMING_STATE_IDLE);
+ return QDF_STATUS_E_FAILURE;
+ }
status = csr_roam_process_disassoc_deauth(pMac, pCommand,
true, false);
lock_status = sme_acquire_global_lock(&pMac->sme);
@@ -11944,64 +11950,64 @@ csr_roam_chk_lnk_swt_ch_ind(tpAniSirGlobal mac_ctx, tSirSmeRsp *msg_ptr)
*/
status = csr_roam_get_session_id_from_bssid(mac_ctx,
&pSwitchChnInd->bssid, &sessionId);
- if (QDF_IS_STATUS_SUCCESS(status)) {
- session = CSR_GET_SESSION(mac_ctx, sessionId);
- if (!session) {
- sme_err("session %d not found", sessionId);
- return;
- }
- session->connectedProfile.operationChannel =
+ if (QDF_IS_STATUS_ERROR(status))
+ return;
+
+ session = CSR_GET_SESSION(mac_ctx, sessionId);
+ if (!session) {
+ sme_err("session %d not found", sessionId);
+ return;
+ }
+ session->connectedProfile.operationChannel =
+ (uint8_t) pSwitchChnInd->newChannelId;
+ if (session->pConnectBssDesc) {
+ session->pConnectBssDesc->channelId =
(uint8_t) pSwitchChnInd->newChannelId;
- if (session->pConnectBssDesc) {
- session->pConnectBssDesc->channelId =
- (uint8_t) pSwitchChnInd->newChannelId;
- }
ds_params_ie = (tSirMacDsParamSetIE *)wlan_cfg_get_ie_ptr(
- (uint8_t *)session->pConnectBssDesc->
- ieFields,
- csr_get_ielen_from_bss_description(
- session->pConnectBssDesc),
- DOT11F_EID_DSPARAMS, ONE_BYTE);
+ (uint8_t *)session->pConnectBssDesc->
+ ieFields,
+ csr_get_ielen_from_bss_description(
+ session->pConnectBssDesc),
+ DOT11F_EID_DSPARAMS, ONE_BYTE);
if (ds_params_ie)
ds_params_ie->channelNumber =
(uint8_t)pSwitchChnInd->newChannelId;
ht_info_ie = (tDot11fIEHTInfo *)wlan_cfg_get_ie_ptr(
- (uint8_t *)session->pConnectBssDesc->
- ieFields,
- csr_get_ielen_from_bss_description(
- session->pConnectBssDesc),
- DOT11F_EID_HTINFO, ONE_BYTE);
+ (uint8_t *)session->pConnectBssDesc->
+ ieFields,
+ csr_get_ielen_from_bss_description(
+ session->pConnectBssDesc),
+ DOT11F_EID_HTINFO, ONE_BYTE);
if (ht_info_ie) {
ht_info_ie->primaryChannel =
(uint8_t)pSwitchChnInd->newChannelId;
ht_info_ie->secondaryChannelOffset =
pSwitchChnInd->chan_params.sec_ch_offset;
}
+ }
- qdf_mem_set(&roamInfo, sizeof(tCsrRoamInfo), 0);
- roamInfo.chan_info.chan_id = pSwitchChnInd->newChannelId;
- roamInfo.chan_info.ch_width =
- pSwitchChnInd->chan_params.ch_width;
- roamInfo.chan_info.sec_ch_offset =
- pSwitchChnInd->chan_params.sec_ch_offset;
- roamInfo.chan_info.band_center_freq1 =
- pSwitchChnInd->chan_params.center_freq_seg0;
- roamInfo.chan_info.band_center_freq2 =
- pSwitchChnInd->chan_params.center_freq_seg1;
-
- if (CSR_IS_PHY_MODE_11ac(mac_ctx->roam.configParam.phyMode))
- roamInfo.mode = SIR_SME_PHY_MODE_VHT;
- else if (CSR_IS_PHY_MODE_11n(mac_ctx->roam.configParam.phyMode))
- roamInfo.mode = SIR_SME_PHY_MODE_HT;
- else
- roamInfo.mode = SIR_SME_PHY_MODE_LEGACY;
+ qdf_mem_set(&roamInfo, sizeof(tCsrRoamInfo), 0);
+ roamInfo.chan_info.chan_id = pSwitchChnInd->newChannelId;
+ roamInfo.chan_info.ch_width = pSwitchChnInd->chan_params.ch_width;
+ roamInfo.chan_info.sec_ch_offset =
+ pSwitchChnInd->chan_params.sec_ch_offset;
+ roamInfo.chan_info.band_center_freq1 =
+ pSwitchChnInd->chan_params.center_freq_seg0;
+ roamInfo.chan_info.band_center_freq2 =
+ pSwitchChnInd->chan_params.center_freq_seg1;
+
+ if (CSR_IS_PHY_MODE_11ac(mac_ctx->roam.configParam.phyMode))
+ roamInfo.mode = SIR_SME_PHY_MODE_VHT;
+ else if (CSR_IS_PHY_MODE_11n(mac_ctx->roam.configParam.phyMode))
+ roamInfo.mode = SIR_SME_PHY_MODE_HT;
+ else
+ roamInfo.mode = SIR_SME_PHY_MODE_LEGACY;
- status = csr_roam_call_callback(mac_ctx, sessionId,
- &roamInfo, 0, eCSR_ROAM_STA_CHANNEL_SWITCH,
- eCSR_ROAM_RESULT_NONE);
- }
+ status = csr_roam_call_callback(mac_ctx, sessionId, &roamInfo, 0,
+ eCSR_ROAM_STA_CHANNEL_SWITCH,
+ eCSR_ROAM_RESULT_NONE);
}
static void
@@ -12291,7 +12297,7 @@ csr_roam_chk_lnk_wm_status_change_ntf(tpAniSirGlobal mac_ctx,
if (!QDF_IS_STATUS_SUCCESS(status))
break;
if (eCSR_ROAMING_STATE_JOINED ==
- mac_ctx->roam.curState[sessionId]
+ sme_get_current_roam_state(mac_ctx, sessionId)
&& ((eCSR_ROAM_SUBSTATE_JOINED_REALTIME_TRAFFIC
== mac_ctx->roam.curSubState[sessionId])
|| (eCSR_ROAM_SUBSTATE_NONE ==
diff --git a/core/sme/src/csr/csr_cmd_process.c b/core/sme/src/csr/csr_cmd_process.c
index b762f5904dad..4d0e2287750c 100644
--- a/core/sme/src/csr/csr_cmd_process.c
+++ b/core/sme/src/csr/csr_cmd_process.c
@@ -44,8 +44,9 @@ QDF_STATUS csr_msg_processor(tpAniSirGlobal mac_ctx, void *msg_buf)
tCsrRoamSession *session;
#endif
uint8_t session_id = sme_rsp->sessionId;
- eCsrRoamState cur_state = mac_ctx->roam.curState[session_id];
+ eCsrRoamState cur_state;
+ cur_state = sme_get_current_roam_state(mac_ctx, session_id);
sme_debug("msg %d[0x%04X] recvd in curstate %s & substate %s id(%d)",
sme_rsp->messageType, sme_rsp->messageType,
mac_trace_getcsr_roam_state(cur_state),
diff --git a/core/utils/logging/src/wlan_logging_sock_svc.c b/core/utils/logging/src/wlan_logging_sock_svc.c
index d93653764b74..4ba9000fe110 100644
--- a/core/utils/logging/src/wlan_logging_sock_svc.c
+++ b/core/utils/logging/src/wlan_logging_sock_svc.c
@@ -749,10 +749,7 @@ static void send_flush_completion_to_user(uint8_t ring_id)
if (!recovery_needed)
return;
- if (cds_is_self_recovery_enabled())
- cds_trigger_recovery(CDS_REASON_UNSPECIFIED);
- else
- QDF_BUG(0);
+ cds_trigger_recovery(CDS_REASON_UNSPECIFIED);
}
/**
diff --git a/core/wma/src/wma_dev_if.c b/core/wma/src/wma_dev_if.c
index b1e7034c9456..3fe9ffd96749 100644
--- a/core/wma/src/wma_dev_if.c
+++ b/core/wma/src/wma_dev_if.c
@@ -5359,7 +5359,6 @@ fail_del_bss_ho_fail:
WMA_DELETE_BSS_HO_FAIL_RSP, (void *)params, 0);
}
-#ifdef WLAN_FEATURE_HOST_ROAM
/**
* wma_wait_tx_complete() - Wait till tx packets are drained
* @wma: wma handle
@@ -5396,12 +5395,7 @@ static void wma_wait_tx_complete(tp_wma_handle wma,
max_wait_iterations--;
}
}
-#else
-static void wma_wait_tx_complete(tp_wma_handle wma)
-{
-}
-#endif
/**
* wma_delete_bss() - process delete bss request from upper layer
* @wma: wma handle
diff --git a/core/wma/src/wma_features.c b/core/wma/src/wma_features.c
index 44c4c6a154e8..0d35a7a39d2d 100644
--- a/core/wma/src/wma_features.c
+++ b/core/wma/src/wma_features.c
@@ -5658,10 +5658,7 @@ QDF_STATUS wma_enable_d0wow_in_fw(WMA_HANDLE handle)
"Credits: %d, pending_cmds: %d",
wmi_get_host_credits(wma->wmi_handle),
wmi_get_pending_cmds(wma->wmi_handle));
- if (!cds_is_driver_recovering())
- cds_trigger_recovery(CDS_SUSPEND_TIMEOUT);
- else
- WMA_LOGE("%s: LOGP is in progress, ignore!", __func__);
+ cds_trigger_recovery(CDS_SUSPEND_TIMEOUT);
return status;
}
@@ -5677,11 +5674,7 @@ QDF_STATUS wma_enable_d0wow_in_fw(WMA_HANDLE handle)
WMA_LOGE("%s: No Credits after HTC ACK:%d, pending_cmds:%d, cannot resume back",
__func__, host_credits, wmi_pending_cmds);
htc_dump_counter_info(wma->htc_handle);
- if (!cds_is_driver_recovering())
- cds_trigger_recovery(CDS_SUSPEND_TIMEOUT);
- else
- WMA_LOGE("%s: SSR in progress, ignore no credit issue",
- __func__);
+ cds_trigger_recovery(CDS_SUSPEND_TIMEOUT);
}
wma->wow.wow_enable_cmd_sent = true;
@@ -5759,11 +5752,7 @@ QDF_STATUS wma_enable_wow_in_fw(WMA_HANDLE handle, uint32_t wow_flags)
wmi_get_host_credits(wma->wmi_handle),
wmi_get_pending_cmds(wma->wmi_handle));
wmi_set_target_suspend(wma->wmi_handle, false);
- if (!cds_is_driver_recovering()) {
- cds_trigger_recovery(CDS_SUSPEND_TIMEOUT);
- } else {
- WMA_LOGE("%s: LOGP is in progress, ignore!", __func__);
- }
+ cds_trigger_recovery(CDS_SUSPEND_TIMEOUT);
return QDF_STATUS_E_FAILURE;
}
@@ -5781,11 +5770,7 @@ QDF_STATUS wma_enable_wow_in_fw(WMA_HANDLE handle, uint32_t wow_flags)
WMA_LOGE("%s: No Credits after HTC ACK:%d, pending_cmds:%d, cannot resume back",
__func__, host_credits, wmi_pending_cmds);
htc_dump_counter_info(wma->htc_handle);
- if (!cds_is_driver_recovering())
- cds_trigger_recovery(CDS_SUSPEND_TIMEOUT);
- else
- WMA_LOGE("%s: SSR in progress, ignore no credit issue",
- __func__);
+ cds_trigger_recovery(CDS_SUSPEND_TIMEOUT);
}
WMA_LOGD("WOW enabled successfully in fw: credits:%d pending_cmds: %d",
@@ -6522,13 +6507,8 @@ static QDF_STATUS wma_send_host_wakeup_ind_to_fw(tp_wma_handle wma)
WMA_LOGP("%s: Pending commands %d credits %d", __func__,
wmi_get_pending_cmds(wma->wmi_handle),
wmi_get_host_credits(wma->wmi_handle));
- if (!cds_is_driver_recovering()) {
- wmi_tag_crash_inject(wma->wmi_handle, true);
- cds_trigger_recovery(CDS_RESUME_TIMEOUT);
- } else {
- WMA_LOGE("%s: SSR in progress, ignore resume timeout",
- __func__);
- }
+ wmi_tag_crash_inject(wma->wmi_handle, true);
+ cds_trigger_recovery(CDS_RESUME_TIMEOUT);
} else {
WMA_LOGD("Host wakeup received");
}
@@ -6578,11 +6558,7 @@ QDF_STATUS wma_disable_d0wow_in_fw(WMA_HANDLE handle)
WMA_LOGP("%s: Pending commands: %d credits: %d", __func__,
wmi_get_pending_cmds(wma->wmi_handle),
wmi_get_host_credits(wma->wmi_handle));
-
- if (!cds_is_driver_recovering())
- cds_trigger_recovery(CDS_RESUME_TIMEOUT);
- else
- WMA_LOGE("%s: LOGP is in progress, ignore!", __func__);
+ cds_trigger_recovery(CDS_RESUME_TIMEOUT);
return status;
}
@@ -8771,14 +8747,6 @@ static inline void wma_suspend_target_timeout(bool is_self_recovery_enabled)
if (cds_is_load_or_unload_in_progress())
WMA_LOGE("%s: Module (un)loading; Ignoring suspend timeout",
__func__);
- else if (cds_is_driver_recovering())
- WMA_LOGE("%s: Module recovering; Ignoring suspend timeout",
- __func__);
- else if (cds_is_driver_in_bad_state())
- WMA_LOGE("%s: Module in bad state; Ignoring suspend timeout",
- __func__);
- else if (cds_is_fw_down())
- WMA_LOGE(FL("FW is down; Ignoring suspend timeout"));
else
cds_trigger_recovery(CDS_SUSPEND_TIMEOUT);
}
@@ -8958,12 +8926,7 @@ QDF_STATUS wma_resume_target(WMA_HANDLE handle)
WMA_LOGP("%s: Pending commands %d credits %d", __func__,
wmi_get_pending_cmds(wma->wmi_handle),
wmi_get_host_credits(wma->wmi_handle));
- if (!cds_is_driver_recovering()) {
- cds_trigger_recovery(CDS_RESUME_TIMEOUT);
- } else {
- WMA_LOGE("%s: SSR in progress, ignore resume timeout",
- __func__);
- }
+ cds_trigger_recovery(CDS_RESUME_TIMEOUT);
} else {
WMA_LOGD("Host wakeup received");
}
diff --git a/core/wma/src/wma_main.c b/core/wma/src/wma_main.c
index e1dfe94532ca..1cc0f1b609a8 100644
--- a/core/wma/src/wma_main.c
+++ b/core/wma/src/wma_main.c
@@ -2635,9 +2635,11 @@ QDF_STATUS wma_open(void *cds_context,
goto err_scn_context;
}
- for (i = 0; i < wma_handle->max_bssid; ++i)
+ for (i = 0; i < wma_handle->max_bssid; ++i) {
wma_vdev_init(&wma_handle->interfaces[i]);
-
+ wma_handle->interfaces[i].delay_before_vdev_stop =
+ cds_cfg->delay_before_vdev_stop;
+ }
/* Register the debug print event handler */
wmi_unified_register_event_handler(wma_handle->wmi_handle,
WMI_DEBUG_PRINT_EVENTID,
diff --git a/core/wma/src/wma_mgmt.c b/core/wma/src/wma_mgmt.c
index 156ef068750a..365f397c9480 100644
--- a/core/wma/src/wma_mgmt.c
+++ b/core/wma/src/wma_mgmt.c
@@ -95,6 +95,12 @@ static void wma_send_bcn_buf_ll(tp_wma_handle wma,
WMA_LOGE("%s: Invalid beacon buffer", __func__);
return;
}
+
+ if (!param_buf->tim_info || !param_buf->p2p_noa_info) {
+ WMA_LOGE("%s: Invalid tim info or p2p noa info", __func__);
+ return;
+ }
+
if (WMI_UNIFIED_NOA_ATTR_NUM_DESC_GET(p2p_noa_info) >
WMI_P2P_MAX_NOA_DESCRIPTORS) {
WMA_LOGE("%s: Too many descriptors %d", __func__,
@@ -2423,9 +2429,9 @@ static QDF_STATUS wma_store_bcn_tmpl(tp_wma_handle wma, uint8_t vdev_id,
}
len = *(u32 *) &bcn_info->beacon[0];
- if (len > SIR_MAX_BEACON_SIZE) {
- WMA_LOGE("%s: Received beacon len %d exceeding max limit %d",
- __func__, len, SIR_MAX_BEACON_SIZE);
+ if (len > SIR_MAX_BEACON_SIZE - sizeof(uint32_t)) {
+ WMA_LOGE("%s: Received beacon len %u exceeding max limit %zu",
+ __func__, len, SIR_MAX_BEACON_SIZE - sizeof(uint32_t));
return QDF_STATUS_E_INVAL;
}
WMA_LOGD("%s: Storing received beacon template buf to local buffer",
diff --git a/core/wma/src/wma_scan_roam.c b/core/wma/src/wma_scan_roam.c
index 5b9e765648f0..ab1aa2b2de7c 100644
--- a/core/wma/src/wma_scan_roam.c
+++ b/core/wma/src/wma_scan_roam.c
@@ -3308,12 +3308,6 @@ int wma_roam_synch_frame_event_handler(void *handle, uint8_t *event,
}
if (synch_frame_event->reassoc_rsp_len) {
- if (!iface->roam_synch_frame_ind.bcn_probe_rsp ||
- !iface->roam_synch_frame_ind.reassoc_req) {
- WMA_LOGE("failed: No probe or reassoc rsp");
- wma_free_roam_synch_frame_ind(iface);
- return status;
- }
iface->roam_synch_frame_ind.reassoc_rsp_len =
synch_frame_event->reassoc_rsp_len;
diff --git a/core/wma/src/wma_utils.c b/core/wma/src/wma_utils.c
index e4006c1b8c8c..0289b78eb9ae 100644
--- a/core/wma/src/wma_utils.c
+++ b/core/wma/src/wma_utils.c
@@ -342,6 +342,12 @@ void wma_lost_link_info_handler(tp_wma_handle wma, uint32_t vdev_id,
QDF_STATUS qdf_status;
cds_msg_t sme_msg = {0};
+ if (vdev_id >= wma->max_bssid) {
+ WMA_LOGE("%s: received invalid vdev_id %d",
+ __func__, vdev_id);
+ return;
+ }
+
/* report lost link information only for STA mode */
if (wma->interfaces[vdev_id].vdev_up &&
(WMI_VDEV_TYPE_STA == wma->interfaces[vdev_id].type) &&