summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--config/WCNSS_qcom_cfg.ini8
-rw-r--r--core/cds/inc/cds_concurrency.h3
-rw-r--r--core/cds/inc/cds_regdomain.h3
-rw-r--r--core/cds/src/cds_concurrency.c122
-rw-r--r--core/cds/src/cds_regdomain.c4
-rw-r--r--core/dp/txrx/ol_tx_classify.c4
-rw-r--r--core/dp/txrx/ol_tx_queue.c4
-rw-r--r--core/dp/txrx/ol_tx_send.c2
-rw-r--r--core/dp/txrx/ol_txrx.c18
-rw-r--r--core/dp/txrx/ol_txrx_peer_find.c31
-rw-r--r--core/hdd/inc/wlan_hdd_cfg.h6
-rw-r--r--core/hdd/inc/wlan_hdd_main.h2
-rw-r--r--core/hdd/inc/wlan_hdd_tdls.h26
-rw-r--r--core/hdd/src/wlan_hdd_assoc.c56
-rw-r--r--core/hdd/src/wlan_hdd_cfg80211.c6
-rw-r--r--core/hdd/src/wlan_hdd_conc_ut.c12
-rw-r--r--core/hdd/src/wlan_hdd_driver_ops.c20
-rw-r--r--core/hdd/src/wlan_hdd_ext_scan.c590
-rw-r--r--core/hdd/src/wlan_hdd_hostapd.c29
-rw-r--r--core/hdd/src/wlan_hdd_main.c4
-rw-r--r--core/hdd/src/wlan_hdd_power.c46
-rw-r--r--core/hdd/src/wlan_hdd_scan.c11
-rw-r--r--core/hdd/src/wlan_hdd_tdls.c176
-rw-r--r--core/hdd/src/wlan_hdd_tx_rx.c115
-rw-r--r--core/mac/inc/qwlan_version.h4
-rw-r--r--core/mac/src/pe/lim/lim_process_sme_req_messages.c19
-rw-r--r--core/mac/src/pe/rrm/rrm_api.c20
-rw-r--r--core/sap/dfs/src/dfs_phyerr_tlv.c13
-rw-r--r--core/sap/dfs/src/dfs_process_phyerr.c21
-rw-r--r--core/sme/inc/csr_internal.h1
-rw-r--r--core/sme/src/common/sme_api.c14
-rw-r--r--core/sme/src/csr/csr_api_scan.c7
-rw-r--r--core/sme/src/csr/csr_util.c16
-rw-r--r--core/utils/epping/src/epping_tx.c32
-rw-r--r--core/wma/src/wma_dev_if.c18
-rw-r--r--core/wma/src/wma_mgmt.c4
-rw-r--r--core/wma/src/wma_utils.c2
37 files changed, 903 insertions, 566 deletions
diff --git a/config/WCNSS_qcom_cfg.ini b/config/WCNSS_qcom_cfg.ini
index e3d506db0387..fbfd80038753 100644
--- a/config/WCNSS_qcom_cfg.ini
+++ b/config/WCNSS_qcom_cfg.ini
@@ -640,6 +640,14 @@ TSOEnable=1
LROEnable=1
################ Datapath feature set End ################
+################ NAN feature set start ###################
+
+# Enable NAN discovery (NAN 1.0)
+# 1 - enable(default) 0 - disable
+gEnableNanSupport=1
+
+################ NAN feature set end #####################
+
END
# Note: Configuration parser would not read anything past the END marker
diff --git a/core/cds/inc/cds_concurrency.h b/core/cds/inc/cds_concurrency.h
index a5b643e263d5..49f9d2f2e113 100644
--- a/core/cds/inc/cds_concurrency.h
+++ b/core/cds/inc/cds_concurrency.h
@@ -550,6 +550,7 @@ struct cds_conc_connection_info {
bool cds_is_connection_in_progress(void);
void cds_dump_concurrency_info(void);
+bool cds_check_is_tdls_allowed(enum tQDF_ADAPTER_MODE device_mode);
void cds_set_tdls_ct_mode(hdd_context_t *hdd_ctx);
void cds_set_concurrency_mode(enum tQDF_ADAPTER_MODE mode);
void cds_clear_concurrency_mode(enum tQDF_ADAPTER_MODE mode);
@@ -782,4 +783,6 @@ QDF_STATUS cds_set_hw_mode_on_channel_switch(uint8_t session_id);
void cds_set_do_hw_mode_change_flag(bool flag);
bool cds_is_hw_mode_change_after_vdev_up(void);
void cds_dump_connection_status_info(void);
+uint32_t cds_mode_specific_connection_count(enum cds_con_mode mode,
+ uint32_t *list);
#endif /* __CDS_CONCURRENCY_H */
diff --git a/core/cds/inc/cds_regdomain.h b/core/cds/inc/cds_regdomain.h
index e2e5299c0b6f..d1c134d0ced7 100644
--- a/core/cds/inc/cds_regdomain.h
+++ b/core/cds/inc/cds_regdomain.h
@@ -189,6 +189,7 @@ enum country_code {
CTRY_MONGOLIA = 496,
CTRY_MONTENEGRO = 499,
CTRY_MOROCCO = 504,
+ CTRY_NAMIBIA = 516,
CTRY_NEPAL = 524,
CTRY_NETHERLANDS = 528,
CTRY_NETHERLANDS_ANTILLES = 530,
@@ -355,6 +356,7 @@ enum reg_domain {
APL11_FCCA = 0x4F,
APL12_WORLD = 0x51,
APL13_WORLD = 0x5A,
+ APL14_WORLD = 0x57,
WOR0_WORLD = 0x60,
WOR1_WORLD = 0x61,
@@ -439,6 +441,7 @@ enum reg_domain {
APL11 = 0x1150,
APL12 = 0x1160,
APL13 = 0x1170,
+ APL14 = 0x1180,
NULL1 = 0x0198,
MKK3 = 0x0340,
diff --git a/core/cds/src/cds_concurrency.c b/core/cds/src/cds_concurrency.c
index 5a2993b45549..ad89f6df623f 100644
--- a/core/cds/src/cds_concurrency.c
+++ b/core/cds/src/cds_concurrency.c
@@ -1951,6 +1951,27 @@ next_action_three_connection_table[CDS_MAX_TWO_CONNECTION_MODE]
};
/**
+ * cds_get_connection_count() - provides the count of
+ * current connections
+ *
+ * This function provides the count of current connections
+ *
+ * Return: connection count
+ */
+uint32_t cds_get_connection_count(void)
+{
+ uint32_t conn_index, count = 0;
+
+ for (conn_index = 0; conn_index < MAX_NUMBER_OF_CONC_CONNECTIONS;
+ conn_index++) {
+ if (conc_connection_list[conn_index].in_use)
+ count++;
+ }
+
+ return count;
+}
+
+/**
* cds_is_sta_connection_pending() - This function will check if sta connection
* is pending or not.
*
@@ -2136,7 +2157,7 @@ static void cds_update_conc_list(uint32_t conn_index,
*
* Return: connection count of specific type
*/
-static uint32_t cds_mode_specific_connection_count(enum cds_con_mode mode,
+uint32_t cds_mode_specific_connection_count(enum cds_con_mode mode,
uint32_t *list)
{
uint32_t conn_index = 0, count = 0;
@@ -3295,6 +3316,34 @@ void cds_dump_concurrency_info(void)
hdd_ctx->mcc_mode = !cds_current_concurrency_is_scc();
}
+/*
+ * cds_check_is_tdls_allowed() - check is tdls allowed or not
+ * @adapter: pointer to adapter
+ *
+ * Function determines the whether TDLS allowed in the system
+ *
+ * Return: true or false
+ */
+bool cds_check_is_tdls_allowed(enum tQDF_ADAPTER_MODE device_mode)
+{
+ bool state = false;
+ uint32_t count;
+
+ count = cds_get_connection_count();
+
+ if (count > 1)
+ state = false;
+ else if (device_mode == QDF_STA_MODE ||
+ device_mode == QDF_P2P_CLIENT_MODE)
+ state = true;
+
+ /* If any concurrency is detected */
+ if (!state)
+ cds_dump_concurrency_info();
+
+ return state;
+}
+
/**
* cds_set_tdls_ct_mode() - Set the tdls connection tracker mode
* @hdd_ctx: hdd context
@@ -3308,17 +3357,34 @@ void cds_set_tdls_ct_mode(hdd_context_t *hdd_ctx)
bool state = false;
/* If any concurrency is detected, skip tdls pkt tracker */
- if (((1 << QDF_STA_MODE) == hdd_ctx->concurrency_mode) &&
- (hdd_ctx->no_of_active_sessions[QDF_STA_MODE] == 1) &&
- (hdd_ctx->config->fEnableTDLSImplicitTrigger) &&
- (eTDLS_SUPPORT_DISABLED != hdd_ctx->tdls_mode)) {
- if (hdd_ctx->config->fTDLSExternalControl) {
- if (hdd_ctx->tdls_external_peer_count)
- state = true;
- goto set_state;
- } else {
+ if (cds_get_connection_count() > 1) {
+ state = false;
+ goto set_state;
+ }
+
+ if (eTDLS_SUPPORT_DISABLED == hdd_ctx->tdls_mode ||
+ (!hdd_ctx->config->fEnableTDLSImplicitTrigger)) {
+ state = false;
+ goto set_state;
+ } else if (cds_mode_specific_connection_count(QDF_STA_MODE,
+ NULL) == 1) {
+ state = true;
+ } else if (cds_mode_specific_connection_count(QDF_P2P_CLIENT_MODE,
+ NULL) == 1){
+ state = true;
+ } else {
+ state = false;
+ goto set_state;
+ }
+
+ /* In case of TDLS external control, peer should be added
+ * by the user space to start connection tracker.
+ */
+ if (hdd_ctx->config->fTDLSExternalControl) {
+ if (hdd_ctx->tdls_external_peer_count)
state = true;
- }
+ else
+ state = false;
}
set_state:
@@ -3518,8 +3584,6 @@ void cds_incr_active_session(enum tQDF_ADAPTER_MODE mode,
break;
}
- /* set tdls connection tracker state */
- cds_set_tdls_ct_mode(hdd_ctx);
cds_info("No.# of active sessions for mode %d = %d",
mode, hdd_ctx->no_of_active_sessions[mode]);
@@ -3535,6 +3599,10 @@ void cds_incr_active_session(enum tQDF_ADAPTER_MODE mode,
cds_info("Set PCL of STA to FW");
}
cds_incr_connection_count(session_id);
+
+ /* set tdls connection tracker state */
+ cds_set_tdls_ct_mode(hdd_ctx);
+
qdf_mutex_release(&cds_ctx->qdf_conc_list_lock);
}
@@ -3786,13 +3854,14 @@ void cds_decr_active_session(enum tQDF_ADAPTER_MODE mode,
break;
}
- /* set tdls connection tracker state */
- cds_set_tdls_ct_mode(hdd_ctx);
-
cds_info("No.# of active sessions for mode %d = %d",
mode, hdd_ctx->no_of_active_sessions[mode]);
cds_decr_connection_count(session_id);
+
+ /* set tdls connection tracker state */
+ cds_set_tdls_ct_mode(hdd_ctx);
+
qdf_mutex_release(&cds_ctx->qdf_conc_list_lock);
}
@@ -3969,27 +4038,6 @@ uint32_t cds_get_connection_for_vdev_id(uint32_t vdev_id)
return conn_index;
}
-
-/**
- * cds_get_connection_count() - provides the count of
- * current connections
- *
- *
- * This function provides the count of current connections
- *
- * Return: connection count
- */
-uint32_t cds_get_connection_count(void)
-{
- uint32_t conn_index, count = 0;
- for (conn_index = 0; conn_index < MAX_NUMBER_OF_CONC_CONNECTIONS;
- conn_index++) {
- if (conc_connection_list[conn_index].in_use)
- count++;
- }
- return count;
-}
-
/**
* cds_get_mode() - Get mode from type and subtype
* @type: type
diff --git a/core/cds/src/cds_regdomain.c b/core/cds/src/cds_regdomain.c
index 5fffb2d6de2d..60d8c518d235 100644
--- a/core/cds/src/cds_regdomain.c
+++ b/core/cds/src/cds_regdomain.c
@@ -312,6 +312,7 @@ static const struct country_code_to_reg_dmn g_all_countries[] = {
{CTRY_MONGOLIA, FCC3_WORLD, "MN", "MONGOLIA"},
{CTRY_MONTENEGRO, ETSI1_WORLD, "ME", "MONTENEGRO"},
{CTRY_MOROCCO, ETSI3_WORLD, "MA", "MOROCCO"},
+ {CTRY_NAMIBIA, APL10_WORLD, "NA", "NAMIBIA"},
{CTRY_NEPAL, APL6_WORLD, "NP", "NEPAL"},
{CTRY_NETHERLANDS, ETSI1_WORLD, "NL", "NETHERLANDS"},
{CTRY_NETHERLANDS_ANTILLES, ETSI1_WORLD, "AN", "NETHERLANDS ANTILLES"},
@@ -321,7 +322,7 @@ static const struct country_code_to_reg_dmn g_all_countries[] = {
{CTRY_NICARAGUA, FCC3_FCCA, "NI", "NICARAGUA"},
{CTRY_NORWAY, ETSI1_WORLD, "NO", "NORWAY"},
{CTRY_OMAN, ETSI1_WORLD, "OM", "OMAN"},
- {CTRY_PAKISTAN, APL1_WORLD, "PK", "PAKISTAN"},
+ {CTRY_PAKISTAN, APL1_ETSIC, "PK", "PAKISTAN"},
{CTRY_PALAU, FCC3_FCCA, "PW", "PALAU"},
{CTRY_PANAMA, FCC1_FCCA, "PA", "PANAMA"},
{CTRY_PAPUA_NEW_GUINEA, FCC3_WORLD, "PG", "PAPUA NEW GUINEA"},
@@ -418,6 +419,7 @@ static const struct reg_dmn g_reg_dmns[] = {
{APL11, ETSI},
{APL12, ETSI},
{APL13, ETSI},
+ {APL14, FCC},
{NULL1, NO_CTL},
{MKK3, MKK},
{MKK4, MKK},
diff --git a/core/dp/txrx/ol_tx_classify.c b/core/dp/txrx/ol_tx_classify.c
index 879b21946b65..1cf50a625e33 100644
--- a/core/dp/txrx/ol_tx_classify.c
+++ b/core/dp/txrx/ol_tx_classify.c
@@ -692,6 +692,10 @@ ol_tx_classify_mgmt(
mac_addr,
&peer->mac_addr) != 0) {
qdf_atomic_dec(&peer->ref_cnt);
+ qdf_print("%s: peer %p peer->ref_cnt %d",
+ __func__, peer,
+ qdf_atomic_read
+ (&peer->ref_cnt));
peer = NULL;
}
}
diff --git a/core/dp/txrx/ol_tx_queue.c b/core/dp/txrx/ol_tx_queue.c
index c57db12adbd3..b9f348699e1c 100644
--- a/core/dp/txrx/ol_tx_queue.c
+++ b/core/dp/txrx/ol_tx_queue.c
@@ -92,6 +92,10 @@ ol_tx_queue_vdev_flush(struct ol_txrx_pdev_t *pdev, struct ol_txrx_vdev_t *vdev)
txq = &peer->txqs[i];
if (txq->frms) {
qdf_atomic_inc(&peer->ref_cnt);
+ qdf_print("%s: peer %p peer->ref_cnt %d",
+ __func__, peer,
+ qdf_atomic_read
+ (&peer->ref_cnt));
peers[peer_count++] = peer;
break;
}
diff --git a/core/dp/txrx/ol_tx_send.c b/core/dp/txrx/ol_tx_send.c
index 9bfbc4788f3b..eb1101e7af3e 100644
--- a/core/dp/txrx/ol_tx_send.c
+++ b/core/dp/txrx/ol_tx_send.c
@@ -551,6 +551,7 @@ ol_tx_completion_handler(ol_txrx_pdev_handle pdev,
tx_desc = ol_tx_desc_find(pdev, tx_desc_id);
tx_desc->status = status;
netbuf = tx_desc->netbuf;
+ QDF_NBUF_UPDATE_TX_PKT_COUNT(netbuf, QDF_NBUF_TX_PKT_FREE);
DPTRACE(qdf_dp_trace_ptr(netbuf,
QDF_DP_TRACE_FREE_PACKET_PTR_RECORD,
qdf_nbuf_data_addr(netbuf),
@@ -569,7 +570,6 @@ ol_tx_completion_handler(ol_txrx_pdev_handle pdev,
ol_tx_msdu_complete(pdev, tx_desc, tx_descs, netbuf,
lcl_freelist, tx_desc_last, status);
}
- QDF_NBUF_UPDATE_TX_PKT_COUNT(netbuf, QDF_NBUF_TX_PKT_FREE);
#ifdef QCA_SUPPORT_TXDESC_SANITY_CHECKS
tx_desc->pkt_type = 0xff;
#ifdef QCA_COMPUTE_TX_DELAY
diff --git a/core/dp/txrx/ol_txrx.c b/core/dp/txrx/ol_txrx.c
index b713a4b8af10..72eb0a76493e 100644
--- a/core/dp/txrx/ol_txrx.c
+++ b/core/dp/txrx/ol_txrx.c
@@ -258,6 +258,8 @@ ol_txrx_find_peer_by_addr_and_vdev(ol_txrx_pdev_handle pdev,
return NULL;
*peer_id = peer->local_id;
qdf_atomic_dec(&peer->ref_cnt);
+ qdf_print("%s: peer %p peer->ref_cnt %d", __func__, peer,
+ qdf_atomic_read(&peer->ref_cnt));
return peer;
}
@@ -312,6 +314,8 @@ ol_txrx_peer_handle ol_txrx_find_peer_by_addr(ol_txrx_pdev_handle pdev,
return NULL;
*peer_id = peer->local_id;
qdf_atomic_dec(&peer->ref_cnt);
+ qdf_print("%s: peer %p peer->ref_cnt %d", __func__, peer,
+ qdf_atomic_read(&peer->ref_cnt));
return peer;
}
@@ -2149,6 +2153,8 @@ ol_txrx_peer_attach(ol_txrx_vdev_handle vdev, uint8_t *peer_mac_addr)
/* keep one reference for ol_rx_peer_map_handler */
qdf_atomic_inc(&peer->ref_cnt);
+ qdf_print("%s: peer %p peer->ref_cnt %d", __func__, peer,
+ qdf_atomic_read(&peer->ref_cnt));
peer->valid = 1;
@@ -2546,6 +2552,8 @@ QDF_STATUS ol_txrx_peer_state_update(struct ol_txrx_pdev_t *pdev,
__func__);
#endif
qdf_atomic_dec(&peer->ref_cnt);
+ qdf_print("%s: peer %p peer->ref_cnt %d", __func__, peer,
+ qdf_atomic_read(&peer->ref_cnt));
return QDF_STATUS_SUCCESS;
}
@@ -2576,7 +2584,8 @@ QDF_STATUS ol_txrx_peer_state_update(struct ol_txrx_pdev_t *pdev,
}
}
qdf_atomic_dec(&peer->ref_cnt);
-
+ qdf_print("%s: peer %p peer->ref_cnt %d", __func__, peer,
+ qdf_atomic_read(&peer->ref_cnt));
/* Set the state after the Pause to avoid the race condiction
with ADDBA check in tx path */
peer->state = state;
@@ -2679,6 +2688,8 @@ ol_txrx_peer_update(ol_txrx_vdev_handle vdev,
}
}
qdf_atomic_dec(&peer->ref_cnt);
+ qdf_print("%s: peer %p peer->ref_cnt %d", __func__, peer,
+ qdf_atomic_read(&peer->ref_cnt));
}
uint8_t
@@ -2801,7 +2812,7 @@ void ol_txrx_peer_unref_delete(ol_txrx_peer_handle peer)
*/
qdf_spin_unlock_bh(&pdev->peer_ref_mutex);
- TXRX_PRINT(TXRX_PRINT_LEVEL_INFO1,
+ TXRX_PRINT(TXRX_PRINT_LEVEL_ERR,
"%s: deleting vdev object %p "
"(%02x:%02x:%02x:%02x:%02x:%02x)"
" - its last peer is done\n",
@@ -2847,6 +2858,9 @@ void ol_txrx_peer_unref_delete(ol_txrx_peer_handle peer)
qdf_mem_free(peer);
} else {
+ TXRX_PRINT(TXRX_PRINT_LEVEL_ERR,
+ "%s: peer %p peer->ref_cnt = %d\n", __func__, peer,
+ qdf_atomic_read(&peer->ref_cnt));
qdf_spin_unlock_bh(&pdev->peer_ref_mutex);
}
}
diff --git a/core/dp/txrx/ol_txrx_peer_find.c b/core/dp/txrx/ol_txrx_peer_find.c
index 6f13af569689..db96fcd69db1 100644
--- a/core/dp/txrx/ol_txrx_peer_find.c
+++ b/core/dp/txrx/ol_txrx_peer_find.c
@@ -195,6 +195,9 @@ struct ol_txrx_peer_t *ol_txrx_peer_vdev_find_hash(struct ol_txrx_pdev_t *pdev,
/* found it - increment the ref count before releasing
the lock */
qdf_atomic_inc(&peer->ref_cnt);
+ qdf_print("%s: peer %p peer->ref_cnt %d",
+ __func__, peer,
+ qdf_atomic_read(&peer->ref_cnt));
qdf_spin_unlock_bh(&pdev->peer_ref_mutex);
return peer;
}
@@ -228,6 +231,9 @@ struct ol_txrx_peer_t *ol_txrx_peer_find_hash_find(struct ol_txrx_pdev_t *pdev,
releasing the lock */
qdf_atomic_inc(&peer->ref_cnt);
qdf_spin_unlock_bh(&pdev->peer_ref_mutex);
+ qdf_print("%s: peer %p peer->ref_cnt %d",
+ __func__, peer,
+ qdf_atomic_read(&peer->ref_cnt));
return peer;
}
}
@@ -293,8 +299,9 @@ void ol_txrx_peer_find_hash_erase(struct ol_txrx_pdev_t *pdev)
qdf_atomic_init(&peer->ref_cnt); /* set to 0 */
qdf_atomic_inc(&peer->ref_cnt); /* incr to 1 */
TXRX_PRINT(TXRX_PRINT_LEVEL_ERR,
- "%s: Delete Peer %p\n", __func__,
- peer);
+ "%s: Delete Peer %p ref_cnt %d\n", __func__,
+ peer,
+ qdf_atomic_read(&peer->ref_cnt));
ol_txrx_peer_unref_delete(peer);
}
}
@@ -353,6 +360,16 @@ ol_txrx_peer_find_add_id(struct ol_txrx_pdev_t *pdev,
}
qdf_atomic_inc
(&pdev->peer_id_to_obj_map[peer_id].peer_id_ref_cnt);
+
+ TXRX_PRINT(TXRX_PRINT_LEVEL_ERR,
+ "%s: peer %p ID %d peer_id_ref_cnt %d peer->ref_cnt %d\n",
+ __func__,
+ peer, peer_id,
+ qdf_atomic_read(&pdev->
+ peer_id_to_obj_map[peer_id].
+ peer_id_ref_cnt),
+ qdf_atomic_read(&peer->ref_cnt));
+
/*
* remove the reference added in ol_txrx_peer_find_hash_find.
* the reference for the first peer id is already added in
@@ -503,8 +520,10 @@ void ol_rx_peer_unmap_handler(ol_txrx_pdev_handle pdev, uint16_t peer_id)
* If there are no more references, delete the peer object.
*/
TXRX_PRINT(TXRX_PRINT_LEVEL_ERR,
- "%s: Remove the ID %d reference to peer %p\n",
- __func__, peer_id, peer);
+ "%s: Remove the ID %d reference to peer %p peer_id_ref_cnt %d\n",
+ __func__, peer_id, peer,
+ qdf_atomic_read
+ (&pdev->peer_id_to_obj_map[peer_id].peer_id_ref_cnt));
ol_txrx_peer_unref_delete(peer);
}
@@ -521,6 +540,10 @@ struct ol_txrx_peer_t *ol_txrx_assoc_peer_find(struct ol_txrx_vdev_t *vdev)
&& vdev->last_real_peer->peer_ids[0] != HTT_INVALID_PEER_ID) {
qdf_atomic_inc(&vdev->last_real_peer->ref_cnt);
peer = vdev->last_real_peer;
+ qdf_print("%s: peer %p peer->ref_cnt %d",
+ __func__, peer,
+ qdf_atomic_read
+ (&peer->ref_cnt));
} else {
peer = NULL;
}
diff --git a/core/hdd/inc/wlan_hdd_cfg.h b/core/hdd/inc/wlan_hdd_cfg.h
index 6df864c8b0f6..04ff01663221 100644
--- a/core/hdd/inc/wlan_hdd_cfg.h
+++ b/core/hdd/inc/wlan_hdd_cfg.h
@@ -3117,7 +3117,7 @@ enum dot11p_mode {
#define CFG_ROAM_DENSE_TRAFFIC_THRESHOLD "gtraffic_threshold"
#define CFG_ROAM_DENSE_TRAFFIC_THRESHOLD_MIN (0)
#define CFG_ROAM_DENSE_TRAFFIC_THRESHOLD_MAX (100)
-#define CFG_ROAM_DENSE_TRAFFIC_THRESHOLD_DEFAULT (0)
+#define CFG_ROAM_DENSE_TRAFFIC_THRESHOLD_DEFAULT (55)
/*
* Dense Roam RSSI Threshold diff
@@ -3128,7 +3128,7 @@ enum dot11p_mode {
#define CFG_ROAM_DENSE_RSSI_THRE_OFFSET "groam_dense_rssi_thresh_offset"
#define CFG_ROAM_DENSE_RSSI_THRE_OFFSET_MIN (0)
#define CFG_ROAM_DENSE_RSSI_THRE_OFFSET_MAX (20)
-#define CFG_ROAM_DENSE_RSSI_THRE_OFFSET_DEFAULT (0)
+#define CFG_ROAM_DENSE_RSSI_THRE_OFFSET_DEFAULT (10)
/*
* Enabling gignore_peer_ht_opmode will enable 11g
@@ -3168,7 +3168,7 @@ enum dot11p_mode {
#define CFG_ROAM_DENSE_MIN_APS "groam_dense_min_aps"
#define CFG_ROAM_DENSE_MIN_APS_MIN (1)
#define CFG_ROAM_DENSE_MIN_APS_MAX (5)
-#define CFG_ROAM_DENSE_MIN_APS_DEFAULT (1)
+#define CFG_ROAM_DENSE_MIN_APS_DEFAULT (3)
/*
* Enable/Disable to initiate BUG report in case of fatal event
diff --git a/core/hdd/inc/wlan_hdd_main.h b/core/hdd/inc/wlan_hdd_main.h
index 4179d18ffce6..cffdf54cb6e4 100644
--- a/core/hdd/inc/wlan_hdd_main.h
+++ b/core/hdd/inc/wlan_hdd_main.h
@@ -1261,6 +1261,7 @@ struct hdd_context_s {
#ifdef FEATURE_WLAN_TDLS
eTDLSSupportMode tdls_mode;
+ bool concurrency_marked;
eTDLSSupportMode tdls_mode_last;
tdlsConnInfo_t tdlsConnInfo[HDD_MAX_NUM_TDLS_STA];
/* maximum TDLS station number allowed upon runtime condition */
@@ -1278,6 +1279,7 @@ struct hdd_context_s {
uint8_t tdls_external_peer_count;
bool tdls_nss_switch_in_progress;
int32_t tdls_teardown_peers_cnt;
+ struct tdls_set_state_info set_state_info;
#endif
void *hdd_ipa;
diff --git a/core/hdd/inc/wlan_hdd_tdls.h b/core/hdd/inc/wlan_hdd_tdls.h
index f17857d3e42d..4273d722ea36 100644
--- a/core/hdd/inc/wlan_hdd_tdls.h
+++ b/core/hdd/inc/wlan_hdd_tdls.h
@@ -314,6 +314,17 @@ struct tdls_ct_mac_table {
uint32_t rx_packet_cnt;
uint32_t peer_timestamp_ms;
};
+
+/**
+ * struct tdls_set_state_db - set state command data base
+ * @set_state_cnt: tdls set state count
+ * @vdev_id: vdev id of last set state command
+ */
+struct tdls_set_state_info {
+ uint8_t set_state_cnt;
+ uint8_t vdev_id;
+};
+
/**
* struct tdlsCtx_t - tdls context
*
@@ -684,6 +695,8 @@ void hdd_tdls_context_destroy(hdd_context_t *hdd_ctx);
int wlan_hdd_tdls_antenna_switch(hdd_context_t *hdd_ctx,
hdd_adapter_t *adapter,
uint32_t mode);
+hdd_adapter_t *wlan_hdd_tdls_check_and_enable(hdd_context_t *hdd_ctx);
+
#else
static inline void hdd_tdls_notify_mode_change(hdd_adapter_t *adapter,
@@ -714,6 +727,19 @@ static inline int wlan_hdd_tdls_antenna_switch(hdd_context_t *hdd_ctx,
{
return 0;
}
+
+static inline hdd_adapter_t *wlan_hdd_tdls_check_and_enable(
+ hdd_context_t *hdd_ctx)
+{
+ return NULL;
+}
+
+static inline void wlan_hdd_update_tdls_info(hdd_adapter_t *adapter,
+ bool tdls_prohibited,
+ bool tdls_chan_swit_prohibited)
+{
+}
+
#endif /* End of FEATURE_WLAN_TDLS */
#ifdef FEATURE_WLAN_DIAG_SUPPORT
diff --git a/core/hdd/src/wlan_hdd_assoc.c b/core/hdd/src/wlan_hdd_assoc.c
index 103a369d8b14..21b5f35338c5 100644
--- a/core/hdd/src/wlan_hdd_assoc.c
+++ b/core/hdd/src/wlan_hdd_assoc.c
@@ -1247,6 +1247,7 @@ static void hdd_send_association_event(struct net_device *dev,
int we_event;
char *msg;
struct qdf_mac_addr peerMacAddr;
+ hdd_adapter_t *tdls_adapter;
/* Added to find the auth type on the fly at run time */
/* rather than with cfg to see if FT is enabled */
@@ -1340,6 +1341,14 @@ static void hdd_send_association_event(struct net_device *dev,
&chan_info,
pAdapter->device_mode);
+ hdd_info("Assoc: Check and enable or disable TDLS state ");
+ if ((pAdapter->device_mode == QDF_STA_MODE ||
+ pAdapter->device_mode == QDF_P2P_CLIENT_MODE) &&
+ !pHddCtx->concurrency_marked)
+ wlan_hdd_update_tdls_info(pAdapter,
+ pCsrRoamInfo->tdls_prohibited,
+ pCsrRoamInfo->tdls_chan_swit_prohibited);
+
#ifdef MSM_PLATFORM
#ifdef CONFIG_CNSS
/* start timer in sta/p2p_cli */
@@ -1389,16 +1398,21 @@ static void hdd_send_association_event(struct net_device *dev,
wlan_hdd_send_status_pkg(pAdapter, pHddStaCtx, 1, 0);
#endif
#ifdef FEATURE_WLAN_TDLS
- if ((pAdapter->device_mode == QDF_STA_MODE) &&
- (pCsrRoamInfo)) {
- hddLog(LOG4,
- FL("tdls_prohibited: %d, tdls_chan_swit_prohibited: %d"),
- pCsrRoamInfo->tdls_prohibited,
- pCsrRoamInfo->tdls_chan_swit_prohibited);
-
- wlan_hdd_update_tdls_info(pAdapter,
- pCsrRoamInfo->tdls_prohibited,
- pCsrRoamInfo->tdls_chan_swit_prohibited);
+ hdd_info("Disassoc: Check and enable or disable TDLS state ");
+ if ((pAdapter->device_mode == QDF_STA_MODE ||
+ pAdapter->device_mode == QDF_P2P_CLIENT_MODE) &&
+ !pHddCtx->concurrency_marked) {
+ wlan_hdd_update_tdls_info(pAdapter,
+ true,
+ true);
+ }
+ if (!pHddCtx->concurrency_marked) {
+ tdls_adapter = wlan_hdd_tdls_check_and_enable(
+ pHddCtx);
+ if (NULL != tdls_adapter)
+ wlan_hdd_update_tdls_info(tdls_adapter,
+ false,
+ false);
}
#endif
#ifdef MSM_PLATFORM
@@ -2892,6 +2906,13 @@ static QDF_STATUS hdd_association_completion_handler(hdd_adapter_t *pAdapter,
GFP_KERNEL);
}
hdd_clear_roam_profile_ie(pAdapter);
+ } else if ((eCSR_ROAM_CANCELLED == roamStatus
+ && !hddDisconInProgress)) {
+ cfg80211_connect_result(dev,
+ pWextState->req_bssId.bytes,
+ NULL, 0, NULL, 0,
+ WLAN_STATUS_UNSPECIFIED_FAILURE,
+ GFP_KERNEL);
}
if (pRoamInfo) {
@@ -2909,9 +2930,10 @@ static QDF_STATUS hdd_association_completion_handler(hdd_adapter_t *pAdapter,
/*
* Set connection state to eConnectionState_NotConnected only
* when CSR has completed operation - with a
- * ASSOCIATION_FAILURE status.
+ * ASSOCIATION_FAILURE or eCSR_ROAM_CANCELLED status.
*/
- if (eCSR_ROAM_ASSOCIATION_FAILURE == roamStatus
+ if (((eCSR_ROAM_ASSOCIATION_FAILURE == roamStatus) ||
+ (eCSR_ROAM_CANCELLED == roamStatus))
&& !hddDisconInProgress) {
hdd_conn_set_connection_state(pAdapter,
eConnectionState_NotConnected);
@@ -3903,12 +3925,8 @@ hdd_roam_tdls_status_update_handler(hdd_adapter_t *pAdapter,
case eCSR_ROAM_RESULT_TDLS_SHOULD_DISCOVER:
{
/* ignore TDLS_SHOULD_DISCOVER if any concurrency detected */
- if (((1 << QDF_STA_MODE) != pHddCtx->concurrency_mode) ||
- (pHddCtx->no_of_active_sessions[QDF_STA_MODE] > 1)) {
- hddLog(LOG2,
- FL("concurrency detected. ignore SHOULD_DISCOVER concurrency_mode: 0x%x, active_sessions: %d"),
- pHddCtx->concurrency_mode,
- pHddCtx->no_of_active_sessions[QDF_STA_MODE]);
+ if (!cds_check_is_tdls_allowed(pAdapter->device_mode)) {
+ hdd_err("TDLS not allowed, ignore SHOULD_DISCOVER");
status = QDF_STATUS_E_FAILURE;
break;
}
@@ -4761,6 +4779,8 @@ hdd_sme_roam_callback(void *pContext, tCsrRoamInfo *pRoamInfo, uint32_t roamId,
pRoamInfo->roamSynchInProgress = false;
#endif
break;
+ case eCSR_ROAM_CANCELLED:
+ hdd_info("****eCSR_ROAM_CANCELLED****");
case eCSR_ROAM_ASSOCIATION_FAILURE:
qdf_ret_status = hdd_association_completion_handler(pAdapter,
pRoamInfo,
diff --git a/core/hdd/src/wlan_hdd_cfg80211.c b/core/hdd/src/wlan_hdd_cfg80211.c
index 626d8ef8e8e1..400fbe4320e4 100644
--- a/core/hdd/src/wlan_hdd_cfg80211.c
+++ b/core/hdd/src/wlan_hdd_cfg80211.c
@@ -9502,6 +9502,7 @@ int wlan_hdd_cfg80211_connect_start(hdd_adapter_t *pAdapter,
*/
qdf_mem_copy((void *)(pWextState->req_bssId.bytes),
bssid, QDF_MAC_ADDR_SIZE);
+ hdd_info("bssid is given by upper layer %pM", bssid);
} else if (bssid_hint) {
pRoamProfile->BSSIDs.numOfBSSIDs = 1;
qdf_mem_copy((void *)(pRoamProfile->BSSIDs.bssid),
@@ -9513,11 +9514,12 @@ int wlan_hdd_cfg80211_connect_start(hdd_adapter_t *pAdapter,
*/
qdf_mem_copy((void *)(pWextState->req_bssId.bytes),
bssid_hint, QDF_MAC_ADDR_SIZE);
- hdd_warn(" bssid_hint "MAC_ADDRESS_STR,
- MAC_ADDR_ARRAY(bssid_hint));
+ hdd_info("bssid_hint is given by upper layer %pM",
+ bssid_hint);
} else {
qdf_mem_zero((void *)(pRoamProfile->BSSIDs.bssid),
QDF_MAC_ADDR_SIZE);
+ hdd_info("no bssid given by upper layer");
}
hdd_notice("Connect to SSID: %.*s operating Channel: %u",
diff --git a/core/hdd/src/wlan_hdd_conc_ut.c b/core/hdd/src/wlan_hdd_conc_ut.c
index 2d44f65e0a51..b792ddfc0c30 100644
--- a/core/hdd/src/wlan_hdd_conc_ut.c
+++ b/core/hdd/src/wlan_hdd_conc_ut.c
@@ -189,7 +189,7 @@ void fill_report(hdd_context_t *hdd_ctx, char *title,
title, pcl_type_to_string(pcl_type));
if (chnl_1st_conn == 0)
snprintf(report[report_idx].first_persona,
- MAX_ALLOWED_CHAR_IN_REPORT,
+ MAX_ALLOWED_CHAR_IN_REPORT, "%s",
device_mode_to_string(first_persona));
else
snprintf(report[report_idx].first_persona,
@@ -198,7 +198,7 @@ void fill_report(hdd_context_t *hdd_ctx, char *title,
device_mode_to_string(first_persona), chnl_1st_conn);
if (chnl_2nd_conn == 0)
snprintf(report[report_idx].second_persona,
- MAX_ALLOWED_CHAR_IN_REPORT,
+ MAX_ALLOWED_CHAR_IN_REPORT, "%s",
device_mode_to_string(second_persona));
else
snprintf(report[report_idx].second_persona,
@@ -207,7 +207,7 @@ void fill_report(hdd_context_t *hdd_ctx, char *title,
device_mode_to_string(second_persona), chnl_2nd_conn);
if (chnl_3rd_conn == 0)
snprintf(report[report_idx].third_persona,
- MAX_ALLOWED_CHAR_IN_REPORT,
+ MAX_ALLOWED_CHAR_IN_REPORT, "%s",
device_mode_to_string(third_persona));
else
snprintf(report[report_idx].third_persona,
@@ -217,13 +217,13 @@ void fill_report(hdd_context_t *hdd_ctx, char *title,
report[report_idx].status = status;
snprintf(report[report_idx].dbs_value,
- MAX_ALLOWED_CHAR_IN_REPORT,
+ MAX_ALLOWED_CHAR_IN_REPORT, "%s",
wma_is_hw_dbs_capable() ? "enable" : "disable");
snprintf(report[report_idx].system_conf,
- MAX_ALLOWED_CHAR_IN_REPORT,
+ MAX_ALLOWED_CHAR_IN_REPORT, "%s",
system_config_to_string(hdd_ctx->config->conc_system_pref));
snprintf(report[report_idx].result_code,
- MAX_ALLOWED_CHAR_IN_REPORT,
+ MAX_ALLOWED_CHAR_IN_REPORT, "%s",
status ? "PASS" : "FAIL");
snprintf(report[report_idx].reason,
MAX_ALLOWED_CHAR_IN_REPORT,
diff --git a/core/hdd/src/wlan_hdd_driver_ops.c b/core/hdd/src/wlan_hdd_driver_ops.c
index f6fa4d7c6c94..cab8f0c74472 100644
--- a/core/hdd/src/wlan_hdd_driver_ops.c
+++ b/core/hdd/src/wlan_hdd_driver_ops.c
@@ -363,6 +363,10 @@ static int wlan_hdd_probe(struct device *dev, void *bdev, const hif_bus_id *bid,
goto err_epping_close;
hif_ctx = cds_get_context(QDF_MODULE_ID_HIF);
+
+ if (NULL == hif_ctx)
+ goto err_epping_close;
+
qdf_dev = cds_get_context(QDF_MODULE_ID_QDF_DEVICE);
status = ol_cds_init(qdf_dev, hif_ctx);
@@ -446,6 +450,9 @@ static void wlan_hdd_remove(struct device *dev)
hif_ctx = cds_get_context(QDF_MODULE_ID_HIF);
+ if (NULL == hif_ctx)
+ return;
+
hif_disable_power_management(hif_ctx);
if (QDF_IS_EPPING_ENABLED(cds_get_conparam())) {
@@ -543,7 +550,7 @@ void wlan_hdd_notify_handler(int state)
static int __wlan_hdd_bus_suspend(pm_message_t state)
{
void *hdd_ctx = cds_get_context(QDF_MODULE_ID_HDD);
- void *hif_ctx = cds_get_context(QDF_MODULE_ID_HIF);
+ void *hif_ctx;
int err = wlan_hdd_validate_context(hdd_ctx);
int status;
@@ -552,6 +559,11 @@ static int __wlan_hdd_bus_suspend(pm_message_t state)
if (err)
goto done;
+ hif_ctx = cds_get_context(QDF_MODULE_ID_HIF);
+ if (NULL == hif_ctx) {
+ err = -EINVAL;
+ goto done;
+ }
err = qdf_status_to_os_return(
ol_txrx_bus_suspend());
if (err)
@@ -616,12 +628,16 @@ int wlan_hdd_bus_suspend(pm_message_t state)
static int __wlan_hdd_bus_resume(void)
{
void *hdd_ctx = cds_get_context(QDF_MODULE_ID_HDD);
- void *hif_ctx = cds_get_context(QDF_MODULE_ID_HIF);
+ void *hif_ctx;
int status = wlan_hdd_validate_context(hdd_ctx);
if (status)
return status;
+ hif_ctx = cds_get_context(QDF_MODULE_ID_HIF);
+ if (NULL == hif_ctx)
+ return -EINVAL;
+
status = hif_bus_resume(hif_ctx);
QDF_BUG(!status);
diff --git a/core/hdd/src/wlan_hdd_ext_scan.c b/core/hdd/src/wlan_hdd_ext_scan.c
index c594b409664f..36a521165437 100644
--- a/core/hdd/src/wlan_hdd_ext_scan.c
+++ b/core/hdd/src/wlan_hdd_ext_scan.c
@@ -28,6 +28,9 @@
#ifdef FEATURE_WLAN_EXTSCAN
+/* denote that this file does not allow legacy hddLog */
+#define HDD_DISALLOW_LEGACY_HDDLOG 1
+
#include "wlan_hdd_ext_scan.h"
#include "cds_utils.h"
#include "cds_sched.h"
@@ -161,7 +164,7 @@ wlan_hdd_cfg80211_extscan_get_capabilities_rsp(void *ctx,
if (wlan_hdd_validate_context(hdd_ctx))
return;
if (!data) {
- hddLog(LOGE, FL("data is null"));
+ hdd_err("data is null");
return;
}
@@ -171,8 +174,7 @@ wlan_hdd_cfg80211_extscan_get_capabilities_rsp(void *ctx,
/* validate response received from target*/
if (context->request_id != data->requestId) {
spin_unlock(&context->context_lock);
- hddLog(LOGE,
- FL("Target response id did not match: request_id %d response_id %d"),
+ hdd_err("Target response id did not match: request_id %d response_id %d",
context->request_id, data->requestId);
return;
} else {
@@ -238,13 +240,13 @@ static int hdd_extscan_nl_fill_bss(struct sk_buff *skb, tSirWifiScanResult *ap,
nla_put_u16(skb, PARAM_BEACON_PERIOD, ap->beaconPeriod) ||
nla_put_u16(skb, PARAM_CAPABILITY, ap->capability) ||
nla_put_u16(skb, PARAM_IE_LENGTH, ap->ieLength)) {
- hddLog(LOGE, FL("put fail"));
+ hdd_err("put fail");
return -EINVAL;
}
if (ap->ieLength)
if (nla_put(skb, PARAM_IE_DATA, ap->ieLength, ap->ieData)) {
- hddLog(LOGE, FL("put fail"));
+ hdd_err("put fail");
return -EINVAL;
}
@@ -294,7 +296,7 @@ wlan_hdd_cfg80211_extscan_cached_results_ind(void *ctx,
if (wlan_hdd_validate_context(pHddCtx))
return;
if (!data) {
- hddLog(LOGE, FL("data is null"));
+ hdd_err("data is null");
return;
}
@@ -304,8 +306,7 @@ wlan_hdd_cfg80211_extscan_cached_results_ind(void *ctx,
spin_unlock(&context->context_lock);
if (ignore_cached_results) {
- hddLog(LOGE,
- FL("Ignore the cached results received after timeout"));
+ hdd_err("Ignore the cached results received after timeout");
return;
}
@@ -357,19 +358,19 @@ wlan_hdd_cfg80211_extscan_cached_results_ind(void *ctx,
}
}
- hddLog(LOG1, FL("nl_buf_len = %u"), nl_buf_len);
+ hdd_notice("nl_buf_len = %u", nl_buf_len);
skb = cfg80211_vendor_cmd_alloc_reply_skb(pHddCtx->wiphy, nl_buf_len);
if (!skb) {
- hddLog(LOGE, FL("cfg80211_vendor_cmd_alloc_reply_skb failed"));
+ hdd_err("cfg80211_vendor_cmd_alloc_reply_skb failed");
goto fail;
}
- hddLog(LOG1, "Req Id %u Num_scan_ids %u More Data %u",
+ hdd_notice("Req Id %u Num_scan_ids %u More Data %u",
data->request_id, data->num_scan_ids, data->more_data);
result = &data->result[0];
for (i = 0; i < data->num_scan_ids; i++) {
- hddLog(LOG1, "[i=%d] scan_id %u flags %u num_results %u",
+ hdd_notice("[i=%d] scan_id %u flags %u num_results %u",
i, result->scan_id, result->flags, result->num_results);
ap = &result->ap[0];
@@ -382,7 +383,7 @@ wlan_hdd_cfg80211_extscan_cached_results_ind(void *ctx,
* BSSID was cached.
*/
ap->ts += pHddCtx->ext_scan_start_since_boot;
- hddLog(LOG1, "Timestamp %llu "
+ hdd_notice("Timestamp %llu "
"Ssid: %s "
"Bssid (" MAC_ADDRESS_STR ") "
"Channel %u "
@@ -415,7 +416,7 @@ wlan_hdd_cfg80211_extscan_cached_results_ind(void *ctx,
nla_put_u8(skb,
QCA_WLAN_VENDOR_ATTR_EXTSCAN_RESULTS_SCAN_RESULT_MORE_DATA,
data->more_data)) {
- hddLog(LOGE, FL("put fail"));
+ hdd_err("put fail");
goto fail;
}
@@ -426,7 +427,7 @@ wlan_hdd_cfg80211_extscan_cached_results_ind(void *ctx,
if (nla_put_u32(skb,
QCA_WLAN_VENDOR_ATTR_EXTSCAN_CACHED_RESULTS_SCAN_ID,
result->scan_id)) {
- hddLog(LOGE, FL("put fail"));
+ hdd_err("put fail");
goto fail;
}
nla_results = nla_nest_start(skb,
@@ -451,7 +452,7 @@ wlan_hdd_cfg80211_extscan_cached_results_ind(void *ctx,
nla_put_u32(skb,
QCA_WLAN_VENDOR_ATTR_EXTSCAN_NUM_RESULTS_AVAILABLE,
result->num_results)) {
- hddLog(LOGE, FL("put fail"));
+ hdd_err("put fail");
goto fail;
}
@@ -520,7 +521,7 @@ wlan_hdd_cfg80211_extscan_hotlist_match_ind(void *ctx,
if (wlan_hdd_validate_context(pHddCtx))
return;
if (!data) {
- hddLog(LOGE, FL("data is null"));
+ hdd_err("data is null");
return;
}
@@ -536,7 +537,7 @@ wlan_hdd_cfg80211_extscan_hotlist_match_ind(void *ctx,
index, flags);
if (!skb) {
- hddLog(LOGE, FL("cfg80211_vendor_event_alloc failed"));
+ hdd_err("cfg80211_vendor_event_alloc failed");
return;
}
hdd_info("Req Id: %u Num_APs: %u MoreData: %u ap_found: %u",
@@ -546,7 +547,7 @@ wlan_hdd_cfg80211_extscan_hotlist_match_ind(void *ctx,
for (i = 0; i < data->numOfAps; i++) {
data->ap[i].ts = qdf_get_monotonic_boottime();
- hddLog(LOG1, "[i=%d] Timestamp %llu "
+ hdd_notice("[i=%d] Timestamp %llu "
"Ssid: %s "
"Bssid (" MAC_ADDRESS_STR ") "
"Channel %u "
@@ -568,7 +569,7 @@ wlan_hdd_cfg80211_extscan_hotlist_match_ind(void *ctx,
nla_put_u32(skb,
QCA_WLAN_VENDOR_ATTR_EXTSCAN_NUM_RESULTS_AVAILABLE,
data->numOfAps)) {
- hddLog(LOGE, FL("put fail"));
+ hdd_err("put fail");
goto fail;
}
@@ -659,7 +660,7 @@ wlan_hdd_cfg80211_extscan_signif_wifi_change_results_ind(
if (wlan_hdd_validate_context(pHddCtx))
return;
if (!pData) {
- hddLog(LOGE, FL("pData is null"));
+ hdd_err("pData is null");
return;
}
@@ -671,15 +672,15 @@ wlan_hdd_cfg80211_extscan_signif_wifi_change_results_ind(
flags);
if (!skb) {
- hddLog(LOGE, FL("cfg80211_vendor_event_alloc failed"));
+ hdd_err("cfg80211_vendor_event_alloc failed");
return;
}
- hddLog(LOG1, "Req Id %u Num results %u More Data %u",
+ hdd_notice("Req Id %u Num results %u More Data %u",
pData->requestId, pData->numResults, pData->moreData);
ap_info = &pData->ap[0];
for (i = 0; i < pData->numResults; i++) {
- hddLog(LOG1, "[i=%d] "
+ hdd_notice("[i=%d] "
"Bssid (" MAC_ADDRESS_STR ") "
"Channel %u "
"numOfRssi %d",
@@ -688,7 +689,7 @@ wlan_hdd_cfg80211_extscan_signif_wifi_change_results_ind(
ap_info->channel, ap_info->numOfRssi);
rssi = &(ap_info)->rssi[0];
for (j = 0; j < ap_info->numOfRssi; j++)
- hddLog(LOG1, "Rssi %d", *rssi++);
+ hdd_notice("Rssi %d", *rssi++);
ap_info += ap_info->numOfRssi * sizeof(*rssi);
}
@@ -699,7 +700,7 @@ wlan_hdd_cfg80211_extscan_signif_wifi_change_results_ind(
nla_put_u32(skb,
QCA_WLAN_VENDOR_ATTR_EXTSCAN_NUM_RESULTS_AVAILABLE,
pData->numResults)) {
- hddLog(LOGE, FL("put fail"));
+ hdd_err("put fail");
goto fail;
}
@@ -781,13 +782,12 @@ wlan_hdd_cfg80211_extscan_full_scan_result_event(void *ctx,
if (wlan_hdd_validate_context(pHddCtx))
return;
if (!pData) {
- hddLog(LOGE, FL("pData is null"));
+ hdd_err("pData is null");
return;
}
if ((sizeof(*pData) + pData->ap.ieLength) >= EXTSCAN_EVENT_BUF_SIZE) {
- hddLog(LOGE,
- FL("Frame exceeded NL size limitation, drop it!!"));
+ hdd_err("Frame exceeded NL size limitation, drop it!!");
return;
}
skb = cfg80211_vendor_event_alloc(
@@ -798,7 +798,7 @@ wlan_hdd_cfg80211_extscan_full_scan_result_event(void *ctx,
flags);
if (!skb) {
- hddLog(LOGE, FL("cfg80211_vendor_event_alloc failed"));
+ hdd_err("cfg80211_vendor_event_alloc failed");
return;
}
@@ -809,9 +809,9 @@ wlan_hdd_cfg80211_extscan_full_scan_result_event(void *ctx,
get_monotonic_boottime(&ts);
pData->ap.ts = ((u64)ts.tv_sec * 1000000) + (ts.tv_nsec / 1000);
- hddLog(LOG1, "Req Id %u More Data %u", pData->requestId,
+ hdd_notice("Req Id %u More Data %u", pData->requestId,
pData->moreData);
- hddLog(LOG1, "AP Info: Timestamp %llu Ssid: %s "
+ hdd_notice("AP Info: Timestamp %llu Ssid: %s "
"Bssid (" MAC_ADDRESS_STR ") "
"Channel %u "
"Rssi %d "
@@ -867,7 +867,7 @@ wlan_hdd_cfg80211_extscan_full_scan_result_event(void *ctx,
nla_put_u8(skb,
QCA_WLAN_VENDOR_ATTR_EXTSCAN_RESULTS_SCAN_RESULT_MORE_DATA,
pData->moreData)) {
- hddLog(LOGE, FL("nla put fail"));
+ hdd_err("nla put fail");
goto nla_put_failure;
}
@@ -911,7 +911,7 @@ wlan_hdd_cfg80211_extscan_scan_res_available_event(
if (wlan_hdd_validate_context(pHddCtx))
return;
if (!pData) {
- hddLog(LOGE, FL("pData is null"));
+ hdd_err("pData is null");
return;
}
@@ -923,11 +923,11 @@ wlan_hdd_cfg80211_extscan_scan_res_available_event(
flags);
if (!skb) {
- hddLog(LOGE, FL("cfg80211_vendor_event_alloc failed"));
+ hdd_err("cfg80211_vendor_event_alloc failed");
return;
}
- hddLog(LOG1, "Req Id %u Num results %u",
+ hdd_notice("Req Id %u Num results %u",
pData->requestId, pData->numResultsAvailable);
if (nla_put_u32(skb,
QCA_WLAN_VENDOR_ATTR_EXTSCAN_RESULTS_REQUEST_ID,
@@ -935,7 +935,7 @@ wlan_hdd_cfg80211_extscan_scan_res_available_event(
nla_put_u32(skb,
QCA_WLAN_VENDOR_ATTR_EXTSCAN_NUM_RESULTS_AVAILABLE,
pData->numResultsAvailable)) {
- hddLog(LOGE, FL("nla put fail"));
+ hdd_err("nla put fail");
goto nla_put_failure;
}
@@ -972,7 +972,7 @@ wlan_hdd_cfg80211_extscan_scan_progress_event(void *ctx,
if (wlan_hdd_validate_context(pHddCtx))
return;
if (!pData) {
- hddLog(LOGE, FL("pData is null"));
+ hdd_err("pData is null");
return;
}
@@ -984,10 +984,10 @@ wlan_hdd_cfg80211_extscan_scan_progress_event(void *ctx,
flags);
if (!skb) {
- hddLog(LOGE, FL("cfg80211_vendor_event_alloc failed"));
+ hdd_err("cfg80211_vendor_event_alloc failed");
return;
}
- hddLog(LOG1, "Req Id %u Scan event type %u Scan event status %u",
+ hdd_notice("Req Id %u Scan event type %u Scan event status %u",
pData->requestId, pData->scanEventType, pData->status);
if (nla_put_u32(skb, QCA_WLAN_VENDOR_ATTR_EXTSCAN_RESULTS_REQUEST_ID,
@@ -998,7 +998,7 @@ wlan_hdd_cfg80211_extscan_scan_progress_event(void *ctx,
nla_put_u32(skb,
QCA_WLAN_VENDOR_ATTR_EXTSCAN_RESULTS_SCAN_EVENT_STATUS,
pData->status)) {
- hddLog(LOGE, FL("nla put fail"));
+ hdd_err("nla put fail");
goto nla_put_failure;
}
@@ -1037,7 +1037,7 @@ wlan_hdd_cfg80211_extscan_epno_match_found(void *ctx,
if (wlan_hdd_validate_context(pHddCtx))
return;
if (!data) {
- hddLog(LOGE, FL("data is null"));
+ hdd_err("data is null");
return;
}
@@ -1051,7 +1051,7 @@ wlan_hdd_cfg80211_extscan_epno_match_found(void *ctx,
len += data->ap[i].ieLength;
if (len >= EXTSCAN_EVENT_BUF_SIZE) {
- hddLog(LOGE, FL("Frame exceeded NL size limitation, drop it!"));
+ hdd_err("Frame exceeded NL size limitation, drop it!");
return;
}
@@ -1062,15 +1062,15 @@ wlan_hdd_cfg80211_extscan_epno_match_found(void *ctx,
flags);
if (!skb) {
- hddLog(LOGE, FL("cfg80211_vendor_event_alloc failed"));
+ hdd_err("cfg80211_vendor_event_alloc failed");
return;
}
- hddLog(LOG1, "Req Id %u More Data %u num_results %d",
+ hdd_notice("Req Id %u More Data %u num_results %d",
data->request_id, data->more_data, data->num_results);
for (i = 0; i < data->num_results; i++) {
data->ap[i].channel = cds_chan_to_freq(data->ap[i].channel);
- hddLog(LOG1, "AP Info: Timestamp %llu) Ssid: %s "
+ hdd_notice("AP Info: Timestamp %llu) Ssid: %s "
"Bssid (" MAC_ADDRESS_STR ") "
"Channel %u "
"Rssi %d "
@@ -1099,7 +1099,7 @@ wlan_hdd_cfg80211_extscan_epno_match_found(void *ctx,
nla_put_u8(skb,
QCA_WLAN_VENDOR_ATTR_EXTSCAN_RESULTS_SCAN_RESULT_MORE_DATA,
data->more_data)) {
- hddLog(LOGE, FL("nla put fail"));
+ hdd_err("nla put fail");
goto fail;
}
@@ -1152,13 +1152,13 @@ wlan_hdd_cfg80211_passpoint_match_found(void *ctx,
if (wlan_hdd_validate_context(pHddCtx))
return;
if (!data) {
- hddLog(LOGE, FL("data is null"));
+ hdd_err("data is null");
return;
}
len = sizeof(*data) + data->ap.ieLength + data->anqp_len;
if (len >= EXTSCAN_EVENT_BUF_SIZE) {
- hddLog(LOGE, FL("Result exceeded NL size limitation, drop it"));
+ hdd_err("Result exceeded NL size limitation, drop it");
return;
}
@@ -1169,14 +1169,14 @@ wlan_hdd_cfg80211_passpoint_match_found(void *ctx,
flags);
if (!skb) {
- hddLog(LOGE, FL("cfg80211_vendor_event_alloc failed"));
+ hdd_err("cfg80211_vendor_event_alloc failed");
return;
}
- hddLog(LOG1, "Req Id %u Id %u ANQP length %u num_matches %u",
+ hdd_notice("Req Id %u Id %u ANQP length %u num_matches %u",
data->request_id, data->id, data->anqp_len, num_matches);
for (i = 0; i < num_matches; i++) {
- hddLog(LOG1, "AP Info: Timestamp %llu Ssid: %s "
+ hdd_notice("AP Info: Timestamp %llu Ssid: %s "
"Bssid (" MAC_ADDRESS_STR ") "
"Channel %u "
"Rssi %d "
@@ -1205,7 +1205,7 @@ wlan_hdd_cfg80211_passpoint_match_found(void *ctx,
nla_put_u8(skb,
QCA_WLAN_VENDOR_ATTR_EXTSCAN_RESULTS_SCAN_RESULT_MORE_DATA,
more_data)) {
- hddLog(LOGE, FL("nla put fail"));
+ hdd_err("nla put fail");
goto fail;
}
@@ -1285,16 +1285,16 @@ wlan_hdd_cfg80211_extscan_hotlist_ssid_match_ind(void *ctx,
if (wlan_hdd_validate_context(hdd_ctx))
return;
if (!event) {
- hddLog(LOGE, FL("event is null"));
+ hdd_err("event is null");
return;
}
if (event->ap_found) {
index = QCA_NL80211_VENDOR_SUBCMD_EXTSCAN_HOTLIST_SSID_FOUND_INDEX;
- hddLog(LOG1, "SSID hotlist found");
+ hdd_notice("SSID hotlist found");
} else {
index = QCA_NL80211_VENDOR_SUBCMD_EXTSCAN_HOTLIST_SSID_LOST_INDEX;
- hddLog(LOG1, "SSID hotlist lost");
+ hdd_notice("SSID hotlist lost");
}
skb = cfg80211_vendor_event_alloc(hdd_ctx->wiphy,
@@ -1303,14 +1303,14 @@ wlan_hdd_cfg80211_extscan_hotlist_ssid_match_ind(void *ctx,
index, flags);
if (!skb) {
- hddLog(LOGE, FL("cfg80211_vendor_event_alloc failed"));
+ hdd_err("cfg80211_vendor_event_alloc failed");
return;
}
- hddLog(LOG1, "Req Id %u, Num results %u, More Data %u",
+ hdd_notice("Req Id %u, Num results %u, More Data %u",
event->requestId, event->numOfAps, event->moreData);
for (i = 0; i < event->numOfAps; i++) {
- hddLog(LOG1, "[i=%d] Timestamp %llu "
+ hdd_notice("[i=%d] Timestamp %llu "
"Ssid: %s "
"Bssid (" MAC_ADDRESS_STR ") "
"Channel %u "
@@ -1333,7 +1333,7 @@ wlan_hdd_cfg80211_extscan_hotlist_ssid_match_ind(void *ctx,
nla_put_u32(skb,
QCA_WLAN_VENDOR_ATTR_EXTSCAN_NUM_RESULTS_AVAILABLE,
event->numOfAps)) {
- hddLog(LOGE, FL("put fail"));
+ hdd_err("put fail");
goto fail;
}
@@ -1342,7 +1342,7 @@ wlan_hdd_cfg80211_extscan_hotlist_ssid_match_ind(void *ctx,
aps = nla_nest_start(skb,
QCA_WLAN_VENDOR_ATTR_EXTSCAN_RESULTS_LIST);
if (!aps) {
- hddLog(LOGE, FL("nest fail"));
+ hdd_err("nest fail");
goto fail;
}
@@ -1351,7 +1351,7 @@ wlan_hdd_cfg80211_extscan_hotlist_ssid_match_ind(void *ctx,
ap = nla_nest_start(skb, i);
if (!ap) {
- hddLog(LOGE, FL("nest fail"));
+ hdd_err("nest fail");
goto fail;
}
@@ -1378,7 +1378,7 @@ wlan_hdd_cfg80211_extscan_hotlist_ssid_match_ind(void *ctx,
nla_put_u32(skb,
QCA_WLAN_VENDOR_ATTR_EXTSCAN_RESULTS_SCAN_RESULT_RTT_SD,
event->ap[i].rtt_sd)) {
- hddLog(LOGE, FL("put fail"));
+ hdd_err("put fail");
goto fail;
}
nla_nest_end(skb, ap);
@@ -1388,7 +1388,7 @@ wlan_hdd_cfg80211_extscan_hotlist_ssid_match_ind(void *ctx,
if (nla_put_u8(skb,
QCA_WLAN_VENDOR_ATTR_EXTSCAN_RESULTS_SCAN_RESULT_MORE_DATA,
event->moreData)) {
- hddLog(LOGE, FL("put fail"));
+ hdd_err("put fail");
goto fail;
}
}
@@ -1424,13 +1424,12 @@ wlan_hdd_cfg80211_extscan_generic_rsp
ENTER();
if (wlan_hdd_validate_context(hdd_ctx) || !response) {
- hddLog(LOGE,
- FL("HDD context is not valid or response(%p) is null"),
+ hdd_err("HDD context is not valid or response(%p) is null",
response);
return;
}
- hddLog(LOG1, FL("request %u status %u"),
+ hdd_notice("request %u status %u",
response->request_id, response->status);
context = &ext_scan_context;
@@ -1462,14 +1461,13 @@ void wlan_hdd_cfg80211_extscan_callback(void *ctx, const uint16_t evType,
if (wlan_hdd_validate_context(pHddCtx))
return;
- hddLog(LOG1, FL("Rcvd Event %d"), evType);
+ hdd_notice("Rcvd Event %d", evType);
switch (evType) {
case eSIR_EXTSCAN_CACHED_RESULTS_RSP:
/* There is no need to send this response to upper layer
Just log the message */
- hddLog(LOG1,
- FL("Rcvd eSIR_EXTSCAN_CACHED_RESULTS_RSP"));
+ hdd_notice("Rcvd eSIR_EXTSCAN_CACHED_RESULTS_RSP");
break;
case eSIR_EXTSCAN_GET_CAPABILITIES_IND:
@@ -1532,7 +1530,7 @@ void wlan_hdd_cfg80211_extscan_callback(void *ctx, const uint16_t evType,
break;
default:
- hddLog(LOGE, FL("Unknown event type %u"), evType);
+ hdd_err("Unknown event type %u", evType);
break;
}
EXIT();
@@ -1609,34 +1607,34 @@ static int wlan_hdd_send_ext_scan_capability(hdd_context_t *hdd_ctx)
skb = cfg80211_vendor_cmd_alloc_reply_skb(hdd_ctx->wiphy, nl_buf_len);
if (!skb) {
- hddLog(LOGE, FL("cfg80211_vendor_cmd_alloc_reply_skb failed"));
+ hdd_err("cfg80211_vendor_cmd_alloc_reply_skb failed");
return -ENOMEM;
}
- hddLog(LOG1, "Req Id %u", data->requestId);
- hddLog(LOG1, "Status %u", data->status);
- hddLog(LOG1, "Scan cache size %u",
+ hdd_notice("Req Id %u", data->requestId);
+ hdd_notice("Status %u", data->status);
+ hdd_notice("Scan cache size %u",
data->max_scan_cache_size);
- hddLog(LOG1, "Scan buckets %u", data->max_scan_buckets);
- hddLog(LOG1, "Max AP per scan %u",
+ hdd_notice("Scan buckets %u", data->max_scan_buckets);
+ hdd_notice("Max AP per scan %u",
data->max_ap_cache_per_scan);
- hddLog(LOG1, "max_rssi_sample_size %u",
+ hdd_notice("max_rssi_sample_size %u",
data->max_rssi_sample_size);
- hddLog(LOG1, "max_scan_reporting_threshold %u",
+ hdd_notice("max_scan_reporting_threshold %u",
data->max_scan_reporting_threshold);
- hddLog(LOG1, "max_hotlist_bssids %u",
+ hdd_notice("max_hotlist_bssids %u",
data->max_hotlist_bssids);
- hddLog(LOG1, "max_significant_wifi_change_aps %u",
+ hdd_notice("max_significant_wifi_change_aps %u",
data->max_significant_wifi_change_aps);
- hddLog(LOG1, "max_bssid_history_entries %u",
+ hdd_notice("max_bssid_history_entries %u",
data->max_bssid_history_entries);
- hddLog(LOG1, "max_hotlist_ssids %u", data->max_hotlist_ssids);
- hddLog(LOG1, "max_number_epno_networks %u",
+ hdd_notice("max_hotlist_ssids %u", data->max_hotlist_ssids);
+ hdd_notice("max_number_epno_networks %u",
data->max_number_epno_networks);
- hddLog(LOG1, "max_number_epno_networks_by_ssid %u",
+ hdd_notice("max_number_epno_networks_by_ssid %u",
data->max_number_epno_networks_by_ssid);
- hddLog(LOG1, "max_number_of_white_listed_ssid %u",
+ hdd_notice("max_number_of_white_listed_ssid %u",
data->max_number_of_white_listed_ssid);
if (nla_put_u32(skb, PARAM_REQUEST_ID, data->requestId) ||
@@ -1661,7 +1659,7 @@ static int wlan_hdd_send_ext_scan_capability(hdd_context_t *hdd_ctx)
data->max_number_epno_networks_by_ssid) ||
nla_put_u32(skb, MAX_NUM_WHITELISTED_SSID,
data->max_number_of_white_listed_ssid)) {
- hddLog(LOGE, FL("nla put fail"));
+ hdd_err("nla put fail");
goto nla_put_failure;
}
@@ -1728,19 +1726,19 @@ static int __wlan_hdd_cfg80211_extscan_get_capabilities(struct wiphy *wiphy,
if (nla_parse(tb, QCA_WLAN_VENDOR_ATTR_EXTSCAN_SUBCMD_CONFIG_PARAM_MAX,
data, data_len, wlan_hdd_extscan_config_policy)) {
- hddLog(LOGE, FL("Invalid ATTR"));
+ hdd_err("Invalid ATTR");
return -EINVAL;
}
pReqMsg = qdf_mem_malloc(sizeof(*pReqMsg));
if (!pReqMsg) {
- hddLog(LOGE, FL("qdf_mem_malloc failed"));
+ hdd_err("qdf_mem_malloc failed");
return -ENOMEM;
}
/* Parse and fetch request Id */
if (!tb[QCA_WLAN_VENDOR_ATTR_EXTSCAN_SUBCMD_CONFIG_PARAM_REQUEST_ID]) {
- hddLog(LOGE, FL("attr request id failed"));
+ hdd_err("attr request id failed");
goto fail;
}
@@ -1748,7 +1746,7 @@ static int __wlan_hdd_cfg80211_extscan_get_capabilities(struct wiphy *wiphy,
nla_get_u32(tb
[QCA_WLAN_VENDOR_ATTR_EXTSCAN_SUBCMD_CONFIG_PARAM_REQUEST_ID]);
pReqMsg->sessionId = pAdapter->sessionId;
- hddLog(LOG1, FL("Req Id %d Session Id %d"),
+ hdd_notice("Req Id %d Session Id %d",
pReqMsg->requestId, pReqMsg->sessionId);
context = &ext_scan_context;
@@ -1759,7 +1757,7 @@ static int __wlan_hdd_cfg80211_extscan_get_capabilities(struct wiphy *wiphy,
status = sme_ext_scan_get_capabilities(pHddCtx->hHal, pReqMsg);
if (!QDF_IS_STATUS_SUCCESS(status)) {
- hddLog(LOGE, FL("sme_ext_scan_get_capabilities failed(err=%d)"),
+ hdd_err("sme_ext_scan_get_capabilities failed(err=%d)",
status);
goto fail;
}
@@ -1767,13 +1765,13 @@ static int __wlan_hdd_cfg80211_extscan_get_capabilities(struct wiphy *wiphy,
rc = wait_for_completion_timeout(&context->response_event,
msecs_to_jiffies(WLAN_WAIT_TIME_EXTSCAN));
if (!rc) {
- hddLog(LOGE, FL("Target response timed out"));
+ hdd_err("Target response timed out");
return -ETIMEDOUT;
}
ret = wlan_hdd_send_ext_scan_capability(pHddCtx);
if (ret)
- hddLog(LOGE, FL("Failed to send ext scan capability to user space"));
+ hdd_err("Failed to send ext scan capability to user space");
EXIT();
return ret;
fail:
@@ -1862,34 +1860,34 @@ static int __wlan_hdd_cfg80211_extscan_get_cached_results(struct wiphy *wiphy,
if (nla_parse(tb, PARAM_MAX, data, data_len,
wlan_hdd_extscan_config_policy)) {
- hddLog(LOGE, FL("Invalid ATTR"));
+ hdd_err("Invalid ATTR");
return -EINVAL;
}
pReqMsg = qdf_mem_malloc(sizeof(*pReqMsg));
if (!pReqMsg) {
- hddLog(LOGE, FL("qdf_mem_malloc failed"));
+ hdd_err("qdf_mem_malloc failed");
return -ENOMEM;
}
/* Parse and fetch request Id */
if (!tb[PARAM_REQUEST_ID]) {
- hddLog(LOGE, FL("attr request id failed"));
+ hdd_err("attr request id failed");
goto fail;
}
pReqMsg->requestId = nla_get_u32(tb[PARAM_REQUEST_ID]);
pReqMsg->sessionId = pAdapter->sessionId;
- hddLog(LOG1, FL("Req Id %d Session Id %d"),
+ hdd_notice("Req Id %d Session Id %d",
pReqMsg->requestId, pReqMsg->sessionId);
/* Parse and fetch flush parameter */
if (!tb[PARAM_FLUSH]) {
- hddLog(LOGE, FL("attr flush failed"));
+ hdd_err("attr flush failed");
goto fail;
}
pReqMsg->flush = nla_get_u8(tb[PARAM_FLUSH]);
- hddLog(LOG1, FL("Flush %d"), pReqMsg->flush);
+ hdd_notice("Flush %d", pReqMsg->flush);
context = &ext_scan_context;
spin_lock(&context->context_lock);
@@ -1900,15 +1898,14 @@ static int __wlan_hdd_cfg80211_extscan_get_cached_results(struct wiphy *wiphy,
status = sme_get_cached_results(pHddCtx->hHal, pReqMsg);
if (!QDF_IS_STATUS_SUCCESS(status)) {
- hddLog(LOGE,
- FL("sme_get_cached_results failed(err=%d)"), status);
+ hdd_err("sme_get_cached_results failed(err=%d)", status);
goto fail;
}
rc = wait_for_completion_timeout(&context->response_event,
msecs_to_jiffies(WLAN_WAIT_TIME_EXTSCAN));
if (!rc) {
- hddLog(LOGE, FL("Target response timed out"));
+ hdd_err("Target response timed out");
retval = -ETIMEDOUT;
spin_lock(&context->context_lock);
context->ignore_cached_results = true;
@@ -2010,48 +2007,48 @@ __wlan_hdd_cfg80211_extscan_set_bssid_hotlist(struct wiphy *wiphy,
if (nla_parse(tb, QCA_WLAN_VENDOR_ATTR_EXTSCAN_SUBCMD_CONFIG_PARAM_MAX,
data, data_len, wlan_hdd_extscan_config_policy)) {
- hddLog(LOGE, FL("Invalid ATTR"));
+ hdd_err("Invalid ATTR");
return -EINVAL;
}
pReqMsg = qdf_mem_malloc(sizeof(*pReqMsg));
if (!pReqMsg) {
- hddLog(LOGE, FL("qdf_mem_malloc failed"));
+ hdd_err("qdf_mem_malloc failed");
return -ENOMEM;
}
/* Parse and fetch request Id */
if (!tb[QCA_WLAN_VENDOR_ATTR_EXTSCAN_SUBCMD_CONFIG_PARAM_REQUEST_ID]) {
- hddLog(LOGE, FL("attr request id failed"));
+ hdd_err("attr request id failed");
goto fail;
}
pReqMsg->requestId =
nla_get_u32(tb
[QCA_WLAN_VENDOR_ATTR_EXTSCAN_SUBCMD_CONFIG_PARAM_REQUEST_ID]);
- hddLog(LOG1, FL("Req Id %d"), pReqMsg->requestId);
+ hdd_notice("Req Id %d", pReqMsg->requestId);
/* Parse and fetch number of APs */
if (!tb[QCA_WLAN_VENDOR_ATTR_EXTSCAN_BSSID_HOTLIST_PARAMS_NUM_AP]) {
- hddLog(LOGE, FL("attr number of AP failed"));
+ hdd_err("attr number of AP failed");
goto fail;
}
pReqMsg->numAp =
nla_get_u32(tb
[QCA_WLAN_VENDOR_ATTR_EXTSCAN_BSSID_HOTLIST_PARAMS_NUM_AP]);
pReqMsg->sessionId = pAdapter->sessionId;
- hddLog(LOG1, FL("Number of AP %d Session Id %d"),
+ hdd_notice("Number of AP %d Session Id %d",
pReqMsg->numAp, pReqMsg->sessionId);
/* Parse and fetch lost ap sample size */
if (!tb[QCA_WLAN_VENDOR_ATTR_EXTSCAN_BSSID_HOTLIST_PARAMS_LOST_AP_SAMPLE_SIZE]) {
- hddLog(LOGE, FL("attr lost ap sample size failed"));
+ hdd_err("attr lost ap sample size failed");
goto fail;
}
pReqMsg->lost_ap_sample_size = nla_get_u32(
tb[QCA_WLAN_VENDOR_ATTR_EXTSCAN_BSSID_HOTLIST_PARAMS_LOST_AP_SAMPLE_SIZE]);
- hddLog(LOG1, FL("Lost ap sample size %d"),
+ hdd_notice("Lost ap sample size %d",
pReqMsg->lost_ap_sample_size);
i = 0;
@@ -2062,43 +2059,43 @@ __wlan_hdd_cfg80211_extscan_set_bssid_hotlist(struct wiphy *wiphy,
(tb2, QCA_WLAN_VENDOR_ATTR_EXTSCAN_SUBCMD_CONFIG_PARAM_MAX,
nla_data(apTh), nla_len(apTh),
wlan_hdd_extscan_config_policy)) {
- hddLog(LOGE, FL("nla_parse failed"));
+ hdd_err("nla_parse failed");
goto fail;
}
/* Parse and fetch MAC address */
if (!tb2[QCA_WLAN_VENDOR_ATTR_EXTSCAN_AP_THRESHOLD_PARAM_BSSID]) {
- hddLog(LOGE, FL("attr mac address failed"));
+ hdd_err("attr mac address failed");
goto fail;
}
nla_memcpy(pReqMsg->ap[i].bssid.bytes,
tb2
[QCA_WLAN_VENDOR_ATTR_EXTSCAN_AP_THRESHOLD_PARAM_BSSID],
QDF_MAC_ADDR_SIZE);
- hddLog(LOG1, MAC_ADDRESS_STR,
+ hdd_notice(MAC_ADDRESS_STR,
MAC_ADDR_ARRAY(pReqMsg->ap[i].bssid.bytes));
/* Parse and fetch low RSSI */
if (!tb2
[QCA_WLAN_VENDOR_ATTR_EXTSCAN_AP_THRESHOLD_PARAM_RSSI_LOW]) {
- hddLog(LOGE, FL("attr low RSSI failed"));
+ hdd_err("attr low RSSI failed");
goto fail;
}
pReqMsg->ap[i].low =
nla_get_s32(tb2
[QCA_WLAN_VENDOR_ATTR_EXTSCAN_AP_THRESHOLD_PARAM_RSSI_LOW]);
- hddLog(LOG1, FL("RSSI low %d"), pReqMsg->ap[i].low);
+ hdd_notice("RSSI low %d", pReqMsg->ap[i].low);
/* Parse and fetch high RSSI */
if (!tb2
[QCA_WLAN_VENDOR_ATTR_EXTSCAN_AP_THRESHOLD_PARAM_RSSI_HIGH]) {
- hddLog(LOGE, FL("attr high RSSI failed"));
+ hdd_err("attr high RSSI failed");
goto fail;
}
pReqMsg->ap[i].high =
nla_get_s32(tb2
[QCA_WLAN_VENDOR_ATTR_EXTSCAN_AP_THRESHOLD_PARAM_RSSI_HIGH]);
- hddLog(LOG1, FL("RSSI High %d"), pReqMsg->ap[i].high);
+ hdd_notice("RSSI High %d", pReqMsg->ap[i].high);
i++;
}
@@ -2111,7 +2108,7 @@ __wlan_hdd_cfg80211_extscan_set_bssid_hotlist(struct wiphy *wiphy,
status = sme_set_bss_hotlist(pHddCtx->hHal, pReqMsg);
if (!QDF_IS_STATUS_SUCCESS(status)) {
- hddLog(LOGE, FL("sme_set_bss_hotlist failed(err=%d)"), status);
+ hdd_err("sme_set_bss_hotlist failed(err=%d)", status);
goto fail;
}
@@ -2121,7 +2118,7 @@ __wlan_hdd_cfg80211_extscan_set_bssid_hotlist(struct wiphy *wiphy,
msecs_to_jiffies(WLAN_WAIT_TIME_EXTSCAN));
if (!rc) {
- hddLog(LOGE, FL("sme_set_bss_hotlist timed out"));
+ hdd_err("sme_set_bss_hotlist timed out");
retval = -ETIMEDOUT;
} else {
spin_lock(&context->context_lock);
@@ -2207,70 +2204,70 @@ __wlan_hdd_cfg80211_extscan_set_significant_change(struct wiphy *wiphy,
if (nla_parse(tb, QCA_WLAN_VENDOR_ATTR_EXTSCAN_SUBCMD_CONFIG_PARAM_MAX,
data, data_len, wlan_hdd_extscan_config_policy)) {
- hddLog(LOGE, FL("Invalid ATTR"));
+ hdd_err("Invalid ATTR");
return -EINVAL;
}
pReqMsg = qdf_mem_malloc(sizeof(*pReqMsg));
if (!pReqMsg) {
- hddLog(LOGE, FL("qdf_mem_malloc failed"));
+ hdd_err("qdf_mem_malloc failed");
return -ENOMEM;
}
/* Parse and fetch request Id */
if (!tb[QCA_WLAN_VENDOR_ATTR_EXTSCAN_SUBCMD_CONFIG_PARAM_REQUEST_ID]) {
- hddLog(LOGE, FL("attr request id failed"));
+ hdd_err("attr request id failed");
goto fail;
}
pReqMsg->requestId =
nla_get_u32(tb
[QCA_WLAN_VENDOR_ATTR_EXTSCAN_SUBCMD_CONFIG_PARAM_REQUEST_ID]);
- hddLog(LOG1, FL("Req Id %d"), pReqMsg->requestId);
+ hdd_notice("Req Id %d", pReqMsg->requestId);
/* Parse and fetch RSSI sample size */
if (!tb
[QCA_WLAN_VENDOR_ATTR_EXTSCAN_SIGNIFICANT_CHANGE_PARAMS_RSSI_SAMPLE_SIZE]) {
- hddLog(LOGE, FL("attr RSSI sample size failed"));
+ hdd_err("attr RSSI sample size failed");
goto fail;
}
pReqMsg->rssiSampleSize =
nla_get_u32(tb
[QCA_WLAN_VENDOR_ATTR_EXTSCAN_SIGNIFICANT_CHANGE_PARAMS_RSSI_SAMPLE_SIZE]);
- hddLog(LOG1, FL("RSSI sample size %u"), pReqMsg->rssiSampleSize);
+ hdd_notice("RSSI sample size %u", pReqMsg->rssiSampleSize);
/* Parse and fetch lost AP sample size */
if (!tb
[QCA_WLAN_VENDOR_ATTR_EXTSCAN_SIGNIFICANT_CHANGE_PARAMS_LOST_AP_SAMPLE_SIZE]) {
- hddLog(LOGE, FL("attr lost AP sample size failed"));
+ hdd_err("attr lost AP sample size failed");
goto fail;
}
pReqMsg->lostApSampleSize =
nla_get_u32(tb
[QCA_WLAN_VENDOR_ATTR_EXTSCAN_SIGNIFICANT_CHANGE_PARAMS_LOST_AP_SAMPLE_SIZE]);
- hddLog(LOG1, FL("Lost AP sample size %u"), pReqMsg->lostApSampleSize);
+ hdd_notice("Lost AP sample size %u", pReqMsg->lostApSampleSize);
/* Parse and fetch AP min breacing */
if (!tb
[QCA_WLAN_VENDOR_ATTR_EXTSCAN_SIGNIFICANT_CHANGE_PARAMS_MIN_BREACHING]) {
- hddLog(LOGE, FL("attr AP min breaching"));
+ hdd_err("attr AP min breaching");
goto fail;
}
pReqMsg->minBreaching =
nla_get_u32(tb
[QCA_WLAN_VENDOR_ATTR_EXTSCAN_SIGNIFICANT_CHANGE_PARAMS_MIN_BREACHING]);
- hddLog(LOG1, FL("AP min breaching %u"), pReqMsg->minBreaching);
+ hdd_notice("AP min breaching %u", pReqMsg->minBreaching);
/* Parse and fetch number of APs */
if (!tb[QCA_WLAN_VENDOR_ATTR_EXTSCAN_SIGNIFICANT_CHANGE_PARAMS_NUM_AP]) {
- hddLog(LOGE, FL("attr number of AP failed"));
+ hdd_err("attr number of AP failed");
goto fail;
}
pReqMsg->numAp =
nla_get_u32(tb
[QCA_WLAN_VENDOR_ATTR_EXTSCAN_SIGNIFICANT_CHANGE_PARAMS_NUM_AP]);
pReqMsg->sessionId = pAdapter->sessionId;
- hddLog(LOG1, FL("Number of AP %d Session Id %d"),
+ hdd_notice("Number of AP %d Session Id %d",
pReqMsg->numAp, pReqMsg->sessionId);
i = 0;
@@ -2281,43 +2278,43 @@ __wlan_hdd_cfg80211_extscan_set_significant_change(struct wiphy *wiphy,
(tb2, QCA_WLAN_VENDOR_ATTR_EXTSCAN_SUBCMD_CONFIG_PARAM_MAX,
nla_data(apTh), nla_len(apTh),
wlan_hdd_extscan_config_policy)) {
- hddLog(LOGE, FL("nla_parse failed"));
+ hdd_err("nla_parse failed");
goto fail;
}
/* Parse and fetch MAC address */
if (!tb2[QCA_WLAN_VENDOR_ATTR_EXTSCAN_AP_THRESHOLD_PARAM_BSSID]) {
- hddLog(LOGE, FL("attr mac address failed"));
+ hdd_err("attr mac address failed");
goto fail;
}
nla_memcpy(pReqMsg->ap[i].bssid.bytes,
tb2
[QCA_WLAN_VENDOR_ATTR_EXTSCAN_AP_THRESHOLD_PARAM_BSSID],
QDF_MAC_ADDR_SIZE);
- hddLog(LOG1, MAC_ADDRESS_STR,
+ hdd_notice(MAC_ADDRESS_STR,
MAC_ADDR_ARRAY(pReqMsg->ap[i].bssid.bytes));
/* Parse and fetch low RSSI */
if (!tb2
[QCA_WLAN_VENDOR_ATTR_EXTSCAN_AP_THRESHOLD_PARAM_RSSI_LOW]) {
- hddLog(LOGE, FL("attr low RSSI failed"));
+ hdd_err("attr low RSSI failed");
goto fail;
}
pReqMsg->ap[i].low =
nla_get_s32(tb2
[QCA_WLAN_VENDOR_ATTR_EXTSCAN_AP_THRESHOLD_PARAM_RSSI_LOW]);
- hddLog(LOG1, FL("RSSI low %d"), pReqMsg->ap[i].low);
+ hdd_notice("RSSI low %d", pReqMsg->ap[i].low);
/* Parse and fetch high RSSI */
if (!tb2
[QCA_WLAN_VENDOR_ATTR_EXTSCAN_AP_THRESHOLD_PARAM_RSSI_HIGH]) {
- hddLog(LOGE, FL("attr high RSSI failed"));
+ hdd_err("attr high RSSI failed");
goto fail;
}
pReqMsg->ap[i].high =
nla_get_s32(tb2
[QCA_WLAN_VENDOR_ATTR_EXTSCAN_AP_THRESHOLD_PARAM_RSSI_HIGH]);
- hddLog(LOG1, FL("RSSI High %d"), pReqMsg->ap[i].high);
+ hdd_notice("RSSI High %d", pReqMsg->ap[i].high);
i++;
}
@@ -2330,8 +2327,7 @@ __wlan_hdd_cfg80211_extscan_set_significant_change(struct wiphy *wiphy,
status = sme_set_significant_change(pHddCtx->hHal, pReqMsg);
if (!QDF_IS_STATUS_SUCCESS(status)) {
- hddLog(LOGE,
- FL("sme_set_significant_change failed(err=%d)"), status);
+ hdd_err("sme_set_significant_change failed(err=%d)", status);
qdf_mem_free(pReqMsg);
return -EINVAL;
}
@@ -2341,7 +2337,7 @@ __wlan_hdd_cfg80211_extscan_set_significant_change(struct wiphy *wiphy,
msecs_to_jiffies(WLAN_WAIT_TIME_EXTSCAN));
if (!rc) {
- hddLog(LOGE, FL("sme_set_significant_change timed out"));
+ hdd_err("sme_set_significant_change timed out");
retval = -ETIMEDOUT;
} else {
spin_lock(&context->context_lock);
@@ -2489,46 +2485,45 @@ __wlan_hdd_cfg80211_extscan_get_valid_channels(struct wiphy *wiphy,
if (nla_parse(tb, QCA_WLAN_VENDOR_ATTR_EXTSCAN_SUBCMD_CONFIG_PARAM_MAX,
data, data_len, wlan_hdd_extscan_config_policy)) {
- hddLog(LOGE, FL("Invalid ATTR"));
+ hdd_err("Invalid ATTR");
return -EINVAL;
}
/* Parse and fetch request Id */
if (!tb[QCA_WLAN_VENDOR_ATTR_EXTSCAN_SUBCMD_CONFIG_PARAM_REQUEST_ID]) {
- hddLog(LOGE, FL("attr request id failed"));
+ hdd_err("attr request id failed");
return -EINVAL;
}
requestId =
nla_get_u32(tb
[QCA_WLAN_VENDOR_ATTR_EXTSCAN_SUBCMD_CONFIG_PARAM_REQUEST_ID]);
- hddLog(LOG1, FL("Req Id %d"), requestId);
+ hdd_notice("Req Id %d", requestId);
/* Parse and fetch wifi band */
if (!tb
[QCA_WLAN_VENDOR_ATTR_EXTSCAN_GET_VALID_CHANNELS_CONFIG_PARAM_WIFI_BAND]) {
- hddLog(LOGE, FL("attr wifi band failed"));
+ hdd_err("attr wifi band failed");
return -EINVAL;
}
wifiBand =
nla_get_u32(tb
[QCA_WLAN_VENDOR_ATTR_EXTSCAN_GET_VALID_CHANNELS_CONFIG_PARAM_WIFI_BAND]);
- hddLog(LOG1, FL("Wifi band %d"), wifiBand);
+ hdd_notice("Wifi band %d", wifiBand);
if (!tb
[QCA_WLAN_VENDOR_ATTR_EXTSCAN_GET_VALID_CHANNELS_CONFIG_PARAM_MAX_CHANNELS]) {
- hddLog(LOGE, FL("attr max channels failed"));
+ hdd_err("attr max channels failed");
return -EINVAL;
}
maxChannels =
nla_get_u32(tb
[QCA_WLAN_VENDOR_ATTR_EXTSCAN_GET_VALID_CHANNELS_CONFIG_PARAM_MAX_CHANNELS]);
- hddLog(LOG1, FL("Max channels %d"), maxChannels);
+ hdd_notice("Max channels %d", maxChannels);
status = sme_get_valid_channels_by_band((tHalHandle) (pHddCtx->hHal),
wifiBand, chan_list,
&num_channels);
if (QDF_STATUS_SUCCESS != status) {
- hddLog(LOGE,
- FL("sme_get_valid_channels_by_band failed (err=%d)"),
+ hdd_err("sme_get_valid_channels_by_band failed (err=%d)",
status);
return -EINVAL;
}
@@ -2541,9 +2536,9 @@ __wlan_hdd_cfg80211_extscan_get_valid_channels(struct wiphy *wiphy,
!strncmp(hdd_get_fwpath(), "ap", 2))
hdd_remove_indoor_channels(wiphy, chan_list, &num_channels);
- hddLog(LOG1, FL("Number of channels %d"), num_channels);
+ hdd_notice("Number of channels %d", num_channels);
for (i = 0; i < num_channels; i++)
- hddLog(LOG1, "Channel: %u ", chan_list[i]);
+ hdd_notice("Channel: %u ", chan_list[i]);
reply_skb = cfg80211_vendor_cmd_alloc_reply_skb(wiphy, sizeof(u32) +
sizeof(u32) *
@@ -2557,7 +2552,7 @@ __wlan_hdd_cfg80211_extscan_get_valid_channels(struct wiphy *wiphy,
nla_put(reply_skb,
QCA_WLAN_VENDOR_ATTR_EXTSCAN_RESULTS_CHANNELS,
sizeof(u32) * num_channels, chan_list)) {
- hddLog(LOGE, FL("nla put fail"));
+ hdd_err("nla put fail");
kfree_skb(reply_skb);
return -EINVAL;
}
@@ -2566,7 +2561,7 @@ __wlan_hdd_cfg80211_extscan_get_valid_channels(struct wiphy *wiphy,
return ret;
}
- hddLog(LOGE, FL("valid channels: buffer alloc fail"));
+ hdd_err("valid channels: buffer alloc fail");
return -EINVAL;
}
@@ -2720,80 +2715,80 @@ static int hdd_extscan_start_fill_bucket_channel_spec(
if (nla_parse(bucket,
QCA_WLAN_VENDOR_ATTR_EXTSCAN_SUBCMD_CONFIG_PARAM_MAX,
nla_data(buckets), nla_len(buckets), NULL)) {
- hddLog(LOGE, FL("nla_parse failed"));
+ hdd_err("nla_parse failed");
return -EINVAL;
}
/* Parse and fetch bucket spec */
if (!bucket[QCA_WLAN_VENDOR_ATTR_EXTSCAN_BUCKET_SPEC_INDEX]) {
- hddLog(LOGE, FL("attr bucket index failed"));
+ hdd_err("attr bucket index failed");
return -EINVAL;
}
req_msg->buckets[bkt_index].bucket = nla_get_u8(
bucket[QCA_WLAN_VENDOR_ATTR_EXTSCAN_BUCKET_SPEC_INDEX]);
- hddLog(LOG1, FL("Bucket spec Index %d"),
+ hdd_notice("Bucket spec Index %d",
req_msg->buckets[bkt_index].bucket);
/* Parse and fetch wifi band */
if (!bucket[QCA_WLAN_VENDOR_ATTR_EXTSCAN_BUCKET_SPEC_BAND]) {
- hddLog(LOGE, FL("attr wifi band failed"));
+ hdd_err("attr wifi band failed");
return -EINVAL;
}
req_msg->buckets[bkt_index].band = nla_get_u8(
bucket[QCA_WLAN_VENDOR_ATTR_EXTSCAN_BUCKET_SPEC_BAND]);
- hddLog(LOG1, FL("Wifi band %d"),
+ hdd_notice("Wifi band %d",
req_msg->buckets[bkt_index].band);
/* Parse and fetch period */
if (!bucket[QCA_WLAN_VENDOR_ATTR_EXTSCAN_BUCKET_SPEC_PERIOD]) {
- hddLog(LOGE, FL("attr period failed"));
+ hdd_err("attr period failed");
return -EINVAL;
}
req_msg->buckets[bkt_index].period = nla_get_u32(
bucket[QCA_WLAN_VENDOR_ATTR_EXTSCAN_BUCKET_SPEC_PERIOD]);
- hddLog(LOG1, FL("period %d"),
+ hdd_notice("period %d",
req_msg->buckets[bkt_index].period);
/* Parse and fetch report events */
if (!bucket[
QCA_WLAN_VENDOR_ATTR_EXTSCAN_BUCKET_SPEC_REPORT_EVENTS]) {
- hddLog(LOGE, FL("attr report events failed"));
+ hdd_err("attr report events failed");
return -EINVAL;
}
req_msg->buckets[bkt_index].reportEvents = nla_get_u8(
bucket[
QCA_WLAN_VENDOR_ATTR_EXTSCAN_BUCKET_SPEC_REPORT_EVENTS]);
- hddLog(LOG1, FL("report events %d"),
+ hdd_notice("report events %d",
req_msg->buckets[bkt_index].reportEvents);
/* Parse and fetch max period */
if (!bucket[QCA_WLAN_VENDOR_ATTR_EXTSCAN_BUCKET_SPEC_MAX_PERIOD]) {
- hddLog(LOGE, FL("attr max period failed"));
+ hdd_err("attr max period failed");
return -EINVAL;
}
req_msg->buckets[bkt_index].max_period = nla_get_u32(
bucket[QCA_WLAN_VENDOR_ATTR_EXTSCAN_BUCKET_SPEC_MAX_PERIOD]);
- hddLog(LOG1, FL("max period %u"),
+ hdd_notice("max period %u",
req_msg->buckets[bkt_index].max_period);
/* Parse and fetch exponent */
if (!bucket[QCA_WLAN_VENDOR_ATTR_EXTSCAN_BUCKET_SPEC_EXPONENT]) {
- hddLog(LOGE, FL("attr exponent failed"));
+ hdd_err("attr exponent failed");
return -EINVAL;
}
req_msg->buckets[bkt_index].exponent = nla_get_u32(
bucket[QCA_WLAN_VENDOR_ATTR_EXTSCAN_BUCKET_SPEC_EXPONENT]);
- hddLog(LOG1, FL("exponent %u"),
+ hdd_notice("exponent %u",
req_msg->buckets[bkt_index].exponent);
/* Parse and fetch step count */
if (!bucket[QCA_WLAN_VENDOR_ATTR_EXTSCAN_BUCKET_SPEC_STEP_COUNT]) {
- hddLog(LOGE, FL("attr step count failed"));
+ hdd_err("attr step count failed");
return -EINVAL;
}
req_msg->buckets[bkt_index].step_count = nla_get_u32(
bucket[QCA_WLAN_VENDOR_ATTR_EXTSCAN_BUCKET_SPEC_STEP_COUNT]);
- hddLog(LOG1, FL("Step count %u"),
+ hdd_notice("Step count %u",
req_msg->buckets[bkt_index].step_count);
/* start with known good values for bucket dwell times */
@@ -2816,17 +2811,16 @@ static int hdd_extscan_start_fill_bucket_channel_spec(
return 0;
num_channels = 0;
- hddLog(LOG1, "WiFi band is specified, driver to fill channel list");
+ hdd_notice("WiFi band is specified, driver to fill channel list");
status = sme_get_valid_channels_by_band(hdd_ctx->hHal,
req_msg->buckets[bkt_index].band,
chan_list, &num_channels);
if (!QDF_IS_STATUS_SUCCESS(status)) {
- hddLog(LOGE,
- FL("sme_GetValidChannelsByBand failed (err=%d)"),
+ hdd_err("sme_GetValidChannelsByBand failed (err=%d)",
status);
return -EINVAL;
}
- hddLog(LOG1, FL("before trimming, num_channels: %d"),
+ hdd_notice("before trimming, num_channels: %d",
num_channels);
req_msg->buckets[bkt_index].numChannels =
@@ -2885,8 +2879,7 @@ static int hdd_extscan_start_fill_bucket_channel_spec(
}
- hddLog(LOG1,
- "Channel: %u Passive: %u Dwell time: %u ms Class: %u",
+ hdd_notice("Channel: %u Passive: %u Dwell time: %u ms Class: %u",
req_msg->buckets[bkt_index].channels[j].channel,
req_msg->buckets[bkt_index].channels[j].passive,
req_msg->buckets[bkt_index].channels[j].dwellTimeMs,
@@ -2900,7 +2893,7 @@ static int hdd_extscan_start_fill_bucket_channel_spec(
min_dwell_time_passive_bucket,
max_dwell_time_passive_bucket);
- hddLog(LOG1, FL("bkt_index:%d actv_min:%d actv_max:%d pass_min:%d pass_max:%d"),
+ hdd_notice("bkt_index:%d actv_min:%d actv_max:%d pass_min:%d pass_max:%d",
bkt_index,
req_msg->buckets[bkt_index].min_dwell_time_active,
req_msg->buckets[bkt_index].max_dwell_time_active,
@@ -2915,7 +2908,7 @@ static int hdd_extscan_start_fill_bucket_channel_spec(
/* Parse and fetch number of channels */
if (!bucket[
QCA_WLAN_VENDOR_ATTR_EXTSCAN_BUCKET_SPEC_NUM_CHANNEL_SPECS]) {
- hddLog(LOGE, FL("attr num channels failed"));
+ hdd_err("attr num channels failed");
return -EINVAL;
}
req_msg->buckets[bkt_index].numChannels =
@@ -2934,7 +2927,7 @@ static int hdd_extscan_start_fill_bucket_channel_spec(
return 0;
if (!bucket[QCA_WLAN_VENDOR_ATTR_EXTSCAN_CHANNEL_SPEC]) {
- hddLog(LOGE, FL("attr channel spec failed"));
+ hdd_err("attr channel spec failed");
return -EINVAL;
}
@@ -2950,26 +2943,26 @@ static int hdd_extscan_start_fill_bucket_channel_spec(
QCA_WLAN_VENDOR_ATTR_EXTSCAN_SUBCMD_CONFIG_PARAM_MAX,
nla_data(channels), nla_len(channels),
wlan_hdd_extscan_config_policy)) {
- hddLog(LOGE, FL("nla_parse failed"));
+ hdd_err("nla_parse failed");
return -EINVAL;
}
/* Parse and fetch channel */
if (!channel[
QCA_WLAN_VENDOR_ATTR_EXTSCAN_CHANNEL_SPEC_CHANNEL]) {
- hddLog(LOGE, FL("attr channel failed"));
+ hdd_err("attr channel failed");
return -EINVAL;
}
req_msg->buckets[bkt_index].channels[j].channel =
nla_get_u32(channel[
QCA_WLAN_VENDOR_ATTR_EXTSCAN_CHANNEL_SPEC_CHANNEL]);
- hddLog(LOG1, FL("channel %u"),
+ hdd_notice("channel %u",
req_msg->buckets[bkt_index].channels[j].channel);
/* Parse and fetch dwell time */
if (!channel[
QCA_WLAN_VENDOR_ATTR_EXTSCAN_CHANNEL_SPEC_DWELL_TIME]) {
- hddLog(LOGE, FL("attr dwelltime failed"));
+ hdd_err("attr dwelltime failed");
return -EINVAL;
}
req_msg->buckets[bkt_index].channels[j].dwellTimeMs =
@@ -2981,7 +2974,7 @@ static int hdd_extscan_start_fill_bucket_channel_spec(
hdd_ctx->config->extscan_active_min_chn_time ||
req_msg->buckets[bkt_index].channels[j].dwellTimeMs >
hdd_ctx->config->extscan_active_max_chn_time) {
- hddLog(LOG1, FL("WiFi band is unspecified, dwellTime:%d"),
+ hdd_notice("WiFi band is unspecified, dwellTime:%d",
req_msg->buckets[bkt_index].channels[j].dwellTimeMs);
if (CDS_IS_PASSIVE_OR_DISABLE_CH(
@@ -2995,7 +2988,7 @@ static int hdd_extscan_start_fill_bucket_channel_spec(
}
}
- hddLog(LOG1, FL("New Dwell time %u ms"),
+ hdd_notice("New Dwell time %u ms",
req_msg->buckets[bkt_index].channels[j].dwellTimeMs);
if (CDS_IS_PASSIVE_OR_DISABLE_CH(
@@ -3027,14 +3020,13 @@ static int hdd_extscan_start_fill_bucket_channel_spec(
/* Parse and fetch channel spec passive */
if (!channel[
QCA_WLAN_VENDOR_ATTR_EXTSCAN_CHANNEL_SPEC_PASSIVE]) {
- hddLog(LOGE,
- FL("attr channel spec passive failed"));
+ hdd_err("attr channel spec passive failed");
return -EINVAL;
}
req_msg->buckets[bkt_index].channels[j].passive =
nla_get_u8(channel[
QCA_WLAN_VENDOR_ATTR_EXTSCAN_CHANNEL_SPEC_PASSIVE]);
- hddLog(LOG1, FL("Chnl spec passive %u"),
+ hdd_notice("Chnl spec passive %u",
req_msg->buckets[bkt_index].channels[j].passive);
/* Override scan type if required */
if (CDS_IS_PASSIVE_OR_DISABLE_CH(
@@ -3055,7 +3047,7 @@ static int hdd_extscan_start_fill_bucket_channel_spec(
min_dwell_time_passive_bucket,
max_dwell_time_passive_bucket);
- hddLog(LOG1, FL("bktIndex:%d actv_min:%d actv_max:%d pass_min:%d pass_max:%d"),
+ hdd_notice("bktIndex:%d actv_min:%d actv_max:%d pass_min:%d pass_max:%d",
bkt_index,
req_msg->buckets[bkt_index].min_dwell_time_active,
req_msg->buckets[bkt_index].max_dwell_time_active,
@@ -3066,7 +3058,7 @@ static int hdd_extscan_start_fill_bucket_channel_spec(
req_msg->numBuckets++;
}
- hddLog(LOG1, FL("Global: actv_min:%d actv_max:%d pass_min:%d pass_max:%d"),
+ hdd_notice("Global: actv_min:%d actv_max:%d pass_min:%d pass_max:%d",
req_msg->min_dwell_time_active,
req_msg->max_dwell_time_active,
req_msg->min_dwell_time_passive,
@@ -3154,66 +3146,66 @@ __wlan_hdd_cfg80211_extscan_start(struct wiphy *wiphy,
if (nla_parse(tb, PARAM_MAX, data, data_len,
wlan_hdd_extscan_config_policy)) {
- hddLog(LOGE, FL("Invalid ATTR"));
+ hdd_err("Invalid ATTR");
return -EINVAL;
}
pReqMsg = qdf_mem_malloc(sizeof(*pReqMsg));
if (!pReqMsg) {
- hddLog(LOGE, FL("memory allocation failed"));
+ hdd_err("memory allocation failed");
return -ENOMEM;
}
/* Parse and fetch request Id */
if (!tb[PARAM_REQUEST_ID]) {
- hddLog(LOGE, FL("attr request id failed"));
+ hdd_err("attr request id failed");
goto fail;
}
pReqMsg->requestId = nla_get_u32(tb[PARAM_REQUEST_ID]);
pReqMsg->sessionId = pAdapter->sessionId;
- hddLog(LOG1, FL("Req Id %d Session Id %d"),
+ hdd_notice("Req Id %d Session Id %d",
pReqMsg->requestId,
pReqMsg->sessionId);
/* Parse and fetch base period */
if (!tb[PARAM_BASE_PERIOD]) {
- hddLog(LOGE, FL("attr base period failed"));
+ hdd_err("attr base period failed");
goto fail;
}
pReqMsg->basePeriod = nla_get_u32(tb[PARAM_BASE_PERIOD]);
- hddLog(LOG1, FL("Base Period %d"),
+ hdd_notice("Base Period %d",
pReqMsg->basePeriod);
/* Parse and fetch max AP per scan */
if (!tb[PARAM_MAX_AP_PER_SCAN]) {
- hddLog(LOGE, FL("attr max_ap_per_scan failed"));
+ hdd_err("attr max_ap_per_scan failed");
goto fail;
}
pReqMsg->maxAPperScan = nla_get_u32(tb[PARAM_MAX_AP_PER_SCAN]);
- hddLog(LOG1, FL("Max AP per Scan %d"), pReqMsg->maxAPperScan);
+ hdd_notice("Max AP per Scan %d", pReqMsg->maxAPperScan);
/* Parse and fetch report threshold percent */
if (!tb[PARAM_RPT_THRHLD_PERCENT]) {
- hddLog(LOGE, FL("attr report_threshold percent failed"));
+ hdd_err("attr report_threshold percent failed");
goto fail;
}
pReqMsg->report_threshold_percent = nla_get_u8(tb[PARAM_RPT_THRHLD_PERCENT]);
- hddLog(LOG1, FL("Report Threshold percent %d"),
+ hdd_notice("Report Threshold percent %d",
pReqMsg->report_threshold_percent);
/* Parse and fetch report threshold num scans */
if (!tb[PARAM_RPT_THRHLD_NUM_SCANS]) {
- hddLog(LOGE, FL("attr report_threshold num scans failed"));
+ hdd_err("attr report_threshold num scans failed");
goto fail;
}
pReqMsg->report_threshold_num_scans = nla_get_u8(tb[PARAM_RPT_THRHLD_NUM_SCANS]);
- hddLog(LOG1, FL("Report Threshold num scans %d"),
+ hdd_notice("Report Threshold num scans %d",
pReqMsg->report_threshold_num_scans);
/* Parse and fetch number of buckets */
if (!tb[PARAM_NUM_BUCKETS]) {
- hddLog(LOGE, FL("attr number of buckets failed"));
+ hdd_err("attr number of buckets failed");
goto fail;
}
num_buckets = nla_get_u8(tb[PARAM_NUM_BUCKETS]);
@@ -3234,11 +3226,11 @@ __wlan_hdd_cfg80211_extscan_start(struct wiphy *wiphy,
pReqMsg->extscan_adaptive_dwell_mode =
pHddCtx->config->extscan_adaptive_dwell_mode;
- hddLog(LOG1, FL("Configuration flags: %u"),
+ hdd_notice("Configuration flags: %u",
pReqMsg->configuration_flags);
if (!tb[QCA_WLAN_VENDOR_ATTR_EXTSCAN_BUCKET_SPEC]) {
- hddLog(LOGE, FL("attr bucket spec failed"));
+ hdd_err("attr bucket spec failed");
goto fail;
}
@@ -3253,13 +3245,12 @@ __wlan_hdd_cfg80211_extscan_start(struct wiphy *wiphy,
status = sme_ext_scan_start(pHddCtx->hHal, pReqMsg);
if (!QDF_IS_STATUS_SUCCESS(status)) {
- hddLog(LOGE,
- FL("sme_ext_scan_start failed(err=%d)"), status);
+ hdd_err("sme_ext_scan_start failed(err=%d)", status);
goto fail;
}
pHddCtx->ext_scan_start_since_boot = qdf_get_monotonic_boottime();
- hddLog(LOG1, FL("Timestamp since boot: %llu"),
+ hdd_notice("Timestamp since boot: %llu",
pHddCtx->ext_scan_start_since_boot);
/* request was sent -- wait for the response */
@@ -3267,7 +3258,7 @@ __wlan_hdd_cfg80211_extscan_start(struct wiphy *wiphy,
msecs_to_jiffies(WLAN_WAIT_TIME_EXTSCAN));
if (!rc) {
- hddLog(LOGE, FL("sme_ext_scan_start timed out"));
+ hdd_err("sme_ext_scan_start timed out");
retval = -ETIMEDOUT;
} else {
spin_lock(&context->context_lock);
@@ -3367,25 +3358,25 @@ __wlan_hdd_cfg80211_extscan_stop(struct wiphy *wiphy,
if (nla_parse(tb, PARAM_MAX, data, data_len,
wlan_hdd_extscan_config_policy)) {
- hddLog(LOGE, FL("Invalid ATTR"));
+ hdd_err("Invalid ATTR");
return -EINVAL;
}
pReqMsg = qdf_mem_malloc(sizeof(*pReqMsg));
if (!pReqMsg) {
- hddLog(LOGE, FL("qdf_mem_malloc failed"));
+ hdd_err("qdf_mem_malloc failed");
return -ENOMEM;
}
/* Parse and fetch request Id */
if (!tb[PARAM_REQUEST_ID]) {
- hddLog(LOGE, FL("attr request id failed"));
+ hdd_err("attr request id failed");
goto fail;
}
pReqMsg->requestId = nla_get_u32(tb[PARAM_REQUEST_ID]);
pReqMsg->sessionId = pAdapter->sessionId;
- hddLog(LOG1, FL("Req Id %d Session Id %d"),
+ hdd_notice("Req Id %d Session Id %d",
pReqMsg->requestId, pReqMsg->sessionId);
context = &ext_scan_context;
@@ -3396,8 +3387,7 @@ __wlan_hdd_cfg80211_extscan_stop(struct wiphy *wiphy,
status = sme_ext_scan_stop(pHddCtx->hHal, pReqMsg);
if (!QDF_IS_STATUS_SUCCESS(status)) {
- hddLog(LOGE,
- FL("sme_ext_scan_stop failed(err=%d)"), status);
+ hdd_err("sme_ext_scan_stop failed(err=%d)", status);
goto fail;
}
@@ -3406,7 +3396,7 @@ __wlan_hdd_cfg80211_extscan_stop(struct wiphy *wiphy,
msecs_to_jiffies(WLAN_WAIT_TIME_EXTSCAN));
if (!rc) {
- hddLog(LOGE, FL("sme_ext_scan_stop timed out"));
+ hdd_err("sme_ext_scan_stop timed out");
retval = -ETIMEDOUT;
} else {
spin_lock(&context->context_lock);
@@ -3494,19 +3484,19 @@ __wlan_hdd_cfg80211_extscan_reset_bssid_hotlist(struct wiphy *wiphy,
if (nla_parse(tb, QCA_WLAN_VENDOR_ATTR_EXTSCAN_SUBCMD_CONFIG_PARAM_MAX,
data, data_len, wlan_hdd_extscan_config_policy)) {
- hddLog(LOGE, FL("Invalid ATTR"));
+ hdd_err("Invalid ATTR");
return -EINVAL;
}
pReqMsg = qdf_mem_malloc(sizeof(*pReqMsg));
if (!pReqMsg) {
- hddLog(LOGE, FL("qdf_mem_malloc failed"));
+ hdd_err("qdf_mem_malloc failed");
return -ENOMEM;
}
/* Parse and fetch request Id */
if (!tb[QCA_WLAN_VENDOR_ATTR_EXTSCAN_SUBCMD_CONFIG_PARAM_REQUEST_ID]) {
- hddLog(LOGE, FL("attr request id failed"));
+ hdd_err("attr request id failed");
goto fail;
}
@@ -3514,7 +3504,7 @@ __wlan_hdd_cfg80211_extscan_reset_bssid_hotlist(struct wiphy *wiphy,
nla_get_u32(tb
[QCA_WLAN_VENDOR_ATTR_EXTSCAN_SUBCMD_CONFIG_PARAM_REQUEST_ID]);
pReqMsg->sessionId = pAdapter->sessionId;
- hddLog(LOG1, FL("Req Id %d Session Id %d"),
+ hdd_notice("Req Id %d Session Id %d",
pReqMsg->requestId, pReqMsg->sessionId);
context = &ext_scan_context;
@@ -3525,8 +3515,7 @@ __wlan_hdd_cfg80211_extscan_reset_bssid_hotlist(struct wiphy *wiphy,
status = sme_reset_bss_hotlist(pHddCtx->hHal, pReqMsg);
if (!QDF_IS_STATUS_SUCCESS(status)) {
- hddLog(LOGE,
- FL("sme_reset_bss_hotlist failed(err=%d)"), status);
+ hdd_err("sme_reset_bss_hotlist failed(err=%d)", status);
goto fail;
}
@@ -3535,7 +3524,7 @@ __wlan_hdd_cfg80211_extscan_reset_bssid_hotlist(struct wiphy *wiphy,
(&context->response_event,
msecs_to_jiffies(WLAN_WAIT_TIME_EXTSCAN));
if (!rc) {
- hddLog(LOGE, FL("sme_reset_bss_hotlist timed out"));
+ hdd_err("sme_reset_bss_hotlist timed out");
retval = -ETIMEDOUT;
} else {
spin_lock(&context->context_lock);
@@ -3619,19 +3608,19 @@ __wlan_hdd_cfg80211_extscan_reset_significant_change(struct wiphy
if (nla_parse(tb, QCA_WLAN_VENDOR_ATTR_EXTSCAN_SUBCMD_CONFIG_PARAM_MAX,
data, data_len, wlan_hdd_extscan_config_policy)) {
- hddLog(LOGE, FL("Invalid ATTR"));
+ hdd_err("Invalid ATTR");
return -EINVAL;
}
pReqMsg = qdf_mem_malloc(sizeof(*pReqMsg));
if (!pReqMsg) {
- hddLog(LOGE, FL("qdf_mem_malloc failed"));
+ hdd_err("qdf_mem_malloc failed");
return -ENOMEM;
}
/* Parse and fetch request Id */
if (!tb[QCA_WLAN_VENDOR_ATTR_EXTSCAN_SUBCMD_CONFIG_PARAM_REQUEST_ID]) {
- hddLog(LOGE, FL("attr request id failed"));
+ hdd_err("attr request id failed");
goto fail;
}
@@ -3639,7 +3628,7 @@ __wlan_hdd_cfg80211_extscan_reset_significant_change(struct wiphy
nla_get_u32(tb
[QCA_WLAN_VENDOR_ATTR_EXTSCAN_SUBCMD_CONFIG_PARAM_REQUEST_ID]);
pReqMsg->sessionId = pAdapter->sessionId;
- hddLog(LOG1, FL("Req Id %d Session Id %d"),
+ hdd_notice("Req Id %d Session Id %d",
pReqMsg->requestId, pReqMsg->sessionId);
context = &ext_scan_context;
@@ -3650,7 +3639,7 @@ __wlan_hdd_cfg80211_extscan_reset_significant_change(struct wiphy
status = sme_reset_significant_change(pHddCtx->hHal, pReqMsg);
if (!QDF_IS_STATUS_SUCCESS(status)) {
- hddLog(LOGE, FL("sme_reset_significant_change failed(err=%d)"),
+ hdd_err("sme_reset_significant_change failed(err=%d)",
status);
qdf_mem_free(pReqMsg);
return -EINVAL;
@@ -3661,7 +3650,7 @@ __wlan_hdd_cfg80211_extscan_reset_significant_change(struct wiphy
msecs_to_jiffies(WLAN_WAIT_TIME_EXTSCAN));
if (!rc) {
- hddLog(LOGE, FL("sme_ResetSignificantChange timed out"));
+ hdd_err("sme_ResetSignificantChange timed out");
retval = -ETIMEDOUT;
} else {
spin_lock(&context->context_lock);
@@ -3733,13 +3722,13 @@ static int hdd_extscan_epno_fill_network_list(
if (nla_parse(network,
QCA_WLAN_VENDOR_ATTR_EXTSCAN_SUBCMD_CONFIG_PARAM_MAX,
nla_data(networks), nla_len(networks), NULL)) {
- hddLog(LOGE, FL("nla_parse failed"));
+ hdd_err("nla_parse failed");
return -EINVAL;
}
/* Parse and fetch ssid */
if (!network[QCA_WLAN_VENDOR_ATTR_PNO_SET_LIST_PARAM_EPNO_NETWORK_SSID]) {
- hddLog(LOGE, FL("attr network ssid failed"));
+ hdd_err("attr network ssid failed");
return -EINVAL;
}
ssid_len = nla_len(
@@ -3749,41 +3738,41 @@ static int hdd_extscan_epno_fill_network_list(
ssid_len--;
req_msg->networks[index].ssid.length = ssid_len;
- hddLog(LOG1, FL("network ssid length %d"), ssid_len);
+ hdd_notice("network ssid length %d", ssid_len);
ssid = nla_data(network[QCA_WLAN_VENDOR_ATTR_PNO_SET_LIST_PARAM_EPNO_NETWORK_SSID]);
qdf_mem_copy(req_msg->networks[index].ssid.ssId,
ssid, ssid_len);
- hddLog(LOG1, FL("Ssid (%.*s)"),
+ hdd_notice("Ssid (%.*s)",
req_msg->networks[index].ssid.length,
req_msg->networks[index].ssid.ssId);
/* Parse and fetch rssi threshold */
if (!network[QCA_WLAN_VENDOR_ATTR_PNO_SET_LIST_PARAM_EPNO_NETWORK_RSSI_THRESHOLD]) {
- hddLog(LOGE, FL("attr rssi threshold failed"));
+ hdd_err("attr rssi threshold failed");
return -EINVAL;
}
req_msg->networks[index].rssi_threshold = nla_get_s8(
network[QCA_WLAN_VENDOR_ATTR_PNO_SET_LIST_PARAM_EPNO_NETWORK_RSSI_THRESHOLD]);
- hddLog(LOG1, FL("rssi threshold %d"),
+ hdd_notice("rssi threshold %d",
req_msg->networks[index].rssi_threshold);
/* Parse and fetch epno flags */
if (!network[QCA_WLAN_VENDOR_ATTR_PNO_SET_LIST_PARAM_EPNO_NETWORK_FLAGS]) {
- hddLog(LOGE, FL("attr epno flags failed"));
+ hdd_err("attr epno flags failed");
return -EINVAL;
}
req_msg->networks[index].flags = nla_get_u8(
network[QCA_WLAN_VENDOR_ATTR_PNO_SET_LIST_PARAM_EPNO_NETWORK_FLAGS]);
- hddLog(LOG1, FL("flags %u"), req_msg->networks[index].flags);
+ hdd_notice("flags %u", req_msg->networks[index].flags);
/* Parse and fetch auth bit */
if (!network[QCA_WLAN_VENDOR_ATTR_PNO_SET_LIST_PARAM_EPNO_NETWORK_AUTH_BIT]) {
- hddLog(LOGE, FL("attr auth bit failed"));
+ hdd_err("attr auth bit failed");
return -EINVAL;
}
req_msg->networks[index].auth_bit_field = nla_get_u8(
network[QCA_WLAN_VENDOR_ATTR_PNO_SET_LIST_PARAM_EPNO_NETWORK_AUTH_BIT]);
- hddLog(LOG1, FL("auth bit %u"),
+ hdd_notice("auth bit %u",
req_msg->networks[index].auth_bit_field);
index++;
@@ -3832,24 +3821,24 @@ static int __wlan_hdd_cfg80211_set_epno_list(struct wiphy *wiphy,
if (nla_parse(tb, QCA_WLAN_VENDOR_ATTR_PNO_MAX,
data, data_len,
wlan_hdd_extscan_config_policy)) {
- hddLog(LOGE, FL("Invalid ATTR"));
+ hdd_err("Invalid ATTR");
return -EINVAL;
}
/* Parse and fetch number of networks */
if (!tb[QCA_WLAN_VENDOR_ATTR_PNO_SET_LIST_PARAM_NUM_NETWORKS]) {
- hddLog(LOGE, FL("attr num networks failed"));
+ hdd_err("attr num networks failed");
return -EINVAL;
}
num_networks = nla_get_u32(
tb[QCA_WLAN_VENDOR_ATTR_PNO_SET_LIST_PARAM_NUM_NETWORKS]);
- hddLog(LOG1, FL("num networks %u"), num_networks);
+ hdd_notice("num networks %u", num_networks);
len = sizeof(*req_msg) +
(num_networks * sizeof(struct wifi_epno_network));
req_msg = qdf_mem_malloc(len);
if (!req_msg) {
- hddLog(LOGE, FL("qdf_mem_malloc failed"));
+ hdd_err("qdf_mem_malloc failed");
return -ENOMEM;
}
qdf_mem_zero(req_msg, len);
@@ -3857,22 +3846,22 @@ static int __wlan_hdd_cfg80211_set_epno_list(struct wiphy *wiphy,
/* Parse and fetch request Id */
if (!tb[QCA_WLAN_VENDOR_ATTR_EXTSCAN_SUBCMD_CONFIG_PARAM_REQUEST_ID]) {
- hddLog(LOGE, FL("attr request id failed"));
+ hdd_err("attr request id failed");
goto fail;
}
req_msg->request_id = nla_get_u32(
tb[QCA_WLAN_VENDOR_ATTR_EXTSCAN_SUBCMD_CONFIG_PARAM_REQUEST_ID]);
- hddLog(LOG1, FL("Req Id %u"), req_msg->request_id);
+ hdd_notice("Req Id %u", req_msg->request_id);
req_msg->session_id = adapter->sessionId;
- hddLog(LOG1, FL("Session Id %d"), req_msg->session_id);
+ hdd_notice("Session Id %d", req_msg->session_id);
if (hdd_extscan_epno_fill_network_list(hdd_ctx, req_msg, tb))
goto fail;
status = sme_set_epno_list(hdd_ctx->hHal, req_msg);
if (!QDF_IS_STATUS_SUCCESS(status)) {
- hddLog(LOGE, FL("sme_set_epno_list failed(err=%d)"), status);
+ hdd_err("sme_set_epno_list failed(err=%d)", status);
goto fail;
}
@@ -3940,55 +3929,55 @@ static int hdd_extscan_passpoint_fill_network_list(
if (nla_parse(network,
QCA_WLAN_VENDOR_ATTR_PNO_MAX,
nla_data(networks), nla_len(networks), NULL)) {
- hddLog(LOGE, FL("nla_parse failed"));
+ hdd_err("nla_parse failed");
return -EINVAL;
}
/* Parse and fetch identifier */
if (!network[QCA_WLAN_VENDOR_ATTR_PNO_PASSPOINT_NETWORK_PARAM_ID]) {
- hddLog(LOGE, FL("attr passpoint id failed"));
+ hdd_err("attr passpoint id failed");
return -EINVAL;
}
req_msg->networks[index].id = nla_get_u32(
network[QCA_WLAN_VENDOR_ATTR_PNO_PASSPOINT_NETWORK_PARAM_ID]);
- hddLog(LOG1, FL("Id %u"), req_msg->networks[index].id);
+ hdd_notice("Id %u", req_msg->networks[index].id);
/* Parse and fetch realm */
if (!network[QCA_WLAN_VENDOR_ATTR_PNO_PASSPOINT_NETWORK_PARAM_REALM]) {
- hddLog(LOGE, FL("attr realm failed"));
+ hdd_err("attr realm failed");
return -EINVAL;
}
len = nla_len(
network[QCA_WLAN_VENDOR_ATTR_PNO_PASSPOINT_NETWORK_PARAM_REALM]);
if (len < 0 || len > SIR_PASSPOINT_REALM_LEN) {
- hddLog(LOGE, FL("Invalid realm size %d"), len);
+ hdd_err("Invalid realm size %d", len);
return -EINVAL;
}
qdf_mem_copy(req_msg->networks[index].realm,
nla_data(network[QCA_WLAN_VENDOR_ATTR_PNO_PASSPOINT_NETWORK_PARAM_REALM]),
len);
- hddLog(LOG1, FL("realm len %d"), len);
- hddLog(LOG1, FL("realm: %s"), req_msg->networks[index].realm);
+ hdd_notice("realm len %d", len);
+ hdd_notice("realm: %s", req_msg->networks[index].realm);
/* Parse and fetch roaming consortium ids */
if (!network[QCA_WLAN_VENDOR_ATTR_PNO_PASSPOINT_NETWORK_PARAM_ROAM_CNSRTM_ID]) {
- hddLog(LOGE, FL("attr roaming consortium ids failed"));
+ hdd_err("attr roaming consortium ids failed");
return -EINVAL;
}
nla_memcpy(&req_msg->networks[index].roaming_consortium_ids,
network[QCA_WLAN_VENDOR_ATTR_PNO_PASSPOINT_NETWORK_PARAM_ROAM_CNSRTM_ID],
sizeof(req_msg->networks[0].roaming_consortium_ids));
- hddLog(LOG1, FL("roaming consortium ids"));
+ hdd_notice("roaming consortium ids");
/* Parse and fetch plmn */
if (!network[QCA_WLAN_VENDOR_ATTR_PNO_PASSPOINT_NETWORK_PARAM_ROAM_PLMN]) {
- hddLog(LOGE, FL("attr plmn failed"));
+ hdd_err("attr plmn failed");
return -EINVAL;
}
nla_memcpy(&req_msg->networks[index].plmn,
network[QCA_WLAN_VENDOR_ATTR_PNO_PASSPOINT_NETWORK_PARAM_ROAM_PLMN],
SIR_PASSPOINT_PLMN_LEN);
- hddLog(LOG1, FL("plmn %02x:%02x:%02x)"),
+ hdd_notice("plmn %02x:%02x:%02x)",
req_msg->networks[index].plmn[0],
req_msg->networks[index].plmn[1],
req_msg->networks[index].plmn[2]);
@@ -4037,37 +4026,37 @@ static int __wlan_hdd_cfg80211_set_passpoint_list(struct wiphy *wiphy,
if (nla_parse(tb, QCA_WLAN_VENDOR_ATTR_PNO_MAX, data, data_len,
wlan_hdd_extscan_config_policy)) {
- hddLog(LOGE, FL("Invalid ATTR"));
+ hdd_err("Invalid ATTR");
return -EINVAL;
}
/* Parse and fetch number of networks */
if (!tb[QCA_WLAN_VENDOR_ATTR_PNO_PASSPOINT_LIST_PARAM_NUM]) {
- hddLog(LOGE, FL("attr num networks failed"));
+ hdd_err("attr num networks failed");
return -EINVAL;
}
num_networks = nla_get_u32(
tb[QCA_WLAN_VENDOR_ATTR_PNO_PASSPOINT_LIST_PARAM_NUM]);
- hddLog(LOG1, FL("num networks %u"), num_networks);
+ hdd_notice("num networks %u", num_networks);
req_msg = qdf_mem_malloc(sizeof(*req_msg) +
(num_networks * sizeof(req_msg->networks[0])));
if (!req_msg) {
- hddLog(LOGE, FL("qdf_mem_malloc failed"));
+ hdd_err("qdf_mem_malloc failed");
return -ENOMEM;
}
req_msg->num_networks = num_networks;
/* Parse and fetch request Id */
if (!tb[QCA_WLAN_VENDOR_ATTR_EXTSCAN_SUBCMD_CONFIG_PARAM_REQUEST_ID]) {
- hddLog(LOGE, FL("attr request id failed"));
+ hdd_err("attr request id failed");
goto fail;
}
req_msg->request_id = nla_get_u32(
tb[QCA_WLAN_VENDOR_ATTR_EXTSCAN_SUBCMD_CONFIG_PARAM_REQUEST_ID]);
req_msg->session_id = adapter->sessionId;
- hddLog(LOG1, FL("Req Id %u Session Id %d"), req_msg->request_id,
+ hdd_notice("Req Id %u Session Id %d", req_msg->request_id,
req_msg->session_id);
if (hdd_extscan_passpoint_fill_network_list(hdd_ctx, req_msg, tb))
@@ -4075,8 +4064,7 @@ static int __wlan_hdd_cfg80211_set_passpoint_list(struct wiphy *wiphy,
status = sme_set_passpoint_list(hdd_ctx->hHal, req_msg);
if (!QDF_IS_STATUS_SUCCESS(status)) {
- hddLog(LOGE,
- FL("sme_set_passpoint_list failed(err=%d)"), status);
+ hdd_err("sme_set_passpoint_list failed(err=%d)", status);
goto fail;
}
@@ -4153,32 +4141,31 @@ static int __wlan_hdd_cfg80211_reset_passpoint_list(struct wiphy *wiphy,
if (nla_parse(tb, QCA_WLAN_VENDOR_ATTR_PNO_MAX, data, data_len,
wlan_hdd_extscan_config_policy)) {
- hddLog(LOGE, FL("Invalid ATTR"));
+ hdd_err("Invalid ATTR");
return -EINVAL;
}
req_msg = qdf_mem_malloc(sizeof(*req_msg));
if (!req_msg) {
- hddLog(LOGE, FL("qdf_mem_malloc failed"));
+ hdd_err("qdf_mem_malloc failed");
return -ENOMEM;
}
/* Parse and fetch request Id */
if (!tb[QCA_WLAN_VENDOR_ATTR_EXTSCAN_SUBCMD_CONFIG_PARAM_REQUEST_ID]) {
- hddLog(LOGE, FL("attr request id failed"));
+ hdd_err("attr request id failed");
goto fail;
}
req_msg->request_id = nla_get_u32(
tb[QCA_WLAN_VENDOR_ATTR_EXTSCAN_SUBCMD_CONFIG_PARAM_REQUEST_ID]);
req_msg->session_id = adapter->sessionId;
- hddLog(LOG1, FL("Req Id %u Session Id %d"),
+ hdd_notice("Req Id %u Session Id %d",
req_msg->request_id, req_msg->session_id);
status = sme_reset_passpoint_list(hdd_ctx->hHal, req_msg);
if (!QDF_IS_STATUS_SUCCESS(status)) {
- hddLog(LOGE,
- FL("sme_reset_passpoint_list failed(err=%d)"), status);
+ hdd_err("sme_reset_passpoint_list failed(err=%d)", status);
goto fail;
}
@@ -4284,70 +4271,69 @@ __wlan_hdd_cfg80211_extscan_set_ssid_hotlist(struct wiphy *wiphy,
if (nla_parse(tb, PARAM_MAX,
data, data_len,
wlan_hdd_extscan_config_policy)) {
- hddLog(LOGE, FL("Invalid ATTR"));
+ hdd_err("Invalid ATTR");
return -EINVAL;
}
request = qdf_mem_malloc(sizeof(*request));
if (!request) {
- hddLog(LOGE, FL("qdf_mem_malloc failed"));
+ hdd_err("qdf_mem_malloc failed");
return -ENOMEM;
}
/* Parse and fetch request Id */
if (!tb[PARAM_REQUEST_ID]) {
- hddLog(LOGE, FL("attr request id failed"));
+ hdd_err("attr request id failed");
goto fail;
}
request->request_id = nla_get_u32(tb[PARAM_REQUEST_ID]);
- hddLog(LOG1, FL("Request Id %d"), request->request_id);
+ hdd_notice("Request Id %d", request->request_id);
/* Parse and fetch lost SSID sample size */
if (!tb[PARAMS_LOST_SSID_SAMPLE_SIZE]) {
- hddLog(LOGE, FL("attr number of Ssid failed"));
+ hdd_err("attr number of Ssid failed");
goto fail;
}
request->lost_ssid_sample_size =
nla_get_u32(tb[PARAMS_LOST_SSID_SAMPLE_SIZE]);
- hddLog(LOG1, FL("Lost SSID Sample Size %d"),
+ hdd_notice("Lost SSID Sample Size %d",
request->lost_ssid_sample_size);
/* Parse and fetch number of hotlist SSID */
if (!tb[PARAMS_NUM_SSID]) {
- hddLog(LOGE, FL("attr number of Ssid failed"));
+ hdd_err("attr number of Ssid failed");
goto fail;
}
request->ssid_count = nla_get_u32(tb[PARAMS_NUM_SSID]);
- hddLog(LOG1, FL("Number of SSID %d"), request->ssid_count);
+ hdd_notice("Number of SSID %d", request->ssid_count);
request->session_id = adapter->sessionId;
- hddLog(LOG1, FL("Session Id %d"), request->session_id);
+ hdd_notice("Session Id %d", request->session_id);
i = 0;
nla_for_each_nested(ssids, tb[THRESHOLD_PARAM], rem) {
if (i >= WLAN_EXTSCAN_MAX_HOTLIST_SSIDS) {
- hddLog(LOGE,
- FL("Too Many SSIDs, %d exceeds %d"),
+ hdd_err("Too Many SSIDs, %d exceeds %d",
i, WLAN_EXTSCAN_MAX_HOTLIST_SSIDS);
break;
}
if (nla_parse(tb2, PARAM_MAX,
nla_data(ssids), nla_len(ssids),
wlan_hdd_extscan_config_policy)) {
- hddLog(LOGE, FL("nla_parse failed"));
+ hdd_err("nla_parse failed");
goto fail;
}
/* Parse and fetch SSID */
if (!tb2[PARAM_SSID]) {
- hddLog(LOGE, FL("attr ssid failed"));
+ hdd_err("attr ssid failed");
goto fail;
}
nla_memcpy(ssid_string,
tb2[PARAM_SSID],
sizeof(ssid_string));
- hddLog(LOG1, FL("SSID %s"),
+ hdd_notice("SSID %s",
ssid_string);
ssid_len = strlen(ssid_string);
memcpy(request->ssids[i].ssid.ssId, ssid_string, ssid_len);
@@ -4355,27 +4341,27 @@ __wlan_hdd_cfg80211_extscan_set_ssid_hotlist(struct wiphy *wiphy,
/* Parse and fetch low RSSI */
if (!tb2[PARAM_BAND]) {
- hddLog(LOGE, FL("attr band failed"));
+ hdd_err("attr band failed");
goto fail;
}
request->ssids[i].band = nla_get_u8(tb2[PARAM_BAND]);
- hddLog(LOG1, FL("band %d"), request->ssids[i].band);
+ hdd_notice("band %d", request->ssids[i].band);
/* Parse and fetch low RSSI */
if (!tb2[PARAM_RSSI_LOW]) {
- hddLog(LOGE, FL("attr low RSSI failed"));
+ hdd_err("attr low RSSI failed");
goto fail;
}
request->ssids[i].rssi_low = nla_get_s32(tb2[PARAM_RSSI_LOW]);
- hddLog(LOG1, FL("RSSI low %d"), request->ssids[i].rssi_low);
+ hdd_notice("RSSI low %d", request->ssids[i].rssi_low);
/* Parse and fetch high RSSI */
if (!tb2[PARAM_RSSI_HIGH]) {
- hddLog(LOGE, FL("attr high RSSI failed"));
+ hdd_err("attr high RSSI failed");
goto fail;
}
request->ssids[i].rssi_high = nla_get_u32(tb2[PARAM_RSSI_HIGH]);
- hddLog(LOG1, FL("RSSI high %d"), request->ssids[i].rssi_high);
+ hdd_notice("RSSI high %d", request->ssids[i].rssi_high);
i++;
}
@@ -4387,8 +4373,7 @@ __wlan_hdd_cfg80211_extscan_set_ssid_hotlist(struct wiphy *wiphy,
status = sme_set_ssid_hotlist(hdd_ctx->hHal, request);
if (!QDF_IS_STATUS_SUCCESS(status)) {
- hddLog(LOGE,
- FL("sme_set_ssid_hotlist failed(err=%d)"), status);
+ hdd_err("sme_set_ssid_hotlist failed(err=%d)", status);
goto fail;
}
@@ -4399,7 +4384,7 @@ __wlan_hdd_cfg80211_extscan_set_ssid_hotlist(struct wiphy *wiphy,
msecs_to_jiffies
(WLAN_WAIT_TIME_EXTSCAN));
if (!rc) {
- hddLog(LOGE, FL("sme_set_ssid_hotlist timed out"));
+ hdd_err("sme_set_ssid_hotlist timed out");
retval = -ETIMEDOUT;
} else {
spin_lock(&context->context_lock);
@@ -4504,27 +4489,27 @@ __wlan_hdd_cfg80211_extscan_reset_ssid_hotlist(struct wiphy *wiphy,
if (nla_parse(tb, PARAM_MAX,
data, data_len,
wlan_hdd_extscan_config_policy)) {
- hddLog(LOGE, FL("Invalid ATTR"));
+ hdd_err("Invalid ATTR");
return -EINVAL;
}
request = qdf_mem_malloc(sizeof(*request));
if (!request) {
- hddLog(LOGE, FL("qdf_mem_malloc failed"));
+ hdd_err("qdf_mem_malloc failed");
return -ENOMEM;
}
/* Parse and fetch request Id */
if (!tb[PARAM_REQUEST_ID]) {
- hddLog(LOGE, FL("attr request id failed"));
+ hdd_err("attr request id failed");
goto fail;
}
request->request_id = nla_get_u32(tb[PARAM_REQUEST_ID]);
- hddLog(LOG1, FL("Request Id %d"), request->request_id);
+ hdd_notice("Request Id %d", request->request_id);
request->session_id = adapter->sessionId;
- hddLog(LOG1, FL("Session Id %d"), request->session_id);
+ hdd_notice("Session Id %d", request->session_id);
request->lost_ssid_sample_size = 0;
request->ssid_count = 0;
@@ -4537,8 +4522,7 @@ __wlan_hdd_cfg80211_extscan_reset_ssid_hotlist(struct wiphy *wiphy,
status = sme_set_ssid_hotlist(hdd_ctx->hHal, request);
if (!QDF_IS_STATUS_SUCCESS(status)) {
- hddLog(LOGE,
- FL("sme_reset_ssid_hotlist failed(err=%d)"), status);
+ hdd_err("sme_reset_ssid_hotlist failed(err=%d)", status);
goto fail;
}
@@ -4549,7 +4533,7 @@ __wlan_hdd_cfg80211_extscan_reset_ssid_hotlist(struct wiphy *wiphy,
msecs_to_jiffies
(WLAN_WAIT_TIME_EXTSCAN));
if (!rc) {
- hddLog(LOGE, FL("sme_reset_ssid_hotlist timed out"));
+ hdd_err("sme_reset_ssid_hotlist timed out");
retval = -ETIMEDOUT;
} else {
spin_lock(&context->context_lock);
diff --git a/core/hdd/src/wlan_hdd_hostapd.c b/core/hdd/src/wlan_hdd_hostapd.c
index 1a33d7fb1fab..999144621acb 100644
--- a/core/hdd/src/wlan_hdd_hostapd.c
+++ b/core/hdd/src/wlan_hdd_hostapd.c
@@ -1971,10 +1971,6 @@ int hdd_softap_set_channel_change(struct net_device *dev, int target_channel,
}
}
- if (qdf_atomic_read(&pHddCtx->dfs_radar_found)) {
- hdd_err("Channel switch in progress!!");
- return -EBUSY;
- }
/*
* Set the dfs_radar_found flag to mimic channel change
* when a radar is found. This will enable synchronizing
@@ -1984,7 +1980,11 @@ int hdd_softap_set_channel_change(struct net_device *dev, int target_channel,
* once the channel change is completed and SAP will
* post eSAP_START_BSS_EVENT success event to HDD.
*/
- qdf_atomic_set(&pHddCtx->dfs_radar_found, 1);
+ if (qdf_atomic_inc_return(&pHddCtx->dfs_radar_found) > 1) {
+ hdd_err("Channel switch in progress!!");
+ return -EBUSY;
+ }
+
/*
* Post the Channel Change request to SAP.
*/
@@ -2794,19 +2794,21 @@ static __iw_softap_setparam(struct net_device *dev,
(WLAN_HDD_GET_AP_CTX_PTR(pHostapdAdapter))->
operatingChannel;
bool isDfsch;
+ int32_t dfs_radar_found;
isDfsch = (CHANNEL_STATE_DFS ==
cds_get_channel_state(ch));
hdd_notice("Set QCASAP_SET_RADAR_CMD val %d", set_value);
- if (!qdf_atomic_read(&pHddCtx->dfs_radar_found) && isDfsch) {
+ dfs_radar_found = qdf_atomic_read(&pHddCtx->dfs_radar_found);
+ if (!dfs_radar_found && isDfsch) {
ret = wma_cli_set_command(pHostapdAdapter->sessionId,
WMA_VDEV_DFS_CONTROL_CMDID,
set_value, VDEV_CMD);
} else {
hdd_err("Ignore, radar_found: %d, dfs_channel: %d",
- qdf_atomic_read(&pHddCtx->dfs_radar_found), isDfsch);
+ dfs_radar_found, isDfsch);
}
break;
}
@@ -6434,12 +6436,15 @@ static int wlan_hdd_set_channel(struct wiphy *wiphy,
*/
channel = ieee80211_frequency_to_channel(chandef->chan->center_freq);
+
if (NL80211_CHAN_WIDTH_80P80 == chandef->width ||
- NL80211_CHAN_WIDTH_160 == chandef->width)
- channel_seg2 =
- ieee80211_frequency_to_channel(chandef->center_freq2);
- else
- channel_seg2 = 0;
+ NL80211_CHAN_WIDTH_160 == chandef->width) {
+ if (chandef->center_freq2)
+ channel_seg2 = ieee80211_frequency_to_channel(
+ chandef->center_freq2);
+ else
+ hdd_err("Invalid center_freq2");
+ }
/* Check freq range */
if ((WNI_CFG_CURRENT_CHANNEL_STAMIN > channel) ||
diff --git a/core/hdd/src/wlan_hdd_main.c b/core/hdd/src/wlan_hdd_main.c
index 61fb4b396fb4..967d84747e8f 100644
--- a/core/hdd/src/wlan_hdd_main.c
+++ b/core/hdd/src/wlan_hdd_main.c
@@ -1426,7 +1426,7 @@ bool hdd_dfs_indicate_radar(void *context, void *param)
return true;
if (true == hdd_radar_event->dfs_radar_status) {
- if (qdf_atomic_read(&hdd_ctx->dfs_radar_found)) {
+ if (qdf_atomic_inc_return(&hdd_ctx->dfs_radar_found) > 1) {
/*
* Application already triggered channel switch
* on current channel, so return here.
@@ -1434,8 +1434,6 @@ bool hdd_dfs_indicate_radar(void *context, void *param)
return false;
}
- qdf_atomic_set(&hdd_ctx->dfs_radar_found, 1);
-
status = hdd_get_front_adapter(hdd_ctx, &adapterNode);
while (NULL != adapterNode && QDF_STATUS_SUCCESS == status) {
adapter = adapterNode->pAdapter;
diff --git a/core/hdd/src/wlan_hdd_power.c b/core/hdd/src/wlan_hdd_power.c
index f0472e76d8f9..b0ff6cd6b5a8 100644
--- a/core/hdd/src/wlan_hdd_power.c
+++ b/core/hdd/src/wlan_hdd_power.c
@@ -924,11 +924,12 @@ void wlan_hdd_set_mc_addr_list(hdd_adapter_t *pAdapter, uint8_t set)
tpSirRcvFltMcAddrList pMulticastAddrs = NULL;
tHalHandle hHal = NULL;
hdd_context_t *pHddCtx = (hdd_context_t *) pAdapter->pHddCtx;
+ hdd_station_ctx_t *sta_ctx = WLAN_HDD_GET_STATION_CTX_PTR(pAdapter);
- if (NULL == pHddCtx) {
- hdd_err("HDD CTX is NULL");
+ ENTER();
+
+ if (wlan_hdd_validate_context(pHddCtx))
return;
- }
hHal = pHddCtx->hHal;
@@ -937,8 +938,12 @@ void wlan_hdd_set_mc_addr_list(hdd_adapter_t *pAdapter, uint8_t set)
return;
}
- /* Check if INI is enabled or not, other wise just return
- */
+ if (!sta_ctx) {
+ hdd_err("sta_ctx is NULL");
+ return;
+ }
+
+ /* Check if INI is enabled or not, other wise just return */
if (!pHddCtx->config->fEnableMCAddrList) {
hdd_notice("gMCAddrListEnable is not enabled in INI");
return;
@@ -952,23 +957,24 @@ void wlan_hdd_set_mc_addr_list(hdd_adapter_t *pAdapter, uint8_t set)
pMulticastAddrs->action = set;
if (set) {
- /* Following pre-conditions should be satisfied before we
+ /*
+ * Following pre-conditions should be satisfied before we
* configure the MC address list.
*/
- if (((pAdapter->device_mode == QDF_STA_MODE)
- || (pAdapter->device_mode == QDF_P2P_CLIENT_MODE))
- && pAdapter->mc_addr_list.mc_cnt
- && (eConnectionState_Associated ==
- (WLAN_HDD_GET_STATION_CTX_PTR(pAdapter))->
- conn_info.connState)) {
+ if (pAdapter->mc_addr_list.mc_cnt &&
+ (((pAdapter->device_mode == QDF_STA_MODE ||
+ pAdapter->device_mode == QDF_P2P_CLIENT_MODE) &&
+ hdd_conn_is_connected(sta_ctx)) ||
+ (WLAN_HDD_IS_NDI(pAdapter) &&
+ WLAN_HDD_IS_NDI_CONNECTED(pAdapter)))) {
+
pMulticastAddrs->ulMulticastAddrCnt =
pAdapter->mc_addr_list.mc_cnt;
- for (i = 0; i < pAdapter->mc_addr_list.mc_cnt;
- i++) {
+
+ for (i = 0; i < pAdapter->mc_addr_list.mc_cnt; i++) {
memcpy(pMulticastAddrs->multicastAddr[i].bytes,
pAdapter->mc_addr_list.addr[i],
- sizeof(pAdapter->mc_addr_list.
- addr[i]));
+ sizeof(pAdapter->mc_addr_list.addr[i]));
hdd_info("%s multicast filter: addr ="
MAC_ADDRESS_STR,
set ? "setting" : "clearing",
@@ -984,12 +990,10 @@ void wlan_hdd_set_mc_addr_list(hdd_adapter_t *pAdapter, uint8_t set)
if (pAdapter->mc_addr_list.isFilterApplied) {
pMulticastAddrs->ulMulticastAddrCnt =
pAdapter->mc_addr_list.mc_cnt;
- for (i = 0; i < pAdapter->mc_addr_list.mc_cnt;
- i++) {
+ for (i = 0; i < pAdapter->mc_addr_list.mc_cnt; i++) {
memcpy(pMulticastAddrs->multicastAddr[i].bytes,
pAdapter->mc_addr_list.addr[i],
- sizeof(pAdapter->mc_addr_list.
- addr[i]));
+ sizeof(pAdapter->mc_addr_list.addr[i]));
}
sme_8023_multicast_list(hHal, pAdapter->sessionId,
pMulticastAddrs);
@@ -1003,6 +1007,8 @@ void wlan_hdd_set_mc_addr_list(hdd_adapter_t *pAdapter, uint8_t set)
pAdapter->mc_addr_list.isFilterApplied = set ? true : false;
qdf_mem_free(pMulticastAddrs);
+
+ EXIT();
return;
}
#endif
diff --git a/core/hdd/src/wlan_hdd_scan.c b/core/hdd/src/wlan_hdd_scan.c
index 577a069090e2..0e641ffc09a3 100644
--- a/core/hdd/src/wlan_hdd_scan.c
+++ b/core/hdd/src/wlan_hdd_scan.c
@@ -531,6 +531,7 @@ static bool wlan_hdd_is_scan_pending(hdd_adapter_t *adapter)
/* Any scan pending on the adapter */
if (adapter == hdd_scan_req->adapter) {
qdf_spin_unlock(&hdd_ctx->hdd_scan_req_q_lock);
+ hdd_info("pending scan id %d", hdd_scan_req->scan_id);
return true;
}
} while (QDF_STATUS_SUCCESS ==
@@ -635,13 +636,15 @@ QDF_STATUS wlan_hdd_scan_request_dequeue(hdd_context_t *hdd_ctx,
*timestamp = hdd_scan_req->timestamp;
qdf_mem_free(hdd_scan_req);
qdf_spin_unlock(&hdd_ctx->hdd_scan_req_q_lock);
- hdd_info("removed Scan id: %d, req = %p",
- scan_id, req);
+ hdd_info("removed Scan id: %d, req = %p, pending scans %d",
+ scan_id, req,
+ qdf_list_size(&hdd_ctx->hdd_scan_req_q));
return QDF_STATUS_SUCCESS;
} else {
qdf_spin_unlock(&hdd_ctx->hdd_scan_req_q_lock);
- hdd_err("Failed to remove node scan id %d",
- scan_id);
+ hdd_err("Failed to remove node scan id %d, pending scans %d",
+ scan_id,
+ qdf_list_size(&hdd_ctx->hdd_scan_req_q));
return status;
}
}
diff --git a/core/hdd/src/wlan_hdd_tdls.c b/core/hdd/src/wlan_hdd_tdls.c
index 5b107bb50b9d..a96d9c5079e2 100644
--- a/core/hdd/src/wlan_hdd_tdls.c
+++ b/core/hdd/src/wlan_hdd_tdls.c
@@ -641,6 +641,24 @@ void hdd_tdls_context_init(hdd_context_t *hdd_ctx)
{
mutex_init(&hdd_ctx->tdls_lock);
qdf_spinlock_create(&hdd_ctx->tdls_ct_spinlock);
+
+ /* initialize TDLS global context */
+ hdd_ctx->connected_peer_count = 0;
+ hdd_ctx->tdls_nss_switch_in_progress = false;
+ hdd_ctx->tdls_teardown_peers_cnt = 0;
+ hdd_ctx->tdls_scan_ctxt.magic = 0;
+ hdd_ctx->tdls_scan_ctxt.attempt = 0;
+ hdd_ctx->tdls_scan_ctxt.reject = 0;
+ hdd_ctx->tdls_scan_ctxt.scan_request = NULL;
+ hdd_ctx->tdls_external_peer_count = 0;
+ hdd_ctx->set_state_info.set_state_cnt = 0;
+ hdd_ctx->set_state_info.vdev_id = 0;
+
+ /* This flag will set be true, only when device operates in
+ * standalone STA mode
+ */
+ hdd_ctx->enable_tdls_connection_tracker = false;
+ hdd_ctx->concurrency_marked = false;
}
/**
@@ -653,6 +671,9 @@ void hdd_tdls_context_init(hdd_context_t *hdd_ctx)
*/
void hdd_tdls_context_destroy(hdd_context_t *hdd_ctx)
{
+ hdd_ctx->tdls_external_peer_count = 0;
+ hdd_ctx->concurrency_marked = false;
+ hdd_ctx->enable_tdls_connection_tracker = false;
mutex_destroy(&hdd_ctx->tdls_lock);
qdf_spinlock_destroy(&hdd_ctx->tdls_ct_spinlock);
}
@@ -670,11 +691,12 @@ int wlan_hdd_tdls_init(hdd_adapter_t *pAdapter)
int i;
uint8_t staIdx;
tdlsInfo_t *tInfo;
- QDF_STATUS qdf_ret_status = QDF_STATUS_E_FAILURE;
if (NULL == pHddCtx)
return -EINVAL;
+ ENTER();
+
mutex_lock(&pHddCtx->tdls_lock);
if (false == pHddCtx->config->fEnableTDLSSupport) {
@@ -741,18 +763,9 @@ int wlan_hdd_tdls_init(hdd_adapter_t *pAdapter)
pHddCtx->connected_peer_count = 0;
}
- /* initialize TDLS global context */
- pHddCtx->connected_peer_count = 0;
- pHddCtx->tdls_nss_switch_in_progress = false;
- pHddCtx->tdls_teardown_peers_cnt = 0;
sme_set_tdls_power_save_prohibited(WLAN_HDD_GET_HAL_CTX(pAdapter),
pAdapter->sessionId, 0);
- pHddCtx->tdls_scan_ctxt.magic = 0;
- pHddCtx->tdls_scan_ctxt.attempt = 0;
- pHddCtx->tdls_scan_ctxt.reject = 0;
- pHddCtx->tdls_scan_ctxt.scan_request = NULL;
- pHddCtx->tdls_external_peer_count = 0;
if (pHddCtx->config->fEnableTDLSSleepSta ||
pHddCtx->config->fEnableTDLSBufferSta ||
@@ -776,11 +789,6 @@ int wlan_hdd_tdls_init(hdd_adapter_t *pAdapter)
pHddTdlsCtx->magic = 0;
pHddTdlsCtx->valid_mac_entries = 0;
- /* This flag will set be true, only when device operates in
- * standalone STA mode
- */
- pHddCtx->enable_tdls_connection_tracker = false;
-
/* remember configuration even if it is not used right now. it could be used later */
pHddTdlsCtx->threshold_config.tx_period_t =
pHddCtx->config->fTDLSTxStatsPeriod;
@@ -864,14 +872,7 @@ int wlan_hdd_tdls_init(hdd_adapter_t *pAdapter)
pHddCtx->config->tdls_peer_kickout_threshold;
dump_tdls_state_param_setting(tInfo);
- qdf_ret_status = sme_update_fw_tdls_state(pHddCtx->hHal, tInfo, true);
- if (QDF_STATUS_SUCCESS != qdf_ret_status) {
- qdf_mem_free(tInfo);
- qdf_mc_timer_destroy(&pHddTdlsCtx->peerDiscoveryTimeoutTimer);
- qdf_mem_free(pHddTdlsCtx);
- return -EINVAL;
- }
-
+ EXIT();
return 0;
}
@@ -886,8 +887,8 @@ void wlan_hdd_tdls_exit(hdd_adapter_t *pAdapter)
tdlsCtx_t *pHddTdlsCtx;
hdd_context_t *pHddCtx;
tdlsInfo_t *tInfo;
- QDF_STATUS qdf_ret_status = QDF_STATUS_E_FAILURE;
+ ENTER();
pHddCtx = WLAN_HDD_GET_CTX(pAdapter);
if (!pHddCtx) {
QDF_TRACE(QDF_MODULE_ID_HDD, QDF_TRACE_LEVEL_WARN,
@@ -965,12 +966,6 @@ void wlan_hdd_tdls_exit(hdd_adapter_t *pAdapter)
tInfo->tdls_peer_kickout_threshold =
pHddCtx->config->tdls_peer_kickout_threshold;
dump_tdls_state_param_setting(tInfo);
-
- qdf_ret_status =
- sme_update_fw_tdls_state(pHddCtx->hHal, tInfo, false);
- if (QDF_STATUS_SUCCESS != qdf_ret_status) {
- qdf_mem_free(tInfo);
- }
} else {
hddLog(QDF_TRACE_LEVEL_ERROR,
"%s: qdf_mem_malloc failed for tInfo", __func__);
@@ -978,7 +973,6 @@ void wlan_hdd_tdls_exit(hdd_adapter_t *pAdapter)
}
pHddTdlsCtx->magic = 0;
- pHddCtx->tdls_external_peer_count = 0;
pHddTdlsCtx->pAdapter = NULL;
qdf_mem_free(pHddTdlsCtx);
@@ -986,6 +980,7 @@ void wlan_hdd_tdls_exit(hdd_adapter_t *pAdapter)
pHddTdlsCtx = NULL;
done:
+ EXIT();
clear_bit(TDLS_INIT_DONE, &pAdapter->event_flags);
}
@@ -1860,6 +1855,31 @@ int wlan_hdd_tdls_set_params(struct net_device *dev,
}
/**
+ * wlan_hdd_tdls_check_and_enable() - check system state and enable tdls
+ * @hdd_ctx: hdd context
+ *
+ * After every disassociation in the system, check whether TDLS
+ * can be enabled in the system. If TDLS possible return the
+ * corresponding hdd adapter to enable TDLS.
+ *
+ * Return: hdd adapter pointer or NULL.
+ */
+hdd_adapter_t *wlan_hdd_tdls_check_and_enable(hdd_context_t *hdd_ctx)
+{
+ if (cds_get_connection_count() > 1)
+ return NULL;
+ if (cds_mode_specific_connection_count(QDF_STA_MODE,
+ NULL) == 1)
+ return hdd_get_adapter(hdd_ctx,
+ QDF_STA_MODE);
+ if (cds_mode_specific_connection_count(QDF_P2P_CLIENT_MODE,
+ NULL) == 1)
+ return hdd_get_adapter(hdd_ctx,
+ QDF_P2P_CLIENT_MODE);
+ return NULL;
+}
+
+/**
* wlan_hdd_update_tdls_info - update tdls status info
* @adapter: ptr to device adapter.
* @tdls_prohibited: indicates whether tdls is prohibited.
@@ -1896,8 +1916,18 @@ void wlan_hdd_update_tdls_info(hdd_adapter_t *adapter, bool tdls_prohibited,
return;
}
- /* If AP indicated TDLS Prohibited then disable tdls mode */
+ hdd_info("tdls_prohibited: %d, tdls_chan_swit_prohibited: %d",
+ tdls_prohibited, tdls_chan_swit_prohibited);
+
mutex_lock(&hdd_ctx->tdls_lock);
+
+ if (hdd_ctx->set_state_info.set_state_cnt == 0 &&
+ tdls_prohibited) {
+ mutex_unlock(&hdd_ctx->tdls_lock);
+ return;
+ }
+
+ /* If AP or caller indicated TDLS Prohibited then disable tdls mode */
if (tdls_prohibited) {
hdd_ctx->tdls_mode = eTDLS_SUPPORT_NOT_ENABLED;
} else {
@@ -1908,15 +1938,41 @@ void wlan_hdd_update_tdls_info(hdd_adapter_t *adapter, bool tdls_prohibited,
else
hdd_ctx->tdls_mode = eTDLS_SUPPORT_ENABLED;
}
- mutex_unlock(&hdd_ctx->tdls_lock);
tdls_param = qdf_mem_malloc(sizeof(*tdls_param));
if (!tdls_param) {
+ mutex_unlock(&hdd_ctx->tdls_lock);
hddLog(QDF_TRACE_LEVEL_ERROR,
FL("memory allocation failed for tdlsParams"));
return;
}
- tdls_param->vdev_id = adapter->sessionId;
+ /* If any concurrency detected, teardown all TDLS links and disable
+ * the tdls support
+ */
+ hdd_warn("Concurrency check in TDLS! set state cnt %d tdls_prohibited %d",
+ hdd_ctx->set_state_info.set_state_cnt, tdls_prohibited);
+
+ if (hdd_ctx->set_state_info.set_state_cnt == 1 &&
+ !tdls_prohibited) {
+ hdd_warn("Concurrency not allowed in TDLS! set state cnt %d",
+ hdd_ctx->set_state_info.set_state_cnt);
+ if (hdd_ctx->connected_peer_count >= 1) {
+ hdd_ctx->concurrency_marked = true;
+ mutex_unlock(&hdd_ctx->tdls_lock);
+ wlan_hdd_tdls_disable_offchan_and_teardown_links(
+ hdd_ctx);
+ qdf_mem_free(tdls_param);
+ return;
+ }
+ tdls_prohibited = true;
+ hdd_ctx->tdls_mode = eTDLS_SUPPORT_NOT_ENABLED;
+ tdls_param->vdev_id = hdd_ctx->set_state_info.vdev_id;
+ } else {
+ tdls_param->vdev_id = adapter->sessionId;
+ }
+
+ mutex_unlock(&hdd_ctx->tdls_lock);
+
tdls_param->tdls_state = hdd_ctx->tdls_mode;
tdls_param->notification_interval_ms =
hdd_tdls_ctx->threshold_config.tx_period_t;
@@ -1966,6 +2022,20 @@ void wlan_hdd_update_tdls_info(hdd_adapter_t *adapter, bool tdls_prohibited,
qdf_mem_free(tdls_param);
return;
}
+
+ mutex_lock(&hdd_ctx->tdls_lock);
+
+ if (!tdls_prohibited) {
+ hdd_ctx->set_state_info.set_state_cnt++;
+ hdd_ctx->set_state_info.vdev_id = adapter->sessionId;
+ } else {
+ hdd_ctx->set_state_info.set_state_cnt--;
+ }
+
+ hdd_info("TDLS Set state cnt %d",
+ hdd_ctx->set_state_info.set_state_cnt);
+
+ mutex_unlock(&hdd_ctx->tdls_lock);
return;
}
@@ -2469,6 +2539,8 @@ void wlan_hdd_tdls_increment_peer_count(hdd_adapter_t *pAdapter)
void wlan_hdd_tdls_decrement_peer_count(hdd_adapter_t *pAdapter)
{
hdd_context_t *pHddCtx = WLAN_HDD_GET_CTX(pAdapter);
+ hdd_adapter_t *tdls_adapter;
+ uint16_t connected_peer_count;
ENTER();
@@ -2484,7 +2556,26 @@ void wlan_hdd_tdls_decrement_peer_count(hdd_adapter_t *pAdapter)
hddLog(LOG1, "%s: %d",
__func__, pHddCtx->connected_peer_count);
+ connected_peer_count = pHddCtx->connected_peer_count;
+
mutex_unlock(&pHddCtx->tdls_lock);
+
+ if (connected_peer_count == 0 &&
+ pHddCtx->concurrency_marked) {
+ tdls_adapter = hdd_get_adapter_by_vdev(pHddCtx,
+ pHddCtx->set_state_info.vdev_id);
+ if (tdls_adapter) {
+ wlan_hdd_update_tdls_info(tdls_adapter, true, true);
+ pHddCtx->concurrency_marked = false;
+ } else {
+ hdd_err("TDLS set state is not cleared correctly !!!");
+ pHddCtx->concurrency_marked = false;
+ }
+ tdls_adapter = wlan_hdd_tdls_check_and_enable(pHddCtx);
+ if (tdls_adapter)
+ wlan_hdd_update_tdls_info(tdls_adapter, false, false);
+ }
+
EXIT();
}
@@ -3922,8 +4013,8 @@ static int __wlan_hdd_cfg80211_tdls_mgmt(struct wiphy *wiphy,
hdd_sta_ctx = WLAN_HDD_GET_STATION_CTX_PTR(pAdapter);
/*
- * STA should be connected and authenticated before sending
- * any TDLS frames
+ * STA or P2P client should be connected and authenticated before
+ * sending any TDLS frames
*/
if ((eConnectionState_Associated !=
hdd_sta_ctx->conn_info.connState) ||
@@ -3934,17 +4025,12 @@ static int __wlan_hdd_cfg80211_tdls_mgmt(struct wiphy *wiphy,
return -EAGAIN;
}
- /* If any concurrency is detected */
- if (((1 << QDF_STA_MODE) != pHddCtx->concurrency_mode) ||
- (pHddCtx->no_of_active_sessions[QDF_STA_MODE] > 1)) {
- QDF_TRACE(QDF_MODULE_ID_HDD, QDF_TRACE_LEVEL_INFO_HIGH,
- "%s: Multiple STA OR Concurrency detected. Ignore TDLS MGMT frame. action_code=%d, concurrency_mode: 0x%x, active_sessions: %d",
- __func__,
- action_code,
- pHddCtx->concurrency_mode,
- pHddCtx->no_of_active_sessions[QDF_STA_MODE]);
+ if (!cds_check_is_tdls_allowed(pAdapter->device_mode)) {
+ hdd_err("TDLS not allowed, reject TDLS MGMT, action_code=%d",
+ action_code);
return -EPERM;
}
+
/* other than teardown frame, mgmt frames are not sent if disabled */
if (SIR_MAC_TDLS_TEARDOWN != action_code) {
/* if tdls_mode is disabled to respond to peer's request */
diff --git a/core/hdd/src/wlan_hdd_tx_rx.c b/core/hdd/src/wlan_hdd_tx_rx.c
index 7ff10a37da92..1385d3d340ca 100644
--- a/core/hdd/src/wlan_hdd_tx_rx.c
+++ b/core/hdd/src/wlan_hdd_tx_rx.c
@@ -298,6 +298,55 @@ static bool wlan_hdd_is_eapol_or_wai(struct sk_buff *skb)
}
/**
+ * hdd_get_transmit_sta_id() - function to retrieve station id to be used for
+ * sending traffic towards a particular destination address. The destination
+ * address can be unicast, multicast or broadcast
+ *
+ * @adapter: Handle to adapter context
+ * @dst_addr: Destination address
+ * @station_id: station id
+ *
+ * Returns: None
+ */
+static void hdd_get_transmit_sta_id(hdd_adapter_t *adapter,
+ struct qdf_mac_addr *dst_addr, uint8_t *station_id)
+{
+ bool mcbc_addr = false;
+ hdd_station_ctx_t *sta_ctx = WLAN_HDD_GET_STATION_CTX_PTR(adapter);
+
+ hdd_get_peer_sta_id(sta_ctx, dst_addr, station_id);
+ if (*station_id == HDD_WLAN_INVALID_STA_ID) {
+ if (qdf_is_macaddr_broadcast(dst_addr) ||
+ qdf_is_macaddr_group(dst_addr)) {
+ hdd_info("Received MC/BC packet for transmission");
+ mcbc_addr = true;
+ } else {
+ hdd_err("UC frame with invalid destination address");
+ }
+ }
+
+ if (adapter->device_mode == QDF_IBSS_MODE) {
+ /*
+ * This check is necessary to make sure station id is not
+ * overwritten for UC traffic in IBSS mode
+ */
+ if (mcbc_addr)
+ *station_id = sta_ctx->broadcast_ibss_staid;
+ } else if (adapter->device_mode == QDF_NDI_MODE) {
+ /*
+ * This check is necessary to make sure station id is not
+ * overwritten for UC traffic in NAN data mode
+ */
+ if (mcbc_addr)
+ *station_id = NDP_BROADCAST_STAID;
+ } else {
+ /* For the rest, traffic is directed to AP/P2P GO */
+ if (eConnectionState_Associated == sta_ctx->conn_info.connState)
+ *station_id = sta_ctx->conn_info.staId[0];
+ }
+}
+
+/**
* hdd_hard_start_xmit() - Transmit a frame
* @skb: pointer to OS packet (sk_buff)
* @dev: pointer to network device
@@ -317,6 +366,7 @@ int hdd_hard_start_xmit(struct sk_buff *skb, struct net_device *dev)
bool granted;
uint8_t STAId = WLAN_MAX_STA_COUNT;
hdd_station_ctx_t *pHddStaCtx = &pAdapter->sessionCtx.station;
+ struct qdf_mac_addr *pDestMacAddress = NULL;
#ifdef QCA_PKT_PROTO_TRACE
uint8_t proto_type = 0;
#endif /* QCA_PKT_PROTO_TRACE */
@@ -336,55 +386,15 @@ int hdd_hard_start_xmit(struct sk_buff *skb, struct net_device *dev)
goto drop_pkt;
}
- if (QDF_IBSS_MODE == pAdapter->device_mode) {
- struct qdf_mac_addr *pDestMacAddress =
- (struct qdf_mac_addr *) skb->data;
+ pDestMacAddress = (struct qdf_mac_addr *)skb->data;
+ STAId = HDD_WLAN_INVALID_STA_ID;
- if (QDF_STATUS_SUCCESS !=
- hdd_get_peer_sta_id(&pAdapter->sessionCtx.station,
- pDestMacAddress, &STAId))
- STAId = HDD_WLAN_INVALID_STA_ID;
-
- if ((STAId == HDD_WLAN_INVALID_STA_ID) &&
- (qdf_is_macaddr_broadcast(pDestMacAddress) ||
- qdf_is_macaddr_group(pDestMacAddress))) {
- STAId = pHddStaCtx->broadcast_ibss_staid;
- QDF_TRACE(QDF_MODULE_ID_HDD_DATA,
- QDF_TRACE_LEVEL_INFO_LOW, "%s: BC/MC packet",
- __func__);
- } else if (STAId == HDD_WLAN_INVALID_STA_ID) {
- QDF_TRACE(QDF_MODULE_ID_HDD_DATA, QDF_TRACE_LEVEL_WARN,
- "%s: Received Unicast frame with invalid staID",
- __func__);
- goto drop_pkt;
- }
- } else if (QDF_NDI_MODE == pAdapter->device_mode) {
- struct qdf_mac_addr *dest_mac_addr =
- (struct qdf_mac_addr *)skb->data;
- if (hdd_get_peer_sta_id(&pAdapter->sessionCtx.station,
- dest_mac_addr, &STAId) !=
- QDF_STATUS_SUCCESS) {
- QDF_TRACE(QDF_MODULE_ID_HDD_DATA, QDF_TRACE_LEVEL_WARN,
- FL("Can't find peer: %pM, dropping packet"),
- dest_mac_addr);
- ++pAdapter->stats.tx_dropped;
- ++pAdapter->hdd_stats.hddTxRxStats.txXmitDropped;
- kfree_skb(skb);
- return NETDEV_TX_OK;
- }
- } else {
- if (QDF_OCB_MODE != pAdapter->device_mode &&
- eConnectionState_Associated !=
- pHddStaCtx->conn_info.connState) {
- QDF_TRACE(QDF_MODULE_ID_HDD_DATA, QDF_TRACE_LEVEL_INFO,
- FL("Tx frame in not associated state in %d context"),
- pAdapter->device_mode);
- goto drop_pkt;
- }
- STAId = pHddStaCtx->conn_info.staId[0];
+ hdd_get_transmit_sta_id(pAdapter, pDestMacAddress, &STAId);
+ if (STAId == HDD_WLAN_INVALID_STA_ID) {
+ hddLog(LOGE, "Invalid station id, transmit operation suspended");
+ goto drop_pkt;
}
-
hdd_get_tx_resource(pAdapter, STAId,
WLAN_HDD_TX_FLOW_CONTROL_OS_Q_BLOCK_TIME);
@@ -398,7 +408,8 @@ int hdd_hard_start_xmit(struct sk_buff *skb, struct net_device *dev)
goto drop_pkt_accounting;
}
- /* user priority from IP header, which is already extracted and set from
+ /*
+ * user priority from IP header, which is already extracted and set from
* select_queue call back function
*/
up = skb->priority;
@@ -410,7 +421,8 @@ int hdd_hard_start_xmit(struct sk_buff *skb, struct net_device *dev)
#endif /* HDD_WMM_DEBUG */
if (HDD_PSB_CHANGED == pAdapter->psbChanged) {
- /* Function which will determine acquire admittance for a
+ /*
+ * Function which will determine acquire admittance for a
* WMM AC is required or not based on psb configuration done
* in the framework
*/
@@ -435,7 +447,8 @@ int hdd_hard_start_xmit(struct sk_buff *skb, struct net_device *dev)
if (!granted) {
bool isDefaultAc = false;
- /* ADDTS request for this AC is sent, for now
+ /*
+ * ADDTS request for this AC is sent, for now
* send this packet through next avaiable lower
* Access category until ADDTS negotiation completes.
*/
@@ -518,8 +531,8 @@ int hdd_hard_start_xmit(struct sk_buff *skb, struct net_device *dev)
}
/*
- * If a transmit function is not registered, drop packet
- */
+ * If a transmit function is not registered, drop packet
+ */
if (!pAdapter->tx_fn) {
QDF_TRACE(QDF_MODULE_ID_HDD_SAP_DATA, QDF_TRACE_LEVEL_INFO_HIGH,
"%s: TX function not registered by the data path",
diff --git a/core/mac/inc/qwlan_version.h b/core/mac/inc/qwlan_version.h
index e0f183833b34..4338c254c49a 100644
--- a/core/mac/inc/qwlan_version.h
+++ b/core/mac/inc/qwlan_version.h
@@ -41,9 +41,9 @@
#define QWLAN_VERSION_MAJOR 5
#define QWLAN_VERSION_MINOR 1
#define QWLAN_VERSION_PATCH 0
-#define QWLAN_VERSION_EXTRA "I"
+#define QWLAN_VERSION_EXTRA "P"
#define QWLAN_VERSION_BUILD 22
-#define QWLAN_VERSIONSTR "5.1.0.22I"
+#define QWLAN_VERSIONSTR "5.1.0.22P"
#endif /* QWLAN_VERSION_H */
diff --git a/core/mac/src/pe/lim/lim_process_sme_req_messages.c b/core/mac/src/pe/lim/lim_process_sme_req_messages.c
index fdbdcc059636..8133c321b1a6 100644
--- a/core/mac/src/pe/lim/lim_process_sme_req_messages.c
+++ b/core/mac/src/pe/lim/lim_process_sme_req_messages.c
@@ -1602,14 +1602,20 @@ __lim_process_sme_join_req(tpAniSirGlobal mac_ctx, uint32_t *msg_buf)
uint16_t n_size;
uint8_t session_id;
tpPESession session = NULL;
- uint8_t sme_session_id;
- uint16_t sme_transaction_id;
+ uint8_t sme_session_id = 0;
+ uint16_t sme_transaction_id = 0;
int8_t local_power_constraint = 0, reg_max = 0;
uint16_t ie_len;
uint8_t *vendor_ie;
tSirBssDescription *bss_desc;
struct vdev_type_nss *vdev_type_nss;
+ if (!mac_ctx || !msg_buf) {
+ QDF_TRACE(QDF_MODULE_ID_PE, QDF_TRACE_LEVEL_ERROR,
+ FL("JOIN REQ with invalid data"));
+ return;
+ }
+
/* FEATURE_WLAN_DIAG_SUPPORT */
#ifdef FEATURE_WLAN_DIAG_SUPPORT_LIM
/*
@@ -1634,7 +1640,7 @@ __lim_process_sme_join_req(tpAniSirGlobal mac_ctx, uint32_t *msg_buf)
lim_log(mac_ctx, LOGP,
FL("AllocateMemory failed for sme_join_req"));
ret_code = eSIR_SME_RESOURCES_UNAVAILABLE;
- return;
+ goto end;
}
(void)qdf_mem_set((void *)sme_join_req, n_size, 0);
(void)qdf_mem_copy((void *)sme_join_req, (void *)msg_buf,
@@ -1937,7 +1943,8 @@ __lim_process_sme_join_req(tpAniSirGlobal mac_ctx, uint32_t *msg_buf)
if (NULL == mlm_join_req) {
lim_log(mac_ctx, LOGP,
FL("AllocateMemory failed for mlmJoinReq"));
- return;
+ ret_code = eSIR_SME_RESOURCES_UNAVAILABLE;
+ goto end;
}
(void)qdf_mem_set((void *)mlm_join_req, val, 0);
@@ -2079,8 +2086,8 @@ __lim_process_sme_join_req(tpAniSirGlobal mac_ctx, uint32_t *msg_buf)
}
end:
- sme_session_id = ((tpSirSmeJoinReq)msg_buf)->sessionId;
- sme_transaction_id = ((tpSirSmeJoinReq)msg_buf)->transactionId;
+ lim_get_session_info(mac_ctx, (uint8_t *) msg_buf,
+ &sme_session_id, &sme_transaction_id);
if (sme_join_req) {
qdf_mem_free(sme_join_req);
diff --git a/core/mac/src/pe/rrm/rrm_api.c b/core/mac/src/pe/rrm/rrm_api.c
index 3e9d4abdb169..771f182f9266 100644
--- a/core/mac/src/pe/rrm/rrm_api.c
+++ b/core/mac/src/pe/rrm/rrm_api.c
@@ -800,7 +800,7 @@ rrm_process_beacon_report_xmit(tpAniSirGlobal mac_ctx,
tpRRMReq curr_req = mac_ctx->rrm.rrmPEContext.pCurrentReq;
tpPESession session_entry;
uint8_t session_id;
- bool flag_bss_present, bss_desc_count = 0;
+ uint8_t bss_desc_count = 0;
lim_log(mac_ctx, LOG1, FL("Received beacon report xmit indication"));
@@ -843,21 +843,19 @@ rrm_process_beacon_report_xmit(tpAniSirGlobal mac_ctx,
beacon_xmit_ind->numBssDesc; bss_desc_count++) {
beacon_report =
report[bss_desc_count].report.beaconReport;
+ /*
+ * If the scan result is NULL then send report request
+ * with option subelement as NULL.
+ */
bss_desc = beacon_xmit_ind->
pBssDescription[bss_desc_count];
- flag_bss_present = false;
/* Prepare the beacon report and send it to the peer.*/
report[bss_desc_count].token =
beacon_xmit_ind->uDialogToken;
report[bss_desc_count].refused = 0;
report[bss_desc_count].incapable = 0;
report[bss_desc_count].type = SIR_MAC_RRM_BEACON_TYPE;
- /*
- * If the scan result is NULL then send report request
- * with option subelement as NULL.
- */
- if (NULL != bss_desc)
- flag_bss_present = true;
+
/*
* Valid response is included if the size of
* becon xmit is == size of beacon xmit ind + ies
@@ -865,7 +863,7 @@ rrm_process_beacon_report_xmit(tpAniSirGlobal mac_ctx,
if (beacon_xmit_ind->length < sizeof(*beacon_xmit_ind))
continue;
beacon_report.regClass = beacon_xmit_ind->regClass;
- if (flag_bss_present) {
+ if (bss_desc) {
beacon_report.channel = bss_desc->channelId;
qdf_mem_copy(beacon_report.measStartTime,
bss_desc->startTSF,
@@ -893,7 +891,7 @@ rrm_process_beacon_report_xmit(tpAniSirGlobal mac_ctx,
lim_log(mac_ctx, LOG3,
FL("Only requested IEs in reporting detail requested"));
- if (flag_bss_present) {
+ if (bss_desc) {
rrm_fill_beacon_ies(mac_ctx,
(uint8_t *) &beacon_report.Ies[0],
(uint8_t *) &beacon_report.numIes,
@@ -908,7 +906,7 @@ rrm_process_beacon_report_xmit(tpAniSirGlobal mac_ctx,
/* 2: default - Include all FFs and all Ies. */
default:
lim_log(mac_ctx, LOG3, FL("Default all IEs and FFs"));
- if (flag_bss_present) {
+ if (bss_desc) {
rrm_fill_beacon_ies(mac_ctx,
(uint8_t *) &beacon_report.Ies[0],
(uint8_t *) &beacon_report.numIes,
diff --git a/core/sap/dfs/src/dfs_phyerr_tlv.c b/core/sap/dfs/src/dfs_phyerr_tlv.c
index 5a479edb3864..82c890f55d16 100644
--- a/core/sap/dfs/src/dfs_phyerr_tlv.c
+++ b/core/sap/dfs/src/dfs_phyerr_tlv.c
@@ -889,6 +889,19 @@ dfs_process_phyerr_bb_tlv(struct ath_dfs *dfs, void *buf, uint16_t datalen,
rs.radar_fft_ext80_inband_power;
e->rsu_version = rs.rsu_version;
e->peak_mag = rsfr.peak_mag;
+
+ /*
+ * RSSI_COMB is not reliable indicator of RSSI
+ * for extension80 when operating in 80p80
+ * non-contiguous mode due to existing hardware
+ * bug. Added workaround in software to use
+ * pulse_rssi instead of RSSI_COMB.
+ */
+
+ if ((dfs->ic->ic_curchan->ic_flags &
+ IEEE80211_CHAN_VHT80P80) &&
+ (rs.radar_80p80_segid == DFS_80P80_SEG1))
+ e->rssi = rs.pulse_rssi;
}
/*
* XXX TODO: add a "chirp detection enabled" capability or config
diff --git a/core/sap/dfs/src/dfs_process_phyerr.c b/core/sap/dfs/src/dfs_process_phyerr.c
index 3e45c5a64d35..9189d58f8372 100644
--- a/core/sap/dfs/src/dfs_process_phyerr.c
+++ b/core/sap/dfs/src/dfs_process_phyerr.c
@@ -812,13 +812,20 @@ dfs_process_phyerr(struct ieee80211com *ic, void *buf, uint16_t datalen,
rn_minrssithresh);
return;
}
- } else {
- if (e.rssi < dfs->dfs_rinfo.rn_minrssithresh ||
- e.dur > dfs->dfs_rinfo.rn_maxpulsedur) {
- /* XXX TODO add a debug statement? */
- dfs->ath_dfs_stats.rssi_discards++;
- return;
- }
+ } else if (e.rssi < dfs->dfs_rinfo.rn_minrssithresh ||
+ e.dur > dfs->dfs_rinfo.rn_maxpulsedur) {
+
+ QDF_TRACE(QDF_MODULE_ID_SAP,
+ QDF_TRACE_LEVEL_INFO,
+ "%s [%d] : Rejecting: dur = %d \
+ maxpulsedur = %d, rssi = %d \
+ minrssithresh = %d", __func__, __LINE__,
+ e.dur, dfs->dfs_rinfo.rn_maxpulsedur,
+ e.rssi,
+ dfs->dfs_rinfo.rn_minrssithresh);
+
+ dfs->ath_dfs_stats.rssi_discards++;
+ return;
}
/*
diff --git a/core/sme/inc/csr_internal.h b/core/sme/inc/csr_internal.h
index 9fff2c3dc61e..93bd440cc4df 100644
--- a/core/sme/inc/csr_internal.h
+++ b/core/sme/inc/csr_internal.h
@@ -1427,4 +1427,5 @@ void csr_neighbor_roam_process_scan_results(tpAniSirGlobal mac_ctx,
void csr_neighbor_roam_trigger_handoff(tpAniSirGlobal mac_ctx,
uint8_t session_id);
+bool csr_is_ndi_started(tpAniSirGlobal mac_ctx, uint32_t session_id);
#endif
diff --git a/core/sme/src/common/sme_api.c b/core/sme/src/common/sme_api.c
index aa646355c871..34011aeda71c 100644
--- a/core/sme/src/common/sme_api.c
+++ b/core/sme/src/common/sme_api.c
@@ -7780,11 +7780,10 @@ QDF_STATUS sme_8023_multicast_list(tHalHandle hHal, uint8_t sessionId,
pMulticastAddrs->ulMulticastAddrCnt,
pMulticastAddrs->multicastAddr[0].bytes);
- /*
- *Find the connected Infra / P2P_client connected session
- */
+ /* Find the connected Infra / P2P_client connected session */
if (CSR_IS_SESSION_VALID(pMac, sessionId) &&
- csr_is_conn_state_infra(pMac, sessionId)) {
+ (csr_is_conn_state_infra(pMac, sessionId) ||
+ csr_is_ndi_started(pMac, sessionId))) {
pSession = CSR_GET_SESSION(pMac, sessionId);
}
@@ -7804,10 +7803,11 @@ QDF_STATUS sme_8023_multicast_list(tHalHandle hHal, uint8_t sessionId,
return QDF_STATUS_E_NOMEM;
}
- if (!csr_is_conn_state_connected_infra(pMac, sessionId)) {
+ if (!csr_is_conn_state_connected_infra(pMac, sessionId) &&
+ !csr_is_ndi_started(pMac, sessionId)) {
QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_ERROR,
- "%s: Ignoring the "
- "indication as we are not connected", __func__);
+ "%s: Request ignored, session %d is not connected or started",
+ __func__, sessionId);
qdf_mem_free(request_buf);
return QDF_STATUS_E_FAILURE;
}
diff --git a/core/sme/src/csr/csr_api_scan.c b/core/sme/src/csr/csr_api_scan.c
index 99d024d36247..3967119f1e4f 100644
--- a/core/sme/src/csr/csr_api_scan.c
+++ b/core/sme/src/csr/csr_api_scan.c
@@ -1962,6 +1962,11 @@ static QDF_STATUS csr_calc_pref_val_by_pcl(tpAniSirGlobal mac_ctx,
if (NULL == mac_ctx || NULL == bss_descr)
return QDF_STATUS_E_FAILURE;
+ if (filter && (0 != filter->BSSIDs.numOfBSSIDs)) {
+ sms_log(mac_ctx, LOGW,
+ FL("filter has specific bssid, no point of boosting"));
+ return QDF_STATUS_SUCCESS;
+ }
if (is_channel_found_in_pcl(mac_ctx,
bss_descr->Result.BssDescriptor.channelId, filter) &&
@@ -2010,7 +2015,7 @@ csr_parse_scan_results(tpAniSirGlobal pMac,
csr_ll_lock(&pMac->scan.scanResultList);
- if (pFilter) {
+ if (pFilter && (0 == pFilter->BSSIDs.numOfBSSIDs)) {
if (cds_map_concurrency_mode(
&pFilter->csrPersona, &new_mode)) {
status = cds_get_pcl(new_mode,
diff --git a/core/sme/src/csr/csr_util.c b/core/sme/src/csr/csr_util.c
index 08ea7cd6326a..06ac64232df6 100644
--- a/core/sme/src/csr/csr_util.c
+++ b/core/sme/src/csr/csr_util.c
@@ -5784,3 +5784,19 @@ enum tQDF_ADAPTER_MODE csr_get_session_persona(tpAniSirGlobal pmac,
return session->pCurRoamProfile->csrPersona;
}
+
+/**
+ * csr_is_ndi_started() - function to check if NDI is started
+ * @mac_ctx: handle to mac context
+ * @session_id: session identifier
+ *
+ * returns: true if NDI is started, false otherwise
+ */
+bool csr_is_ndi_started(tpAniSirGlobal mac_ctx, uint32_t session_id)
+{
+ tCsrRoamSession *session = CSR_GET_SESSION(mac_ctx, session_id);
+ if (!session)
+ return false;
+
+ return eCSR_CONNECT_STATE_TYPE_NDI_STARTED == session->connectState;
+}
diff --git a/core/utils/epping/src/epping_tx.c b/core/utils/epping/src/epping_tx.c
index 0954bf2bb2dc..92908b4f4e77 100644
--- a/core/utils/epping/src/epping_tx.c
+++ b/core/utils/epping/src/epping_tx.c
@@ -336,15 +336,31 @@ void epping_tx_complete_multiple(void *ctx, HTC_PACKET_QUEUE *pPacketQueue)
pktSkb = GET_HTC_PACKET_NET_BUF_CONTEXT(htc_pkt);
cookie = htc_pkt->pPktContext;
- ASSERT(pktSkb);
- ASSERT(htc_pkt->pBuffer == qdf_nbuf_data(pktSkb));
-
- /* add this to the list, use faster non-lock API */
- qdf_nbuf_queue_add(&skb_queue, pktSkb);
-
- if (A_SUCCESS(status)) {
- ASSERT(htc_pkt->ActualLength == qdf_nbuf_len(pktSkb));
+ if (!pktSkb) {
+ EPPING_LOG(QDF_TRACE_LEVEL_ERROR,
+ "%s: pktSkb is NULL", __func__);
+ ASSERT(0);
+ } else {
+ if (htc_pkt->pBuffer != qdf_nbuf_data(pktSkb)) {
+ EPPING_LOG(QDF_TRACE_LEVEL_ERROR,
+ "%s: htc_pkt buffer not equal to skb->data",
+ __func__);
+ ASSERT(0);
+ }
+ /* add this to the list, use faster non-lock API */
+ qdf_nbuf_queue_add(&skb_queue, pktSkb);
+
+ if (A_SUCCESS(status)) {
+ if (htc_pkt->ActualLength !=
+ qdf_nbuf_len(pktSkb)) {
+ EPPING_LOG(QDF_TRACE_LEVEL_ERROR,
+ "%s: htc_pkt length not equal to skb->len",
+ __func__);
+ ASSERT(0);
+ }
+ }
}
+
EPPING_LOG(QDF_TRACE_LEVEL_INFO,
"%s skb=%p data=%p len=0x%x eid=%d ",
__func__, pktSkb, htc_pkt->pBuffer,
diff --git a/core/wma/src/wma_dev_if.c b/core/wma/src/wma_dev_if.c
index f43ead6a6b5e..ca129ce2a4af 100644
--- a/core/wma/src/wma_dev_if.c
+++ b/core/wma/src/wma_dev_if.c
@@ -1070,8 +1070,9 @@ void wma_remove_peer(tp_wma_handle wma, uint8_t *bssid,
}
wma->interfaces[vdev_id].peer_count--;
- WMA_LOGE("%s: Removed peer with peer_addr %pM vdevid %d peer_count %d",
- __func__, bssid, vdev_id, wma->interfaces[vdev_id].peer_count);
+ WMA_LOGE("%s: Removed peer %p with peer_addr %pM vdevid %d peer_count %d",
+ __func__, peer, bssid, vdev_id,
+ wma->interfaces[vdev_id].peer_count);
if (roam_synch_in_progress)
return;
/* Flush all TIDs except MGMT TID for this peer in Target */
@@ -1126,8 +1127,9 @@ QDF_STATUS wma_create_peer(tp_wma_handle wma, ol_txrx_pdev_handle pdev,
}
if (roam_synch_in_progress) {
- WMA_LOGE("%s: LFR3: Created peer with peer_addr %pM vdev_id %d,"
- "peer_count - %d", __func__, peer_addr, vdev_id,
+ WMA_LOGE("%s: LFR3: Created peer %p with peer_addr %pM vdev_id %d,"
+ "peer_count - %d",
+ __func__, peer, peer_addr, vdev_id,
wma->interfaces[vdev_id].peer_count);
return QDF_STATUS_SUCCESS;
}
@@ -1140,8 +1142,10 @@ QDF_STATUS wma_create_peer(tp_wma_handle wma, ol_txrx_pdev_handle pdev,
ol_txrx_peer_detach(peer);
goto err;
}
- WMA_LOGE("%s: Created peer with peer_addr %pM vdev_id %d, peer_count - %d",
- __func__, peer_addr, vdev_id, wma->interfaces[vdev_id].peer_count);
+ WMA_LOGE("%s: Created peer %p ref_cnt %d with peer_addr %pM vdev_id %d, peer_count - %d",
+ __func__, peer, qdf_atomic_read(&peer->ref_cnt),
+ peer_addr, vdev_id,
+ wma->interfaces[vdev_id].peer_count);
mac_addr_raw = ol_txrx_get_vdev_mac_addr(vdev);
if (mac_addr_raw == NULL) {
@@ -2977,7 +2981,7 @@ static void wma_add_bss_sta_mode(tp_wma_handle wma, tpAddBssParams add_bss)
struct wma_vdev_start_req req;
struct wma_target_req *msg;
uint8_t vdev_id, peer_id;
- ol_txrx_peer_handle peer;
+ ol_txrx_peer_handle peer = NULL;
QDF_STATUS status;
struct wma_txrx_node *iface;
int pps_val = 0;
diff --git a/core/wma/src/wma_mgmt.c b/core/wma/src/wma_mgmt.c
index a5cf5b8f88e1..b93178d74d79 100644
--- a/core/wma/src/wma_mgmt.c
+++ b/core/wma/src/wma_mgmt.c
@@ -1112,8 +1112,8 @@ QDF_STATUS wma_send_peer_assoc(tp_wma_handle wma,
status = wmi_unified_peer_assoc_send(wma->wmi_handle,
cmd);
if (QDF_IS_STATUS_ERROR(status))
- WMA_LOGP("%s: Failed to send peer assoc command ret = %d",
- __func__, ret);
+ WMA_LOGP(FL("Failed to send peer assoc command status = %d"),
+ status);
qdf_mem_free(cmd);
return status;
diff --git a/core/wma/src/wma_utils.c b/core/wma/src/wma_utils.c
index 8ca54776ab76..fb92941421ed 100644
--- a/core/wma/src/wma_utils.c
+++ b/core/wma/src/wma_utils.c
@@ -205,7 +205,7 @@ static uint8_t wma_get_mcs_idx(uint16_t maxRate, uint8_t rate_flags,
uint8_t nss, uint8_t *mcsRateFlag)
{
uint8_t index = 0;
- uint16_t match_rate;
+ uint16_t match_rate = 0;
bool is_sgi = false;
WMA_LOGD("%s rate:%d rate_flgs: 0x%x, nss: %d",