Skip to content
This repository has been archived by the owner on Jul 3, 2019. It is now read-only.

Commit

Permalink
staging: qcacld-3.0: Merge tag 'LA.UM.6.2.r1-08700-sdm660.0' into 8.1…
Browse files Browse the repository at this point in the history
….0-unified

Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
  • Loading branch information
nathanchance committed Jun 2, 2018
2 parents d0a359d + 058219d commit 4cc01dd
Show file tree
Hide file tree
Showing 25 changed files with 753 additions and 126 deletions.
1 change: 1 addition & 0 deletions drivers/staging/qcacld-3.0/Kbuild
Original file line number Diff line number Diff line change
Expand Up @@ -425,6 +425,7 @@ HDD_OBJS := $(HDD_SRC_DIR)/wlan_hdd_assoc.o \
$(HDD_SRC_DIR)/wlan_hdd_packet_filter.o \
$(HDD_SRC_DIR)/wlan_hdd_power.o \
$(HDD_SRC_DIR)/wlan_hdd_regulatory.o \
$(HDD_SRC_DIR)/wlan_hdd_request_manager.o \
$(HDD_SRC_DIR)/wlan_hdd_scan.o \
$(HDD_SRC_DIR)/wlan_hdd_softap_tx_rx.o \
$(HDD_SRC_DIR)/wlan_hdd_tx_rx.o \
Expand Down
14 changes: 9 additions & 5 deletions drivers/staging/qcacld-3.0/core/cds/src/cds_api.c
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,7 @@ v_CONTEXT_t cds_init(void)
qdf_lock_stats_init();
qdf_mem_init();
qdf_mc_timer_manager_init();
qdf_event_list_init();

gp_cds_context = &g_cds_context;

Expand Down Expand Up @@ -166,6 +167,7 @@ void cds_deinit(void)
qdf_mem_exit();
qdf_lock_stats_deinit();
qdf_debugfs_exit();
qdf_event_list_destroy();

gp_cds_context->qdf_ctx = NULL;
gp_cds_context = NULL;
Expand Down Expand Up @@ -626,8 +628,9 @@ QDF_STATUS cds_pre_enable(v_CONTEXT_t cds_context)
}

/* Need to update time out of complete */
qdf_status = qdf_wait_single_event(&gp_cds_context->wmaCompleteEvent,
CDS_WMA_TIMEOUT);
qdf_status = qdf_wait_for_event_completion(
&gp_cds_context->wmaCompleteEvent,
CDS_WMA_TIMEOUT);
if (qdf_status != QDF_STATUS_SUCCESS) {
if (qdf_status == QDF_STATUS_E_TIMEOUT) {
QDF_TRACE(QDF_MODULE_ID_QDF, QDF_TRACE_LEVEL_ERROR,
Expand Down Expand Up @@ -781,8 +784,9 @@ QDF_STATUS cds_enable(v_CONTEXT_t cds_context)
wma_setneedshutdown(cds_context);
} else {
qdf_status =
qdf_wait_single_event(&(gp_cds_context->wmaCompleteEvent),
CDS_WMA_TIMEOUT);
qdf_wait_for_event_completion(
&gp_cds_context->wmaCompleteEvent,
CDS_WMA_TIMEOUT);
if (qdf_status != QDF_STATUS_SUCCESS) {
if (qdf_status == QDF_STATUS_E_TIMEOUT) {
QDF_TRACE(QDF_MODULE_ID_QDF,
Expand Down Expand Up @@ -1814,7 +1818,7 @@ static QDF_STATUS cds_force_assert_target(qdf_device_t qdf_ctx)
}

/* wait for firmware assert to trigger a recovery event */
status = qdf_wait_single_event(&wma->recovery_event,
status = qdf_wait_for_event_completion(&wma->recovery_event,
WMA_CRASH_INJECT_TIMEOUT);
if (QDF_IS_STATUS_ERROR(status)) {
cds_err("Failed target force assert wait; status:%d", status);
Expand Down
6 changes: 3 additions & 3 deletions drivers/staging/qcacld-3.0/core/cds/src/cds_concurrency.c
Original file line number Diff line number Diff line change
Expand Up @@ -8503,7 +8503,7 @@ void cds_restart_sap(hdd_adapter_t *ap_adapter)
qdf_event_reset(&hostapd_state->qdf_stop_bss_event);
if (QDF_STATUS_SUCCESS == wlansap_stop_bss(sap_ctx)) {
qdf_status =
qdf_wait_single_event(&hostapd_state->
qdf_wait_for_event_completion(&hostapd_state->
qdf_stop_bss_event,
SME_CMD_TIMEOUT_VALUE);

Expand Down Expand Up @@ -8536,7 +8536,7 @@ void cds_restart_sap(hdd_adapter_t *ap_adapter)

cds_debug("Waiting for SAP to start");
qdf_status =
qdf_wait_single_event(&hostapd_state->qdf_event,
qdf_wait_for_event_completion(&hostapd_state->qdf_event,
SME_CMD_TIMEOUT_VALUE);
wlansap_reset_sap_config_add_ie(sap_config,
eUPDATE_IE_ALL);
Expand Down Expand Up @@ -8968,7 +8968,7 @@ QDF_STATUS qdf_wait_for_connection_update(void)
return QDF_STATUS_E_FAILURE;
}

status = qdf_wait_single_event(
status = qdf_wait_for_event_completion(
&cds_context->connection_update_done_evt,
CONNECTION_UPDATE_TIMEOUT);

Expand Down
2 changes: 1 addition & 1 deletion drivers/staging/qcacld-3.0/core/dp/txrx/ol_txrx.c
Original file line number Diff line number Diff line change
Expand Up @@ -2538,7 +2538,7 @@ ol_txrx_peer_attach(ol_txrx_vdev_handle vdev, uint8_t *peer_mac_addr)
sizeof(union ol_txrx_align_mac_addr_t));
if (wait_on_deletion) {
/* wait for peer deletion */
rc = qdf_wait_single_event(&vdev->wait_delete_comp,
rc = qdf_wait_for_event_completion(&vdev->wait_delete_comp,
PEER_DELETION_TIMEOUT);
if (QDF_STATUS_SUCCESS != rc) {
ol_txrx_err(
Expand Down
101 changes: 101 additions & 0 deletions drivers/staging/qcacld-3.0/core/hdd/inc/wlan_hdd_cfg.h
Original file line number Diff line number Diff line change
Expand Up @@ -2146,6 +2146,53 @@ enum hdd_dot11_mode {
#define CFG_ROAM_BG_SCAN_CLIENT_BITMAP_MAX (0x7FF)
#define CFG_ROAM_BG_SCAN_CLIENT_BITMAP_DEFAULT (0x424)

/*
* <ini>
* min_delay_btw_roam_scans - Min duration (in sec) allowed btw two
* consecutive roam scans
* @Min: 0
* @Max: 60
* @Default: 10
*
* Roam scan is not allowed if duration between two consecutive
* roam scans is less than this time.
*
* Related: None
*
* Supported Feature: Roaming
*
* Usage: External
*
* </ini>
*/
#define CFG_MIN_DELAY_BTW_ROAM_SCAN_NAME "min_delay_btw_roam_scans"
#define CFG_MIN_DELAY_BTW_ROAM_SCAN_MIN (0)
#define CFG_MIN_DELAY_BTW_ROAM_SCAN_MAX (60)
#define CFG_MIN_DELAY_BTW_ROAM_SCAN_DEFAULT (10)

/*
* <ini>
* roam_trigger_reason_bitmask - Contains roam_trigger_reasons
* @Min: 0
* @Max: 0xFFFFFFFF
* @Default: 0xDA
*
* Bitmask containing roam_trigger_reasons for which
* min_delay_btw_roam_scans constraint should be applied.
*
* Related: None
*
* Supported Feature: Roaming
*
* Usage: External
*
* </ini>
*/
#define CFG_ROAM_SCAN_TRIGGER_REASON_BITMASK_NAME "roam_trigger_reason_bitmask"
#define CFG_ROAM_SCAN_TRIGGER_REASON_BITMASK_MIN (0)
#define CFG_ROAM_SCAN_TRIGGER_REASON_BITMASK_MAX (0xFFFFFFFF)
#define CFG_ROAM_SCAN_TRIGGER_REASON_BITMASK_DEFAULT (0xDA)

/*
* <ini>
* roam_bad_rssi_thresh_offset_2g - RSSI threshold offset for 2G to 5G roam
Expand Down Expand Up @@ -2176,6 +2223,56 @@ enum hdd_dot11_mode {
#define CFG_ROAM_BG_SCAN_BAD_RSSI_OFFSET_2G_MAX (86)
#define CFG_ROAM_BG_SCAN_BAD_RSSI_OFFSET_2G_DEFAULT (40)

/*
* <ini>
* ho_delay_for_rx - Delay Hand-off (In msec) by this duration to receive
* pending rx frames from current BSS
* @Min: 0
* @Max: 200
* @Default: 0
*
* For LFR 3.0 roaming scenario, once roam candidate is found, firmware
* waits for minimum this much duration to receive pending rx frames from
* current BSS before switching to new channel for handoff to new AP.
*
* Related: None
*
* Supported Feature: Roaming
*
* Usage: External
*
* </ini>
*/
#define CFG_ROAM_HO_DELAY_FOR_RX_NAME "ho_delay_for_rx"
#define CFG_ROAM_HO_DELAY_FOR_RX_MIN (0)
#define CFG_ROAM_HO_DELAY_FOR_RX_MAX (200)
#define CFG_ROAM_HO_DELAY_FOR_RX_DEFAULT (0)

/*
* <ini>
* roam_force_rssi_trigger - To set roam scan mode
* irrespective of channel list
* @Min: 0
* @Max: 1
* @Default: 1
*
* This ini is used to set roam scan mode
* WMI_ROAM_SCAN_MODE_RSSI_CHANGE, irrespective of whether
* channel list type is CHANNEL_LIST_STATIC or not
*
* Related: None
*
* Supported Feature: Roaming
*
* Usage: External
*
* </ini>
*/
#define CFG_ROAM_FORCE_RSSI_TRIGGER_NAME "roam_force_rssi_trigger"
#define CFG_ROAM_FORCE_RSSI_TRIGGER_MIN (0)
#define CFG_ROAM_FORCE_RSSI_TRIGGER_MAX (1)
#define CFG_ROAM_FORCE_RSSI_TRIGGER_DEFAULT (1)

/*
* <ini>
* roamscan_adaptive_dwell_mode - Sets dwell time adaptive mode
Expand Down Expand Up @@ -13876,6 +13973,9 @@ struct hdd_config {
uint32_t roam_dense_min_aps;
int8_t roam_bg_scan_bad_rssi_thresh;
uint8_t roam_bad_rssi_thresh_offset_2g;
uint32_t ho_delay_for_rx;
uint32_t min_delay_btw_roam_scans;
uint32_t roam_trigger_reason_bitmask;
uint32_t roam_bg_scan_client_bitmap;
bool enable_edca_params;
uint32_t edca_vo_cwmin;
Expand Down Expand Up @@ -14078,6 +14178,7 @@ struct hdd_config {
uint32_t neighbor_report_offload_cache_timeout;
uint32_t neighbor_report_offload_max_req_cap;
uint8_t enable_tx_sch_delay;
bool roam_force_rssi_trigger;
};

#define VAR_OFFSET(_Struct, _Var) (offsetof(_Struct, _Var))
Expand Down
54 changes: 54 additions & 0 deletions drivers/staging/qcacld-3.0/core/hdd/src/wlan_hdd_cfg.c
Original file line number Diff line number Diff line change
Expand Up @@ -4043,6 +4043,30 @@ struct reg_table_entry g_registry_table[] = {
CFG_ROAM_BG_SCAN_BAD_RSSI_OFFSET_2G_MIN,
CFG_ROAM_BG_SCAN_BAD_RSSI_OFFSET_2G_MAX),

REG_VARIABLE(CFG_ROAM_HO_DELAY_FOR_RX_NAME,
WLAN_PARAM_Integer, struct hdd_config,
ho_delay_for_rx,
VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT,
CFG_ROAM_HO_DELAY_FOR_RX_DEFAULT,
CFG_ROAM_HO_DELAY_FOR_RX_MIN,
CFG_ROAM_HO_DELAY_FOR_RX_MAX),

REG_VARIABLE(CFG_MIN_DELAY_BTW_ROAM_SCAN_NAME,
WLAN_PARAM_Integer, struct hdd_config,
min_delay_btw_roam_scans,
VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT,
CFG_MIN_DELAY_BTW_ROAM_SCAN_DEFAULT,
CFG_MIN_DELAY_BTW_ROAM_SCAN_MIN,
CFG_MIN_DELAY_BTW_ROAM_SCAN_MAX),

REG_VARIABLE(CFG_ROAM_SCAN_TRIGGER_REASON_BITMASK_NAME,
WLAN_PARAM_HexInteger, struct hdd_config,
roam_trigger_reason_bitmask,
VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT,
CFG_ROAM_SCAN_TRIGGER_REASON_BITMASK_DEFAULT,
CFG_ROAM_SCAN_TRIGGER_REASON_BITMASK_MIN,
CFG_ROAM_SCAN_TRIGGER_REASON_BITMASK_MAX),

REG_VARIABLE(CFG_ENABLE_FATAL_EVENT_TRIGGER, WLAN_PARAM_Integer,
struct hdd_config, enable_fatal_event,
VAR_FLAGS_OPTIONAL |
Expand Down Expand Up @@ -5271,6 +5295,15 @@ struct reg_table_entry g_registry_table[] = {
CFG_TX_SCH_DELAY_DEFAULT,
CFG_TX_SCH_DELAY_MIN,
CFG_TX_SCH_DELAY_MAX),

REG_VARIABLE(CFG_ROAM_FORCE_RSSI_TRIGGER_NAME,
WLAN_PARAM_Integer, struct hdd_config,
roam_force_rssi_trigger,
VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT,
CFG_ROAM_FORCE_RSSI_TRIGGER_DEFAULT,
CFG_ROAM_FORCE_RSSI_TRIGGER_MIN,
CFG_ROAM_FORCE_RSSI_TRIGGER_MAX),

};

/**
Expand Down Expand Up @@ -6753,6 +6786,15 @@ void hdd_cfg_print(hdd_context_t *pHddCtx)
hdd_debug("Name = [%s] Value = [%u]",
CFG_ROAM_BG_SCAN_BAD_RSSI_OFFSET_2G_NAME,
pHddCtx->config->roam_bad_rssi_thresh_offset_2g);
hdd_debug("Name = [%s] Value = [%u]",
CFG_ROAM_HO_DELAY_FOR_RX_NAME,
pHddCtx->config->ho_delay_for_rx);
hdd_debug("Name = [%s] Value = [%u]",
CFG_MIN_DELAY_BTW_ROAM_SCAN_NAME,
pHddCtx->config->min_delay_btw_roam_scans);
hdd_debug("Name = [%s] Value = [%u]",
CFG_ROAM_SCAN_TRIGGER_REASON_BITMASK_NAME,
pHddCtx->config->roam_trigger_reason_bitmask);
hdd_debug("Name = [%s] Value = [%u]",
CFG_MIN_REST_TIME_NAME,
pHddCtx->config->min_rest_time_conc);
Expand Down Expand Up @@ -7068,6 +7110,10 @@ void hdd_cfg_print(hdd_context_t *pHddCtx)
pHddCtx->config->enable_tx_sch_delay);

hdd_cfg_print_11k_offload_params(pHddCtx);
hdd_debug("Name = [%s] Value = [%u]",
CFG_ROAM_FORCE_RSSI_TRIGGER_NAME,
pHddCtx->config->roam_force_rssi_trigger);

}

/**
Expand Down Expand Up @@ -9546,6 +9592,12 @@ QDF_STATUS hdd_set_sme_config(hdd_context_t *pHddCtx)
pHddCtx->config->roam_bg_scan_client_bitmap;
smeConfig->csrConfig.roam_bad_rssi_thresh_offset_2g =
pHddCtx->config->roam_bad_rssi_thresh_offset_2g;
smeConfig->csrConfig.ho_delay_for_rx =
pHddCtx->config->ho_delay_for_rx;
smeConfig->csrConfig.min_delay_btw_roam_scans =
pHddCtx->config->min_delay_btw_roam_scans;
smeConfig->csrConfig.roam_trigger_reason_bitmask =
pHddCtx->config->roam_trigger_reason_bitmask;
smeConfig->csrConfig.obss_width_interval =
pHddCtx->config->obss_width_trigger_interval;
smeConfig->csrConfig.obss_active_dwelltime =
Expand All @@ -9560,6 +9612,8 @@ QDF_STATUS hdd_set_sme_config(hdd_context_t *pHddCtx)
pHddCtx->config->scan_adaptive_dwell_mode;
smeConfig->csrConfig.roamscan_adaptive_dwell_mode =
pHddCtx->config->roamscan_adaptive_dwell_mode;
smeConfig->csrConfig.roam_force_rssi_trigger =
pHddCtx->config->roam_force_rssi_trigger;

hdd_update_per_config_to_sme(pHddCtx, smeConfig);

Expand Down
12 changes: 6 additions & 6 deletions drivers/staging/qcacld-3.0/core/hdd/src/wlan_hdd_cfg80211.c
Original file line number Diff line number Diff line change
Expand Up @@ -15928,7 +15928,7 @@ static bool wlan_hdd_handle_sap_sta_dfs_conc(hdd_adapter_t *adapter,
* machine from disconnected to started and set this event.
* wait for 10 secs to finish this.
*/
status = qdf_wait_single_event(&hostapd_state->qdf_event, 10000);
status = qdf_wait_for_event_completion(&hostapd_state->qdf_event, 10000);
if (!QDF_IS_STATUS_SUCCESS(status)) {
hdd_err("wait for qdf_event failed, STA not allowed!!");
return false;
Expand Down Expand Up @@ -18679,7 +18679,7 @@ int __wlan_hdd_cfg80211_del_station(struct wiphy *wiphy,
pAdapter->aStaInfo[i].
isDeauthInProgress = true;
qdf_status =
qdf_wait_single_event(
qdf_wait_for_event_completion(
&hapd_state->
qdf_sta_disassoc_event,
SME_CMD_TIMEOUT_VALUE);
Expand Down Expand Up @@ -18744,10 +18744,10 @@ int __wlan_hdd_cfg80211_del_station(struct wiphy *wiphy,
MAC_ADDR_ARRAY(mac));
return -ENOENT;
} else {
qdf_status = qdf_wait_single_event(
&hapd_state->
qdf_sta_disassoc_event,
SME_CMD_TIMEOUT_VALUE);
qdf_status = qdf_wait_for_event_completion(
&hapd_state->
qdf_sta_disassoc_event,
SME_CMD_TIMEOUT_VALUE);
if (!QDF_IS_STATUS_SUCCESS(qdf_status))
hdd_warn("Deauth wait time expired");
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1294,6 +1294,7 @@ static void hdd_cleanup_on_fw_down(void)
ENTER();

hdd_ctx = cds_get_context(QDF_MODULE_ID_HDD);
qdf_complete_wait_events();
cds_set_target_ready(false);
if (hdd_ctx != NULL)
hdd_cleanup_scan_queue(hdd_ctx, NULL);
Expand Down
6 changes: 3 additions & 3 deletions drivers/staging/qcacld-3.0/core/hdd/src/wlan_hdd_hostapd.c
Original file line number Diff line number Diff line change
Expand Up @@ -5353,7 +5353,7 @@ __iw_softap_stopbss(struct net_device *dev,
WLAN_HDD_GET_SAP_CTX_PTR(pHostapdAdapter));
if (QDF_IS_STATUS_SUCCESS(status)) {
qdf_status =
qdf_wait_single_event(&pHostapdState->
qdf_wait_for_event_completion(&pHostapdState->
qdf_stop_bss_event,
SME_CMD_TIMEOUT_VALUE);

Expand Down Expand Up @@ -8665,7 +8665,7 @@ int wlan_hdd_cfg80211_start_bss(hdd_adapter_t *pHostapdAdapter,

hdd_debug("Waiting for Scan to complete(auto mode) and BSS to start");

qdf_status = qdf_wait_single_event(&pHostapdState->qdf_event,
qdf_status = qdf_wait_for_event_completion(&pHostapdState->qdf_event,
SME_CMD_TIMEOUT_VALUE);

wlansap_reset_sap_config_add_ie(pConfig, eUPDATE_IE_ALL);
Expand Down Expand Up @@ -8891,7 +8891,7 @@ static int __wlan_hdd_cfg80211_stop_ap(struct wiphy *wiphy,
status = wlansap_stop_bss(WLAN_HDD_GET_SAP_CTX_PTR(pAdapter));
if (QDF_IS_STATUS_SUCCESS(status)) {
qdf_status =
qdf_wait_single_event(&pHostapdState->
qdf_wait_for_event_completion(&pHostapdState->
qdf_stop_bss_event,
SME_CMD_TIMEOUT_VALUE);

Expand Down
Loading

0 comments on commit 4cc01dd

Please sign in to comment.