qcacld-3.0: Fix kernel module check patch warnings in WMA files
Fix kernel module check patch warnings in WMA files Change-Id: I236fc58152787a7ee906e5aa7d19f917ac69a17a CRs-fixed: 2030824
Esse commit está contido em:
@@ -215,7 +215,8 @@ enum ds_mode {
|
||||
#define WMA_ROAM_LOW_RSSI_TRIGGER_VERYLOW (10)
|
||||
#define WMA_ROAM_BEACON_WEIGHT_DEFAULT (14)
|
||||
#define WMA_ROAM_OPP_SCAN_PERIOD_DEFAULT (120000)
|
||||
#define WMA_ROAM_OPP_SCAN_AGING_PERIOD_DEFAULT (WMA_ROAM_OPP_SCAN_PERIOD_DEFAULT * 5)
|
||||
#define WMA_ROAM_OPP_SCAN_AGING_PERIOD_DEFAULT \
|
||||
(WMA_ROAM_OPP_SCAN_PERIOD_DEFAULT * 5)
|
||||
#define WMA_ROAM_BMISS_FIRST_BCNT_DEFAULT (10)
|
||||
#define WMA_ROAM_BMISS_FINAL_BCNT_DEFAULT (10)
|
||||
#define WMA_ROAM_BMISS_FIRST_BCNT_DEFAULT_P2P (15)
|
||||
@@ -627,6 +628,7 @@ enum wma_phy_idx {
|
||||
struct wma_mem_chunk {
|
||||
uint32_t *vaddr;
|
||||
uint32_t paddr;
|
||||
|
||||
qdf_dma_mem_context(memctx);
|
||||
uint32_t len;
|
||||
uint32_t req_id;
|
||||
@@ -1477,6 +1479,7 @@ typedef struct {
|
||||
* the serialized MC thread context with a timer.
|
||||
*/
|
||||
qdf_mc_timer_t service_ready_ext_timer;
|
||||
|
||||
QDF_STATUS (*csr_roam_synch_cb)(tpAniSirGlobal mac,
|
||||
roam_offload_synch_ind *roam_synch_data,
|
||||
tpSirBssDescription bss_desc_ptr,
|
||||
|
@@ -54,7 +54,7 @@ typedef void *WMA_HANDLE;
|
||||
* @GEN_PARAM_RESET_TSF_GPIO: reset tsf gpio
|
||||
* @GEN_VDEV_ROAM_SYNCH_DELAY: roam sync delay
|
||||
*/
|
||||
typedef enum {
|
||||
enum GEN_PARAM {
|
||||
GEN_VDEV_PARAM_AMPDU = 0x1,
|
||||
GEN_VDEV_PARAM_AMSDU,
|
||||
GEN_PARAM_CRASH_INJECT,
|
||||
@@ -62,7 +62,7 @@ typedef enum {
|
||||
GEN_PARAM_CAPTURE_TSF,
|
||||
GEN_PARAM_RESET_TSF_GPIO,
|
||||
GEN_VDEV_ROAM_SYNCH_DELAY,
|
||||
} GEN_PARAM;
|
||||
};
|
||||
|
||||
/**
|
||||
* struct wma_caps_per_phy - various caps per phy
|
||||
|
@@ -43,23 +43,25 @@
|
||||
#error "more than one ANI_OS_TYPE_xxx is defined for this build"
|
||||
#endif
|
||||
|
||||
#elif defined (ANI_OS_TYPE_QNX) /* QNX */
|
||||
#elif defined(ANI_OS_TYPE_QNX) /* QNX */
|
||||
|
||||
#if defined(ANI_OS_TYPE_ANDROID)
|
||||
#error "more than one ANI_OS_TYPE_xxx is defined for this build"
|
||||
#endif
|
||||
|
||||
#elif !defined(ANI_OS_TYPE_ANDROID) && !defined(ANI_OS_TYPE_QNX) /* NONE */
|
||||
#elif !defined(ANI_OS_TYPE_ANDROID) && !defined(ANI_OS_TYPE_QNX) /* NONE */
|
||||
#error "NONE of the ANI_OS_TYPE_xxx are defined for this build"
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Validate the compiler
|
||||
*/
|
||||
#if (defined (ANI_COMPILER_TYPE_MSVC) && defined (ANI_COMPILER_TYPE_GCC) && defined (ANI_COMPILER_TYPE_RVCT))
|
||||
#if (defined(ANI_COMPILER_TYPE_MSVC) && defined(ANI_COMPILER_TYPE_GCC) && \
|
||||
defined(ANI_COMPILER_TYPE_RVCT))
|
||||
#error "more than one ANI_COMPILER_TYPE_xxx is defined for this build"
|
||||
|
||||
#elif !(defined (ANI_COMPILER_TYPE_MSVC) || defined (ANI_COMPILER_TYPE_GCC) || defined (ANI_COMPILER_TYPE_RVCT))
|
||||
#elif !(defined(ANI_COMPILER_TYPE_MSVC) || defined(ANI_COMPILER_TYPE_GCC) || \
|
||||
defined(ANI_COMPILER_TYPE_RVCT))
|
||||
#error "NONE of the ANI_COMPILER_TYPE_xxx are defined for this build"
|
||||
|
||||
#endif
|
||||
|
@@ -343,21 +343,18 @@ QDF_STATUS wma_extscan_start_hotlist_monitor(tp_wma_handle wma,
|
||||
*photlist);
|
||||
|
||||
QDF_STATUS wma_extscan_stop_hotlist_monitor(tp_wma_handle wma,
|
||||
tSirExtScanResetBssidHotlistReqParams
|
||||
*photlist_reset);
|
||||
tSirExtScanResetBssidHotlistReqParams *photlist_reset);
|
||||
|
||||
QDF_STATUS wma_get_buf_extscan_change_monitor_cmd(tp_wma_handle wma_handle,
|
||||
tSirExtScanSetSigChangeReqParams
|
||||
*psigchange, wmi_buf_t *buf,
|
||||
int *buf_len);
|
||||
tSirExtScanSetSigChangeReqParams *psigchange,
|
||||
wmi_buf_t *buf, int *buf_len);
|
||||
|
||||
QDF_STATUS wma_extscan_start_change_monitor(tp_wma_handle wma,
|
||||
tSirExtScanSetSigChangeReqParams *
|
||||
psigchange);
|
||||
|
||||
QDF_STATUS wma_extscan_stop_change_monitor(tp_wma_handle wma,
|
||||
tSirExtScanResetSignificantChangeReqParams
|
||||
*pResetReq);
|
||||
tSirExtScanResetSignificantChangeReqParams *pResetReq);
|
||||
|
||||
QDF_STATUS wma_extscan_get_cached_results(tp_wma_handle wma,
|
||||
tSirExtScanGetCachedResultsReqParams *
|
||||
@@ -380,7 +377,7 @@ QDF_STATUS wma_ipa_offload_enable_disable(tp_wma_handle wma,
|
||||
struct sir_ipa_offload_enable_disable *ipa_offload);
|
||||
|
||||
void wma_process_unit_test_cmd(WMA_HANDLE handle,
|
||||
t_wma_unit_test_cmd * wma_utest);
|
||||
t_wma_unit_test_cmd *wma_utest);
|
||||
|
||||
QDF_STATUS wma_scan_probe_setoui(tp_wma_handle wma, tSirScanMacOui *psetoui);
|
||||
|
||||
@@ -534,8 +531,8 @@ struct cdp_vdev *wma_vdev_attach(tp_wma_handle wma_handle,
|
||||
struct add_sta_self_params *self_sta_req,
|
||||
uint8_t generateRsp);
|
||||
|
||||
QDF_STATUS wma_vdev_start(tp_wma_handle wma,
|
||||
struct wma_vdev_start_req *req, bool isRestart);
|
||||
QDF_STATUS wma_vdev_start(tp_wma_handle wma, struct wma_vdev_start_req *req,
|
||||
bool isRestart);
|
||||
|
||||
void wma_vdev_resp_timer(void *data);
|
||||
|
||||
@@ -680,8 +677,7 @@ void wma_disable_sta_ps_mode(tp_wma_handle wma, tpDisablePsParams ps_req);
|
||||
|
||||
void wma_enable_uapsd_mode(tp_wma_handle wma, tpEnableUapsdParams ps_req);
|
||||
|
||||
void wma_disable_uapsd_mode(tp_wma_handle wma,
|
||||
tpDisableUapsdParams ps_req);
|
||||
void wma_disable_uapsd_mode(tp_wma_handle wma, tpDisableUapsdParams ps_req);
|
||||
|
||||
QDF_STATUS wma_get_temperature(tp_wma_handle wma_handle);
|
||||
|
||||
@@ -804,7 +800,7 @@ int wma_stats_ext_event_handler(void *handle, uint8_t *event_buf,
|
||||
uint32_t len);
|
||||
#endif
|
||||
|
||||
tSmpsModeValue host_map_smps_mode(A_UINT32 fw_smps_mode);
|
||||
enum eSmpsModeValue host_map_smps_mode(A_UINT32 fw_smps_mode);
|
||||
int wma_smps_mode_to_force_mode_param(uint8_t smps_mode);
|
||||
|
||||
#ifdef WLAN_FEATURE_LINK_LAYER_STATS
|
||||
@@ -817,7 +813,7 @@ QDF_STATUS wma_process_ll_stats_set_req
|
||||
(tp_wma_handle wma, const tpSirLLStatsSetReq setReq);
|
||||
|
||||
QDF_STATUS wma_process_ll_stats_get_req
|
||||
(tp_wma_handle wma, const tpSirLLStatsGetReq getReq) ;
|
||||
(tp_wma_handle wma, const tpSirLLStatsGetReq getReq);
|
||||
|
||||
int wma_unified_link_iface_stats_event_handler(void *handle,
|
||||
uint8_t *cmd_param_info,
|
||||
|
@@ -35,7 +35,8 @@
|
||||
#include "i_cds_packet.h"
|
||||
|
||||
#define IS_MCC_SUPPORTED 1
|
||||
#define IS_FEATURE_SUPPORTED_BY_FW(feat_enum_value) wma_get_fw_wlan_feat_caps(feat_enum_value)
|
||||
#define IS_FEATURE_SUPPORTED_BY_FW(feat_enum_value) \
|
||||
wma_get_fw_wlan_feat_caps(feat_enum_value)
|
||||
|
||||
#define IS_ROAM_SCAN_OFFLOAD_FEATURE_ENABLE 1
|
||||
|
||||
@@ -182,7 +183,7 @@
|
||||
#define WMA_REGISTER_PE_CALLBACK SIR_HAL_REGISTER_PE_CALLBACK
|
||||
|
||||
#define WMA_IBSS_STA_ADD SIR_HAL_IBSS_STA_ADD
|
||||
#define WMA_TIMER_ADJUST_ADAPTIVE_THRESHOLD_IND SIR_HAL_TIMER_ADJUST_ADAPTIVE_THRESHOLD_IND
|
||||
#define WMA_TIMER_ADJUST_ADAPTIVE_THRESHOLD_IND SIR_HAL_TIMER_ADJUST_ADAPTIVE_THRESHOLD_IND
|
||||
#define WMA_SET_LINK_STATE SIR_HAL_SET_LINK_STATE
|
||||
#define WMA_SET_LINK_STATE_RSP SIR_HAL_SET_LINK_STATE_RSP
|
||||
#define WMA_SET_STA_BCASTKEY_REQ SIR_HAL_SET_STA_BCASTKEY_REQ
|
||||
@@ -659,23 +660,23 @@ struct ar6k_testmode_cmd_data {
|
||||
* @WMA_TDLS_PEER_ADD_MAC_ADDR: add peer into connection table
|
||||
* @WMA_TDLS_PEER_REMOVE_MAC_ADDR: remove peer from connection table
|
||||
*/
|
||||
typedef enum {
|
||||
enum WMA_TdlsPeerState {
|
||||
WMA_TDLS_PEER_STATE_PEERING,
|
||||
WMA_TDLS_PEER_STATE_CONNECTED,
|
||||
WMA_TDLS_PEER_STATE_TEARDOWN,
|
||||
WMA_TDLS_PEER_ADD_MAC_ADDR,
|
||||
WMA_TDLS_PEER_REMOVE_MAC_ADDR,
|
||||
} WMA_TdlsPeerState;
|
||||
};
|
||||
|
||||
/**
|
||||
* enum wma_tdls_off_chan_mode - modes for WMI_TDLS_SET_OFFCHAN_MODE_CMDID
|
||||
* @WMA_TDLS_ENABLE_OFFCHANNEL: enable off channel
|
||||
* @WMA_TDLS_DISABLE_OFFCHANNEL: disable off channel
|
||||
*/
|
||||
typedef enum {
|
||||
enum wma_tdls_off_chan_mode {
|
||||
WMA_TDLS_ENABLE_OFFCHANNEL,
|
||||
WMA_TDLS_DISABLE_OFFCHANNEL
|
||||
} wma_tdls_off_chan_mode;
|
||||
};
|
||||
|
||||
#endif /* FEATURE_WLAN_TDLS */
|
||||
|
||||
|
@@ -111,8 +111,8 @@ tSirRetStatus u_mac_post_ctrl_msg(void *pSirGlobal, tSirMbMsg *pMb)
|
||||
struct scheduler_msg msg = {0};
|
||||
tSirRetStatus status = eSIR_SUCCESS;
|
||||
tpAniSirGlobal pMac = (tpAniSirGlobal) pSirGlobal;
|
||||
|
||||
tSirMbMsg *pMbLocal;
|
||||
|
||||
msg.type = pMb->type;
|
||||
msg.bodyval = 0;
|
||||
|
||||
|
@@ -83,16 +83,16 @@
|
||||
#include <cdp_txrx_handle.h>
|
||||
#include <wlan_pmo_ucfg_api.h>
|
||||
|
||||
typedef struct {
|
||||
struct wma_search_rate {
|
||||
int32_t rate;
|
||||
uint8_t flag;
|
||||
} wma_search_rate_t;
|
||||
};
|
||||
|
||||
#define WMA_MAX_OFDM_CCK_RATE_TBL_SIZE 12
|
||||
/* In ofdm_cck_rate_tbl->flag, if bit 7 is 1 it's CCK, otherwise it ofdm.
|
||||
* Lower bit carries the ofdm/cck index for encoding the rate
|
||||
*/
|
||||
static wma_search_rate_t ofdm_cck_rate_tbl[WMA_MAX_OFDM_CCK_RATE_TBL_SIZE] = {
|
||||
static struct wma_search_rate ofdm_cck_rate_tbl[WMA_MAX_OFDM_CCK_RATE_TBL_SIZE] = {
|
||||
{540, 4}, /* 4: OFDM 54 Mbps */
|
||||
{480, 0}, /* 0: OFDM 48 Mbps */
|
||||
{360, 5}, /* 5: OFDM 36 Mbps */
|
||||
@@ -109,7 +109,7 @@ static wma_search_rate_t ofdm_cck_rate_tbl[WMA_MAX_OFDM_CCK_RATE_TBL_SIZE] = {
|
||||
|
||||
#define WMA_MAX_VHT20_RATE_TBL_SIZE 9
|
||||
/* In vht20_400ns_rate_tbl flag carries the mcs index for encoding the rate */
|
||||
static wma_search_rate_t vht20_400ns_rate_tbl[WMA_MAX_VHT20_RATE_TBL_SIZE] = {
|
||||
static struct wma_search_rate vht20_400ns_rate_tbl[WMA_MAX_VHT20_RATE_TBL_SIZE] = {
|
||||
{867, 8}, /* MCS8 1SS short GI */
|
||||
{722, 7}, /* MCS7 1SS short GI */
|
||||
{650, 6}, /* MCS6 1SS short GI */
|
||||
@@ -122,7 +122,7 @@ static wma_search_rate_t vht20_400ns_rate_tbl[WMA_MAX_VHT20_RATE_TBL_SIZE] = {
|
||||
};
|
||||
|
||||
/* In vht20_800ns_rate_tbl flag carries the mcs index for encoding the rate */
|
||||
static wma_search_rate_t vht20_800ns_rate_tbl[WMA_MAX_VHT20_RATE_TBL_SIZE] = {
|
||||
static struct wma_search_rate vht20_800ns_rate_tbl[WMA_MAX_VHT20_RATE_TBL_SIZE] = {
|
||||
{780, 8}, /* MCS8 1SS long GI */
|
||||
{650, 7}, /* MCS7 1SS long GI */
|
||||
{585, 6}, /* MCS6 1SS long GI */
|
||||
@@ -136,7 +136,7 @@ static wma_search_rate_t vht20_800ns_rate_tbl[WMA_MAX_VHT20_RATE_TBL_SIZE] = {
|
||||
|
||||
#define WMA_MAX_VHT40_RATE_TBL_SIZE 10
|
||||
/* In vht40_400ns_rate_tbl flag carries the mcs index for encoding the rate */
|
||||
static wma_search_rate_t vht40_400ns_rate_tbl[WMA_MAX_VHT40_RATE_TBL_SIZE] = {
|
||||
static struct wma_search_rate vht40_400ns_rate_tbl[WMA_MAX_VHT40_RATE_TBL_SIZE] = {
|
||||
{2000, 9}, /* MCS9 1SS short GI */
|
||||
{1800, 8}, /* MCS8 1SS short GI */
|
||||
{1500, 7}, /* MCS7 1SS short GI */
|
||||
@@ -149,7 +149,7 @@ static wma_search_rate_t vht40_400ns_rate_tbl[WMA_MAX_VHT40_RATE_TBL_SIZE] = {
|
||||
{150, 0}, /* MCS0 1SS short GI */
|
||||
};
|
||||
|
||||
static wma_search_rate_t vht40_800ns_rate_tbl[WMA_MAX_VHT40_RATE_TBL_SIZE] = {
|
||||
static struct wma_search_rate vht40_800ns_rate_tbl[WMA_MAX_VHT40_RATE_TBL_SIZE] = {
|
||||
{1800, 9}, /* MCS9 1SS long GI */
|
||||
{1620, 8}, /* MCS8 1SS long GI */
|
||||
{1350, 7}, /* MCS7 1SS long GI */
|
||||
@@ -163,7 +163,7 @@ static wma_search_rate_t vht40_800ns_rate_tbl[WMA_MAX_VHT40_RATE_TBL_SIZE] = {
|
||||
};
|
||||
|
||||
#define WMA_MAX_VHT80_RATE_TBL_SIZE 10
|
||||
static wma_search_rate_t vht80_400ns_rate_tbl[WMA_MAX_VHT80_RATE_TBL_SIZE] = {
|
||||
static struct wma_search_rate vht80_400ns_rate_tbl[WMA_MAX_VHT80_RATE_TBL_SIZE] = {
|
||||
{4333, 9}, /* MCS9 1SS short GI */
|
||||
{3900, 8}, /* MCS8 1SS short GI */
|
||||
{3250, 7}, /* MCS7 1SS short GI */
|
||||
@@ -176,7 +176,7 @@ static wma_search_rate_t vht80_400ns_rate_tbl[WMA_MAX_VHT80_RATE_TBL_SIZE] = {
|
||||
{325, 0} /* MCS0 1SS short GI */
|
||||
};
|
||||
|
||||
static wma_search_rate_t vht80_800ns_rate_tbl[WMA_MAX_VHT80_RATE_TBL_SIZE] = {
|
||||
static struct wma_search_rate vht80_800ns_rate_tbl[WMA_MAX_VHT80_RATE_TBL_SIZE] = {
|
||||
{3900, 9}, /* MCS9 1SS long GI */
|
||||
{3510, 8}, /* MCS8 1SS long GI */
|
||||
{2925, 7}, /* MCS7 1SS long GI */
|
||||
@@ -190,7 +190,7 @@ static wma_search_rate_t vht80_800ns_rate_tbl[WMA_MAX_VHT80_RATE_TBL_SIZE] = {
|
||||
};
|
||||
|
||||
#define WMA_MAX_HT20_RATE_TBL_SIZE 8
|
||||
static wma_search_rate_t ht20_400ns_rate_tbl[WMA_MAX_HT20_RATE_TBL_SIZE] = {
|
||||
static struct wma_search_rate ht20_400ns_rate_tbl[WMA_MAX_HT20_RATE_TBL_SIZE] = {
|
||||
{722, 7}, /* MCS7 1SS short GI */
|
||||
{650, 6}, /* MCS6 1SS short GI */
|
||||
{578, 5}, /* MCS5 1SS short GI */
|
||||
@@ -201,7 +201,7 @@ static wma_search_rate_t ht20_400ns_rate_tbl[WMA_MAX_HT20_RATE_TBL_SIZE] = {
|
||||
{72, 0} /* MCS0 1SS short GI */
|
||||
};
|
||||
|
||||
static wma_search_rate_t ht20_800ns_rate_tbl[WMA_MAX_HT20_RATE_TBL_SIZE] = {
|
||||
static struct wma_search_rate ht20_800ns_rate_tbl[WMA_MAX_HT20_RATE_TBL_SIZE] = {
|
||||
{650, 7}, /* MCS7 1SS long GI */
|
||||
{585, 6}, /* MCS6 1SS long GI */
|
||||
{520, 5}, /* MCS5 1SS long GI */
|
||||
@@ -213,7 +213,7 @@ static wma_search_rate_t ht20_800ns_rate_tbl[WMA_MAX_HT20_RATE_TBL_SIZE] = {
|
||||
};
|
||||
|
||||
#define WMA_MAX_HT40_RATE_TBL_SIZE 8
|
||||
static wma_search_rate_t ht40_400ns_rate_tbl[WMA_MAX_HT40_RATE_TBL_SIZE] = {
|
||||
static struct wma_search_rate ht40_400ns_rate_tbl[WMA_MAX_HT40_RATE_TBL_SIZE] = {
|
||||
{1500, 7}, /* MCS7 1SS short GI */
|
||||
{1350, 6}, /* MCS6 1SS short GI */
|
||||
{1200, 5}, /* MCS5 1SS short GI */
|
||||
@@ -224,7 +224,7 @@ static wma_search_rate_t ht40_400ns_rate_tbl[WMA_MAX_HT40_RATE_TBL_SIZE] = {
|
||||
{150, 0} /* MCS0 1SS short GI */
|
||||
};
|
||||
|
||||
static wma_search_rate_t ht40_800ns_rate_tbl[WMA_MAX_HT40_RATE_TBL_SIZE] = {
|
||||
static struct wma_search_rate ht40_800ns_rate_tbl[WMA_MAX_HT40_RATE_TBL_SIZE] = {
|
||||
{1350, 7}, /* MCS7 1SS long GI */
|
||||
{1215, 6}, /* MCS6 1SS long GI */
|
||||
{1080, 5}, /* MCS5 1SS long GI */
|
||||
@@ -244,13 +244,14 @@ static wma_search_rate_t ht40_800ns_rate_tbl[WMA_MAX_HT40_RATE_TBL_SIZE] = {
|
||||
*
|
||||
* Return: none
|
||||
*/
|
||||
static void wma_bin_search_rate(wma_search_rate_t *tbl, int32_t tbl_size,
|
||||
static void wma_bin_search_rate(struct wma_search_rate *tbl, int32_t tbl_size,
|
||||
int32_t *mbpsx10_rate, uint8_t *ret_flag)
|
||||
{
|
||||
int32_t upper, lower, mid;
|
||||
|
||||
/* the table is descenting. index holds the largest value and the
|
||||
* bottom index holds the smallest value */
|
||||
* bottom index holds the smallest value
|
||||
*/
|
||||
|
||||
upper = 0; /* index 0 */
|
||||
lower = tbl_size - 1; /* last index */
|
||||
@@ -274,16 +275,15 @@ static void wma_bin_search_rate(wma_search_rate_t *tbl, int32_t tbl_size,
|
||||
*mbpsx10_rate = tbl[mid].rate;
|
||||
*ret_flag = tbl[mid].flag;
|
||||
return;
|
||||
} else {
|
||||
/* not found. if mid's rate is larger than input move
|
||||
* upper to mid. If mid's rate is larger than input
|
||||
* move lower to mid.
|
||||
*/
|
||||
if (*mbpsx10_rate > tbl[mid].rate)
|
||||
lower = mid;
|
||||
else
|
||||
upper = mid;
|
||||
}
|
||||
/* not found. if mid's rate is larger than input move
|
||||
* upper to mid. If mid's rate is larger than input
|
||||
* move lower to mid.
|
||||
*/
|
||||
if (*mbpsx10_rate > tbl[mid].rate)
|
||||
lower = mid;
|
||||
else
|
||||
upper = mid;
|
||||
}
|
||||
/* after the bin search the index is the ceiling of rate */
|
||||
*mbpsx10_rate = tbl[upper].rate;
|
||||
@@ -303,6 +303,7 @@ static QDF_STATUS wma_fill_ofdm_cck_mcast_rate(int32_t mbpsx10_rate,
|
||||
uint8_t nss, uint8_t *rate)
|
||||
{
|
||||
uint8_t idx = 0;
|
||||
|
||||
wma_bin_search_rate(ofdm_cck_rate_tbl, WMA_MAX_OFDM_CCK_RATE_TBL_SIZE,
|
||||
&mbpsx10_rate, &idx);
|
||||
|
||||
@@ -360,6 +361,7 @@ static QDF_STATUS wma_fill_ht20_mcast_rate(uint32_t shortgi,
|
||||
{
|
||||
uint8_t sgi_idx = 0, lgi_idx = 0;
|
||||
int32_t sgi_rate, lgi_rate;
|
||||
|
||||
if (nss == 1)
|
||||
mbpsx10_rate = mbpsx10_rate >> 1;
|
||||
|
||||
@@ -640,8 +642,7 @@ static QDF_STATUS wma_encode_mc_rate(uint32_t shortgi, uint32_t chwidth,
|
||||
* (3) 540 < mbpsx10_rate <= 2000: use 1x1 HT/VHT
|
||||
* (4) 2000 < mbpsx10_rate: use 2x2 HT/VHT
|
||||
*/
|
||||
WMA_LOGE("%s: Input: nss = %d, chanmode = %d, "
|
||||
"mbpsx10 = 0x%x, chwidth = %d, shortgi = %d",
|
||||
WMA_LOGE("%s: Input: nss = %d, chanmode = %d, mbpsx10 = 0x%x, chwidth = %d, shortgi = %d",
|
||||
__func__, nss, chanmode, mbpsx10_rate, chwidth, shortgi);
|
||||
if ((mbpsx10_rate & 0x40000000) && nss > 0) {
|
||||
/* bit 30 indicates user inputed nss,
|
||||
@@ -674,9 +675,8 @@ static QDF_STATUS wma_encode_mc_rate(uint32_t shortgi, uint32_t chwidth,
|
||||
ret = wma_fill_ht_mcast_rate(shortgi, chwidth, mbpsx10_rate,
|
||||
nss, chanmode, &rate_ht,
|
||||
&stream_rate_ht);
|
||||
if (ret != QDF_STATUS_SUCCESS) {
|
||||
if (ret != QDF_STATUS_SUCCESS)
|
||||
stream_rate_ht = 0;
|
||||
}
|
||||
if (mhz < WMA_2_4_GHZ_MAX_FREQ) {
|
||||
/* not in 5 GHZ frequency */
|
||||
*rate = rate_ht;
|
||||
@@ -717,11 +717,10 @@ static QDF_STATUS wma_encode_mc_rate(uint32_t shortgi, uint32_t chwidth,
|
||||
}
|
||||
}
|
||||
ht_vht_done:
|
||||
WMA_LOGE("%s: NSS = %d, ucast_chanmode = %d, "
|
||||
"freq = %d, input_rate = %d, chwidth = %d "
|
||||
"rate = 0x%x, streaming_rate = %d",
|
||||
__func__, nss, chanmode, mhz,
|
||||
mbpsx10_rate, chwidth, *rate, stream_rate);
|
||||
WMA_LOGE("%s: NSS = %d, ucast_chanmode = %d, freq = %d",
|
||||
__func__, nss, chanmode, mhz);
|
||||
WMA_LOGD(" %s: input_rate = %d, chwidth = %d rate = 0x%x, streaming_rate = %d",
|
||||
__func__, mbpsx10_rate, chwidth, *rate, stream_rate);
|
||||
} else {
|
||||
if (mbpsx10_rate > 0)
|
||||
ret = wma_fill_ofdm_cck_mcast_rate(mbpsx10_rate,
|
||||
@@ -729,8 +728,7 @@ ht_vht_done:
|
||||
else
|
||||
*rate = 0xFF;
|
||||
|
||||
WMA_LOGE("%s: NSS = %d, ucast_chanmode = %d, "
|
||||
"input_rate = %d, rate = 0x%x",
|
||||
WMA_LOGE("%s: NSS = %d, ucast_chanmode = %d, input_rate = %d, rate = 0x%x",
|
||||
__func__, nss, chanmode, mbpsx10_rate, *rate);
|
||||
}
|
||||
return ret;
|
||||
@@ -924,18 +922,16 @@ free_nbuf:
|
||||
void wma_update_txrx_chainmask(int num_rf_chains, int *cmd_value)
|
||||
{
|
||||
if (*cmd_value > WMA_MAX_RF_CHAINS(num_rf_chains)) {
|
||||
WMA_LOGE("%s: Chainmask value exceeds the maximum"
|
||||
" supported range setting it to"
|
||||
" maximum value. Requested value %d"
|
||||
" Updated value %d", __func__, *cmd_value,
|
||||
WMA_MAX_RF_CHAINS(num_rf_chains));
|
||||
WMA_LOGE("%s: Chainmask value exceeds the maximum supported range setting it to maximum value.",
|
||||
__func__);
|
||||
WMA_LOGE("%s: Requested value %d Updated value %d",
|
||||
__func__, *cmd_value, WMA_MAX_RF_CHAINS(num_rf_chains));
|
||||
*cmd_value = WMA_MAX_RF_CHAINS(num_rf_chains);
|
||||
} else if (*cmd_value < WMA_MIN_RF_CHAINS) {
|
||||
WMA_LOGE("%s: Chainmask value is less than the minimum"
|
||||
" supported range setting it to"
|
||||
" minimum value. Requested value %d"
|
||||
" Updated value %d", __func__, *cmd_value,
|
||||
WMA_MIN_RF_CHAINS);
|
||||
WMA_LOGE("%s: Chainmask value is less than the minimum supported range setting it to minimum value.",
|
||||
__func__);
|
||||
WMA_LOGE("%s: Requested value %d Updated value %d",
|
||||
__func__, *cmd_value, WMA_MIN_RF_CHAINS);
|
||||
*cmd_value = WMA_MIN_RF_CHAINS;
|
||||
}
|
||||
}
|
||||
@@ -1046,8 +1042,7 @@ QDF_STATUS wma_set_enable_disable_mcc_adaptive_scheduler(uint32_t
|
||||
*
|
||||
* Return: QDF status
|
||||
*/
|
||||
QDF_STATUS wma_set_mcc_channel_time_latency
|
||||
(tp_wma_handle wma,
|
||||
QDF_STATUS wma_set_mcc_channel_time_latency(tp_wma_handle wma,
|
||||
uint32_t mcc_channel, uint32_t mcc_channel_time_latency)
|
||||
{
|
||||
uint32_t cfg_val = 0;
|
||||
@@ -1077,8 +1072,8 @@ QDF_STATUS wma_set_mcc_channel_time_latency
|
||||
if (wlan_cfg_get_int(pMac, WNI_CFG_ENABLE_MCC_ADAPTIVE_SCHED,
|
||||
&cfg_val) == eSIR_SUCCESS) {
|
||||
if (cfg_val == WNI_CFG_ENABLE_MCC_ADAPTIVE_SCHED_STAMAX) {
|
||||
WMA_LOGD("%s: Can't set channel latency while MCC "
|
||||
"ADAPTIVE SCHED is enabled. Exit", __func__);
|
||||
WMA_LOGD("%s: Can't set channel latency while MCC ADAPTIVE SCHED is enabled. Exit",
|
||||
__func__);
|
||||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
} else {
|
||||
@@ -1109,10 +1104,9 @@ QDF_STATUS wma_set_mcc_channel_time_latency
|
||||
*
|
||||
* Return: QDF status
|
||||
*/
|
||||
QDF_STATUS wma_set_mcc_channel_time_quota
|
||||
(tp_wma_handle wma,
|
||||
uint32_t adapter_1_chan_number,
|
||||
uint32_t adapter_1_quota, uint32_t adapter_2_chan_number)
|
||||
QDF_STATUS wma_set_mcc_channel_time_quota(tp_wma_handle wma,
|
||||
uint32_t adapter_1_chan_number, uint32_t adapter_1_quota,
|
||||
uint32_t adapter_2_chan_number)
|
||||
{
|
||||
uint32_t cfg_val = 0;
|
||||
struct sAniSirGlobal *pMac = NULL;
|
||||
@@ -1142,14 +1136,13 @@ QDF_STATUS wma_set_mcc_channel_time_quota
|
||||
if (wlan_cfg_get_int(pMac, WNI_CFG_ENABLE_MCC_ADAPTIVE_SCHED,
|
||||
&cfg_val) == eSIR_SUCCESS) {
|
||||
if (cfg_val == WNI_CFG_ENABLE_MCC_ADAPTIVE_SCHED_STAMAX) {
|
||||
WMA_LOGD("%s: Can't set channel quota while "
|
||||
"MCC_ADAPTIVE_SCHED is enabled. Exit",
|
||||
WMA_LOGD("%s: Can't set channel quota while MCC_ADAPTIVE_SCHED is enabled. Exit",
|
||||
__func__);
|
||||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
} else {
|
||||
WMA_LOGE("%s: Failed to retrieve "
|
||||
"WNI_CFG_ENABLE_MCC_ADAPTIVE_SCHED. Exit", __func__);
|
||||
WMA_LOGE("%s: Failed to retrieve WNI_CFG_ENABLE_MCC_ADAPTIVE_SCHED. Exit",
|
||||
__func__);
|
||||
QDF_ASSERT(0);
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
}
|
||||
@@ -1309,7 +1302,7 @@ QDF_STATUS wma_process_rate_update_indicate(tp_wma_handle wma,
|
||||
if (short_gi == 0)
|
||||
short_gi = (intr[vdev_id].rate_flags & eHAL_TX_RATE_SGI) ?
|
||||
true : false;
|
||||
/* first check if reliable TX mcast rate is used. If not check the bcast.
|
||||
/* first check if reliable TX mcast rate is used. If not check the bcast
|
||||
* Then is mcast. Mcast rate is saved in mcastDataRate24GHz
|
||||
*/
|
||||
if (pRateUpdateParams->reliableMcastDataRateTxFlag > 0) {
|
||||
@@ -1328,10 +1321,11 @@ QDF_STATUS wma_process_rate_update_indicate(tp_wma_handle wma,
|
||||
mcastDataRate24GHzTxFlag & eHAL_TX_RATE_SGI)
|
||||
short_gi = 1; /* upper layer specified short GI */
|
||||
}
|
||||
WMA_LOGE("%s: dev_id = %d, dev_type = %d, dev_mode = %d, "
|
||||
"mac = %pM, config.shortgi = %d, rate_flags = 0x%x",
|
||||
WMA_LOGE("%s: dev_id = %d, dev_type = %d, dev_mode = %d,",
|
||||
__func__, vdev_id, intr[vdev_id].type,
|
||||
pRateUpdateParams->dev_mode, pRateUpdateParams->bssid.bytes,
|
||||
pRateUpdateParams->dev_mode);
|
||||
WMA_LOGE("%s: mac = %pM, config.shortgi = %d, rate_flags = 0x%x",
|
||||
__func__, pRateUpdateParams->bssid.bytes,
|
||||
intr[vdev_id].config.shortgi, intr[vdev_id].rate_flags);
|
||||
ret = wma_encode_mc_rate(short_gi, intr[vdev_id].config.chwidth,
|
||||
intr[vdev_id].chanmode, intr[vdev_id].mhz,
|
||||
@@ -1344,7 +1338,7 @@ QDF_STATUS wma_process_rate_update_indicate(tp_wma_handle wma,
|
||||
status = wma_vdev_set_param(wma->wmi_handle, vdev_id,
|
||||
WMI_VDEV_PARAM_SGI, short_gi);
|
||||
if (QDF_IS_STATUS_ERROR(status)) {
|
||||
WMA_LOGE("%s: Failed to Set WMI_VDEV_PARAM_SGI (%d), status = %d",
|
||||
WMA_LOGE("%s: Fail to Set WMI_VDEV_PARAM_SGI(%d), status = %d",
|
||||
__func__, short_gi, status);
|
||||
qdf_mem_free(pRateUpdateParams);
|
||||
return status;
|
||||
@@ -1353,7 +1347,7 @@ QDF_STATUS wma_process_rate_update_indicate(tp_wma_handle wma,
|
||||
vdev_id, paramId, rate);
|
||||
qdf_mem_free(pRateUpdateParams);
|
||||
if (QDF_IS_STATUS_ERROR(status)) {
|
||||
WMA_LOGE("%s: Failed to Set rate, status = %d", __func__, status);
|
||||
WMA_LOGE("%s: Fail to Set rate, status = %d", __func__, status);
|
||||
return status;
|
||||
}
|
||||
|
||||
@@ -1446,8 +1440,8 @@ wma_mgmt_tx_ack_comp_hdlr(void *wma_context, qdf_nbuf_t netbuf, int32_t status)
|
||||
} else {
|
||||
struct wma_tx_ack_work_ctx *ack_work;
|
||||
|
||||
ack_work =
|
||||
qdf_mem_malloc(sizeof(struct wma_tx_ack_work_ctx));
|
||||
ack_work = qdf_mem_malloc(sizeof(
|
||||
struct wma_tx_ack_work_ctx));
|
||||
|
||||
if (ack_work) {
|
||||
ack_work->wma_handle = wma_handle;
|
||||
@@ -1631,7 +1625,8 @@ int wma_mcc_vdev_tx_pause_evt_handler(void *handle, uint8_t *event,
|
||||
vdev_map = wmi_event->vdev_map;
|
||||
/* FW mapped vdev from ID
|
||||
* vdev_map = (1 << vdev_id)
|
||||
* So, host should unmap to ID */
|
||||
* So, host should unmap to ID
|
||||
*/
|
||||
for (vdev_id = 0; vdev_map != 0; vdev_id++) {
|
||||
if (!(vdev_map & 0x1)) {
|
||||
/* No Vdev */
|
||||
@@ -1668,7 +1663,8 @@ int wma_mcc_vdev_tx_pause_evt_handler(void *handle, uint8_t *event,
|
||||
if (!wma->interfaces[vdev_id].
|
||||
pause_bitmap) {
|
||||
/* PAUSE BIT MAP is cleared
|
||||
* UNPAUSE VDEV */
|
||||
* UNPAUSE VDEV
|
||||
*/
|
||||
cdp_fc_vdev_unpause(soc,
|
||||
wma->interfaces[vdev_id]
|
||||
.handle,
|
||||
@@ -1775,7 +1771,8 @@ QDF_STATUS wma_process_init_bad_peer_tx_ctl_info(tp_wma_handle wma,
|
||||
config->txq_limit);
|
||||
|
||||
/* Only need to initialize the setting
|
||||
when the feature is enabled */
|
||||
* when the feature is enabled
|
||||
*/
|
||||
if (config->enable) {
|
||||
int i = 0;
|
||||
|
||||
@@ -1787,8 +1784,8 @@ QDF_STATUS wma_process_init_bad_peer_tx_ctl_info(tp_wma_handle wma,
|
||||
|
||||
for (i = 0; i < WLAN_WMA_IEEE80211_MAX_LEVEL; i++) {
|
||||
u_int32_t threshold, limit;
|
||||
threshold =
|
||||
config->threshold[i].thresh[0];
|
||||
|
||||
threshold = config->threshold[i].thresh[0];
|
||||
limit = config->threshold[i].txlimit;
|
||||
cdp_bad_peer_txctl_update_threshold(soc,
|
||||
curr_pdev,
|
||||
@@ -2103,8 +2100,8 @@ int wma_thermal_mgmt_evt_handler(void *handle, uint8_t *event,
|
||||
tm_event->temperature_degreeC);
|
||||
|
||||
/* Get the thermal mitigation level for the reported temperature */
|
||||
thermal_level =
|
||||
wma_thermal_mgmt_get_level(handle, tm_event->temperature_degreeC);
|
||||
thermal_level = wma_thermal_mgmt_get_level(handle,
|
||||
tm_event->temperature_degreeC);
|
||||
WMA_LOGD("Thermal mgmt level %d", thermal_level);
|
||||
|
||||
if (thermal_level == wma->thermal_mgmt_info.thermalCurrLevel) {
|
||||
@@ -2262,19 +2259,18 @@ int wma_fast_tx_fail_event_handler(void *handle, uint8_t *data,
|
||||
fix_param = param_tlvs->fixed_param;
|
||||
|
||||
WMI_MAC_ADDR_TO_CHAR_ARRAY(&fix_param->peer_mac_address, peer_mac);
|
||||
WMA_LOGE("%s: received fast tx failure event for peer"
|
||||
" 0x:%2x:0x%2x:0x%2x:0x%2x:0x%2x:0x%2x seq No %d", __func__,
|
||||
WMA_LOGE("%s: received fast tx failure event for peer 0x:%2x:0x%2x:0x%2x:0x%2x:0x%2x:0x%2x seq No %d",
|
||||
__func__,
|
||||
peer_mac[0], peer_mac[1], peer_mac[2], peer_mac[3],
|
||||
peer_mac[4], peer_mac[5], fix_param->seq_no);
|
||||
|
||||
tx_fail_cnt = fix_param->seq_no;
|
||||
|
||||
/*call HDD callback */
|
||||
if (NULL != wma->hddTxFailCb) {
|
||||
if (wma->hddTxFailCb != NULL)
|
||||
wma->hddTxFailCb(peer_mac, tx_fail_cnt);
|
||||
} else {
|
||||
else
|
||||
WMA_LOGE("%s: HDD callback is %p", __func__, wma->hddTxFailCb);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -2315,13 +2311,14 @@ static void wma_decap_to_8023(qdf_nbuf_t msdu, struct wma_decap_info_t *info)
|
||||
}
|
||||
}
|
||||
}
|
||||
if (l2_hdr_space > ETHERNET_HDR_LEN) {
|
||||
if (l2_hdr_space > ETHERNET_HDR_LEN)
|
||||
buf = qdf_nbuf_pull_head(msdu, l2_hdr_space - ETHERNET_HDR_LEN);
|
||||
} else if (l2_hdr_space < ETHERNET_HDR_LEN) {
|
||||
else if (l2_hdr_space < ETHERNET_HDR_LEN)
|
||||
buf = qdf_nbuf_push_head(msdu, ETHERNET_HDR_LEN - l2_hdr_space);
|
||||
}
|
||||
|
||||
/* mpdu hdr should be present in info,re-create ethr_hdr based on mpdu hdr */
|
||||
/* mpdu hdr should be present in info,re-create ethr_hdr based on
|
||||
* mpdu hdr
|
||||
*/
|
||||
wh = (struct ieee80211_qosframe_addr4 *)info->hdr;
|
||||
ethr_hdr = (struct ethernet_hdr_t *)local_buf;
|
||||
switch (wh->i_fc[1] & IEEE80211_FC1_DIR_MASK) {
|
||||
@@ -2492,7 +2489,9 @@ QDF_STATUS wma_tx_packet(void *wma_context, void *tx_frame, uint16_t frmLen,
|
||||
if (!IEEE80211_IS_BROADCAST(wh->i_addr1) &&
|
||||
!IEEE80211_IS_MULTICAST(wh->i_addr1)) {
|
||||
if (pFc->wep) {
|
||||
/* Allocate extra bytes for privacy header and trailer */
|
||||
/* Allocate extra bytes for privacy header and
|
||||
* trailer
|
||||
*/
|
||||
newFrmLen = frmLen + IEEE80211_CCMP_HEADERLEN +
|
||||
IEEE80211_CCMP_MICLEN;
|
||||
qdf_status =
|
||||
@@ -2501,8 +2500,8 @@ QDF_STATUS wma_tx_packet(void *wma_context, void *tx_frame, uint16_t frmLen,
|
||||
(void **)&pPacket);
|
||||
|
||||
if (!QDF_IS_STATUS_SUCCESS(qdf_status)) {
|
||||
WMA_LOGP("%s: Failed to allocate %d bytes for RMF status "
|
||||
"code (%x)", __func__, newFrmLen,
|
||||
WMA_LOGP("%s: Failed to allocate %d bytes for RMF status code (%x)",
|
||||
__func__, newFrmLen,
|
||||
qdf_status);
|
||||
/* Free the original packet memory */
|
||||
cds_packet_free((void *)tx_frame);
|
||||
@@ -2536,8 +2535,8 @@ QDF_STATUS wma_tx_packet(void *wma_context, void *tx_frame, uint16_t frmLen,
|
||||
(void **)&pPacket);
|
||||
|
||||
if (!QDF_IS_STATUS_SUCCESS(qdf_status)) {
|
||||
WMA_LOGP("%s: Failed to allocate %d bytes for RMF status "
|
||||
"code (%x)", __func__, newFrmLen,
|
||||
WMA_LOGP("%s: Failed to allocate %d bytes for RMF status code (%x)",
|
||||
__func__, newFrmLen,
|
||||
qdf_status);
|
||||
/* Free the original packet memory */
|
||||
cds_packet_free((void *)tx_frame);
|
||||
@@ -2557,8 +2556,8 @@ QDF_STATUS wma_tx_packet(void *wma_context, void *tx_frame, uint16_t frmLen,
|
||||
WMA_IGTK_KEY_INDEX_4,
|
||||
pFrame,
|
||||
pFrame + newFrmLen, newFrmLen)) {
|
||||
WMA_LOGP("%s: Failed to attach MMIE at the end of "
|
||||
"frame", __func__);
|
||||
WMA_LOGP("%s: Failed to attach MMIE at the end of frame",
|
||||
__func__);
|
||||
/* Free the original packet memory */
|
||||
cds_packet_free((void *)tx_frame);
|
||||
goto error;
|
||||
@@ -2608,8 +2607,8 @@ QDF_STATUS wma_tx_packet(void *wma_context, void *tx_frame, uint16_t frmLen,
|
||||
if (tx_frm_ota_comp_cb) {
|
||||
if (wma_handle->umac_data_ota_ack_cb) {
|
||||
/*
|
||||
* If last data frame was sent more than 5 seconds
|
||||
* ago and still we did not receive ack/nack from
|
||||
* If last data frame was sent more than 5 secs
|
||||
* ago and still we didn't receive ack/nack from
|
||||
* fw then allow Tx of this data frame
|
||||
*/
|
||||
if (curr_timestamp >=
|
||||
@@ -2626,8 +2625,8 @@ QDF_STATUS wma_tx_packet(void *wma_context, void *tx_frame, uint16_t frmLen,
|
||||
}
|
||||
} else {
|
||||
/*
|
||||
* Data Frames are sent through TxRx Non Standard Data Path
|
||||
* so Ack Complete Cb is must
|
||||
* Data Frames are sent through TxRx Non Standard Data
|
||||
* path so Ack Complete Cb is must
|
||||
*/
|
||||
WMA_LOGE("No Ack Complete Cb. Don't Allow");
|
||||
cds_packet_free((void *)tx_frame);
|
||||
@@ -2671,8 +2670,8 @@ QDF_STATUS wma_tx_packet(void *wma_context, void *tx_frame, uint16_t frmLen,
|
||||
/* Call Download Cb so that umac can free the buffer */
|
||||
if (tx_frm_download_comp_cb)
|
||||
tx_frm_download_comp_cb(wma_handle->mac_context,
|
||||
tx_frame,
|
||||
WMA_TX_FRAME_BUFFER_FREE);
|
||||
tx_frame,
|
||||
WMA_TX_FRAME_BUFFER_FREE);
|
||||
wma_handle->umac_data_ota_ack_cb = NULL;
|
||||
wma_handle->last_umac_data_nbuf = NULL;
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
@@ -2732,8 +2731,8 @@ QDF_STATUS wma_tx_packet(void *wma_context, void *tx_frame, uint16_t frmLen,
|
||||
wma_handle->tx_frm_download_comp_cb = tx_frm_download_comp_cb;
|
||||
|
||||
/* Reset the Tx Frame Complete Event */
|
||||
qdf_status =
|
||||
qdf_event_reset(&wma_handle->tx_frm_download_comp_event);
|
||||
qdf_status = qdf_event_reset(
|
||||
&wma_handle->tx_frm_download_comp_event);
|
||||
|
||||
if (!QDF_IS_STATUS_SUCCESS(qdf_status)) {
|
||||
WMA_LOGP("%s: Event Reset failed tx comp event %x",
|
||||
@@ -3103,9 +3102,12 @@ wma_indicate_err(
|
||||
qdf_copy_macaddr(&mic_err_ind->bssId,
|
||||
(struct qdf_mac_addr *) &wma->interfaces[vdev_id].bssid);
|
||||
WMA_LOGE("MIC error: BSSID:%02x:%02x:%02x:%02x:%02x:%02x\n",
|
||||
mic_err_ind->bssId.bytes[0], mic_err_ind->bssId.bytes[1],
|
||||
mic_err_ind->bssId.bytes[2], mic_err_ind->bssId.bytes[3],
|
||||
mic_err_ind->bssId.bytes[4], mic_err_ind->bssId.bytes[5]);
|
||||
mic_err_ind->bssId.bytes[0],
|
||||
mic_err_ind->bssId.bytes[1],
|
||||
mic_err_ind->bssId.bytes[2],
|
||||
mic_err_ind->bssId.bytes[3],
|
||||
mic_err_ind->bssId.bytes[4],
|
||||
mic_err_ind->bssId.bytes[5]);
|
||||
qdf_mem_copy(mic_err_ind->info.taMacAddr,
|
||||
(struct qdf_mac_addr *) err_info->u.mic_err.ta,
|
||||
sizeof(tSirMacAddr));
|
||||
|
@@ -194,6 +194,7 @@ struct cdp_vdev *wma_find_vdev_by_bssid(tp_wma_handle wma, uint8_t *bssid,
|
||||
static enum wlan_op_mode wma_get_txrx_vdev_type(uint32_t type)
|
||||
{
|
||||
enum wlan_op_mode vdev_type = wlan_op_mode_unknown;
|
||||
|
||||
switch (type) {
|
||||
case WMI_VDEV_TYPE_AP:
|
||||
vdev_type = wlan_op_mode_ap;
|
||||
@@ -821,6 +822,7 @@ int wma_vdev_start_resp_handler(void *handle, uint8_t *cmd_param_info,
|
||||
|
||||
#ifdef FEATURE_AP_MCC_CH_AVOIDANCE
|
||||
tpAniSirGlobal mac_ctx = cds_get_context(QDF_MODULE_ID_PE);
|
||||
|
||||
if (NULL == mac_ctx) {
|
||||
wma_release_wmi_resp_wakelock(wma);
|
||||
WMA_LOGE("%s: Failed to get mac_ctx", __func__);
|
||||
@@ -883,8 +885,8 @@ int wma_vdev_start_resp_handler(void *handle, uint8_t *cmd_param_info,
|
||||
iface = &wma->interfaces[resp_event->vdev_id];
|
||||
|
||||
if ((resp_event->vdev_id <= wma->max_bssid) &&
|
||||
(qdf_atomic_read
|
||||
(&wma->interfaces[resp_event->vdev_id].vdev_restart_params.hidden_ssid_restart_in_progress))
|
||||
(qdf_atomic_read(
|
||||
&wma->interfaces[resp_event->vdev_id].vdev_restart_params.hidden_ssid_restart_in_progress))
|
||||
&& (wma_is_vdev_in_ap_mode(wma, resp_event->vdev_id) == true)) {
|
||||
WMA_LOGE("%s: vdev restart event recevied for hidden ssid set using IOCTL",
|
||||
__func__);
|
||||
@@ -984,6 +986,7 @@ int wma_vdev_start_resp_handler(void *handle, uint8_t *cmd_param_info,
|
||||
wma_send_msg(wma, WMA_SWITCH_CHANNEL_RSP, (void *)params, 0);
|
||||
} else if (req_msg->msg_type == WMA_ADD_BSS_REQ) {
|
||||
tpAddBssParams bssParams = (tpAddBssParams) req_msg->user_data;
|
||||
|
||||
qdf_mem_copy(iface->bssid, bssParams->bssId,
|
||||
IEEE80211_ADDR_LEN);
|
||||
wma_vdev_start_rsp(wma, bssParams, resp_event);
|
||||
@@ -1027,6 +1030,7 @@ wma_vdev_set_param(wmi_unified_t wmi_handle, uint32_t if_id,
|
||||
uint32_t param_id, uint32_t param_value)
|
||||
{
|
||||
struct vdev_set_params param = {0};
|
||||
|
||||
param.if_id = if_id;
|
||||
param.param_id = param_id;
|
||||
param.param_value = param_value;
|
||||
@@ -1044,6 +1048,7 @@ wma_vdev_set_param(wmi_unified_t wmi_handle, uint32_t if_id,
|
||||
void wma_set_peer_authorized_cb(void *wma_ctx, wma_peer_authorized_fp auth_cb)
|
||||
{
|
||||
tp_wma_handle wma_handle = (tp_wma_handle) wma_ctx;
|
||||
|
||||
wma_handle->peer_authorized_cb = auth_cb;
|
||||
}
|
||||
|
||||
@@ -1196,8 +1201,7 @@ QDF_STATUS wma_create_peer(tp_wma_handle wma, struct cdp_pdev *pdev,
|
||||
}
|
||||
|
||||
if (roam_synch_in_progress) {
|
||||
WMA_LOGI("%s: LFR3: Created peer %p with peer_addr %pM vdev_id %d,"
|
||||
"peer_count - %d",
|
||||
WMA_LOGI("%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;
|
||||
@@ -1230,8 +1234,8 @@ QDF_STATUS wma_create_peer(tp_wma_handle wma, struct cdp_pdev *pdev,
|
||||
/* for each remote ibss peer, clear its keys */
|
||||
if (wma_is_vdev_in_ibss_mode(wma, vdev_id) &&
|
||||
qdf_mem_cmp(peer_addr, mac_addr_raw, IEEE80211_ADDR_LEN)) {
|
||||
|
||||
tSetStaKeyParams key_info;
|
||||
|
||||
WMA_LOGD("%s: remote ibss peer %pM key clearing\n", __func__,
|
||||
peer_addr);
|
||||
qdf_mem_set(&key_info, sizeof(key_info), 0);
|
||||
@@ -1433,6 +1437,7 @@ int wma_vdev_stop_resp_handler(void *handle, uint8_t *cmd_param_info,
|
||||
|
||||
#ifdef FEATURE_AP_MCC_CH_AVOIDANCE
|
||||
tpAniSirGlobal mac_ctx = cds_get_context(QDF_MODULE_ID_PE);
|
||||
|
||||
if (NULL == mac_ctx) {
|
||||
wma_release_wmi_resp_wakelock(wma);
|
||||
WMA_LOGE("%s: Failed to get mac_ctx", __func__);
|
||||
@@ -1550,8 +1555,8 @@ int wma_vdev_stop_resp_handler(void *handle, uint8_t *cmd_param_info,
|
||||
bcn = wma->interfaces[resp_event->vdev_id].beacon;
|
||||
|
||||
if (bcn) {
|
||||
WMA_LOGD("%s: Freeing beacon struct %p, "
|
||||
"template memory %p", __func__, bcn, bcn->buf);
|
||||
WMA_LOGD("%s: Freeing beacon struct %p, template memory %p",
|
||||
__func__, bcn, bcn->buf);
|
||||
if (bcn->dma_mapped)
|
||||
qdf_nbuf_unmap_single(wma->qdf_dev, bcn->buf,
|
||||
QDF_DMA_TO_DEVICE);
|
||||
@@ -1566,8 +1571,7 @@ int wma_vdev_stop_resp_handler(void *handle, uint8_t *cmd_param_info,
|
||||
*/
|
||||
if (params->status == QDF_STATUS_FW_MSG_TIMEDOUT) {
|
||||
wma_cleanup_target_req_param(req_msg);
|
||||
WMA_LOGE("%s: DEL BSS from ADD BSS timeout do not send "
|
||||
"resp to UMAC (vdev id %x)",
|
||||
WMA_LOGE("%s: DEL BSS from ADD BSS timeout do not send resp to UMAC (vdev id %x)",
|
||||
__func__, resp_event->vdev_id);
|
||||
} else {
|
||||
params->status = QDF_STATUS_SUCCESS;
|
||||
@@ -1713,8 +1717,7 @@ struct cdp_vdev *wma_vdev_attach(tp_wma_handle wma_handle,
|
||||
case WMI_VDEV_TYPE_STA:
|
||||
if (wlan_cfg_get_int(mac, WNI_CFG_INFRA_STA_KEEP_ALIVE_PERIOD,
|
||||
&cfg_val) != eSIR_SUCCESS) {
|
||||
WMA_LOGE("Failed to get value for "
|
||||
"WNI_CFG_INFRA_STA_KEEP_ALIVE_PERIOD");
|
||||
WMA_LOGE("Failed to get value for WNI_CFG_INFRA_STA_KEEP_ALIVE_PERIOD");
|
||||
cfg_val = DEFAULT_INFRA_STA_KEEP_ALIVE_PERIOD;
|
||||
}
|
||||
|
||||
@@ -1777,9 +1780,9 @@ struct cdp_vdev *wma_vdev_attach(tp_wma_handle wma_handle,
|
||||
if (wlan_cfg_get_int(mac, WNI_CFG_RTS_THRESHOLD,
|
||||
&cfg_val) == eSIR_SUCCESS) {
|
||||
ret = wma_vdev_set_param(wma_handle->wmi_handle,
|
||||
self_sta_req->session_id,
|
||||
WMI_VDEV_PARAM_RTS_THRESHOLD,
|
||||
cfg_val);
|
||||
self_sta_req->session_id,
|
||||
WMI_VDEV_PARAM_RTS_THRESHOLD,
|
||||
cfg_val);
|
||||
if (QDF_IS_STATUS_ERROR(ret))
|
||||
WMA_LOGE("Failed to set WMI_VDEV_PARAM_RTS_THRESHOLD");
|
||||
} else {
|
||||
@@ -1789,18 +1792,20 @@ struct cdp_vdev *wma_vdev_attach(tp_wma_handle wma_handle,
|
||||
if (wlan_cfg_get_int(mac, WNI_CFG_FRAGMENTATION_THRESHOLD,
|
||||
&cfg_val) == eSIR_SUCCESS) {
|
||||
ret = wma_vdev_set_param(wma_handle->wmi_handle,
|
||||
self_sta_req->session_id,
|
||||
WMI_VDEV_PARAM_FRAGMENTATION_THRESHOLD,
|
||||
cfg_val);
|
||||
self_sta_req->session_id,
|
||||
WMI_VDEV_PARAM_FRAGMENTATION_THRESHOLD,
|
||||
cfg_val);
|
||||
if (QDF_IS_STATUS_ERROR(ret))
|
||||
WMA_LOGE("Failed to set WMI_VDEV_PARAM_FRAGMENTATION_THRESHOLD");
|
||||
} else {
|
||||
WMA_LOGE("Failed to get value for WNI_CFG_FRAGMENTATION_THRESHOLD, leaving unchanged");
|
||||
}
|
||||
|
||||
if (wlan_cfg_get_int(mac, WNI_CFG_HT_CAP_INFO, &cfg_val) == eSIR_SUCCESS) {
|
||||
if (wlan_cfg_get_int(mac, WNI_CFG_HT_CAP_INFO, &cfg_val) ==
|
||||
eSIR_SUCCESS) {
|
||||
val16 = (uint16_t) cfg_val;
|
||||
phtCapInfo = (tSirMacHTCapabilityInfo *) &cfg_val;
|
||||
|
||||
ret = wma_vdev_set_param(wma_handle->wmi_handle,
|
||||
self_sta_req->session_id,
|
||||
WMI_VDEV_PARAM_TX_STBC,
|
||||
@@ -1818,10 +1823,10 @@ struct cdp_vdev *wma_vdev_attach(tp_wma_handle wma_handle,
|
||||
(self_sta_req->sub_type == 0)) {
|
||||
wma_handle->roam_offload_enabled = true;
|
||||
ret = wma_vdev_set_param(wma_handle->wmi_handle,
|
||||
self_sta_req->session_id,
|
||||
WMI_VDEV_PARAM_ROAM_FW_OFFLOAD,
|
||||
(WMI_ROAM_FW_OFFLOAD_ENABLE_FLAG |
|
||||
WMI_ROAM_BMISS_FINAL_SCAN_ENABLE_FLAG));
|
||||
self_sta_req->session_id,
|
||||
WMI_VDEV_PARAM_ROAM_FW_OFFLOAD,
|
||||
(WMI_ROAM_FW_OFFLOAD_ENABLE_FLAG |
|
||||
WMI_ROAM_BMISS_FINAL_SCAN_ENABLE_FLAG));
|
||||
if (QDF_IS_STATUS_ERROR(ret))
|
||||
WMA_LOGE("Failed to set WMI_VDEV_PARAM_ROAM_FW_OFFLOAD");
|
||||
|
||||
@@ -2142,6 +2147,7 @@ int wma_peer_assoc_conf_handler(void *handle, uint8_t *cmd_param_info,
|
||||
|
||||
if (req_msg->msg_type == WMA_ADD_STA_REQ) {
|
||||
tpAddStaParams params = (tpAddStaParams)req_msg->user_data;
|
||||
|
||||
if (!params) {
|
||||
WMA_LOGE(FL("add STA params is NULL for vdev %d"),
|
||||
event->vdev_id);
|
||||
@@ -2158,6 +2164,7 @@ int wma_peer_assoc_conf_handler(void *handle, uint8_t *cmd_param_info,
|
||||
wma_send_msg(wma, WMA_ADD_STA_RSP, (void *)params, 0);
|
||||
} else if (req_msg->msg_type == WMA_ADD_BSS_REQ) {
|
||||
tpAddBssParams params = (tpAddBssParams) req_msg->user_data;
|
||||
|
||||
if (!params) {
|
||||
WMA_LOGE(FL("add BSS params is NULL for vdev %d"),
|
||||
event->vdev_id);
|
||||
@@ -2167,9 +2174,8 @@ int wma_peer_assoc_conf_handler(void *handle, uint8_t *cmd_param_info,
|
||||
|
||||
/* peer assoc conf event means the cmd succeeds */
|
||||
params->status = QDF_STATUS_SUCCESS;
|
||||
WMA_LOGD(FL("Send ADD BSS RSP: opermode: %d update_bss: %d"
|
||||
" nw_type: %d bssid: %pM"
|
||||
" staIdx %d status %d"), params->operMode,
|
||||
WMA_LOGD(FL("Send ADD BSS RSP: opermode: %d update_bss: %d nw_type: %d bssid: %pM staIdx %d status %d"),
|
||||
params->operMode,
|
||||
params->updateBss, params->nwType, params->bssId,
|
||||
params->staContext.staIdx, params->status);
|
||||
wma_send_msg(wma, WMA_ADD_BSS_RSP, (void *)params, 0);
|
||||
@@ -2293,6 +2299,7 @@ int wma_peer_delete_handler(void *handle, uint8_t *cmd_param_info,
|
||||
}
|
||||
} else if (req_msg->type == WMA_DEL_P2P_SELF_STA_RSP_START) {
|
||||
struct del_sta_self_rsp_params *data;
|
||||
|
||||
data = (struct del_sta_self_rsp_params *)req_msg->user_data;
|
||||
WMA_LOGD(FL("Calling vdev detach handler"));
|
||||
wma_handle_vdev_detach(wma, data->self_sta_param,
|
||||
@@ -2346,6 +2353,7 @@ void wma_hold_req_timer(void *data)
|
||||
|
||||
if (tgt_req->msg_type == WMA_ADD_STA_REQ) {
|
||||
tpAddStaParams params = (tpAddStaParams) tgt_req->user_data;
|
||||
|
||||
params->status = QDF_STATUS_E_TIMEOUT;
|
||||
WMA_LOGA(FL("WMA_ADD_STA_REQ timed out"));
|
||||
WMA_LOGD(FL("Sending add sta rsp to umac (mac:%pM, status:%d)"),
|
||||
@@ -2356,6 +2364,7 @@ void wma_hold_req_timer(void *data)
|
||||
wma_send_msg(wma, WMA_ADD_STA_RSP, (void *)params, 0);
|
||||
} else if (tgt_req->msg_type == WMA_ADD_BSS_REQ) {
|
||||
tpAddBssParams params = (tpAddBssParams) tgt_req->user_data;
|
||||
|
||||
params->status = QDF_STATUS_E_TIMEOUT;
|
||||
WMA_LOGA(FL("WMA_ADD_BSS_REQ timed out"));
|
||||
WMA_LOGD(FL("Sending add bss rsp to umac (mac:%pM, status:%d)"),
|
||||
@@ -2484,6 +2493,7 @@ void wma_vdev_resp_timer(void *data)
|
||||
void *soc = cds_get_context(QDF_MODULE_ID_SOC);
|
||||
#ifdef FEATURE_AP_MCC_CH_AVOIDANCE
|
||||
tpAniSirGlobal mac_ctx = cds_get_context(QDF_MODULE_ID_PE);
|
||||
|
||||
if (NULL == mac_ctx) {
|
||||
WMA_LOGE("%s: Failed to get mac_ctx", __func__);
|
||||
wma_cleanup_target_req_param(tgt_req);
|
||||
@@ -2593,8 +2603,8 @@ void wma_vdev_resp_timer(void *data)
|
||||
bcn = wma->interfaces[tgt_req->vdev_id].beacon;
|
||||
|
||||
if (bcn) {
|
||||
WMA_LOGD("%s: Freeing beacon struct %p, "
|
||||
"template memory %p", __func__, bcn, bcn->buf);
|
||||
WMA_LOGD("%s: Freeing beacon struct %p, template memory %p",
|
||||
__func__, bcn, bcn->buf);
|
||||
if (bcn->dma_mapped)
|
||||
qdf_nbuf_unmap_single(wma->qdf_dev, bcn->buf,
|
||||
QDF_DMA_TO_DEVICE);
|
||||
@@ -2776,25 +2786,20 @@ wma_vdev_set_bss_params(tp_wma_handle wma, int vdev_id,
|
||||
|
||||
if (QDF_IS_STATUS_ERROR(ret))
|
||||
WMA_LOGE("failed to set WMI_VDEV_PARAM_BEACON_INTERVAL");
|
||||
|
||||
ret = wmi_unified_vdev_set_gtx_cfg_send(wma->wmi_handle, vdev_id,
|
||||
&intr[vdev_id].config.gtx_info);
|
||||
if (QDF_IS_STATUS_ERROR(ret))
|
||||
WMA_LOGE("failed to set WMI_VDEV_PARAM_DTIM_PERIOD");
|
||||
|
||||
ret = wma_vdev_set_param(wma->wmi_handle, vdev_id,
|
||||
WMI_VDEV_PARAM_DTIM_PERIOD,
|
||||
dtimPeriod);
|
||||
if (QDF_IS_STATUS_ERROR(ret))
|
||||
WMA_LOGE("failed to set WMI_VDEV_PARAM_DTIM_PERIOD");
|
||||
|
||||
if (!maxTxPower) {
|
||||
if (!maxTxPower)
|
||||
WMA_LOGW("Setting Tx power limit to 0");
|
||||
}
|
||||
|
||||
WMA_LOGD("Set maxTx pwr [WMI_VDEV_PARAM_TX_PWRLIMIT] to %d",
|
||||
maxTxPower);
|
||||
|
||||
ret = wma_vdev_set_param(wma->wmi_handle, vdev_id,
|
||||
WMI_VDEV_PARAM_TX_PWRLIMIT,
|
||||
maxTxPower);
|
||||
@@ -3126,9 +3131,8 @@ static void wma_add_bss_ibss_mode(tp_wma_handle wma, tpAddBssParams add_bss)
|
||||
return;
|
||||
|
||||
peer_cleanup:
|
||||
if (peer) {
|
||||
if (peer)
|
||||
wma_remove_peer(wma, add_bss->bssId, vdev_id, peer, false);
|
||||
}
|
||||
send_fail_resp:
|
||||
add_bss->status = QDF_STATUS_E_FAILURE;
|
||||
wma_send_msg(wma, WMA_ADD_BSS_RSP, (void *)add_bss, 0);
|
||||
@@ -3176,9 +3180,8 @@ static void wma_add_bss_sta_mode(tp_wma_handle wma, tpAddBssParams add_bss)
|
||||
wma_set_bss_rate_flags(iface, add_bss);
|
||||
if (add_bss->operMode) {
|
||||
/* Save parameters later needed by WMA_ADD_STA_REQ */
|
||||
if (iface->addBssStaContext) {
|
||||
if (iface->addBssStaContext)
|
||||
qdf_mem_free(iface->addBssStaContext);
|
||||
}
|
||||
iface->addBssStaContext = qdf_mem_malloc(sizeof(tAddStaParams));
|
||||
if (!iface->addBssStaContext) {
|
||||
WMA_LOGE("%s Failed to allocat memory", __func__);
|
||||
@@ -3223,7 +3226,9 @@ static void wma_add_bss_sta_mode(tp_wma_handle wma, tpAddBssParams add_bss)
|
||||
#if defined(QCA_LL_LEGACY_TX_FLOW_CONTROL) || defined(QCA_LL_TX_FLOW_CONTROL_V2)
|
||||
struct cdp_vdev *vdev;
|
||||
#endif
|
||||
/* Called in preassoc state. BSSID peer is already added by set_linkstate */
|
||||
/* Called in preassoc state. BSSID peer is already
|
||||
* added by set_linkstate
|
||||
*/
|
||||
peer = cdp_peer_find_by_addr(soc,
|
||||
pdev,
|
||||
add_bss->bssId,
|
||||
@@ -3292,7 +3297,7 @@ static void wma_add_bss_sta_mode(tp_wma_handle wma, tpAddBssParams add_bss)
|
||||
status = wma_vdev_start(wma, &req, false);
|
||||
if (status != QDF_STATUS_SUCCESS) {
|
||||
wma_remove_vdev_req(wma, vdev_id,
|
||||
WMA_TARGET_REQ_TYPE_VDEV_START);
|
||||
WMA_TARGET_REQ_TYPE_VDEV_START);
|
||||
goto peer_cleanup;
|
||||
}
|
||||
#if defined(QCA_LL_LEGACY_TX_FLOW_CONTROL) || defined(QCA_LL_TX_FLOW_CONTROL_V2)
|
||||
@@ -3302,16 +3307,15 @@ static void wma_add_bss_sta_mode(tp_wma_handle wma, tpAddBssParams add_bss)
|
||||
goto peer_cleanup;
|
||||
}
|
||||
cdp_fc_vdev_pause(soc, vdev,
|
||||
OL_TXQ_PAUSE_REASON_PEER_UNAUTHORIZED);
|
||||
OL_TXQ_PAUSE_REASON_PEER_UNAUTHORIZED);
|
||||
#endif
|
||||
/* ADD_BSS_RESP will be deferred to completion of VDEV_START */
|
||||
|
||||
/* ADD_BSS_RESP will be deferred to completion of
|
||||
* VDEV_START
|
||||
*/
|
||||
return;
|
||||
}
|
||||
if (!add_bss->updateBss) {
|
||||
if (!add_bss->updateBss)
|
||||
goto send_bss_resp;
|
||||
|
||||
}
|
||||
/* Update peer state */
|
||||
if (add_bss->staContext.encryptType == eSIR_ED_NONE) {
|
||||
WMA_LOGD("%s: Update peer(%pM) state into auth",
|
||||
@@ -3347,13 +3351,11 @@ static void wma_add_bss_sta_mode(tp_wma_handle wma, tpAddBssParams add_bss)
|
||||
|
||||
wmi_unified_send_txbf(wma, &add_bss->staContext);
|
||||
|
||||
pps_val =
|
||||
((pMac->
|
||||
enable5gEBT << 31) & 0xffff0000) | (PKT_PWR_SAVE_5G_EBT &
|
||||
0xffff);
|
||||
pps_val = ((pMac->enable5gEBT << 31) & 0xffff0000) |
|
||||
(PKT_PWR_SAVE_5G_EBT & 0xffff);
|
||||
status = wma_vdev_set_param(wma->wmi_handle, vdev_id,
|
||||
WMI_VDEV_PARAM_PACKET_POWERSAVE,
|
||||
pps_val);
|
||||
WMI_VDEV_PARAM_PACKET_POWERSAVE,
|
||||
pps_val);
|
||||
if (QDF_IS_STATUS_ERROR(status))
|
||||
WMA_LOGE("Failed to send wmi packet power save cmd");
|
||||
else
|
||||
@@ -3411,8 +3413,8 @@ send_bss_resp:
|
||||
return;
|
||||
|
||||
send_final_rsp:
|
||||
WMA_LOGD("%s: opermode %d update_bss %d nw_type %d bssid %pM"
|
||||
" staIdx %d status %d", __func__, add_bss->operMode,
|
||||
WMA_LOGD("%s: opermode %d update_bss %d nw_type %d bssid %pM staIdx %d status %d",
|
||||
__func__, add_bss->operMode,
|
||||
add_bss->updateBss, add_bss->nwType, add_bss->bssId,
|
||||
add_bss->staContext.staIdx, add_bss->status);
|
||||
wma_send_msg(wma, WMA_ADD_BSS_RSP, (void *)add_bss, 0);
|
||||
@@ -3528,8 +3530,7 @@ static void wma_add_sta_req_ap_mode(tp_wma_handle wma, tpAddStaParams add_sta)
|
||||
peer = cdp_peer_find_by_addr(soc, pdev,
|
||||
add_sta->staMac, &peer_id);
|
||||
if (peer) {
|
||||
WMA_LOGE("%s: My vdev:%p, but Peer exists on other vdev with "
|
||||
"peer_addr %pM and peer_id %d",
|
||||
WMA_LOGE("%s: My vdev:%p, but Peer exists on other vdev with peer_addr %pM and peer_id %d",
|
||||
__func__, vdev, add_sta->staMac, peer_id);
|
||||
add_sta->status = QDF_STATUS_E_FAILURE;
|
||||
goto send_rsp;
|
||||
@@ -3676,8 +3677,7 @@ static void wma_add_tdls_sta(tp_wma_handle wma, tpAddStaParams add_sta)
|
||||
bool peer_assoc_cnf = false;
|
||||
void *soc = cds_get_context(QDF_MODULE_ID_SOC);
|
||||
|
||||
WMA_LOGD("%s: staType: %d, staIdx: %d, updateSta: %d, "
|
||||
"bssId: %pM, staMac: %pM",
|
||||
WMA_LOGD("%s: staType: %d, staIdx: %d, updateSta: %d, bssId: %pM, staMac: %pM",
|
||||
__func__, add_sta->staType, add_sta->staIdx,
|
||||
add_sta->updateSta, add_sta->bssId, add_sta->staMac);
|
||||
|
||||
@@ -3729,8 +3729,7 @@ static void wma_add_tdls_sta(tp_wma_handle wma, tpAddStaParams add_sta)
|
||||
}
|
||||
|
||||
add_sta->staIdx = cdp_peer_get_local_peer_id(soc, peer);
|
||||
WMA_LOGD("%s: addSta, after calling cdp_local_peer_id, "
|
||||
"staIdx: %d, staMac: %pM",
|
||||
WMA_LOGD("%s: addSta, after calling cdp_local_peer_id, staIdx: %d, staMac: %pM",
|
||||
__func__, add_sta->staIdx, add_sta->staMac);
|
||||
|
||||
peerStateParams = qdf_mem_malloc(sizeof(tTdlsPeerStateParams));
|
||||
@@ -3906,7 +3905,8 @@ static void wma_add_sta_req_sta_mode(tp_wma_handle wma, tpAddStaParams params)
|
||||
/*In LFR2.0, the following operations are performed as
|
||||
* part of wma_send_peer_assoc. As we are
|
||||
* skipping this operation, we are just executing the
|
||||
* following which are useful for LFR3.0.*/
|
||||
* following which are useful for LFR3.0
|
||||
*/
|
||||
cdp_peer_state_update(soc, pdev, params->bssId,
|
||||
OL_TXRX_PEER_STATE_AUTH);
|
||||
qdf_atomic_set(&iface->bss_status,
|
||||
@@ -4153,8 +4153,7 @@ static void wma_del_tdls_sta(tp_wma_handle wma, tpDeleteStaParams del_sta)
|
||||
qdf_mem_copy(&peerStateParams->peerMacAddr,
|
||||
&del_sta->staMac, sizeof(tSirMacAddr));
|
||||
|
||||
WMA_LOGD("%s: sending tdls_peer_state for peer mac: %pM, "
|
||||
" peerState: %d",
|
||||
WMA_LOGD("%s: sending tdls_peer_state for peer mac: %pM, peerState: %d",
|
||||
__func__, peerStateParams->peerMacAddr,
|
||||
peerStateParams->peerState);
|
||||
|
||||
@@ -4222,9 +4221,9 @@ static void wma_delete_sta_req_sta_mode(tp_wma_handle wma,
|
||||
{
|
||||
QDF_STATUS status = QDF_STATUS_SUCCESS;
|
||||
struct wma_txrx_node *iface;
|
||||
|
||||
iface = &wma->interfaces[params->smesessionId];
|
||||
iface->uapsd_cached_val = 0;
|
||||
|
||||
if (wma_is_roam_synch_in_progress(wma, params->smesessionId))
|
||||
return;
|
||||
#ifdef FEATURE_WLAN_TDLS
|
||||
@@ -4282,7 +4281,9 @@ void wma_add_sta(tp_wma_handle wma, tpAddStaParams add_sta)
|
||||
}
|
||||
|
||||
#ifdef QCA_IBSS_SUPPORT
|
||||
/* adjust heart beat thresold timer value for detecting ibss peer departure */
|
||||
/* adjust heart beat thresold timer value for detecting ibss peer
|
||||
* departure
|
||||
*/
|
||||
if (oper_mode == BSS_OPERATIONAL_MODE_IBSS)
|
||||
wma_adjust_ibss_heart_beat_timer(wma, add_sta->smesessionId, 1);
|
||||
#endif
|
||||
@@ -4636,6 +4637,7 @@ void wma_set_vdev_intrabss_fwd(tp_wma_handle wma_handle,
|
||||
tpDisableIntraBssFwd pdis_intra_fwd)
|
||||
{
|
||||
struct cdp_vdev *txrx_vdev;
|
||||
|
||||
WMA_LOGD("%s:intra_fwd:vdev(%d) intrabss_dis=%s",
|
||||
__func__, pdis_intra_fwd->sessionId,
|
||||
(pdis_intra_fwd->disableintrabssfwd ? "true" : "false"));
|
||||
|
@@ -162,7 +162,7 @@ QDF_STATUS wma_send_snr_request(tp_wma_handle wma_handle,
|
||||
if (pGetRssiReq) {
|
||||
pRssiBkUp = qdf_mem_malloc(sizeof(tAniGetRssiReq));
|
||||
if (!pRssiBkUp) {
|
||||
WMA_LOGE("Failed to allocate memory for tAniGetRssiReq");
|
||||
WMA_LOGE("Failed to alloc memory for tAniGetRssiReq");
|
||||
wma_handle->pGetRssiReq = NULL;
|
||||
return QDF_STATUS_E_NOMEM;
|
||||
}
|
||||
@@ -532,14 +532,11 @@ QDF_STATUS wma_process_dhcp_ind(tp_wma_handle wma_handle,
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
}
|
||||
|
||||
WMA_LOGD("%s: WMA --> WMI_PEER_SET_PARAM triggered by DHCP, "
|
||||
"msgType=%s,"
|
||||
"device_mode=%d, macAddr=" MAC_ADDRESS_STR,
|
||||
__func__,
|
||||
ta_dhcp_ind->msgType == WMA_DHCP_START_IND ?
|
||||
"WMA_DHCP_START_IND" : "WMA_DHCP_STOP_IND",
|
||||
ta_dhcp_ind->device_mode,
|
||||
MAC_ADDR_ARRAY(ta_dhcp_ind->peerMacAddr.bytes));
|
||||
WMA_LOGD("%s: WMA --> WMI_PEER_SET_PARAM triggered by DHCP, msgType=%s, device_mode=%d, macAddr=" MAC_ADDRESS_STR,
|
||||
__func__, ta_dhcp_ind->msgType == WMA_DHCP_START_IND ?
|
||||
"WMA_DHCP_START_IND" : "WMA_DHCP_STOP_IND",
|
||||
ta_dhcp_ind->device_mode,
|
||||
MAC_ADDR_ARRAY(ta_dhcp_ind->peerMacAddr.bytes));
|
||||
|
||||
/* fill in values */
|
||||
peer_set_param_fp.vdev_id = vdev_id;
|
||||
@@ -553,9 +550,8 @@ QDF_STATUS wma_process_dhcp_ind(tp_wma_handle wma_handle,
|
||||
|
||||
status = wmi_unified_process_dhcp_ind(wma_handle->wmi_handle,
|
||||
&peer_set_param_fp);
|
||||
if (status != EOK) {
|
||||
if (status != EOK)
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
}
|
||||
|
||||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
@@ -587,33 +583,30 @@ WLAN_PHY_MODE wma_chan_phy_mode(u8 chan, enum phy_ch_width chan_width,
|
||||
else {
|
||||
switch (dot11_mode) {
|
||||
case WNI_CFG_DOT11_MODE_11B:
|
||||
if ((20 == bw_val) ||
|
||||
(40 == bw_val))
|
||||
if ((bw_val == 20) || (bw_val == 40))
|
||||
phymode = MODE_11B;
|
||||
break;
|
||||
case WNI_CFG_DOT11_MODE_11G:
|
||||
if ((20 == bw_val) ||
|
||||
(40 == bw_val))
|
||||
if ((bw_val == 20) || (bw_val == 40))
|
||||
phymode = MODE_11G;
|
||||
break;
|
||||
case WNI_CFG_DOT11_MODE_11G_ONLY:
|
||||
if ((20 == bw_val) ||
|
||||
(40 == bw_val))
|
||||
if ((bw_val == 20) || (bw_val == 40))
|
||||
phymode = MODE_11GONLY;
|
||||
break;
|
||||
case WNI_CFG_DOT11_MODE_11N:
|
||||
case WNI_CFG_DOT11_MODE_11N_ONLY:
|
||||
if (20 == bw_val)
|
||||
if (bw_val == 20)
|
||||
phymode = MODE_11NG_HT20;
|
||||
else if (40 == bw_val)
|
||||
else if (bw_val == 40)
|
||||
phymode = MODE_11NG_HT40;
|
||||
break;
|
||||
case WNI_CFG_DOT11_MODE_ALL:
|
||||
case WNI_CFG_DOT11_MODE_11AC:
|
||||
case WNI_CFG_DOT11_MODE_11AC_ONLY:
|
||||
if (20 == bw_val)
|
||||
if (bw_val == 20)
|
||||
phymode = MODE_11AC_VHT20_2G;
|
||||
else if (40 == bw_val)
|
||||
else if (bw_val == 40)
|
||||
phymode = MODE_11AC_VHT40_2G;
|
||||
break;
|
||||
case WNI_CFG_DOT11_MODE_11AX:
|
||||
@@ -646,7 +639,7 @@ WLAN_PHY_MODE wma_chan_phy_mode(u8 chan, enum phy_ch_width chan_width,
|
||||
break;
|
||||
case WNI_CFG_DOT11_MODE_11N:
|
||||
case WNI_CFG_DOT11_MODE_11N_ONLY:
|
||||
if (20 == bw_val)
|
||||
if (bw_val == 20)
|
||||
phymode = MODE_11NA_HT20;
|
||||
else if (40 <= bw_val)
|
||||
phymode = MODE_11NA_HT40;
|
||||
@@ -654,15 +647,15 @@ WLAN_PHY_MODE wma_chan_phy_mode(u8 chan, enum phy_ch_width chan_width,
|
||||
case WNI_CFG_DOT11_MODE_ALL:
|
||||
case WNI_CFG_DOT11_MODE_11AC:
|
||||
case WNI_CFG_DOT11_MODE_11AC_ONLY:
|
||||
if (20 == bw_val)
|
||||
if (bw_val == 20)
|
||||
phymode = MODE_11AC_VHT20;
|
||||
else if (40 == bw_val)
|
||||
else if (bw_val == 40)
|
||||
phymode = MODE_11AC_VHT40;
|
||||
else if (80 == bw_val)
|
||||
else if (bw_val == 80)
|
||||
phymode = MODE_11AC_VHT80;
|
||||
else if (CH_WIDTH_160MHZ == chan_width)
|
||||
else if (chan_width == CH_WIDTH_160MHZ)
|
||||
phymode = MODE_11AC_VHT160;
|
||||
else if (CH_WIDTH_80P80MHZ == chan_width)
|
||||
else if (chan_width == CH_WIDTH_80P80MHZ)
|
||||
phymode = MODE_11AC_VHT80_80;
|
||||
break;
|
||||
case WNI_CFG_DOT11_MODE_11AX:
|
||||
@@ -684,9 +677,8 @@ WLAN_PHY_MODE wma_chan_phy_mode(u8 chan, enum phy_ch_width chan_width,
|
||||
}
|
||||
}
|
||||
|
||||
WMA_LOGD("%s: phymode %d channel %d ch_width %d"
|
||||
"dot11_mode %d", __func__, phymode, chan,
|
||||
chan_width, dot11_mode);
|
||||
WMA_LOGD("%s: phymode %d channel %d ch_width %d dot11_mode %d",
|
||||
__func__, phymode, chan, chan_width, dot11_mode);
|
||||
|
||||
QDF_ASSERT(MODE_UNKNOWN != phymode);
|
||||
return phymode;
|
||||
@@ -711,22 +703,18 @@ QDF_STATUS wma_get_link_speed(WMA_HANDLE handle, tSirLinkSpeedInfo *pLinkSpeed)
|
||||
}
|
||||
if (!WMI_SERVICE_IS_ENABLED(wma_handle->wmi_service_bitmap,
|
||||
WMI_SERVICE_ESTIMATE_LINKSPEED)) {
|
||||
WMA_LOGE("%s: Linkspeed feature bit not enabled"
|
||||
" Sending value 0 as link speed.", __func__);
|
||||
WMA_LOGE("%s: Linkspeed feature bit not enabled Sending value 0 as link speed.",
|
||||
__func__);
|
||||
wma_send_link_speed(0);
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
}
|
||||
|
||||
/* Copy the peer macaddress to the wma buffer */
|
||||
WMI_CHAR_ARRAY_TO_MAC_ADDR(pLinkSpeed->peer_macaddr.bytes,
|
||||
&peer_macaddr);
|
||||
|
||||
WMA_LOGD("%s: pLinkSpeed->peerMacAddr: %pM, "
|
||||
"peer_macaddr.mac_addr31to0: 0x%x, peer_macaddr.mac_addr47to32: 0x%x",
|
||||
WMA_LOGD("%s: pLinkSpeed->peerMacAddr: %pM, peer_macaddr.mac_addr31to0: 0x%x, peer_macaddr.mac_addr47to32: 0x%x",
|
||||
__func__, pLinkSpeed->peer_macaddr.bytes,
|
||||
peer_macaddr.mac_addr31to0,
|
||||
peer_macaddr.mac_addr47to32);
|
||||
|
||||
if (wmi_unified_get_link_speed_cmd(wma_handle->wmi_handle,
|
||||
peer_macaddr)) {
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
@@ -736,12 +724,12 @@ QDF_STATUS wma_get_link_speed(WMA_HANDLE handle, tSirLinkSpeedInfo *pLinkSpeed)
|
||||
}
|
||||
|
||||
/**
|
||||
* wma_add_beacon_filter() - Issue WMI command to set beacon filter
|
||||
* @wma: wma handler
|
||||
* @filter_params: beacon_filter_param to set
|
||||
*
|
||||
* Return: Return QDF_STATUS
|
||||
*/
|
||||
* wma_add_beacon_filter() - Issue WMI command to set beacon filter
|
||||
* @wma: wma handler
|
||||
* @filter_params: beacon_filter_param to set
|
||||
*
|
||||
* Return: Return QDF_STATUS
|
||||
*/
|
||||
QDF_STATUS wma_add_beacon_filter(WMA_HANDLE handle,
|
||||
struct beacon_filter_param *filter_params)
|
||||
{
|
||||
@@ -900,13 +888,11 @@ static int wma_egap_info_status_event(void *handle, u_int8_t *event,
|
||||
WMA_LOGE("Invalid EGAP Info status event buffer");
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
egap_info_event = (wmi_ap_ps_egap_info_event_fixed_param *)
|
||||
param_buf->fixed_param;
|
||||
buf_ptr = (uint8_t *)egap_info_event;
|
||||
buf_ptr += sizeof(wmi_ap_ps_egap_info_event_fixed_param);
|
||||
chainmask_event = (wmi_ap_ps_egap_info_chainmask_list *)buf_ptr;
|
||||
|
||||
WMA_LOGI("mac_id: %d, status: %d, tx_mask: %x, rx_mask: %d",
|
||||
chainmask_event->mac_id,
|
||||
egap_info_event->status,
|
||||
@@ -934,9 +920,8 @@ QDF_STATUS wma_send_egap_conf_params(WMA_HANDLE handle,
|
||||
cmd.wait_time = egap_params->wait_time;
|
||||
cmd.flags = egap_params->flags;
|
||||
err = wmi_unified_egap_conf_params_cmd(wma_handle->wmi_handle, &cmd);
|
||||
if (err) {
|
||||
if (err)
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
}
|
||||
|
||||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
@@ -2762,6 +2747,7 @@ static QDF_STATUS wma_set_tsm_interval(tAddTsParams *req)
|
||||
*/
|
||||
uint32_t interval_milliseconds;
|
||||
struct cdp_pdev *pdev = cds_get_context(QDF_MODULE_ID_TXRX);
|
||||
|
||||
if (NULL == pdev) {
|
||||
WMA_LOGE("%s: Failed to get pdev", __func__);
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
@@ -2791,8 +2777,8 @@ static inline QDF_STATUS wma_set_tsm_interval(tAddTsParams *req)
|
||||
void wma_add_ts_req(tp_wma_handle wma, tAddTsParams *msg)
|
||||
{
|
||||
struct add_ts_param cmd = {0};
|
||||
msg->status = QDF_STATUS_SUCCESS;
|
||||
|
||||
msg->status = QDF_STATUS_SUCCESS;
|
||||
if (wma_set_tsm_interval(msg) == QDF_STATUS_SUCCESS) {
|
||||
|
||||
cmd.sme_session_id = msg->sme_session_id;
|
||||
@@ -2849,9 +2835,9 @@ static int wma_config_packet_filter(tp_wma_handle wma,
|
||||
int err;
|
||||
|
||||
/* send the command along with data */
|
||||
err = wmi_unified_config_packet_filter_cmd(wma->wmi_handle,
|
||||
vdev_id, (struct rcv_pkt_filter_config *)rcv_filter_param,
|
||||
filter_id, enable);
|
||||
err = wmi_unified_config_packet_filter_cmd(wma->wmi_handle, vdev_id,
|
||||
(struct rcv_pkt_filter_config *)rcv_filter_param,
|
||||
filter_id, enable);
|
||||
if (err) {
|
||||
WMA_LOGE("Failed to send pkt_filter cmd");
|
||||
return -EIO;
|
||||
@@ -3142,9 +3128,8 @@ QDF_STATUS wma_process_get_peer_info_req
|
||||
if (ret != QDF_STATUS_SUCCESS)
|
||||
wmi_buf_free(buf);
|
||||
|
||||
WMA_LOGE("IBSS get peer info cmd sent len: %d, vdev %d"
|
||||
" command id: %d, status: %d", len,
|
||||
vdev_id, WMI_PEER_INFO_REQ_CMDID, ret);
|
||||
WMA_LOGE("IBSS get peer info cmd sent len: %d, vdev %d command id: %d, status: %d",
|
||||
len, vdev_id, WMI_PEER_INFO_REQ_CMDID, ret);
|
||||
|
||||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
@@ -3156,16 +3141,16 @@ QDF_STATUS wma_process_get_peer_info_req
|
||||
*
|
||||
* Return: QDF status
|
||||
*/
|
||||
QDF_STATUS wma_process_tx_fail_monitor_ind
|
||||
(tp_wma_handle wma, tAniTXFailMonitorInd *pReq)
|
||||
QDF_STATUS wma_process_tx_fail_monitor_ind(tp_wma_handle wma,
|
||||
tAniTXFailMonitorInd *pReq)
|
||||
{
|
||||
QDF_STATUS ret;
|
||||
int32_t vdev_id;
|
||||
|
||||
vdev_id = wma_find_vdev_by_type(wma, WMI_VDEV_TYPE_IBSS);
|
||||
if (vdev_id < 0) {
|
||||
WMA_LOGE("%s: IBSS vdev does not exist could not send fast tx fail"
|
||||
" monitor indication message to target", __func__);
|
||||
WMA_LOGE("%s: IBSS vdev does not exist could not send fast tx fail monitor indication message to target",
|
||||
__func__);
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
}
|
||||
|
||||
@@ -3173,11 +3158,10 @@ QDF_STATUS wma_process_tx_fail_monitor_ind
|
||||
WMA_LOGE("send fast tx fail monitor ind cmd target for vdevId %d val %d",
|
||||
vdev_id, pReq->tx_fail_count);
|
||||
|
||||
if (0 == pReq->tx_fail_count) {
|
||||
if (pReq->tx_fail_count == 0)
|
||||
wma->hddTxFailCb = NULL;
|
||||
} else {
|
||||
else
|
||||
wma->hddTxFailCb = pReq->txFailIndCallback;
|
||||
}
|
||||
ret = wma_vdev_set_param(wma->wmi_handle, vdev_id,
|
||||
WMI_VDEV_PARAM_SET_IBSS_TX_FAIL_CNT_THR,
|
||||
pReq->tx_fail_count);
|
||||
@@ -3235,8 +3219,8 @@ QDF_STATUS wma_process_rmc_enable_ind(tp_wma_handle wma)
|
||||
if (ret != QDF_STATUS_SUCCESS)
|
||||
wmi_buf_free(buf);
|
||||
|
||||
WMA_LOGE("Enable RMC cmd sent len: %d, vdev %d" " command id: %d,"
|
||||
" status: %d", len, vdev_id, WMI_RMC_SET_MODE_CMDID, ret);
|
||||
WMA_LOGE("Enable RMC cmd sent len: %d, vdev %d command id: %d, status: %d",
|
||||
len, vdev_id, WMI_RMC_SET_MODE_CMDID, ret);
|
||||
|
||||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
@@ -3287,8 +3271,8 @@ QDF_STATUS wma_process_rmc_disable_ind(tp_wma_handle wma)
|
||||
if (ret != QDF_STATUS_SUCCESS)
|
||||
wmi_buf_free(buf);
|
||||
|
||||
WMA_LOGE("Disable RMC cmd sent len: %d, vdev %d" " command id: %d,"
|
||||
" status: %d", len, vdev_id, WMI_RMC_SET_MODE_CMDID, ret);
|
||||
WMA_LOGE("Disable RMC cmd sent len: %d, vdev %d command id: %d, status: %d",
|
||||
len, vdev_id, WMI_RMC_SET_MODE_CMDID, ret);
|
||||
|
||||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
@@ -3317,8 +3301,8 @@ QDF_STATUS wma_process_rmc_action_period_ind(tp_wma_handle wma)
|
||||
|
||||
vdev_id = wma_find_vdev_by_type(wma, WMI_VDEV_TYPE_IBSS);
|
||||
if (vdev_id < 0) {
|
||||
WMA_LOGE("%s: IBSS vdev does not exist could not send"
|
||||
" RMC action period to target", __func__);
|
||||
WMA_LOGE("%s: IBSS vdev does not exist could not send RMC action period to target",
|
||||
__func__);
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
}
|
||||
|
||||
@@ -3352,9 +3336,9 @@ QDF_STATUS wma_process_rmc_action_period_ind(tp_wma_handle wma)
|
||||
if (ret != QDF_STATUS_SUCCESS)
|
||||
wmi_buf_free(buf);
|
||||
|
||||
WMA_LOGE("RMC action period %d cmd sent len: %d, vdev %d"
|
||||
" command id: %d, status: %d", periodicity_msec,
|
||||
len, vdev_id, WMI_RMC_SET_ACTION_PERIOD_CMDID, ret);
|
||||
WMA_LOGE("RMC action period %d cmd sent len: %d, vdev %d command id: %d, status: %d",
|
||||
periodicity_msec, len, vdev_id, WMI_RMC_SET_ACTION_PERIOD_CMDID,
|
||||
ret);
|
||||
|
||||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
@@ -3788,9 +3772,8 @@ QDF_STATUS wma_set_led_flashing(tp_wma_handle wma_handle,
|
||||
cmd.led_x1 = flashing->led_x1;
|
||||
status = wmi_unified_set_led_flashing_cmd(wma_handle->wmi_handle,
|
||||
&cmd);
|
||||
if (status != EOK) {
|
||||
if (status != EOK)
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
}
|
||||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
#endif /* WLAN_FEATURE_GPIO_LED_FLASHING */
|
||||
@@ -3838,11 +3821,12 @@ int wma_channel_avoid_evt_handler(void *handle, uint8_t *event,
|
||||
freq_range_idx++) {
|
||||
afr_desc = (wmi_avoid_freq_range_desc *)
|
||||
((void *)param_buf->avd_freq_range +
|
||||
freq_range_idx * sizeof(wmi_avoid_freq_range_desc));
|
||||
freq_range_idx *
|
||||
sizeof(wmi_avoid_freq_range_desc));
|
||||
|
||||
WMA_LOGD("range %d: tlv id = %u, start freq = %u, end freq = %u",
|
||||
freq_range_idx, afr_desc->tlv_header, afr_desc->start_freq,
|
||||
afr_desc->end_freq);
|
||||
WMA_LOGD("range %d tlv id = %u, start freq = %u, end freq = %u",
|
||||
freq_range_idx, afr_desc->tlv_header,
|
||||
afr_desc->start_freq, afr_desc->end_freq);
|
||||
}
|
||||
|
||||
sca_indication = (tSirChAvoidIndType *)
|
||||
@@ -3857,7 +3841,8 @@ int wma_channel_avoid_evt_handler(void *handle, uint8_t *event,
|
||||
freq_range_idx++) {
|
||||
afr_desc = (wmi_avoid_freq_range_desc *)
|
||||
((void *)param_buf->avd_freq_range +
|
||||
freq_range_idx * sizeof(wmi_avoid_freq_range_desc));
|
||||
freq_range_idx *
|
||||
sizeof(wmi_avoid_freq_range_desc));
|
||||
sca_indication->avoid_freq_range[freq_range_idx].start_freq =
|
||||
afr_desc->start_freq;
|
||||
sca_indication->avoid_freq_range[freq_range_idx].end_freq =
|
||||
@@ -3890,6 +3875,7 @@ QDF_STATUS wma_process_ch_avoid_update_req(tp_wma_handle wma_handle,
|
||||
ch_avoid_update_req)
|
||||
{
|
||||
QDF_STATUS status;
|
||||
|
||||
if (!wma_handle) {
|
||||
WMA_LOGE("%s: wma handle is NULL", __func__);
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
@@ -3956,8 +3942,6 @@ void wma_send_regdomain_info_to_fw(uint32_t reg_dmn, uint16_t regdmn2G,
|
||||
if (QDF_IS_STATUS_ERROR(ret))
|
||||
WMA_LOGE("failed to set PDEV tx_chain_mask_cck %d",
|
||||
ret);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -4096,8 +4080,7 @@ int wma_tdls_event_handler(void *handle, uint8_t *event, uint32_t len)
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
WMA_LOGD("%s: sending msg to umac, messageType: 0x%x, "
|
||||
"for peer: %pM, reason: %d, smesessionId: %d",
|
||||
WMA_LOGD("%s: sending msg to umac, messageType: 0x%x, for peer: %pM, reason: %d, smesessionId: %d",
|
||||
__func__, tdls_event->messageType, tdls_event->peermac.bytes,
|
||||
tdls_event->peer_reason, tdls_event->sessionId);
|
||||
|
||||
@@ -4174,15 +4157,14 @@ QDF_STATUS wma_update_fw_tdls_state(WMA_HANDLE handle, void *pwmaTdlsparams)
|
||||
params.tdls_state = wma_tdls->tdls_state;
|
||||
tdls_mode = wma_tdls->tdls_state;
|
||||
|
||||
if (WMA_TDLS_SUPPORT_EXPLICIT_TRIGGER_ONLY == tdls_mode) {
|
||||
if (tdls_mode == WMA_TDLS_SUPPORT_EXPLICIT_TRIGGER_ONLY)
|
||||
tdls_state = WMI_TDLS_ENABLE_PASSIVE;
|
||||
} else if (WMA_TDLS_SUPPORT_ENABLED == tdls_mode) {
|
||||
else if (tdls_mode == WMA_TDLS_SUPPORT_ENABLED)
|
||||
tdls_state = WMI_TDLS_ENABLE_CONNECTION_TRACKER_IN_HOST;
|
||||
} else if (WMA_TDLS_SUPPORT_ACTIVE_EXTERNAL_CONTROL == tdls_mode) {
|
||||
else if (tdls_mode == WMA_TDLS_SUPPORT_ACTIVE_EXTERNAL_CONTROL)
|
||||
tdls_state = WMI_TDLS_ENABLE_CONNECTION_TRACKER_IN_HOST;
|
||||
} else {
|
||||
else
|
||||
tdls_state = WMI_TDLS_DISABLE;
|
||||
}
|
||||
|
||||
params.vdev_id = wma_tdls->vdev_id;
|
||||
params.notification_interval_ms = wma_tdls->notification_interval_ms;
|
||||
@@ -4272,8 +4254,8 @@ int wma_update_tdls_peer_state(WMA_HANDLE handle,
|
||||
}
|
||||
|
||||
if (wmi_unified_update_tdls_peer_state_cmd(wma_handle->wmi_handle,
|
||||
(struct tdls_peer_state_params *)peerStateParams,
|
||||
ch_mhz)) {
|
||||
(struct tdls_peer_state_params *)peerStateParams,
|
||||
ch_mhz)) {
|
||||
WMA_LOGE("%s: failed to send tdls peer update state command",
|
||||
__func__);
|
||||
ret = -EIO;
|
||||
@@ -5205,6 +5187,7 @@ int wma_unified_power_debug_stats_event_handler(void *handle,
|
||||
uint32_t power_stats_len, stats_registers_len, *debug_registers;
|
||||
|
||||
tpAniSirGlobal mac = (tpAniSirGlobal)cds_get_context(QDF_MODULE_ID_PE);
|
||||
|
||||
param_tlvs =
|
||||
(WMI_PDEV_CHIP_POWER_STATS_EVENTID_param_tlvs *) cmd_param_info;
|
||||
|
||||
|
@@ -94,9 +94,8 @@
|
||||
|
||||
#define WMA_LOG_COMPLETION_TIMER 10000 /* 10 seconds */
|
||||
#define WMI_TLV_HEADROOM 128
|
||||
|
||||
uint8_t *mac_trace_get_wma_msg_string(uint16_t wmaMsg);
|
||||
static uint32_t g_fw_wlan_feat_caps;
|
||||
|
||||
/**
|
||||
* wma_get_fw_wlan_feat_caps() - get fw feature capablity
|
||||
* @feature: feature enum value
|
||||
@@ -384,8 +383,8 @@ int wma_cli_get_command(int vdev_id, int param_id, int vpdev)
|
||||
ret = wma_get_he_vdev_param(&intr[vdev_id], param_id);
|
||||
break;
|
||||
default:
|
||||
WMA_LOGE("Invalid cli_get vdev command/Not"
|
||||
" yet implemented 0x%x", param_id);
|
||||
WMA_LOGE("Invalid cli_get vdev command/Not yet implemented 0x%x",
|
||||
param_id);
|
||||
return -EINVAL;
|
||||
}
|
||||
} else if (PDEV_CMD == vpdev) {
|
||||
@@ -430,8 +429,8 @@ int wma_cli_get_command(int vdev_id, int param_id, int vpdev)
|
||||
ret = wma->pdevconfig.burst_dur;
|
||||
break;
|
||||
default:
|
||||
WMA_LOGE("Invalid cli_get pdev command/Not"
|
||||
" yet implemented 0x%x", param_id);
|
||||
WMA_LOGE("Invalid cli_get pdev command/Not yet implemented 0x%x",
|
||||
param_id);
|
||||
return -EINVAL;
|
||||
}
|
||||
} else if (GEN_CMD == vpdev) {
|
||||
@@ -446,8 +445,8 @@ int wma_cli_get_command(int vdev_id, int param_id, int vpdev)
|
||||
ret = intr[vdev_id].roam_synch_delay;
|
||||
break;
|
||||
default:
|
||||
WMA_LOGE("Invalid generic vdev command/Not"
|
||||
" yet implemented 0x%x", param_id);
|
||||
WMA_LOGE("Invalid generic vdev command/Not yet implemented 0x%x",
|
||||
param_id);
|
||||
return -EINVAL;
|
||||
}
|
||||
} else if (PPS_CMD == vpdev) {
|
||||
@@ -480,8 +479,8 @@ int wma_cli_get_command(int vdev_id, int param_id, int vpdev)
|
||||
ret = intr[vdev_id].config.pps_params.rssi_chk;
|
||||
break;
|
||||
default:
|
||||
WMA_LOGE("Invalid pps vdev command/Not"
|
||||
" yet implemented 0x%x", param_id);
|
||||
WMA_LOGE("Invalid pps vdev command/Not yet implemented 0x%x",
|
||||
param_id);
|
||||
return -EINVAL;
|
||||
}
|
||||
} else if (QPOWER_CMD == vpdev) {
|
||||
@@ -503,8 +502,8 @@ int wma_cli_get_command(int vdev_id, int param_id, int vpdev)
|
||||
max_spec_nodata_ps_poll;
|
||||
break;
|
||||
default:
|
||||
WMA_LOGE("Invalid generic vdev command/Not"
|
||||
" yet implemented 0x%x", param_id);
|
||||
WMA_LOGE("Invalid generic vdev command/Not yet implemented 0x%x",
|
||||
param_id);
|
||||
return -EINVAL;
|
||||
}
|
||||
} else if (GTX_CMD == vpdev) {
|
||||
@@ -534,8 +533,8 @@ int wma_cli_get_command(int vdev_id, int param_id, int vpdev)
|
||||
ret = intr[vdev_id].config.gtx_info.gtxBWMask;
|
||||
break;
|
||||
default:
|
||||
WMA_LOGE("Invalid generic vdev command/Not"
|
||||
" yet implemented 0x%x", param_id);
|
||||
WMA_LOGE("Invalid generic vdev command/Not yet implemented 0x%x",
|
||||
param_id);
|
||||
return -EINVAL;
|
||||
}
|
||||
}
|
||||
@@ -642,6 +641,7 @@ static int32_t wma_set_priv_cfg(tp_wma_handle wma_handle,
|
||||
uint8_t mcc_channel_latency =
|
||||
(privcmd->param_value & 0x0000FF00) >> 8;
|
||||
int ret = -1;
|
||||
|
||||
WMA_LOGD("%s: Parsed input: Channel #1:%d, latency:%dms",
|
||||
__func__, mcc_channel, mcc_channel_latency);
|
||||
ret = wma_set_mcc_channel_time_latency(wma_handle,
|
||||
@@ -877,7 +877,7 @@ static void wma_set_modulated_dtim(tp_wma_handle wma,
|
||||
|
||||
ret = wma_vdev_set_param(wma->wmi_handle,
|
||||
privcmd->param_vdev_id,
|
||||
WMI_VDEV_PARAM_DTIM_POLICY ,
|
||||
WMI_VDEV_PARAM_DTIM_POLICY,
|
||||
NORMAL_DTIM);
|
||||
if (QDF_IS_STATUS_ERROR(ret))
|
||||
WMA_LOGE("Failed to Set to Normal DTIM policy");
|
||||
@@ -924,7 +924,7 @@ static void wma_process_cli_set_cmd(tp_wma_handle wma,
|
||||
case VDEV_CMD:
|
||||
if (!wma->interfaces[privcmd->param_vdev_id].is_vdev_valid) {
|
||||
WMA_LOGE("%s Vdev id is not valid", __func__);
|
||||
return ;
|
||||
return;
|
||||
}
|
||||
|
||||
WMA_LOGD("vdev id %d pid %d pval %d", privcmd->param_vdev_id,
|
||||
@@ -1257,8 +1257,8 @@ static void wma_process_cli_set_cmd(tp_wma_handle wma,
|
||||
WMA_LOGD("QPOWER CLI CMD:Ps Poll Wake Inv val %d",
|
||||
privcmd->param_value);
|
||||
/* Set the QPower Spec Ps Poll Wake Inv */
|
||||
ret = wma_unified_set_sta_ps_param(wma->wmi_handle,
|
||||
vid, WMI_STA_PS_PARAM_QPOWER_SPEC_PSPOLL_WAKE_INTERVAL,
|
||||
ret = wma_unified_set_sta_ps_param(wma->wmi_handle, vid,
|
||||
WMI_STA_PS_PARAM_QPOWER_SPEC_PSPOLL_WAKE_INTERVAL,
|
||||
privcmd->param_value);
|
||||
if (ret) {
|
||||
WMA_LOGE("Set Q-PsPoll WakeIntv Failed vId %d val %d",
|
||||
@@ -1272,8 +1272,8 @@ static void wma_process_cli_set_cmd(tp_wma_handle wma,
|
||||
WMA_LOGD("QPOWER CLI CMD:Spec NoData Ps Poll val %d",
|
||||
privcmd->param_value);
|
||||
/* Set the QPower Spec NoData PsPoll */
|
||||
ret = wma_unified_set_sta_ps_param(wma->wmi_handle,
|
||||
vid, WMI_STA_PS_PARAM_QPOWER_SPEC_MAX_SPEC_NODATA_PSPOLL,
|
||||
ret = wma_unified_set_sta_ps_param(wma->wmi_handle, vid,
|
||||
WMI_STA_PS_PARAM_QPOWER_SPEC_MAX_SPEC_NODATA_PSPOLL,
|
||||
privcmd->param_value);
|
||||
if (ret) {
|
||||
WMA_LOGE("Set Q-SpecNoDataPsPoll Failed vId %d val %d",
|
||||
@@ -1355,8 +1355,8 @@ static void wma_process_cli_set_cmd(tp_wma_handle wma,
|
||||
privcmd->param_vdev_id,
|
||||
&intr[vid].config.gtx_info);
|
||||
if (ret) {
|
||||
WMA_LOGE("wma_vdev_set_param"
|
||||
" failed ret %d", ret);
|
||||
WMA_LOGE("wma_vdev_set_param failed ret %d",
|
||||
ret);
|
||||
return;
|
||||
}
|
||||
break;
|
||||
@@ -1421,8 +1421,8 @@ static void wma_process_cli_set_cmd(tp_wma_handle wma,
|
||||
privcmd->param_value);
|
||||
break;
|
||||
default:
|
||||
WMA_LOGE("Invalid wma_cli_set vdev command/Not"
|
||||
" yet implemented 0x%x", privcmd->param_id);
|
||||
WMA_LOGE("Invalid wma_cli_set vdev command/Not yet implemented 0x%x",
|
||||
privcmd->param_id);
|
||||
break;
|
||||
}
|
||||
} else if (2 == privcmd->param_vp_dev) {
|
||||
@@ -1505,9 +1505,9 @@ static void wma_process_cli_set_cmd(tp_wma_handle wma,
|
||||
}
|
||||
} else if (5 == privcmd->param_vp_dev) {
|
||||
ret = wma_vdev_set_param(wma->wmi_handle,
|
||||
privcmd->param_vdev_id,
|
||||
WMI_VDEV_PARAM_PACKET_POWERSAVE,
|
||||
pps_val);
|
||||
privcmd->param_vdev_id,
|
||||
WMI_VDEV_PARAM_PACKET_POWERSAVE,
|
||||
pps_val);
|
||||
if (ret)
|
||||
WMA_LOGE("Failed to send wmi packet power save cmd");
|
||||
else
|
||||
@@ -2049,7 +2049,13 @@ static int wma_flush_complete_evt_handler(void *handle,
|
||||
WLAN_LOG_INDICATOR_FIRMWARE, reason_code);
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
}
|
||||
return 0;
|
||||
/* Asynchronous flush event for fatal event,
|
||||
* but, report in progress already
|
||||
*/
|
||||
WMA_LOGW("%s: Bug report already in progress - dropping! type:%d, indicator=%d reason_code=%d",
|
||||
__func__, WLAN_LOG_TYPE_FATAL,
|
||||
WLAN_LOG_INDICATOR_FIRMWARE, reason_code);
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -2622,6 +2628,7 @@ void wma_send_msg(tp_wma_handle wma_handle, uint16_t msg_type,
|
||||
struct scheduler_msg msg = { 0 };
|
||||
uint32_t status = QDF_STATUS_SUCCESS;
|
||||
tpAniSirGlobal pMac = cds_get_context(QDF_MODULE_ID_PE);
|
||||
|
||||
msg.type = msg_type;
|
||||
msg.bodyval = body_val;
|
||||
msg.bodyptr = body_ptr;
|
||||
@@ -2631,7 +2638,6 @@ void wma_send_msg(tp_wma_handle wma_handle, uint16_t msg_type,
|
||||
qdf_mem_free(body_ptr);
|
||||
QDF_ASSERT(0);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -2745,6 +2751,7 @@ static int wma_pdev_set_hw_mode_resp_evt_handler(void *handle,
|
||||
/* Store the vdev-mac map in WMA and prepare to send to PE */
|
||||
for (i = 0; i < wmi_event->num_vdev_mac_entries; i++) {
|
||||
uint32_t vdev_id, mac_id, pdev_id;
|
||||
|
||||
vdev_id = vdev_mac_entry[i].vdev_id;
|
||||
pdev_id = vdev_mac_entry[i].pdev_id;
|
||||
if (pdev_id == WMI_PDEV_ID_SOC) {
|
||||
@@ -2827,6 +2834,7 @@ void wma_process_pdev_hw_mode_trans_ind(void *handle,
|
||||
/* Store the vdev-mac map in WMA and send to policy manager */
|
||||
for (i = 0; i < fixed_param->num_vdev_mac_entries; i++) {
|
||||
uint32_t vdev_id, mac_id, pdev_id;
|
||||
|
||||
vdev_id = vdev_mac_entry[i].vdev_id;
|
||||
pdev_id = vdev_mac_entry[i].pdev_id;
|
||||
|
||||
@@ -2999,8 +3007,8 @@ QDF_STATUS wma_start(void *cds_ctx)
|
||||
|
||||
WMA_LOGD("%s: Enter", __func__);
|
||||
|
||||
WMA_LOGD("%s: Enter", __func__);
|
||||
wma_handle = cds_get_context(QDF_MODULE_ID_WMA);
|
||||
|
||||
/* validate the wma_handle */
|
||||
if (NULL == wma_handle) {
|
||||
WMA_LOGE("%s: Invalid handle", __func__);
|
||||
@@ -3116,20 +3124,21 @@ QDF_STATUS wma_start(void *cds_ctx)
|
||||
|
||||
WMA_LOGD("FW supports cesium network, registering event handlers");
|
||||
|
||||
status = wmi_unified_register_event_handler(wma_handle->wmi_handle,
|
||||
WMI_PEER_INFO_EVENTID,
|
||||
wma_ibss_peer_info_event_handler,
|
||||
WMA_RX_SERIALIZER_CTX);
|
||||
status = wmi_unified_register_event_handler(
|
||||
wma_handle->wmi_handle,
|
||||
WMI_PEER_INFO_EVENTID,
|
||||
wma_ibss_peer_info_event_handler,
|
||||
WMA_RX_SERIALIZER_CTX);
|
||||
if (status) {
|
||||
WMA_LOGE("Failed to register ibss peer info event cb");
|
||||
qdf_status = QDF_STATUS_E_FAILURE;
|
||||
goto end;
|
||||
}
|
||||
|
||||
status = wmi_unified_register_event_handler(wma_handle->wmi_handle,
|
||||
WMI_PEER_TX_FAIL_CNT_THR_EVENTID,
|
||||
wma_fast_tx_fail_event_handler,
|
||||
WMA_RX_SERIALIZER_CTX);
|
||||
status = wmi_unified_register_event_handler(
|
||||
wma_handle->wmi_handle,
|
||||
WMI_PEER_TX_FAIL_CNT_THR_EVENTID,
|
||||
wma_fast_tx_fail_event_handler,
|
||||
WMA_RX_SERIALIZER_CTX);
|
||||
if (status) {
|
||||
WMA_LOGE("Failed to register peer fast tx failure event cb");
|
||||
qdf_status = QDF_STATUS_E_FAILURE;
|
||||
@@ -3240,10 +3249,9 @@ QDF_STATUS wma_stop(void *cds_ctx, uint8_t reason)
|
||||
tp_wma_handle wma_handle;
|
||||
QDF_STATUS qdf_status = QDF_STATUS_SUCCESS;
|
||||
int i;
|
||||
|
||||
wma_handle = cds_get_context(QDF_MODULE_ID_WMA);
|
||||
|
||||
WMA_LOGD("%s: Enter", __func__);
|
||||
|
||||
/* validate the wma_handle */
|
||||
if (NULL == wma_handle) {
|
||||
WMA_LOGE("%s: Invalid handle", __func__);
|
||||
@@ -3269,10 +3277,8 @@ QDF_STATUS wma_stop(void *cds_ctx, uint8_t reason)
|
||||
|
||||
/* Destroy the timer for log completion */
|
||||
qdf_status = qdf_mc_timer_destroy(&wma_handle->log_completion_timer);
|
||||
if (qdf_status != QDF_STATUS_SUCCESS) {
|
||||
if (qdf_status != QDF_STATUS_SUCCESS)
|
||||
WMA_LOGE("Failed to destroy the log completion timer");
|
||||
}
|
||||
|
||||
/* clean up ll-queue for all vdev */
|
||||
for (i = 0; i < wma_handle->max_bssid; i++) {
|
||||
if (wma_handle->interfaces[i].handle &&
|
||||
@@ -3558,12 +3564,12 @@ QDF_STATUS wma_close(void *cds_ctx)
|
||||
for (idx = 0; idx < wma_handle->num_mem_chunks; ++idx) {
|
||||
qdf_mem_free_consistent(wma_handle->qdf_dev,
|
||||
wma_handle->qdf_dev->dev,
|
||||
wma_handle->mem_chunks[idx].len,
|
||||
wma_handle->mem_chunks[idx].vaddr,
|
||||
wma_handle->mem_chunks[idx].paddr,
|
||||
qdf_get_dma_mem_context(
|
||||
(&(wma_handle->mem_chunks[idx])),
|
||||
memctx));
|
||||
wma_handle->mem_chunks[idx].len,
|
||||
wma_handle->mem_chunks[idx].vaddr,
|
||||
wma_handle->mem_chunks[idx].paddr,
|
||||
qdf_get_dma_mem_context(
|
||||
(&(wma_handle->mem_chunks[idx])),
|
||||
memctx));
|
||||
}
|
||||
|
||||
#if defined(QCA_WIFI_FTM)
|
||||
@@ -3650,9 +3656,9 @@ static uint32_t wma_alloc_host_mem_chunk(tp_wma_handle wma_handle,
|
||||
uint32_t num_units, uint32_t unit_len)
|
||||
{
|
||||
qdf_dma_addr_t paddr;
|
||||
if (!num_units || !unit_len) {
|
||||
|
||||
if (!num_units || !unit_len)
|
||||
return 0;
|
||||
}
|
||||
wma_handle->mem_chunks[idx].vaddr = NULL;
|
||||
/** reduce the requested allocation by half until allocation succeeds */
|
||||
while (wma_handle->mem_chunks[idx].vaddr == NULL && num_units) {
|
||||
@@ -3697,8 +3703,7 @@ static void wma_alloc_host_mem(tp_wma_handle wma_handle, uint32_t req_id,
|
||||
idx, remaining_units,
|
||||
unit_len);
|
||||
if (allocated_units == 0) {
|
||||
WMA_LOGE("FAILED TO ALLOCATED memory unit len %d"
|
||||
" units requested %d units allocated %d ",
|
||||
WMA_LOGE("FAILED TO ALLOCATED memory unit len %d units requested %d units allocated %d ",
|
||||
unit_len, num_units,
|
||||
(num_units - remaining_units));
|
||||
wma_handle->num_mem_chunks = idx;
|
||||
@@ -3707,9 +3712,7 @@ static void wma_alloc_host_mem(tp_wma_handle wma_handle, uint32_t req_id,
|
||||
remaining_units -= allocated_units;
|
||||
++idx;
|
||||
if (idx == MAX_MEM_CHUNKS) {
|
||||
WMA_LOGE("RWACHED MAX CHUNK LIMIT for memory units %d"
|
||||
" unit len %d requested by FW,"
|
||||
" only allocated %d ",
|
||||
WMA_LOGE("RWACHED MAX CHUNK LIMIT for memory units %d unit len %d requested by FW, only allocated %d ",
|
||||
num_units, unit_len,
|
||||
(num_units - remaining_units));
|
||||
wma_handle->num_mem_chunks = idx;
|
||||
@@ -3767,9 +3770,8 @@ static inline void wma_update_target_services(tp_wma_handle wh,
|
||||
#endif /* FEATURE_WLAN_SCAN_PNO */
|
||||
|
||||
#ifdef FEATURE_WLAN_EXTSCAN
|
||||
if (WMI_SERVICE_IS_ENABLED(wh->wmi_service_bitmap, WMI_SERVICE_EXTSCAN)) {
|
||||
if (WMI_SERVICE_IS_ENABLED(wh->wmi_service_bitmap, WMI_SERVICE_EXTSCAN))
|
||||
g_fw_wlan_feat_caps |= (1 << EXTENDED_SCAN);
|
||||
}
|
||||
#endif /* FEATURE_WLAN_EXTSCAN */
|
||||
cfg->lte_coex_ant_share = WMI_SERVICE_IS_ENABLED(wh->wmi_service_bitmap,
|
||||
WMI_SERVICE_LTE_ANT_SHARE_SUPPORT);
|
||||
@@ -3802,7 +3804,7 @@ static inline void wma_update_target_services(tp_wma_handle wh,
|
||||
#ifdef WLAN_FEATURE_ROAM_OFFLOAD
|
||||
/* Enable Roam Offload */
|
||||
cfg->en_roam_offload = WMI_SERVICE_IS_ENABLED(wh->wmi_service_bitmap,
|
||||
WMI_SERVICE_ROAM_HO_OFFLOAD);
|
||||
WMI_SERVICE_ROAM_HO_OFFLOAD);
|
||||
#endif /* WLAN_FEATURE_ROAM_OFFLOAD */
|
||||
#ifdef WLAN_FEATURE_NAN
|
||||
if (WMI_SERVICE_IS_ENABLED(wh->wmi_service_bitmap, WMI_SERVICE_NAN))
|
||||
@@ -3907,7 +3909,7 @@ static inline void wma_update_target_vht_cap(tp_wma_handle wh,
|
||||
|
||||
cfg->vht_rx_stbc = (wh->vht_cap_info & WMI_VHT_CAP_RX_STBC_1SS) |
|
||||
(wh->vht_cap_info & WMI_VHT_CAP_RX_STBC_2SS) |
|
||||
(wh->vht_cap_info & WMI_VHT_CAP_RX_STBC_3SS) ;
|
||||
(wh->vht_cap_info & WMI_VHT_CAP_RX_STBC_3SS);
|
||||
|
||||
cfg->vht_max_ampdu_len_exp = (wh->vht_cap_info &
|
||||
WMI_VHT_CAP_MAX_AMPDU_LEN_EXP)
|
||||
@@ -4042,8 +4044,8 @@ static void wma_update_target_ext_ht_cap(tp_wma_handle wma_handle,
|
||||
|
||||
if (qdf_mem_cmp(&tmp_cap, &tmp_ht_cap,
|
||||
sizeof(struct wma_tgt_ht_cap))) {
|
||||
qdf_mem_copy(ht_cap, &tmp_ht_cap,
|
||||
sizeof(struct wma_tgt_ht_cap));
|
||||
qdf_mem_copy(ht_cap, &tmp_ht_cap,
|
||||
sizeof(struct wma_tgt_ht_cap));
|
||||
}
|
||||
|
||||
WMA_LOGD("%s: [ext ht cap] ht_rx_stbc - %d, ht_tx_stbc - %d\n"
|
||||
@@ -4353,10 +4355,10 @@ static int wma_setup_wmi_init_msg(tp_wma_handle wma_handle,
|
||||
* target. this needs to be fied, host
|
||||
* and target can get out of sync
|
||||
*/
|
||||
num_units = wma_handle->wlan_resource_config.num_peers + 1;
|
||||
num_units = wma_handle->wlan_resource_config.num_peers +
|
||||
1;
|
||||
}
|
||||
WMA_LOGD
|
||||
("idx %d req %d num_units %d num_unit_info %d unit size %d actual units %d ",
|
||||
WMA_LOGD("idx %d req %d num_units %d num_unit_info %d unit size %d actual units %d ",
|
||||
idx, ev_mem_reqs[idx].req_id,
|
||||
ev_mem_reqs[idx].num_units,
|
||||
ev_mem_reqs[idx].num_unit_info,
|
||||
@@ -4609,8 +4611,8 @@ int wma_rx_service_ready_event(void *handle, uint8_t *cmd_param_info,
|
||||
if (WMI_SERVICE_IS_ENABLED(wma_handle->wmi_service_bitmap,
|
||||
WMI_SERVICE_CSA_OFFLOAD)) {
|
||||
WMA_LOGD("%s: FW support CSA offload capability", __func__);
|
||||
status =
|
||||
wmi_unified_register_event_handler(wma_handle->wmi_handle,
|
||||
status = wmi_unified_register_event_handler(
|
||||
wma_handle->wmi_handle,
|
||||
WMI_CSA_HANDLING_EVENTID,
|
||||
wma_csa_offload_handler,
|
||||
WMA_RX_SERIALIZER_CTX);
|
||||
@@ -4654,7 +4656,8 @@ int wma_rx_service_ready_event(void *handle, uint8_t *cmd_param_info,
|
||||
if (WMI_SERVICE_IS_ENABLED(wma_handle->wmi_service_bitmap,
|
||||
WMI_SERVICE_GTK_OFFLOAD)) {
|
||||
status =
|
||||
wmi_unified_register_event_handler(wma_handle->wmi_handle,
|
||||
wmi_unified_register_event_handler(
|
||||
wma_handle->wmi_handle,
|
||||
WMI_GTK_OFFLOAD_STATUS_EVENTID,
|
||||
target_if_pmo_gtk_offload_status_event,
|
||||
WMA_RX_WORK_CTX);
|
||||
@@ -4680,8 +4683,7 @@ int wma_rx_service_ready_event(void *handle, uint8_t *cmd_param_info,
|
||||
wma_tbttoffset_update_event_handler,
|
||||
WMA_RX_SERIALIZER_CTX);
|
||||
if (status) {
|
||||
WMA_LOGE
|
||||
("Failed to register WMI_TBTTOFFSET_UPDATE_EVENTID callback");
|
||||
WMA_LOGE("Failed to register WMI_TBTTOFFSET_UPDATE_EVENTID callback");
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
@@ -4693,7 +4695,7 @@ int wma_rx_service_ready_event(void *handle, uint8_t *cmd_param_info,
|
||||
* service is not set, then host shall not expect MAC ID from FW in
|
||||
* VDEV START RESPONSE event and host shall use PDEV ID.
|
||||
*/
|
||||
if (WMI_SERVICE_IS_ENABLED(wma_handle->wmi_service_bitmap,
|
||||
if (WMI_SERVICE_IS_ENABLED(wma_handle->wmi_service_bitmap,
|
||||
WMI_SERVICE_DEPRECATED_REPLACE))
|
||||
wma_handle->wlan_resource_config.use_pdev_id = true;
|
||||
else
|
||||
@@ -4803,7 +4805,7 @@ int wma_rx_service_ready_event(void *handle, uint8_t *cmd_param_info,
|
||||
* Return: QDF_STATUS
|
||||
*/
|
||||
static QDF_STATUS wma_get_phyid_for_given_band(
|
||||
t_wma_handle * wma_handle,
|
||||
tp_wma_handle wma_handle,
|
||||
struct hw_mode_idx_to_mac_cap_idx *map,
|
||||
enum cds_band_type band, uint8_t *phyid)
|
||||
{
|
||||
@@ -5378,7 +5380,6 @@ static void wma_populate_soc_caps(t_wma_handle *wma_handle,
|
||||
phy_caps->num_phy_for_hal_reg_cap.num_phy *
|
||||
sizeof(WMI_HAL_REG_CAPABILITIES_EXT));
|
||||
wma_print_populate_soc_caps(wma_handle);
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -5480,7 +5481,8 @@ int wma_rx_ready_event(void *handle, uint8_t *cmd_param_info,
|
||||
|
||||
ev = param_buf->fixed_param;
|
||||
/* Indicate to the waiting thread that the ready
|
||||
* event was received */
|
||||
* event was received
|
||||
*/
|
||||
wma_handle->sub_20_support =
|
||||
WMI_SERVICE_IS_ENABLED(wma_handle->wmi_service_bitmap,
|
||||
WMI_SERVICE_HALF_RATE_QUARTER_RATE_SUPPORT);
|
||||
@@ -5497,8 +5499,8 @@ int wma_rx_ready_event(void *handle, uint8_t *cmd_param_info,
|
||||
* Error: Our host version and the given firmware version
|
||||
* are incompatible.
|
||||
*/
|
||||
WMA_LOGE("%s: Error: Incompatible WMI version."
|
||||
"Host: %d,%d,0x%x 0x%x 0x%x 0x%x, FW: %d,%d,0x%x 0x%x 0x%x 0x%x",
|
||||
WMA_LOGE("%s: Error: Incompatible WMI version.", __func__);
|
||||
WMA_LOGE("%s: Host: %d,%d,0x%x 0x%x 0x%x 0x%x, FW: %d,%d,0x%x 0x%x 0x%x 0x%x",
|
||||
__func__,
|
||||
WMI_VER_GET_MAJOR(wma_handle->final_abi_vers.
|
||||
abi_version_0),
|
||||
@@ -5676,8 +5678,8 @@ pkt_pwr_save_config:
|
||||
WMA_LOGD("vdev_id:%d val:0x%x pps_val:0x%x", vdev_id,
|
||||
val, pps_val);
|
||||
ret = wma_vdev_set_param(wma->wmi_handle, vdev_id,
|
||||
WMI_VDEV_PARAM_PACKET_POWERSAVE,
|
||||
pps_val);
|
||||
WMI_VDEV_PARAM_PACKET_POWERSAVE,
|
||||
pps_val);
|
||||
break;
|
||||
default:
|
||||
WMA_LOGE("%s:INVALID PPS CONFIG", __func__);
|
||||
@@ -5711,10 +5713,8 @@ static QDF_STATUS wma_process_set_mas(tp_wma_handle wma,
|
||||
wma_set_enable_disable_mcc_adaptive_scheduler(val)) {
|
||||
WMA_LOGE("%s: Unable to enable/disable MAS", __func__);
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
} else {
|
||||
WMA_LOGE("%s: Value is %d", __func__, val);
|
||||
}
|
||||
|
||||
WMA_LOGE("%s: Value is %d", __func__, val);
|
||||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
@@ -5844,8 +5844,6 @@ static void wma_enable_specific_fw_logs(tp_wma_handle wma_handle,
|
||||
|
||||
wmi_unified_enable_specific_fw_logs_cmd(wma_handle->wmi_handle,
|
||||
(struct wmi_wifi_start_log *)start_log);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
#define MEGABYTE (1024 * 1024)
|
||||
@@ -5864,7 +5862,6 @@ static void wma_enable_specific_fw_logs(tp_wma_handle wma_handle,
|
||||
static void wma_set_wifi_start_packet_stats(void *wma_handle,
|
||||
struct sir_wifi_start_log *start_log)
|
||||
{
|
||||
return;
|
||||
}
|
||||
#else
|
||||
static void wma_set_wifi_start_packet_stats(void *wma_handle,
|
||||
@@ -5975,7 +5972,7 @@ static QDF_STATUS wma_update_wep_default_key(tp_wma_handle wma,
|
||||
* Return: VOS_STATUS_SUCCESS on success, error number otherwise
|
||||
*/
|
||||
static QDF_STATUS wma_update_tx_fail_cnt_th(tp_wma_handle wma,
|
||||
struct sme_tx_fail_cnt_threshold *tx_fail_cnt_th)
|
||||
struct sme_tx_fail_cnt_threshold *tx_fail_cnt_th)
|
||||
{
|
||||
u_int8_t vdev_id;
|
||||
u_int32_t tx_fail_disconn_th;
|
||||
@@ -6139,13 +6136,13 @@ WMI_WOW_HOSTWAKEUP_GPIO_PIN_PATTERN_CONFIG_CMD_fixed_param
|
||||
WMITLV_TAG_STRUC_wmi_wow_hostwakeup_gpio_pin_pattern_config_cmd_fixed_param
|
||||
|
||||
/**
|
||||
* wma_send_wow_pulse_cmd() - send wmi cmd of wow pulse cmd
|
||||
* infomation to fw.
|
||||
* @wma_handle: wma handler
|
||||
* @udp_response: wow_pulse_mode pointer
|
||||
*
|
||||
* Return: Return QDF_STATUS
|
||||
*/
|
||||
* wma_send_wow_pulse_cmd() - send wmi cmd of wow pulse cmd
|
||||
* information to fw.
|
||||
* @wma_handle: wma handler
|
||||
* @udp_response: wow_pulse_mode pointer
|
||||
*
|
||||
* Return: Return QDF_STATUS
|
||||
*/
|
||||
static QDF_STATUS wma_send_wow_pulse_cmd(tp_wma_handle wma_handle,
|
||||
struct wow_pulse_mode *wow_pulse_cmd)
|
||||
{
|
||||
@@ -6157,8 +6154,8 @@ static QDF_STATUS wma_send_wow_pulse_cmd(tp_wma_handle wma_handle,
|
||||
len = sizeof(*cmd);
|
||||
buf = wmi_buf_alloc(wma_handle->wmi_handle, len);
|
||||
if (!buf) {
|
||||
WMA_LOGE("wmi_buf_alloc failed");
|
||||
return QDF_STATUS_E_NOMEM;
|
||||
WMA_LOGE("wmi_buf_alloc failed");
|
||||
return QDF_STATUS_E_NOMEM;
|
||||
}
|
||||
|
||||
cmd = (WMI_WOW_HOSTWAKEUP_GPIO_CMD_FIXED_PARAM *)wmi_buf_data(buf);
|
||||
@@ -6310,11 +6307,10 @@ QDF_STATUS wma_mc_process_msg(void *cds_context, struct scheduler_msg *msg)
|
||||
case WNI_CFG_DNLD_REQ:
|
||||
WMA_LOGD("McThread: WNI_CFG_DNLD_REQ");
|
||||
qdf_status = wma_wni_cfg_dnld(wma_handle);
|
||||
if (QDF_IS_STATUS_SUCCESS(qdf_status)) {
|
||||
if (QDF_IS_STATUS_SUCCESS(qdf_status))
|
||||
cds_wma_complete_cback(cds_context);
|
||||
} else {
|
||||
else
|
||||
WMA_LOGD("config download failure");
|
||||
}
|
||||
break;
|
||||
case WMA_ADD_STA_SELF_REQ:
|
||||
txrx_vdev_handle =
|
||||
@@ -6441,7 +6437,7 @@ QDF_STATUS wma_mc_process_msg(void *cds_context, struct scheduler_msg *msg)
|
||||
break;
|
||||
case WMA_SET_DTIM_PERIOD:
|
||||
wma_set_dtim_period(wma_handle,
|
||||
(struct set_dtim_params *)msg->bodyptr);
|
||||
(struct set_dtim_params *)msg->bodyptr);
|
||||
qdf_mem_free(msg->bodyptr);
|
||||
break;
|
||||
case WMA_SET_TX_POWER_REQ:
|
||||
@@ -6723,7 +6719,8 @@ QDF_STATUS wma_mc_process_msg(void *cds_context, struct scheduler_msg *msg)
|
||||
break;
|
||||
case WMA_EXTSCAN_RESET_SIGNF_CHANGE_REQ:
|
||||
wma_extscan_stop_change_monitor(wma_handle,
|
||||
(tSirExtScanResetSignificantChangeReqParams *) msg->bodyptr);
|
||||
(tSirExtScanResetSignificantChangeReqParams *)
|
||||
msg->bodyptr);
|
||||
qdf_mem_free(msg->bodyptr);
|
||||
break;
|
||||
case WMA_EXTSCAN_GET_CACHED_RESULTS_REQ:
|
||||
@@ -6748,7 +6745,8 @@ QDF_STATUS wma_mc_process_msg(void *cds_context, struct scheduler_msg *msg)
|
||||
break;
|
||||
case WMA_SET_PASSPOINT_LIST_REQ:
|
||||
/* Issue reset passpoint network list first and clear
|
||||
* the entries */
|
||||
* the entries
|
||||
*/
|
||||
wma_reset_passpoint_network_list(wma_handle,
|
||||
(struct wifi_passpoint_req *)msg->bodyptr);
|
||||
|
||||
@@ -7087,10 +7085,9 @@ void wma_log_completion_timeout(void *data)
|
||||
WMA_LOGE("%s: Invalid WMA handle", __func__);
|
||||
|
||||
/* Though we did not receive any event from FW,
|
||||
* we can flush whatever logs we have with us */
|
||||
* we can flush whatever logs we have with us
|
||||
*/
|
||||
cds_logging_set_fw_flush_complete();
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -7263,7 +7260,6 @@ QDF_STATUS wma_send_pdev_set_dual_mac_config(tp_wma_handle wma_handle,
|
||||
__func__, status);
|
||||
return status;
|
||||
}
|
||||
|
||||
policy_mgr_update_dbs_req_config(wma_handle->psoc,
|
||||
msg->scan_config, msg->fw_mode_config);
|
||||
|
||||
@@ -7365,9 +7361,9 @@ QDF_STATUS wma_crash_inject(tp_wma_handle wma_handle, uint32_t type,
|
||||
uint32_t delay_time_ms)
|
||||
{
|
||||
struct crash_inject param;
|
||||
|
||||
param.type = type;
|
||||
param.delay_time_ms = delay_time_ms;
|
||||
|
||||
return wmi_crash_inject(wma_handle->wmi_handle, ¶m);
|
||||
}
|
||||
|
||||
|
@@ -151,7 +151,8 @@ static void wma_send_bcn_buf_ll(tp_wma_handle wma,
|
||||
tim_ie->tim_bitctl &= ~1;
|
||||
|
||||
/* To avoid sw generated frame sequence the same as H/W generated frame,
|
||||
* the value lower than min_sw_seq is reserved for HW generated frame */
|
||||
* the value lower than min_sw_seq is reserved for HW generated frame
|
||||
*/
|
||||
if ((bcn->seq_no & IEEE80211_SEQ_MASK) < MIN_SW_SEQ)
|
||||
bcn->seq_no = MIN_SW_SEQ;
|
||||
|
||||
@@ -169,10 +170,10 @@ static void wma_send_bcn_buf_ll(tp_wma_handle wma,
|
||||
(uint8_t) WMI_UNIFIED_NOA_ATTR_OPP_PS_GET(p2p_noa_info);
|
||||
noa_ie.ctwindow =
|
||||
(uint8_t) WMI_UNIFIED_NOA_ATTR_CTWIN_GET(p2p_noa_info);
|
||||
noa_ie.num_descriptors =
|
||||
(uint8_t) WMI_UNIFIED_NOA_ATTR_NUM_DESC_GET(p2p_noa_info);
|
||||
WMA_LOGI("%s: index %u, oppPs %u, ctwindow %u, "
|
||||
"num_descriptors = %u", __func__, noa_ie.index,
|
||||
noa_ie.num_descriptors = (uint8_t)
|
||||
WMI_UNIFIED_NOA_ATTR_NUM_DESC_GET(p2p_noa_info);
|
||||
WMA_LOGI("%s: index %u, oppPs %u, ctwindow %u, num_descriptors = %u",
|
||||
__func__, noa_ie.index,
|
||||
noa_ie.oppPS, noa_ie.ctwindow, noa_ie.num_descriptors);
|
||||
for (i = 0; i < noa_ie.num_descriptors; i++) {
|
||||
noa_ie.noa_descriptors[i].type_count =
|
||||
@@ -184,8 +185,7 @@ static void wma_send_bcn_buf_ll(tp_wma_handle wma,
|
||||
p2p_noa_info->noa_descriptors[i].interval;
|
||||
noa_ie.noa_descriptors[i].start_time =
|
||||
p2p_noa_info->noa_descriptors[i].start_time;
|
||||
WMA_LOGI("%s: NoA descriptor[%d] type_count %u, "
|
||||
"duration %u, interval %u, start_time = %u",
|
||||
WMA_LOGI("%s: NoA descriptor[%d] type_count %u, duration %u, interval %u, start_time = %u",
|
||||
__func__, i,
|
||||
noa_ie.noa_descriptors[i].type_count,
|
||||
noa_ie.noa_descriptors[i].duration,
|
||||
@@ -195,7 +195,8 @@ static void wma_send_bcn_buf_ll(tp_wma_handle wma,
|
||||
wma_update_noa(bcn, &noa_ie);
|
||||
|
||||
/* Send a msg to LIM to update the NoA IE in probe response
|
||||
* frames transmitted by the host */
|
||||
* frames transmitted by the host
|
||||
*/
|
||||
wma_update_probe_resp_noa(wma, &noa_ie);
|
||||
}
|
||||
|
||||
@@ -346,7 +347,8 @@ int wma_peer_sta_kickout_event_handler(void *handle, u8 *event, u32 len)
|
||||
switch (kickout_event->reason) {
|
||||
case WMI_PEER_STA_KICKOUT_REASON_IBSS_DISCONNECT:
|
||||
p_inactivity = (tpSirIbssPeerInactivityInd)
|
||||
qdf_mem_malloc(sizeof(tSirIbssPeerInactivityInd));
|
||||
qdf_mem_malloc(sizeof(
|
||||
tSirIbssPeerInactivityInd));
|
||||
if (!p_inactivity) {
|
||||
WMA_LOGE("QDF MEM Alloc Failed for tSirIbssPeerInactivity");
|
||||
return -ENOMEM;
|
||||
@@ -358,14 +360,12 @@ int wma_peer_sta_kickout_event_handler(void *handle, u8 *event, u32 len)
|
||||
wma_send_msg(wma, WMA_IBSS_PEER_INACTIVITY_IND,
|
||||
(void *)p_inactivity, 0);
|
||||
goto exit_handler;
|
||||
break;
|
||||
|
||||
#ifdef FEATURE_WLAN_TDLS
|
||||
case WMI_PEER_STA_KICKOUT_REASON_TDLS_DISCONNECT:
|
||||
del_sta_ctx = (tpDeleteStaContext)
|
||||
qdf_mem_malloc(sizeof(tDeleteStaContext));
|
||||
if (!del_sta_ctx) {
|
||||
WMA_LOGE("%s: mem alloc failed for tDeleteStaContext for TDLS peer: %pM",
|
||||
WMA_LOGE("%s: mem alloc failed for struct del_sta_context for TDLS peer: %pM",
|
||||
__func__, macaddr);
|
||||
return -ENOMEM;
|
||||
}
|
||||
@@ -380,9 +380,7 @@ int wma_peer_sta_kickout_event_handler(void *handle, u8 *event, u32 len)
|
||||
wma_send_msg(wma, SIR_LIM_DELETE_STA_CONTEXT_IND,
|
||||
(void *)del_sta_ctx, 0);
|
||||
goto exit_handler;
|
||||
break;
|
||||
#endif /* FEATURE_WLAN_TDLS */
|
||||
|
||||
case WMI_PEER_STA_KICKOUT_REASON_XRETRY:
|
||||
if (wma->interfaces[vdev_id].type == WMI_VDEV_TYPE_STA &&
|
||||
(wma->interfaces[vdev_id].sub_type == 0 ||
|
||||
@@ -411,7 +409,7 @@ int wma_peer_sta_kickout_event_handler(void *handle, u8 *event, u32 len)
|
||||
|
||||
case WMI_PEER_STA_KICKOUT_REASON_UNSPECIFIED:
|
||||
/*
|
||||
* Default legacy value used by original firmware implementation.
|
||||
* Default legacy value used by original firmware implementation
|
||||
*/
|
||||
if (wma->interfaces[vdev_id].type == WMI_VDEV_TYPE_STA &&
|
||||
(wma->interfaces[vdev_id].sub_type == 0 ||
|
||||
@@ -452,9 +450,9 @@ int wma_peer_sta_kickout_event_handler(void *handle, u8 *event, u32 len)
|
||||
* default action is to send delete station context indication to LIM
|
||||
*/
|
||||
del_sta_ctx =
|
||||
(tpDeleteStaContext) qdf_mem_malloc(sizeof(tDeleteStaContext));
|
||||
(tDeleteStaContext *) qdf_mem_malloc(sizeof(tDeleteStaContext));
|
||||
if (!del_sta_ctx) {
|
||||
WMA_LOGE("QDF MEM Alloc Failed for tDeleteStaContext");
|
||||
WMA_LOGE("QDF MEM Alloc Failed for struct del_sta_context");
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
@@ -646,29 +644,26 @@ void wma_set_sap_keepalive(tp_wma_handle wma, uint8_t vdev_id)
|
||||
|
||||
min_inactive_time = max_inactive_time / 2;
|
||||
|
||||
status = wma_vdev_set_param(wma->wmi_handle,
|
||||
vdev_id,
|
||||
WMI_VDEV_PARAM_AP_KEEPALIVE_MIN_IDLE_INACTIVE_TIME_SECS,
|
||||
min_inactive_time);
|
||||
status = wma_vdev_set_param(wma->wmi_handle, vdev_id,
|
||||
WMI_VDEV_PARAM_AP_KEEPALIVE_MIN_IDLE_INACTIVE_TIME_SECS,
|
||||
min_inactive_time);
|
||||
if (QDF_IS_STATUS_ERROR(status))
|
||||
WMA_LOGE("Failed to Set AP MIN IDLE INACTIVE TIME");
|
||||
|
||||
status = wma_vdev_set_param(wma->wmi_handle,
|
||||
vdev_id,
|
||||
WMI_VDEV_PARAM_AP_KEEPALIVE_MAX_IDLE_INACTIVE_TIME_SECS,
|
||||
max_inactive_time);
|
||||
status = wma_vdev_set_param(wma->wmi_handle, vdev_id,
|
||||
WMI_VDEV_PARAM_AP_KEEPALIVE_MAX_IDLE_INACTIVE_TIME_SECS,
|
||||
max_inactive_time);
|
||||
if (QDF_IS_STATUS_ERROR(status))
|
||||
WMA_LOGE("Failed to Set AP MAX IDLE INACTIVE TIME");
|
||||
|
||||
status = wma_vdev_set_param(wma->wmi_handle,
|
||||
vdev_id,
|
||||
WMI_VDEV_PARAM_AP_KEEPALIVE_MAX_UNRESPONSIVE_TIME_SECS,
|
||||
max_unresponsive_time);
|
||||
status = wma_vdev_set_param(wma->wmi_handle, vdev_id,
|
||||
WMI_VDEV_PARAM_AP_KEEPALIVE_MAX_UNRESPONSIVE_TIME_SECS,
|
||||
max_unresponsive_time);
|
||||
if (QDF_IS_STATUS_ERROR(status))
|
||||
WMA_LOGE("Failed to Set MAX UNRESPONSIVE TIME");
|
||||
|
||||
WMA_LOGD("%s:vdev_id:%d min_inactive_time: %u max_inactive_time: %u"
|
||||
" max_unresponsive_time: %u", __func__, vdev_id,
|
||||
WMA_LOGD("%s:vdev_id:%d min_inactive_time: %u max_inactive_time: %u max_unresponsive_time: %u",
|
||||
__func__, vdev_id,
|
||||
min_inactive_time, max_inactive_time, max_unresponsive_time);
|
||||
}
|
||||
|
||||
@@ -713,7 +708,6 @@ void wma_set_sta_sa_query_param(tp_wma_handle wma,
|
||||
retry_interval);
|
||||
|
||||
WMA_LOGD(FL("Exit :"));
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -759,9 +753,7 @@ void wma_set_sta_keep_alive(tp_wma_handle wma, uint8_t vdev_id,
|
||||
|
||||
wmi_unified_set_sta_keep_alive_cmd(wma->wmi_handle,
|
||||
¶ms);
|
||||
|
||||
WMA_LOGD("%s: Exit", __func__);
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1009,7 +1001,8 @@ QDF_STATUS wma_send_peer_assoc(tp_wma_handle wma,
|
||||
if ((phymode == MODE_11A && num_peer_11a_rates == 0) ||
|
||||
(phymode == MODE_11B && num_peer_11b_rates == 0)) {
|
||||
WMA_LOGW("%s: Invalid phy rates. phymode 0x%x, 11b_rates %d, 11a_rates %d",
|
||||
__func__, phymode, num_peer_11b_rates, num_peer_11a_rates);
|
||||
__func__, phymode, num_peer_11b_rates,
|
||||
num_peer_11a_rates);
|
||||
qdf_mem_free(cmd);
|
||||
return QDF_STATUS_E_INVAL;
|
||||
}
|
||||
@@ -1163,10 +1156,8 @@ QDF_STATUS wma_send_peer_assoc(tp_wma_handle wma,
|
||||
|
||||
#ifdef FEATURE_WLAN_WAPI
|
||||
if (params->encryptType == eSIR_ED_WPI) {
|
||||
ret = wma_vdev_set_param(wma->wmi_handle,
|
||||
params->smesessionId,
|
||||
WMI_VDEV_PARAM_DROP_UNENCRY,
|
||||
false);
|
||||
ret = wma_vdev_set_param(wma->wmi_handle, params->smesessionId,
|
||||
WMI_VDEV_PARAM_DROP_UNENCRY, false);
|
||||
if (ret) {
|
||||
WMA_LOGE
|
||||
("Set WMI_VDEV_PARAM_DROP_UNENCRY Param status:%d\n",
|
||||
@@ -1249,15 +1240,14 @@ QDF_STATUS wma_send_peer_assoc(tp_wma_handle wma,
|
||||
|
||||
intr->nss = cmd->peer_nss;
|
||||
cmd->peer_phymode = phymode;
|
||||
WMA_LOGD("%s: vdev_id %d associd %d peer_flags %x rate_caps %x "
|
||||
"peer_caps %x listen_intval %d ht_caps %x max_mpdu %d "
|
||||
"nss %d phymode %d peer_mpdu_density %d encr_type %d "
|
||||
"cmd->peer_vht_caps %x", __func__,
|
||||
cmd->vdev_id, cmd->peer_associd, cmd->peer_flags,
|
||||
cmd->peer_rate_caps, cmd->peer_caps,
|
||||
cmd->peer_listen_intval, cmd->peer_ht_caps,
|
||||
cmd->peer_max_mpdu, cmd->peer_nss, cmd->peer_phymode,
|
||||
cmd->peer_mpdu_density, params->encryptType,
|
||||
WMA_LOGD("%s: vdev_id %d associd %d peer_flags %x rate_caps %x peer_caps %x",
|
||||
__func__, cmd->vdev_id, cmd->peer_associd, cmd->peer_flags,
|
||||
cmd->peer_rate_caps, cmd->peer_caps);
|
||||
WMA_LOGD("%s:listen_intval %d ht_caps %x max_mpdu %d nss %d phymode %d",
|
||||
__func__, cmd->peer_listen_intval, cmd->peer_ht_caps,
|
||||
cmd->peer_max_mpdu, cmd->peer_nss, cmd->peer_phymode);
|
||||
WMA_LOGD("%s: peer_mpdu_density %d encr_type %d cmd->peer_vht_caps %x",
|
||||
__func__, cmd->peer_mpdu_density, params->encryptType,
|
||||
cmd->peer_vht_caps);
|
||||
|
||||
status = wmi_unified_peer_assoc_send(wma->wmi_handle,
|
||||
@@ -1562,7 +1552,7 @@ static QDF_STATUS wma_setup_install_key_cmd(tp_wma_handle wma_handle,
|
||||
0x5c, 0x36, 0x5c, 0x37};
|
||||
if (mode == wlan_op_mode_ap) {
|
||||
/* Authenticator initializes the value of PN as
|
||||
* 0x5C365C365C365C365C365C365C365C36 for MCastkey Update
|
||||
* 0x5C365C365C365C365C365C365C365C36 for MCastkeyUpdate
|
||||
*/
|
||||
if (key_params->unicast)
|
||||
tx_iv[0] = 0x37;
|
||||
@@ -1643,9 +1633,10 @@ static QDF_STATUS wma_setup_install_key_cmd(tp_wma_handle wma_handle,
|
||||
}
|
||||
#endif /* WLAN_FEATURE_11W */
|
||||
|
||||
WMA_LOGD("Key setup : vdev_id %d key_idx %d key_type %d key_len %d"
|
||||
" unicast %d peer_mac %pM def_key_idx %d", key_params->vdev_id,
|
||||
key_params->key_idx, key_params->key_type, key_params->key_len,
|
||||
WMA_LOGD("Key setup : vdev_id %d key_idx %d key_type %d key_len %d",
|
||||
key_params->vdev_id, key_params->key_idx,
|
||||
key_params->key_type, key_params->key_len);
|
||||
WMA_LOGD("unicast %d peer_mac %pM def_key_idx %d",
|
||||
key_params->unicast, key_params->peer_mac,
|
||||
key_params->def_key_idx);
|
||||
|
||||
@@ -1787,8 +1778,9 @@ static uint16_t wma_calc_ibss_heart_beat_timer(int16_t peer_num)
|
||||
{
|
||||
/* heart beat timer value look-up table */
|
||||
/* entry index : (the number of currently connected peers) - 1
|
||||
entry value : the heart time threshold value in seconds for
|
||||
detecting ibss peer departure */
|
||||
* entry value : the heart time threshold value in seconds for
|
||||
* detecting ibss peer departure
|
||||
*/
|
||||
static const uint16_t heart_beat_timer[MAX_PEERS] = {
|
||||
4, 4, 4, 4, 4, 4, 4, 4,
|
||||
8, 8, 8, 8, 8, 8, 8, 8,
|
||||
@@ -2176,8 +2168,8 @@ fail:
|
||||
* Return: 0 for success or error code
|
||||
*/
|
||||
static int wmi_unified_probe_rsp_tmpl_send(tp_wma_handle wma,
|
||||
uint8_t vdev_id,
|
||||
tpSendProbeRespParams probe_rsp_info)
|
||||
uint8_t vdev_id,
|
||||
tpSendProbeRespParams probe_rsp_info)
|
||||
{
|
||||
uint8_t *frm;
|
||||
uint64_t adjusted_tsf_le;
|
||||
@@ -2250,10 +2242,8 @@ static QDF_STATUS wma_unified_bcn_tmpl_send(tp_wma_handle wma,
|
||||
tmpl_len = *(uint32_t *) &bcn_info->beacon[0];
|
||||
else
|
||||
tmpl_len = bcn_info->beaconLength;
|
||||
if (p2p_ie_len) {
|
||||
if (p2p_ie_len)
|
||||
tmpl_len -= (uint32_t) p2p_ie_len;
|
||||
}
|
||||
|
||||
frm = bcn_info->beacon + bytes_to_strip;
|
||||
tmpl_len_aligned = roundup(tmpl_len, sizeof(A_UINT32));
|
||||
/*
|
||||
@@ -2276,9 +2266,8 @@ static QDF_STATUS wma_unified_bcn_tmpl_send(tp_wma_handle wma,
|
||||
|
||||
ret = wmi_unified_beacon_send_cmd(wma->wmi_handle,
|
||||
¶ms);
|
||||
if (QDF_IS_STATUS_ERROR(ret)) {
|
||||
if (QDF_IS_STATUS_ERROR(ret))
|
||||
WMA_LOGE("%s: Failed to send bcn tmpl: %d", __func__, ret);
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
@@ -2329,21 +2318,20 @@ static QDF_STATUS wma_store_bcn_tmpl(tp_wma_handle wma, uint8_t vdev_id,
|
||||
memcpy(qdf_nbuf_data(bcn->buf),
|
||||
bcn_info->beacon + 4 /* Exclude beacon length field */,
|
||||
len);
|
||||
if (bcn_info->timIeOffset > 3) {
|
||||
if (bcn_info->timIeOffset > 3)
|
||||
bcn->tim_ie_offset = bcn_info->timIeOffset - 4;
|
||||
} else {
|
||||
else
|
||||
bcn->tim_ie_offset = bcn_info->timIeOffset;
|
||||
}
|
||||
|
||||
if (bcn_info->p2pIeOffset > 3) {
|
||||
if (bcn_info->p2pIeOffset > 3)
|
||||
bcn->p2p_ie_offset = bcn_info->p2pIeOffset - 4;
|
||||
} else {
|
||||
else
|
||||
bcn->p2p_ie_offset = bcn_info->p2pIeOffset;
|
||||
}
|
||||
|
||||
bcn_payload = qdf_nbuf_data(bcn->buf);
|
||||
if (bcn->tim_ie_offset) {
|
||||
tim_ie =
|
||||
(struct beacon_tim_ie *)(&bcn_payload[bcn->tim_ie_offset]);
|
||||
tim_ie = (struct beacon_tim_ie *)
|
||||
(&bcn_payload[bcn->tim_ie_offset]);
|
||||
/*
|
||||
* Intial Value of bcn->dtim_count will be 0.
|
||||
* But if the beacon gets updated then current dtim
|
||||
@@ -2466,14 +2454,14 @@ void wma_send_probe_rsp_tmpl(tp_wma_handle wma,
|
||||
{
|
||||
struct cdp_vdev *vdev;
|
||||
uint8_t vdev_id;
|
||||
tpAniProbeRspStruct probe_rsp;
|
||||
struct sAniProbeRspStruct *probe_rsp;
|
||||
|
||||
if (!probe_rsp_info) {
|
||||
WMA_LOGE(FL("probe_rsp_info is NULL"));
|
||||
return;
|
||||
}
|
||||
|
||||
probe_rsp = (tpAniProbeRspStruct) (probe_rsp_info->pProbeRespTemplate);
|
||||
probe_rsp = (struct sAniProbeRspStruct *) (probe_rsp_info->pProbeRespTemplate);
|
||||
if (!probe_rsp) {
|
||||
WMA_LOGE(FL("probe_rsp is NULL"));
|
||||
return;
|
||||
@@ -2512,10 +2500,10 @@ void wma_send_beacon(tp_wma_handle wma, tpSendbeaconParams bcn_info)
|
||||
uint8_t vdev_id;
|
||||
QDF_STATUS status;
|
||||
uint8_t *p2p_ie;
|
||||
tpAniBeaconStruct beacon;
|
||||
struct sAniBeaconStruct *beacon;
|
||||
struct vdev_up_params param = {0};
|
||||
|
||||
beacon = (tpAniBeaconStruct) (bcn_info->beacon);
|
||||
beacon = (struct sAniBeaconStruct *) (bcn_info->beacon);
|
||||
vdev = wma_find_vdev_by_addr(wma, beacon->macHdr.sa, &vdev_id);
|
||||
if (!vdev) {
|
||||
WMA_LOGE("%s : failed to get vdev handle", __func__);
|
||||
@@ -2534,12 +2522,11 @@ void wma_send_beacon(tp_wma_handle wma, tpSendbeaconParams bcn_info)
|
||||
|
||||
if (bcn_info->p2pIeOffset) {
|
||||
p2p_ie = bcn_info->beacon + bcn_info->p2pIeOffset;
|
||||
WMA_LOGI
|
||||
(" %s: p2pIe is present - vdev_id %hu, p2p_ie = %p, p2p ie len = %hu",
|
||||
WMA_LOGI("%s: p2pIe is present - vdev_id %hu, p2p_ie = %p, p2p ie len = %hu",
|
||||
__func__, vdev_id, p2p_ie, p2p_ie[1]);
|
||||
if (wma_p2p_go_set_beacon_ie(wma, vdev_id, p2p_ie) < 0) {
|
||||
WMA_LOGE
|
||||
("%s : wmi_unified_bcn_tmpl_send Failed ",
|
||||
if (wma_p2p_go_set_beacon_ie(wma, vdev_id,
|
||||
p2p_ie) < 0) {
|
||||
WMA_LOGE("%s : wmi_unified_bcn_tmpl_send Failed ",
|
||||
__func__);
|
||||
return;
|
||||
}
|
||||
@@ -3181,8 +3168,8 @@ int wma_process_rmf_frame(tp_wma_handle wma_handle,
|
||||
if (IEEE80211_IS_BROADCAST(wh->i_addr1) ||
|
||||
IEEE80211_IS_MULTICAST(wh->i_addr1)) {
|
||||
if (0 != wma_process_bip(wma_handle, iface, wh, wbuf)) {
|
||||
cds_pkt_return_packet(rx_pkt);
|
||||
return -EINVAL;
|
||||
cds_pkt_return_packet(rx_pkt);
|
||||
return -EINVAL;
|
||||
}
|
||||
} else {
|
||||
WMA_LOGE("Rx unprotected unicast mgmt frame");
|
||||
@@ -3190,7 +3177,7 @@ int wma_process_rmf_frame(tp_wma_handle wma_handle,
|
||||
DPU_FEEDBACK_UNPROTECTED_ERROR;
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
return 0;
|
||||
}
|
||||
#else
|
||||
static inline int wma_process_rmf_frame(tp_wma_handle wma_handle,
|
||||
@@ -3396,8 +3383,7 @@ int wma_form_rx_packet(qdf_nbuf_t buf,
|
||||
rx_pkt->pkt_meta.tsf_delta = mgmt_rx_params->tsf_delta;
|
||||
rx_pkt->pkt_buf = buf;
|
||||
|
||||
WMA_LOGD(
|
||||
FL("BSSID: "MAC_ADDRESS_STR" snr = %d, rssi = %d, rssi_raw = %d tsf_delta: %u"),
|
||||
WMA_LOGD(FL("BSSID: "MAC_ADDRESS_STR" snr = %d, rssi = %d, rssi_raw = %d tsf_delta: %u"),
|
||||
MAC_ADDR_ARRAY(wh->i_addr3),
|
||||
mgmt_rx_params->snr, rx_pkt->pkt_meta.rssi,
|
||||
rx_pkt->pkt_meta.rssi_raw,
|
||||
|
@@ -430,13 +430,13 @@ static int wma_ndp_indication_event_handler(void *handle, uint8_t *event_info,
|
||||
WMI_MAC_ADDR_TO_CHAR_ARRAY(&fixed_params->peer_discovery_mac_addr,
|
||||
ind_event.peer_discovery_mac_addr.bytes);
|
||||
|
||||
WMA_LOGD(FL("WMI_NDP_INDICATION_EVENTID(0x%X) received. vdev %d, \n"
|
||||
"service_instance %d, ndp_instance %d, role %d, policy %d, \n"
|
||||
"csid: %d, scid_len: %d, peer_mac_addr: %pM, peer_disc_mac_addr: %pM"),
|
||||
WMI_NDP_INDICATION_EVENTID, fixed_params->vdev_id,
|
||||
WMA_LOGD(FL("WMI_NDP_INDICATION_EVENTID(0x%X) received. vdev %d"),
|
||||
WMI_NDP_INDICATION_EVENTID, fixed_params->vdev_id);
|
||||
WMA_LOGD(FL("service_instance %d, ndp_instance %d, role %d, policy %d"),
|
||||
fixed_params->service_instance_id,
|
||||
fixed_params->ndp_instance_id, fixed_params->self_ndp_role,
|
||||
fixed_params->accept_policy,
|
||||
fixed_params->accept_policy);
|
||||
WMA_LOGD(FL("csid: %d, scid_len: %d, peer_mac_addr: %pM, peer_disc_mac_addr: %pM"),
|
||||
fixed_params->nan_csid, fixed_params->nan_scid_len,
|
||||
ind_event.peer_mac_addr.bytes,
|
||||
ind_event.peer_discovery_mac_addr.bytes);
|
||||
|
@@ -254,7 +254,8 @@ int wma_ocb_set_config(tp_wma_handle wma_handle, struct sir_ocb_config *config)
|
||||
tconfig.schedule = (struct ocb_config_sched *)config->schedule;
|
||||
tconfig.dcc_ndl_chan_list_len = config->dcc_ndl_chan_list_len;
|
||||
tconfig.dcc_ndl_chan_list = config->dcc_ndl_chan_list;
|
||||
tconfig.dcc_ndl_active_state_list_len = config->dcc_ndl_active_state_list_len;
|
||||
tconfig.dcc_ndl_active_state_list_len =
|
||||
config->dcc_ndl_active_state_list_len;
|
||||
tconfig.dcc_ndl_active_state_list = config->dcc_ndl_active_state_list;
|
||||
ch_mhz = qdf_mem_malloc(sizeof(uint32_t)*config->channel_count);
|
||||
if (ch_mhz == NULL) {
|
||||
@@ -304,6 +305,7 @@ int wma_ocb_set_config_event_handler(void *handle, uint8_t *event_buf,
|
||||
{
|
||||
WMI_OCB_SET_CONFIG_RESP_EVENTID_param_tlvs *param_tlvs;
|
||||
wmi_ocb_set_config_resp_event_fixed_param *fix_param;
|
||||
|
||||
param_tlvs = (WMI_OCB_SET_CONFIG_RESP_EVENTID_param_tlvs *)event_buf;
|
||||
fix_param = param_tlvs->fixed_param;
|
||||
return wma_ocb_set_config_resp(handle, fix_param->status);
|
||||
@@ -323,7 +325,8 @@ int wma_ocb_set_utc_time(tp_wma_handle wma_handle, struct sir_ocb_utc *utc)
|
||||
|
||||
cmd.vdev_id = utc->vdev_id;
|
||||
qdf_mem_copy(&cmd.utc_time, &utc->utc_time, WMI_SIZE_UTC_TIME);
|
||||
qdf_mem_copy(&cmd.time_error, &utc->time_error, WMI_SIZE_UTC_TIME_ERROR);
|
||||
qdf_mem_copy(&cmd.time_error, &utc->time_error,
|
||||
WMI_SIZE_UTC_TIME_ERROR);
|
||||
ret = wmi_unified_ocb_set_utc_time_cmd(wma_handle->wmi_handle, &cmd);
|
||||
if (ret != EOK) {
|
||||
WMA_LOGE(FL("Failed to set OCB UTC time"));
|
||||
@@ -405,7 +408,8 @@ int wma_ocb_get_tsf_timer(tp_wma_handle wma_handle,
|
||||
QDF_STATUS ret;
|
||||
|
||||
/* Send the WMI command */
|
||||
ret = wmi_unified_ocb_get_tsf_timer(wma_handle->wmi_handle, request->vdev_id);
|
||||
ret = wmi_unified_ocb_get_tsf_timer(wma_handle->wmi_handle,
|
||||
request->vdev_id);
|
||||
/* If there is an error, set the completion event */
|
||||
if (ret != EOK) {
|
||||
WMA_LOGE(FL("Failed to send WMI message: %d"), ret);
|
||||
|
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2015-2016 The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2015-2017 The Linux Foundation. All rights reserved.
|
||||
*
|
||||
* Previously licensed under the ISC license by Qualcomm Atheros, Inc.
|
||||
*
|
||||
@@ -122,7 +122,7 @@ static inline int wma_ocb_get_tsf_timer(tp_wma_handle wma_handle,
|
||||
static inline int wma_dcc_get_stats(tp_wma_handle wma_handle,
|
||||
struct sir_dcc_get_stats *get_stats_param)
|
||||
{
|
||||
return 0 ;
|
||||
return 0;
|
||||
}
|
||||
|
||||
static inline int wma_dcc_clear_stats(tp_wma_handle wma_handle,
|
||||
|
@@ -376,7 +376,8 @@ void wma_set_tx_power(WMA_HANDLE handle,
|
||||
|
||||
if (tx_pwr_params->power == 0) {
|
||||
/* set to default. Since the app does not care the tx power
|
||||
* we keep the previous setting */
|
||||
* we keep the previous setting
|
||||
*/
|
||||
wma_handle->interfaces[vdev_id].tx_power = 0;
|
||||
ret = 0;
|
||||
goto end;
|
||||
@@ -394,10 +395,9 @@ void wma_set_tx_power(WMA_HANDLE handle,
|
||||
/* tx_power changed, Push the tx_power to FW */
|
||||
WMA_LOGI("%s: Set TX pwr limit [WMI_VDEV_PARAM_TX_PWRLIMIT] to %d",
|
||||
__func__, tx_pwr_params->power);
|
||||
ret = wma_vdev_set_param(wma_handle->wmi_handle,
|
||||
vdev_id,
|
||||
WMI_VDEV_PARAM_TX_PWRLIMIT,
|
||||
tx_pwr_params->power);
|
||||
ret = wma_vdev_set_param(wma_handle->wmi_handle, vdev_id,
|
||||
WMI_VDEV_PARAM_TX_PWRLIMIT,
|
||||
tx_pwr_params->power);
|
||||
if (ret == QDF_STATUS_SUCCESS)
|
||||
wma_handle->interfaces[vdev_id].tx_power =
|
||||
tx_pwr_params->power;
|
||||
@@ -786,8 +786,8 @@ void wma_enable_sta_ps_mode(tp_wma_handle wma, tpEnablePsParams ps_req)
|
||||
}
|
||||
} else if (eSIR_ADDON_ENABLE_UAPSD == ps_req->psSetting) {
|
||||
uint32_t uapsd_val = 0;
|
||||
uapsd_val = wma_get_uapsd_mask(&ps_req->uapsdParams);
|
||||
|
||||
uapsd_val = wma_get_uapsd_mask(&ps_req->uapsdParams);
|
||||
if (uapsd_val != iface->uapsd_cached_val) {
|
||||
WMA_LOGD("Enable Uapsd vdevId %d Mask %d",
|
||||
vdev_id, uapsd_val);
|
||||
@@ -1194,10 +1194,8 @@ int wma_pdev_temperature_evt_handler(void *handle, uint8_t *event,
|
||||
sme_msg.bodyval = wmi_event->value;
|
||||
|
||||
qdf_status = scheduler_post_msg(QDF_MODULE_ID_SME, &sme_msg);
|
||||
if (!QDF_IS_STATUS_SUCCESS(qdf_status)) {
|
||||
if (!QDF_IS_STATUS_SUCCESS(qdf_status))
|
||||
WMA_LOGE(FL("Fail to post get temperature ind msg"));
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -1292,9 +1290,8 @@ static void wma_update_beacon_noa_ie(struct beacon_info *bcn,
|
||||
/* if there is nothing to add, just return */
|
||||
if (new_noa_sub_ie_len == 0) {
|
||||
if (bcn->noa_sub_ie_len && bcn->noa_ie) {
|
||||
WMA_LOGD("%s: NoA is present in previous beacon, "
|
||||
"but not present in swba event, "
|
||||
"So Reset the NoA", __func__);
|
||||
WMA_LOGD("%s: NoA is present in previous beacon, but not present in swba event, So Reset the NoA",
|
||||
__func__);
|
||||
/* TODO: Assuming p2p noa ie is last ie in the beacon */
|
||||
qdf_mem_zero(bcn->noa_ie, (bcn->noa_sub_ie_len +
|
||||
sizeof(struct p2p_ie)));
|
||||
@@ -1309,16 +1306,14 @@ static void wma_update_beacon_noa_ie(struct beacon_info *bcn,
|
||||
|
||||
if (bcn->noa_sub_ie_len && bcn->noa_ie) {
|
||||
/* NoA present in previous beacon, update it */
|
||||
WMA_LOGD("%s: NoA present in previous beacon, "
|
||||
"update the NoA IE, bcn->len %u"
|
||||
"bcn->noa_sub_ie_len %u",
|
||||
WMA_LOGD("%s: NoA present in previous beacon, update the NoA IE, bcn->len %u bcn->noa_sub_ie_len %u",
|
||||
__func__, bcn->len, bcn->noa_sub_ie_len);
|
||||
bcn->len -= (bcn->noa_sub_ie_len + sizeof(struct p2p_ie));
|
||||
qdf_mem_zero(bcn->noa_ie,
|
||||
(bcn->noa_sub_ie_len + sizeof(struct p2p_ie)));
|
||||
} else { /* NoA is not present in previous beacon */
|
||||
WMA_LOGD("%s: NoA not present in previous beacon, add it"
|
||||
"bcn->len %u", __func__, bcn->len);
|
||||
WMA_LOGD("%s: NoA not present in previous beacon, add it bcn->len %u",
|
||||
__func__, bcn->len);
|
||||
buf = qdf_nbuf_data(bcn->buf);
|
||||
bcn->noa_ie = buf + bcn->len;
|
||||
}
|
||||
@@ -1364,9 +1359,8 @@ static void wma_p2p_create_sub_ie_noa(uint8_t *buf,
|
||||
*buf++ = noa->index; /* Instance Index */
|
||||
|
||||
tmp_octet = noa->ctwindow & WMA_P2P_NOA_IE_CTWIN_MASK;
|
||||
if (noa->oppPS) {
|
||||
if (noa->oppPS)
|
||||
tmp_octet |= WMA_P2P_NOA_IE_OPP_PS_SET;
|
||||
}
|
||||
*buf++ = tmp_octet; /* Opp Ps and CTWin capabilities */
|
||||
|
||||
for (i = 0; i < noa->num_descriptors; i++) {
|
||||
@@ -1510,8 +1504,8 @@ int wma_p2p_noa_event_handler(void *handle, uint8_t *event,
|
||||
descriptors = WMI_UNIFIED_NOA_ATTR_NUM_DESC_GET(p2p_noa_info);
|
||||
noa_ie.num_descriptors = (uint8_t) descriptors;
|
||||
|
||||
WMA_LOGI("%s: index %u, oppPs %u, ctwindow %u, "
|
||||
"num_descriptors = %u", __func__, noa_ie.index,
|
||||
WMA_LOGI("%s: index %u, oppPs %u, ctwindow %u, num_descriptors = %u",
|
||||
__func__, noa_ie.index,
|
||||
noa_ie.oppPS, noa_ie.ctwindow, noa_ie.num_descriptors);
|
||||
for (i = 0; i < noa_ie.num_descriptors; i++) {
|
||||
noa_ie.noa_descriptors[i].type_count =
|
||||
@@ -1523,8 +1517,7 @@ int wma_p2p_noa_event_handler(void *handle, uint8_t *event,
|
||||
p2p_noa_info->noa_descriptors[i].interval;
|
||||
noa_ie.noa_descriptors[i].start_time =
|
||||
p2p_noa_info->noa_descriptors[i].start_time;
|
||||
WMA_LOGI("%s: NoA descriptor[%d] type_count %u, "
|
||||
"duration %u, interval %u, start_time = %u",
|
||||
WMA_LOGI("%s: NoA descriptor[%d] type_count %u, duration %u, interval %u, start_time = %u",
|
||||
__func__, i,
|
||||
noa_ie.noa_descriptors[i].type_count,
|
||||
noa_ie.noa_descriptors[i].duration,
|
||||
@@ -1533,7 +1526,8 @@ int wma_p2p_noa_event_handler(void *handle, uint8_t *event,
|
||||
}
|
||||
|
||||
/* Send a msg to LIM to update the NoA IE in probe response
|
||||
* frames transmitted by the host */
|
||||
* frames transmitted by the host
|
||||
*/
|
||||
wma_update_probe_resp_noa(wma, &noa_ie);
|
||||
}
|
||||
|
||||
@@ -1566,7 +1560,6 @@ static void wma_set_p2pgo_noa_req(tp_wma_handle wma, tP2pPsParams *noa)
|
||||
if (QDF_IS_STATUS_ERROR(ret))
|
||||
WMA_LOGE("Failed to send set uapsd param ret = %d", ret);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1595,7 +1588,6 @@ static void wma_set_p2pgo_oppps_req(tp_wma_handle wma, tP2pPsParams *oppps)
|
||||
if (QDF_IS_STATUS_ERROR(ret))
|
||||
WMA_LOGE("Failed to send set uapsd param ret = %d", ret);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1609,11 +1601,10 @@ void wma_process_set_p2pgo_noa_req(tp_wma_handle wma,
|
||||
tP2pPsParams *ps_params)
|
||||
{
|
||||
WMA_LOGD("%s: Enter", __func__);
|
||||
if (ps_params->opp_ps) {
|
||||
if (ps_params->opp_ps)
|
||||
wma_set_p2pgo_oppps_req(wma, ps_params);
|
||||
} else {
|
||||
else
|
||||
wma_set_p2pgo_noa_req(wma, ps_params);
|
||||
}
|
||||
|
||||
WMA_LOGD("%s: Exit", __func__);
|
||||
}
|
||||
@@ -1966,6 +1957,7 @@ static void wma_set_vdev_resume_dtim(tp_wma_handle wma, uint8_t vdev_id)
|
||||
uint32_t cfg_data_val = 0;
|
||||
/* get mac to acess CFG data base */
|
||||
struct sAniSirGlobal *mac = cds_get_context(QDF_MODULE_ID_PE);
|
||||
|
||||
if (!mac) {
|
||||
WMA_LOGE(FL("Failed to get mac context"));
|
||||
return;
|
||||
@@ -1979,8 +1971,8 @@ static void wma_set_vdev_resume_dtim(tp_wma_handle wma, uint8_t vdev_id)
|
||||
}
|
||||
|
||||
ret = wma_vdev_set_param(wma->wmi_handle, vdev_id,
|
||||
WMI_VDEV_PARAM_LISTEN_INTERVAL,
|
||||
cfg_data_val);
|
||||
WMI_VDEV_PARAM_LISTEN_INTERVAL,
|
||||
cfg_data_val);
|
||||
if (QDF_IS_STATUS_ERROR(ret)) {
|
||||
/* Even it fails continue Fw will take default LI */
|
||||
WMA_LOGE("Failed to Set Listen Interval vdevId %d",
|
||||
|
@@ -62,7 +62,6 @@
|
||||
#endif /* REMOVE_PKT_LOG */
|
||||
|
||||
#include "dbglog_host.h"
|
||||
/* FIXME: Inclusion of .c looks odd but this is how it is in internal codebase */
|
||||
#include "csr_api.h"
|
||||
#include "ol_fw.h"
|
||||
|
||||
@@ -93,7 +92,7 @@
|
||||
* @EXTSCAN_REPORT_EVENTS_NO_BATCH: controls batching,
|
||||
* 0 => batching, 1 => no batching
|
||||
* @EXTSCAN_REPORT_EVENTS_CONTEXT_HUB: forward results to context hub
|
||||
*/
|
||||
*/
|
||||
enum extscan_report_events_type {
|
||||
EXTSCAN_REPORT_EVENTS_BUFFER_FULL = 0x00,
|
||||
EXTSCAN_REPORT_EVENTS_EACH_SCAN = 0x01,
|
||||
@@ -133,6 +132,7 @@ static void wma_dec_pending_scans(tp_wma_handle wma)
|
||||
static void wma_inc_pending_scans(tp_wma_handle wma)
|
||||
{
|
||||
int32_t scan_cnt = qdf_atomic_inc_return(&wma->num_pending_scans);
|
||||
|
||||
WMA_LOGD("Starting pending scan: %d -> %d", scan_cnt - 1, scan_cnt);
|
||||
}
|
||||
|
||||
@@ -160,13 +160,46 @@ static bool wma_is_mcc_24G(WMA_HANDLE handle)
|
||||
(wma_handle->interfaces[i].mhz <=
|
||||
CDS_CHAN_14_FREQ))
|
||||
return true;
|
||||
else
|
||||
prev_chan = wma_handle->interfaces[i].mhz;
|
||||
prev_chan = wma_handle->interfaces[i].mhz;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
static inline int wma_get_burst_duration(int max_ch_time, int miracast_value)
|
||||
{
|
||||
int burst_duration = 0;
|
||||
|
||||
if (miracast_value) {
|
||||
/* When miracast is running, burst
|
||||
* duration needs to be minimum to avoid
|
||||
* any stutter or glitch in miracast
|
||||
* during station scan
|
||||
*/
|
||||
if (max_ch_time <= WMA_GO_MIN_ACTIVE_SCAN_BURST_DURATION)
|
||||
burst_duration = max_ch_time;
|
||||
else
|
||||
burst_duration = WMA_GO_MIN_ACTIVE_SCAN_BURST_DURATION;
|
||||
} else {
|
||||
/* If miracast is not running, accommodate max
|
||||
* stations to make the scans faster
|
||||
*/
|
||||
burst_duration = WMA_BURST_SCAN_MAX_NUM_OFFCHANNELS *
|
||||
max_ch_time;
|
||||
if (burst_duration > WMA_GO_MAX_ACTIVE_SCAN_BURST_DURATION) {
|
||||
uint8_t channels = WMA_P2P_SCAN_MAX_BURST_DURATION /
|
||||
max_ch_time;
|
||||
|
||||
if (channels)
|
||||
burst_duration = channels * max_ch_time;
|
||||
else
|
||||
burst_duration =
|
||||
WMA_GO_MAX_ACTIVE_SCAN_BURST_DURATION;
|
||||
}
|
||||
}
|
||||
return burst_duration;
|
||||
}
|
||||
|
||||
/**
|
||||
* wma_get_buf_start_scan_cmd() - Fill start scan command
|
||||
* @wma_handle: wma handle
|
||||
@@ -220,19 +253,20 @@ QDF_STATUS wma_get_buf_start_scan_cmd(tp_wma_handle wma_handle,
|
||||
WMI_SCAN_EVENT_FOREIGN_CHANNEL |
|
||||
WMI_SCAN_EVENT_COMPLETED |
|
||||
WMI_SCAN_EVENT_DEQUEUED |
|
||||
WMI_SCAN_EVENT_PREEMPTED | WMI_SCAN_EVENT_RESTARTED;
|
||||
WMI_SCAN_EVENT_PREEMPTED |
|
||||
WMI_SCAN_EVENT_RESTARTED;
|
||||
|
||||
cmd->dwell_time_active = scan_req->maxChannelTime;
|
||||
|
||||
if (scan_req->scanType == eSIR_ACTIVE_SCAN) {
|
||||
/* In Active scan case, the firmware has to do passive scan on DFS channels
|
||||
* So the passive scan duration should be updated properly so that the duration
|
||||
* will be sufficient enough to receive the beacon from AP */
|
||||
|
||||
/* In Active scan case, the firmware has to do passive scan on
|
||||
* DFS channels So the passive scan duration should be updated
|
||||
* properly so that the duration will be sufficient enough to
|
||||
* receive the beacon from AP
|
||||
*/
|
||||
if (wlan_cfg_get_int(pMac, WNI_CFG_PASSIVE_MAXIMUM_CHANNEL_TIME,
|
||||
&dwell_time) != eSIR_SUCCESS) {
|
||||
WMA_LOGE("Failed to get passive max channel value"
|
||||
"using default value");
|
||||
WMA_LOGE("Failed to get passive max channel value using default value");
|
||||
dwell_time = WMA_DWELL_TIME_PASSIVE_DEFAULT;
|
||||
}
|
||||
cmd->dwell_time_passive = dwell_time;
|
||||
@@ -318,43 +352,16 @@ QDF_STATUS wma_get_buf_start_scan_cmd(tp_wma_handle wma_handle,
|
||||
}
|
||||
if (wma_is_p2p_go_active(wma_handle)) {
|
||||
/* Background scan while GO is sending beacons.
|
||||
* Every off-channel transition has overhead of 2 beacon
|
||||
* intervals for NOA. Maximize number of channels in
|
||||
* every transition by using burst scan.
|
||||
* Every off-channel transition has overhead of
|
||||
* 2 beacon intervals for NOA. Maximize number
|
||||
* of channels in every transition by using
|
||||
* burst scan.
|
||||
*/
|
||||
if (wma_handle->miracast_value) {
|
||||
/* When miracast is running, burst duration
|
||||
* needs to be minimum to avoid any stutter
|
||||
* or glitch in miracast during station scan
|
||||
*/
|
||||
if (scan_req->maxChannelTime <=
|
||||
WMA_GO_MIN_ACTIVE_SCAN_BURST_DURATION)
|
||||
cmd->burst_duration =
|
||||
scan_req->maxChannelTime;
|
||||
else
|
||||
cmd->burst_duration =
|
||||
WMA_GO_MIN_ACTIVE_SCAN_BURST_DURATION;
|
||||
} else {
|
||||
/* If miracast is not running, accomodate max
|
||||
* stations to make the scans faster
|
||||
*/
|
||||
cmd->burst_duration =
|
||||
WMA_BURST_SCAN_MAX_NUM_OFFCHANNELS *
|
||||
scan_req->maxChannelTime;
|
||||
if (cmd->burst_duration >
|
||||
WMA_GO_MAX_ACTIVE_SCAN_BURST_DURATION) {
|
||||
uint8_t channels =
|
||||
WMA_P2P_SCAN_MAX_BURST_DURATION
|
||||
/ scan_req->maxChannelTime;
|
||||
if (channels)
|
||||
cmd->burst_duration =
|
||||
channels *
|
||||
scan_req->maxChannelTime;
|
||||
else
|
||||
cmd->burst_duration =
|
||||
WMA_GO_MAX_ACTIVE_SCAN_BURST_DURATION;
|
||||
}
|
||||
}
|
||||
cmd->burst_duration =
|
||||
wma_get_burst_duration(
|
||||
scan_req->maxChannelTime,
|
||||
wma_handle->miracast_value);
|
||||
|
||||
break;
|
||||
}
|
||||
if (wma_is_sta_active(wma_handle) ||
|
||||
@@ -488,9 +495,7 @@ QDF_STATUS wma_get_buf_start_scan_cmd(tp_wma_handle wma_handle,
|
||||
scan_req->scanType, cmd->dwell_time_active,
|
||||
cmd->dwell_time_passive);
|
||||
WMA_LOGD("Scan repeat_probe_time %u n_probes %u num_ssids %u num_bssid %u",
|
||||
cmd->repeat_probe_time,
|
||||
cmd->n_probes,
|
||||
cmd->num_ssids,
|
||||
cmd->repeat_probe_time, cmd->n_probes, cmd->num_ssids,
|
||||
cmd->num_bssid);
|
||||
|
||||
cmd->num_bssid = 1;
|
||||
@@ -536,7 +541,8 @@ QDF_STATUS wma_start_scan(tp_wma_handle wma_handle,
|
||||
}
|
||||
|
||||
/* Fill individual elements of wmi_start_scan_req and
|
||||
* TLV for channel list, bssid, ssid etc ... */
|
||||
* TLV for channel list, bssid, ssid etc ...
|
||||
*/
|
||||
qdf_status = wma_get_buf_start_scan_cmd(wma_handle, scan_req,
|
||||
&cmd);
|
||||
if (qdf_status != QDF_STATUS_SUCCESS) {
|
||||
@@ -729,9 +735,8 @@ QDF_STATUS wma_update_channel_list(WMA_HANDLE handle,
|
||||
qdf_status = wmi_unified_scan_chan_list_cmd_send(wma_handle->wmi_handle,
|
||||
&scan_ch_param);
|
||||
|
||||
if (QDF_IS_STATUS_ERROR(qdf_status)) {
|
||||
if (QDF_IS_STATUS_ERROR(qdf_status))
|
||||
WMA_LOGE("Failed to send WMI_SCAN_CHAN_LIST_CMDID");
|
||||
}
|
||||
|
||||
qdf_mem_free(scan_ch_param.chan_info);
|
||||
|
||||
@@ -921,9 +926,8 @@ QDF_STATUS wma_roam_scan_offload_rssi_thresh(tp_wma_handle wma_handle,
|
||||
|
||||
status = wmi_unified_roam_scan_offload_rssi_thresh_cmd(
|
||||
wma_handle->wmi_handle, ¶ms);
|
||||
if (QDF_IS_STATUS_ERROR(status)) {
|
||||
if (QDF_IS_STATUS_ERROR(status))
|
||||
return status;
|
||||
}
|
||||
|
||||
WMA_LOGD(FL("roam_scan_rssi_thresh=%d, roam_rssi_thresh_diff=%d"),
|
||||
rssi_thresh, rssi_thresh_diff);
|
||||
@@ -978,9 +982,10 @@ QDF_STATUS wma_roam_scan_offload_rssi_change(tp_wma_handle wma_handle,
|
||||
{
|
||||
int status;
|
||||
|
||||
status = wmi_unified_roam_scan_offload_rssi_change_cmd(wma_handle->wmi_handle,
|
||||
vdev_id, rssi_change_thresh,
|
||||
bcn_rssi_weight, hirssi_delay_btw_scans);
|
||||
status = wmi_unified_roam_scan_offload_rssi_change_cmd(
|
||||
wma_handle->wmi_handle,
|
||||
vdev_id, rssi_change_thresh,
|
||||
bcn_rssi_weight, hirssi_delay_btw_scans);
|
||||
if (status != EOK)
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
|
||||
@@ -1026,9 +1031,10 @@ QDF_STATUS wma_roam_scan_offload_chan_list(tp_wma_handle wma_handle,
|
||||
WMA_LOGD("%d,", chan_list_mhz[i]);
|
||||
}
|
||||
|
||||
status = wmi_unified_roam_scan_offload_chan_list_cmd(wma_handle->wmi_handle,
|
||||
chan_count, chan_list_mhz,
|
||||
list_type, vdev_id);
|
||||
status = wmi_unified_roam_scan_offload_chan_list_cmd(
|
||||
wma_handle->wmi_handle,
|
||||
chan_count, chan_list_mhz,
|
||||
list_type, vdev_id);
|
||||
qdf_mem_free(chan_list_mhz);
|
||||
|
||||
return status;
|
||||
@@ -1167,6 +1173,7 @@ void wma_roam_scan_fill_ap_profile(tp_wma_handle wma_handle,
|
||||
wmi_ap_profile *ap_profile_p)
|
||||
{
|
||||
uint32_t rsn_authmode;
|
||||
|
||||
qdf_mem_zero(ap_profile_p, sizeof(wmi_ap_profile));
|
||||
if (roam_req == NULL) {
|
||||
ap_profile_p->ssid.ssid_len = 0;
|
||||
@@ -1194,9 +1201,11 @@ void wma_roam_scan_fill_ap_profile(tp_wma_handle wma_handle,
|
||||
wma_roam_scan_get_cckm_mode(
|
||||
roam_req, rsn_authmode);
|
||||
ap_profile_p->rsn_ucastcipherset =
|
||||
e_csr_encryption_type_to_rsn_cipherset(roam_req->ConnectedNetwork.encryption);
|
||||
e_csr_encryption_type_to_rsn_cipherset(
|
||||
roam_req->ConnectedNetwork.encryption);
|
||||
ap_profile_p->rsn_mcastcipherset =
|
||||
e_csr_encryption_type_to_rsn_cipherset(roam_req->ConnectedNetwork.mcencryption);
|
||||
e_csr_encryption_type_to_rsn_cipherset(
|
||||
roam_req->ConnectedNetwork.mcencryption);
|
||||
ap_profile_p->rsn_mcastmgmtcipherset =
|
||||
ap_profile_p->rsn_mcastcipherset;
|
||||
ap_profile_p->rssi_threshold = roam_req->RoamRssiDiff;
|
||||
@@ -1369,13 +1378,11 @@ void wma_roam_scan_fill_scan_params(tp_wma_handle wma_handle,
|
||||
WMI_SCAN_ADD_DS_IE_IN_PROBE_REQ;
|
||||
if (roam_req != NULL) {
|
||||
/* Parameters updated after association is complete */
|
||||
WMA_LOGD("%s: NeighborScanChannelMinTime: %d"
|
||||
" NeighborScanChannelMaxTime: %d",
|
||||
WMA_LOGD("%s: NeighborScanChannelMinTime: %d NeighborScanChannelMaxTime: %d",
|
||||
__func__,
|
||||
roam_req->NeighborScanChannelMinTime,
|
||||
roam_req->NeighborScanChannelMaxTime);
|
||||
WMA_LOGD("%s: NeighborScanTimerPeriod: %d"
|
||||
" HomeAwayTime: %d nProbes: %d",
|
||||
WMA_LOGD("%s: NeighborScanTimerPeriod: %d HomeAwayTime: %d nProbes: %d",
|
||||
__func__,
|
||||
roam_req->NeighborScanTimerPeriod,
|
||||
roam_req->HomeAwayTime, roam_req->nProbes);
|
||||
@@ -1385,11 +1392,11 @@ void wma_roam_scan_fill_scan_params(tp_wma_handle wma_handle,
|
||||
* roam_req->HomeAwayTime = SCAN_HOME_AWAY_TIME
|
||||
* roam_req->NeighborScanTimerPeriod = SCAN_HOME_TIME
|
||||
*
|
||||
* scan_params->dwell_time_active = time station stays on channel
|
||||
* scan_params->dwell_time_active :time station stays on channel
|
||||
* and sends probes;
|
||||
* scan_params->dwell_time_passive = time station stays on channel
|
||||
* scan_params->dwell_time_passive:time station stays on channel
|
||||
* and listens probes;
|
||||
* scan_params->burst_duration = time station goes off channel
|
||||
* scan_params->burst_duration :time station goes off channel
|
||||
* to scan;
|
||||
*/
|
||||
|
||||
@@ -1399,8 +1406,7 @@ void wma_roam_scan_fill_scan_params(tp_wma_handle wma_handle,
|
||||
/*
|
||||
* Could not get max channel value from CFG. Log error.
|
||||
*/
|
||||
WMA_LOGE
|
||||
("could not retrieve passive max channel value");
|
||||
WMA_LOGE("could not retrieve passive max channel value");
|
||||
|
||||
/* use a default value of 110ms */
|
||||
val = WMA_ROAM_DWELL_TIME_PASSIVE_DEFAULT;
|
||||
@@ -1457,8 +1463,8 @@ void wma_roam_scan_fill_scan_params(tp_wma_handle wma_handle,
|
||||
scan_params->min_rest_time = roam_req->NeighborScanTimerPeriod;
|
||||
scan_params->max_rest_time = roam_req->NeighborScanTimerPeriod;
|
||||
scan_params->repeat_probe_time = (roam_req->nProbes > 0) ?
|
||||
QDF_MAX(scan_params->dwell_time_active / roam_req->nProbes,
|
||||
1) : 0;
|
||||
QDF_MAX(scan_params->dwell_time_active /
|
||||
roam_req->nProbes, 1) : 0;
|
||||
scan_params->probe_spacing_time = 0;
|
||||
scan_params->probe_delay = 0;
|
||||
/* 30 seconds for full scan cycle */
|
||||
@@ -1508,22 +1514,15 @@ void wma_roam_scan_fill_scan_params(tp_wma_handle wma_handle,
|
||||
scan_params->n_probes = 0;
|
||||
}
|
||||
|
||||
WMA_LOGD("%s: Rome roam scan parameters:"
|
||||
" dwell_time_active = %d, dwell_time_passive = %d",
|
||||
__func__,
|
||||
scan_params->dwell_time_active,
|
||||
WMA_LOGD("%s: Rome roam scan parameters: dwell_time_active = %d, dwell_time_passive = %d",
|
||||
__func__, scan_params->dwell_time_active,
|
||||
scan_params->dwell_time_passive);
|
||||
WMA_LOGD("%s: min_rest_time = %d, max_rest_time = %d,"
|
||||
" repeat_probe_time = %d n_probes = %d",
|
||||
__func__,
|
||||
scan_params->min_rest_time,
|
||||
WMA_LOGD("%s: min_rest_time = %d, max_rest_time = %d, repeat_probe_time = %d n_probes = %d",
|
||||
__func__, scan_params->min_rest_time,
|
||||
scan_params->max_rest_time,
|
||||
scan_params->repeat_probe_time, scan_params->n_probes);
|
||||
WMA_LOGD("%s: max_scan_time = %d, idle_time = %d,"
|
||||
" burst_duration = %d, scan_ctrl_flags = 0x%x",
|
||||
__func__,
|
||||
scan_params->max_scan_time,
|
||||
scan_params->idle_time,
|
||||
WMA_LOGD("%s: max_scan_time = %d, idle_time = %d, burst_duration = %d, scan_ctrl_flags = 0x%x",
|
||||
__func__, scan_params->max_scan_time, scan_params->idle_time,
|
||||
scan_params->burst_duration, scan_params->scan_ctrl_flags);
|
||||
}
|
||||
|
||||
@@ -1607,7 +1606,8 @@ static QDF_STATUS wma_roam_scan_filter(tp_wma_handle wma_handle,
|
||||
} else {
|
||||
/* In case of STOP command, reset all the variables
|
||||
* except for blacklist BSSID which should be retained
|
||||
* across connections.*/
|
||||
* across connections.
|
||||
*/
|
||||
op_bitmap = 0x2 | 0x4;
|
||||
num_ssid_white_list = roam_params->num_ssid_allowed_list;
|
||||
len = num_ssid_white_list * sizeof(wmi_ssid);
|
||||
@@ -1672,9 +1672,8 @@ QDF_STATUS wma_roam_scan_bmiss_cnt(tp_wma_handle wma_handle,
|
||||
final_bcnt);
|
||||
|
||||
status = wma_vdev_set_param(wma_handle->wmi_handle,
|
||||
vdev_id,
|
||||
WMI_VDEV_PARAM_BMISS_FIRST_BCNT,
|
||||
first_bcnt);
|
||||
vdev_id, WMI_VDEV_PARAM_BMISS_FIRST_BCNT,
|
||||
first_bcnt);
|
||||
if (QDF_IS_STATUS_ERROR(status)) {
|
||||
WMA_LOGE("wma_vdev_set_param WMI_VDEV_PARAM_BMISS_FIRST_BCNT returned Error %d",
|
||||
status);
|
||||
@@ -1682,9 +1681,8 @@ QDF_STATUS wma_roam_scan_bmiss_cnt(tp_wma_handle wma_handle,
|
||||
}
|
||||
|
||||
status = wma_vdev_set_param(wma_handle->wmi_handle,
|
||||
vdev_id,
|
||||
WMI_VDEV_PARAM_BMISS_FINAL_BCNT,
|
||||
final_bcnt);
|
||||
vdev_id, WMI_VDEV_PARAM_BMISS_FINAL_BCNT,
|
||||
final_bcnt);
|
||||
if (QDF_IS_STATUS_ERROR(status)) {
|
||||
WMA_LOGE("wma_vdev_set_param WMI_VDEV_PARAM_BMISS_FINAL_BCNT returned Error %d",
|
||||
status);
|
||||
@@ -1752,12 +1750,12 @@ QDF_STATUS wma_process_roaming_config(tp_wma_handle wma_handle,
|
||||
intr->delay_before_vdev_stop = roam_req->delay_before_vdev_stop;
|
||||
/*
|
||||
* Scan/Roam threshold parameters are translated from fields of
|
||||
* tSirRoamOffloadScanReq to WMITLV values sent to Rome firmware.
|
||||
* some of these parameters are configurable in qcom_cfg.ini file.
|
||||
* tSirRoamOffloadScanReq to WMITLV values sent to Rome firmware
|
||||
* some of these parameters are configurable in qcom_cfg.ini
|
||||
*/
|
||||
|
||||
/* First parameter is positive rssi value to trigger rssi based scan.
|
||||
* Opportunistic scan is started at 30 dB higher that trigger rssi.
|
||||
/* First param is positive rssi value to trigger rssi based scan
|
||||
* Opportunistic scan is started at 30dB > trigger rssi.
|
||||
*/
|
||||
wma_handle->suitable_ap_hb_failure = false;
|
||||
|
||||
@@ -1766,9 +1764,9 @@ QDF_STATUS wma_process_roaming_config(tp_wma_handle wma_handle,
|
||||
if (qdf_status != QDF_STATUS_SUCCESS)
|
||||
break;
|
||||
qdf_status = wma_roam_scan_bmiss_cnt(wma_handle,
|
||||
roam_req->RoamBmissFirstBcnt,
|
||||
roam_req->RoamBmissFinalBcnt,
|
||||
roam_req->sessionId);
|
||||
roam_req->RoamBmissFirstBcnt,
|
||||
roam_req->RoamBmissFinalBcnt,
|
||||
roam_req->sessionId);
|
||||
if (qdf_status != QDF_STATUS_SUCCESS)
|
||||
break;
|
||||
|
||||
@@ -1779,9 +1777,9 @@ QDF_STATUS wma_process_roaming_config(tp_wma_handle wma_handle,
|
||||
if (roam_req->EmptyRefreshScanPeriod > 0) {
|
||||
qdf_status =
|
||||
wma_roam_scan_offload_scan_period(wma_handle,
|
||||
roam_req->EmptyRefreshScanPeriod,
|
||||
roam_req->EmptyRefreshScanPeriod * 3,
|
||||
roam_req->sessionId);
|
||||
roam_req->EmptyRefreshScanPeriod,
|
||||
roam_req->EmptyRefreshScanPeriod * 3,
|
||||
roam_req->sessionId);
|
||||
if (qdf_status != QDF_STATUS_SUCCESS)
|
||||
break;
|
||||
|
||||
@@ -1796,9 +1794,10 @@ QDF_STATUS wma_process_roaming_config(tp_wma_handle wma_handle,
|
||||
mode = WMI_ROAM_SCAN_MODE_RSSI_CHANGE;
|
||||
}
|
||||
|
||||
/* Start new rssi triggered scan only if it changes by RoamRssiDiff value.
|
||||
* Beacon weight of 14 means average rssi is taken over 14 previous samples +
|
||||
* 2 times the current beacon's rssi.
|
||||
/* Start new rssi triggered scan only if it changes by
|
||||
* RoamRssiDiff value. Beacon weight of 14 means average rssi
|
||||
* is taken over 14 previous samples + 2 times the current
|
||||
* beacon's rssi.
|
||||
*/
|
||||
qdf_status = wma_roam_scan_offload_rssi_change(wma_handle,
|
||||
roam_req->sessionId,
|
||||
@@ -1813,16 +1812,15 @@ QDF_STATUS wma_process_roaming_config(tp_wma_handle wma_handle,
|
||||
&ap_profile);
|
||||
|
||||
qdf_status = wma_roam_scan_offload_ap_profile(wma_handle,
|
||||
&ap_profile,
|
||||
roam_req->sessionId);
|
||||
&ap_profile, roam_req->sessionId);
|
||||
if (qdf_status != QDF_STATUS_SUCCESS)
|
||||
break;
|
||||
|
||||
qdf_status = wma_roam_scan_offload_chan_list(wma_handle,
|
||||
roam_req->ConnectedNetwork.ChannelCount,
|
||||
&roam_req->ConnectedNetwork.ChannelCache[0],
|
||||
roam_req->ChannelCacheType,
|
||||
roam_req->sessionId);
|
||||
roam_req->ConnectedNetwork.ChannelCount,
|
||||
&roam_req->ConnectedNetwork.ChannelCache[0],
|
||||
roam_req->ChannelCacheType,
|
||||
roam_req->sessionId);
|
||||
if ((qdf_status != QDF_STATUS_SUCCESS) &&
|
||||
(qdf_status != QDF_STATUS_E_EMPTY))
|
||||
break;
|
||||
@@ -1873,6 +1871,7 @@ QDF_STATUS wma_process_roaming_config(tp_wma_handle wma_handle,
|
||||
REASON_OS_REQUESTED_ROAMING_NOW) {
|
||||
struct scheduler_msg cds_msg = {0};
|
||||
tSirRoamOffloadScanRsp *scan_offload_rsp;
|
||||
|
||||
scan_offload_rsp =
|
||||
qdf_mem_malloc(sizeof(*scan_offload_rsp));
|
||||
if (!scan_offload_rsp) {
|
||||
@@ -1907,8 +1906,8 @@ QDF_STATUS wma_process_roaming_config(tp_wma_handle wma_handle,
|
||||
* It will continue automatically on next trigger.
|
||||
*/
|
||||
qdf_status = wma_roam_scan_offload_command(wma_handle,
|
||||
WMI_ROAM_SCAN_STOP_CMD,
|
||||
roam_req->sessionId);
|
||||
WMI_ROAM_SCAN_STOP_CMD,
|
||||
roam_req->sessionId);
|
||||
break;
|
||||
|
||||
case ROAM_SCAN_OFFLOAD_RESTART:
|
||||
@@ -1944,9 +1943,9 @@ QDF_STATUS wma_process_roaming_config(tp_wma_handle wma_handle,
|
||||
break;
|
||||
|
||||
qdf_status = wma_roam_scan_bmiss_cnt(wma_handle,
|
||||
roam_req->RoamBmissFirstBcnt,
|
||||
roam_req->RoamBmissFinalBcnt,
|
||||
roam_req->sessionId);
|
||||
roam_req->RoamBmissFirstBcnt,
|
||||
roam_req->RoamBmissFinalBcnt,
|
||||
roam_req->sessionId);
|
||||
if (qdf_status != QDF_STATUS_SUCCESS)
|
||||
break;
|
||||
qdf_status = wma_roam_scan_filter(wma_handle, roam_req);
|
||||
@@ -1961,10 +1960,10 @@ QDF_STATUS wma_process_roaming_config(tp_wma_handle wma_handle,
|
||||
* other parameters.
|
||||
*/
|
||||
qdf_status = wma_roam_scan_offload_chan_list(wma_handle,
|
||||
roam_req->ConnectedNetwork.ChannelCount,
|
||||
&roam_req->ConnectedNetwork.ChannelCache[0],
|
||||
roam_req->ChannelCacheType,
|
||||
roam_req->sessionId);
|
||||
roam_req->ConnectedNetwork.ChannelCount,
|
||||
&roam_req->ConnectedNetwork.ChannelCache[0],
|
||||
roam_req->ChannelCacheType,
|
||||
roam_req->sessionId);
|
||||
/*
|
||||
* Even though the channel list is empty, we can
|
||||
* still go ahead and start Roaming.
|
||||
@@ -1980,11 +1979,11 @@ QDF_STATUS wma_process_roaming_config(tp_wma_handle wma_handle,
|
||||
break;
|
||||
|
||||
if (roam_req->EmptyRefreshScanPeriod > 0) {
|
||||
qdf_status =
|
||||
wma_roam_scan_offload_scan_period(wma_handle,
|
||||
roam_req->EmptyRefreshScanPeriod,
|
||||
roam_req->EmptyRefreshScanPeriod * 3,
|
||||
roam_req->sessionId);
|
||||
qdf_status = wma_roam_scan_offload_scan_period(
|
||||
wma_handle,
|
||||
roam_req->EmptyRefreshScanPeriod,
|
||||
roam_req->EmptyRefreshScanPeriod * 3,
|
||||
roam_req->sessionId);
|
||||
if (qdf_status != QDF_STATUS_SUCCESS)
|
||||
break;
|
||||
|
||||
@@ -2009,9 +2008,8 @@ QDF_STATUS wma_process_roaming_config(tp_wma_handle wma_handle,
|
||||
|
||||
wma_roam_scan_fill_ap_profile(wma_handle, pMac, roam_req,
|
||||
&ap_profile);
|
||||
qdf_status =
|
||||
wma_roam_scan_offload_ap_profile(wma_handle, &ap_profile,
|
||||
roam_req->sessionId);
|
||||
qdf_status = wma_roam_scan_offload_ap_profile(wma_handle,
|
||||
&ap_profile, roam_req->sessionId);
|
||||
if (qdf_status != QDF_STATUS_SUCCESS)
|
||||
break;
|
||||
|
||||
@@ -2081,8 +2079,6 @@ free_frame_buf:
|
||||
qdf_mem_free(roaminvoke->frame_buf);
|
||||
roaminvoke->frame_buf = NULL;
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -2104,7 +2100,8 @@ void wma_process_roam_synch_fail(WMA_HANDLE handle,
|
||||
/* Hand Off Failure could happen as an exception, when a roam synch
|
||||
* indication is posted to Host, but a roam synch complete is not
|
||||
* posted to the firmware.So, clear the roam synch in progress
|
||||
* flag before disconnecting the session through this event.*/
|
||||
* flag before disconnecting the session through this event.
|
||||
*/
|
||||
wma_handle->interfaces[synch_fail->session_id].roam_synch_in_progress =
|
||||
false;
|
||||
}
|
||||
@@ -2141,14 +2138,10 @@ static int wma_fill_roam_synch_buffer(tp_wma_handle wma,
|
||||
roam_synch_ind_ptr->isBeacon = synch_event->is_beacon;
|
||||
WMI_MAC_ADDR_TO_CHAR_ARRAY(&synch_event->bssid,
|
||||
roam_synch_ind_ptr->bssid.bytes);
|
||||
WMA_LOGI("%s: roamedVdevId %d authStatus %d roamReason %d rssi %d"
|
||||
"isBeacon %d",
|
||||
__func__,
|
||||
roam_synch_ind_ptr->roamedVdevId,
|
||||
roam_synch_ind_ptr->authStatus,
|
||||
roam_synch_ind_ptr->roamReason,
|
||||
roam_synch_ind_ptr->rssi,
|
||||
roam_synch_ind_ptr->isBeacon);
|
||||
WMA_LOGI("%s: roamedVdevId %d authStatus %d roamReason %d rssi %d isBeacon %d",
|
||||
__func__, roam_synch_ind_ptr->roamedVdevId,
|
||||
roam_synch_ind_ptr->authStatus, roam_synch_ind_ptr->roamReason,
|
||||
roam_synch_ind_ptr->rssi, roam_synch_ind_ptr->isBeacon);
|
||||
|
||||
if (!QDF_IS_STATUS_SUCCESS(
|
||||
wma->csr_roam_synch_cb((tpAniSirGlobal)wma->mac_context,
|
||||
@@ -2457,7 +2450,8 @@ QDF_STATUS wma_roam_scan_fill_self_caps(tp_wma_handle wma_handle,
|
||||
|
||||
qdf_mem_set(&macQosInfoSta, sizeof(tSirMacQosInfoStation), 0);
|
||||
/* Roaming is done only for INFRA STA type.
|
||||
* So, ess will be one and ibss will be Zero */
|
||||
* So, ess will be one and ibss will be Zero
|
||||
*/
|
||||
pMac = cds_get_context(QDF_MODULE_ID_PE);
|
||||
if (!pMac) {
|
||||
WMA_LOGE("%s:NULL pMac ptr. Exiting", __func__);
|
||||
@@ -2465,7 +2459,8 @@ QDF_STATUS wma_roam_scan_fill_self_caps(tp_wma_handle wma_handle,
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
}
|
||||
|
||||
if (wlan_cfg_get_int(pMac, WNI_CFG_PRIVACY_ENABLED, &val) != eSIR_SUCCESS) {
|
||||
if (wlan_cfg_get_int(pMac, WNI_CFG_PRIVACY_ENABLED, &val) !=
|
||||
eSIR_SUCCESS) {
|
||||
QDF_TRACE(QDF_MODULE_ID_WMA, QDF_TRACE_LEVEL_ERROR,
|
||||
"Failed to get WNI_CFG_PRIVACY_ENABLED");
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
@@ -2474,7 +2469,8 @@ QDF_STATUS wma_roam_scan_fill_self_caps(tp_wma_handle wma_handle,
|
||||
selfCaps.ibss = 0;
|
||||
if (val)
|
||||
selfCaps.privacy = 1;
|
||||
if (wlan_cfg_get_int(pMac, WNI_CFG_SHORT_PREAMBLE, &val) != eSIR_SUCCESS) {
|
||||
if (wlan_cfg_get_int(pMac, WNI_CFG_SHORT_PREAMBLE, &val) !=
|
||||
eSIR_SUCCESS) {
|
||||
QDF_TRACE(QDF_MODULE_ID_WMA, QDF_TRACE_LEVEL_ERROR,
|
||||
"Failed to get WNI_CFG_SHORT_PREAMBLE");
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
@@ -2506,7 +2502,8 @@ QDF_STATUS wma_roam_scan_fill_self_caps(tp_wma_handle wma_handle,
|
||||
}
|
||||
if (val)
|
||||
selfCaps.qos = 1;
|
||||
if (wlan_cfg_get_int(pMac, WNI_CFG_APSD_ENABLED, &val) != eSIR_SUCCESS) {
|
||||
if (wlan_cfg_get_int(pMac, WNI_CFG_APSD_ENABLED, &val) !=
|
||||
eSIR_SUCCESS) {
|
||||
QDF_TRACE(QDF_MODULE_ID_WMA, QDF_TRACE_LEVEL_ERROR,
|
||||
"Failed to get WNI_CFG_APSD_ENABLED");
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
@@ -2567,7 +2564,8 @@ QDF_STATUS wma_roam_scan_fill_self_caps(tp_wma_handle wma_handle,
|
||||
roam_offload_params->ht_ext_cap =
|
||||
uHTCapabilityInfo.nCfgValue16 & 0xFFFF;
|
||||
|
||||
if (wlan_cfg_get_int(pMac, WNI_CFG_TX_BF_CAP, &nCfgValue) != eSIR_SUCCESS) {
|
||||
if (wlan_cfg_get_int(pMac, WNI_CFG_TX_BF_CAP, &nCfgValue) !=
|
||||
eSIR_SUCCESS) {
|
||||
QDF_TRACE(QDF_MODULE_ID_WMA, QDF_TRACE_LEVEL_ERROR,
|
||||
"Failed to get WNI_CFG_TX_BF_CAP");
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
@@ -2575,7 +2573,8 @@ QDF_STATUS wma_roam_scan_fill_self_caps(tp_wma_handle wma_handle,
|
||||
/* tSirMacTxBFCapabilityInfo */
|
||||
nCfgValue8 = (uint8_t) nCfgValue;
|
||||
roam_offload_params->ht_txbf = nCfgValue8 & 0xFF;
|
||||
if (wlan_cfg_get_int(pMac, WNI_CFG_AS_CAP, &nCfgValue) != eSIR_SUCCESS) {
|
||||
if (wlan_cfg_get_int(pMac, WNI_CFG_AS_CAP, &nCfgValue) !=
|
||||
eSIR_SUCCESS) {
|
||||
QDF_TRACE(QDF_MODULE_ID_WMA, QDF_TRACE_LEVEL_ERROR,
|
||||
"Failed to get WNI_CFG_AS_CAP");
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
@@ -2628,8 +2627,6 @@ void wma_set_ric_req(tp_wma_handle wma, void *msg, uint8_t is_add_ts)
|
||||
}
|
||||
|
||||
wmi_unified_set_ric_req_cmd(wma->wmi_handle, msg, is_add_ts);
|
||||
|
||||
return;
|
||||
}
|
||||
#endif /* WLAN_FEATURE_ROAM_OFFLOAD */
|
||||
|
||||
@@ -2702,8 +2699,6 @@ void wma_process_unit_test_cmd(WMA_HANDLE handle,
|
||||
(struct wmi_unit_test_cmd *)wma_utest)) {
|
||||
return;
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
#ifdef WLAN_FEATURE_ROAM_OFFLOAD
|
||||
@@ -2737,7 +2732,6 @@ static void wma_roam_ho_fail_handler(tp_wma_handle wma, uint32_t vdev_id)
|
||||
qdf_mem_free(ho_failure_ind);
|
||||
return;
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -2768,7 +2762,6 @@ void wma_process_roam_synch_complete(WMA_HANDLE handle, uint8_t vdev_id)
|
||||
vdev_id, QDF_PROTO_TYPE_EVENT, QDF_ROAM_COMPLETE));
|
||||
|
||||
WMA_LOGE("LFR3: Posting WMA_ROAM_OFFLOAD_SYNCH_CNF");
|
||||
return;
|
||||
}
|
||||
#endif /* WLAN_FEATURE_ROAM_OFFLOAD */
|
||||
|
||||
@@ -2994,7 +2987,8 @@ void wma_set_channel(tp_wma_handle wma, tpSwitchChannelParams params)
|
||||
if (status != QDF_STATUS_SUCCESS) {
|
||||
wma_remove_vdev_req(wma, req.vdev_id,
|
||||
WMA_TARGET_REQ_TYPE_VDEV_START);
|
||||
WMA_LOGP("%s: vdev start failed status = %d", __func__, status);
|
||||
WMA_LOGP("%s: vdev start failed status = %d", __func__,
|
||||
status);
|
||||
goto send_resp;
|
||||
}
|
||||
|
||||
@@ -3163,7 +3157,8 @@ void wma_config_plm(tp_wma_handle wma, tpSirPlmReq plm)
|
||||
plm->enable ? "start" : "stop", ret);
|
||||
|
||||
/* SME expects WMA to free tpSirPlmReq memory after
|
||||
* processing PLM request. */
|
||||
* processing PLM request.
|
||||
*/
|
||||
qdf_mem_free(plm);
|
||||
plm = NULL;
|
||||
}
|
||||
@@ -3277,8 +3272,6 @@ void wma_register_extscan_event_handler(tp_wma_handle wma_handle)
|
||||
WMI_PASSPOINT_MATCH_EVENTID,
|
||||
wma_passpoint_match_event_handler,
|
||||
WMA_RX_SERIALIZER_CTX);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
#ifdef FEATURE_WLAN_EXTSCAN
|
||||
@@ -3303,6 +3296,7 @@ int wma_extscan_start_stop_event_handler(void *handle,
|
||||
struct sir_extscan_generic_response *extscan_ind;
|
||||
uint16_t event_type;
|
||||
tpAniSirGlobal pMac = cds_get_context(QDF_MODULE_ID_PE);
|
||||
|
||||
if (!pMac) {
|
||||
WMA_LOGE("%s: Invalid pMac", __func__);
|
||||
return -EINVAL;
|
||||
@@ -3337,22 +3331,20 @@ int wma_extscan_start_stop_event_handler(void *handle,
|
||||
case WMI_EXTSCAN_CONFIGURE_WLAN_CHANGE_MONITOR_CMDID:
|
||||
extscan_ind->status = event->status;
|
||||
extscan_ind->request_id = event->request_id;
|
||||
if (event->mode == WMI_EXTSCAN_MODE_STOP) {
|
||||
if (event->mode == WMI_EXTSCAN_MODE_STOP)
|
||||
event_type =
|
||||
eSIR_EXTSCAN_RESET_SIGNIFICANT_WIFI_CHANGE_RSP;
|
||||
} else {
|
||||
else
|
||||
event_type =
|
||||
eSIR_EXTSCAN_SET_SIGNIFICANT_WIFI_CHANGE_RSP;
|
||||
}
|
||||
break;
|
||||
case WMI_EXTSCAN_CONFIGURE_HOTLIST_MONITOR_CMDID:
|
||||
extscan_ind->status = event->status;
|
||||
extscan_ind->request_id = event->request_id;
|
||||
if (event->mode == WMI_EXTSCAN_MODE_STOP) {
|
||||
if (event->mode == WMI_EXTSCAN_MODE_STOP)
|
||||
event_type = eSIR_EXTSCAN_RESET_BSSID_HOTLIST_RSP;
|
||||
} else {
|
||||
else
|
||||
event_type = eSIR_EXTSCAN_SET_BSSID_HOTLIST_RSP;
|
||||
}
|
||||
break;
|
||||
case WMI_EXTSCAN_GET_CACHED_RESULTS_CMDID:
|
||||
extscan_ind->status = event->status;
|
||||
@@ -3362,13 +3354,12 @@ int wma_extscan_start_stop_event_handler(void *handle,
|
||||
case WMI_EXTSCAN_CONFIGURE_HOTLIST_SSID_MONITOR_CMDID:
|
||||
extscan_ind->status = event->status;
|
||||
extscan_ind->request_id = event->request_id;
|
||||
if (event->mode == WMI_EXTSCAN_MODE_STOP) {
|
||||
if (event->mode == WMI_EXTSCAN_MODE_STOP)
|
||||
event_type =
|
||||
eSIR_EXTSCAN_RESET_SSID_HOTLIST_RSP;
|
||||
} else {
|
||||
else
|
||||
event_type =
|
||||
eSIR_EXTSCAN_SET_SSID_HOTLIST_RSP;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
WMA_LOGE("%s: Unknown event(%d) from target",
|
||||
@@ -3377,9 +3368,8 @@ int wma_extscan_start_stop_event_handler(void *handle,
|
||||
return -EINVAL;
|
||||
}
|
||||
pMac->sme.pExtScanIndCb(pMac->hHdd, event_type, extscan_ind);
|
||||
WMA_LOGD("%s: sending event to umac for requestid %u"
|
||||
"with status %d", __func__,
|
||||
extscan_ind->request_id, extscan_ind->status);
|
||||
WMA_LOGD("%s: sending event to umac for requestid %u with status %d",
|
||||
__func__, extscan_ind->request_id, extscan_ind->status);
|
||||
qdf_mem_free(extscan_ind);
|
||||
return 0;
|
||||
}
|
||||
@@ -3404,8 +3394,8 @@ int wma_extscan_operations_event_handler(void *handle,
|
||||
wmi_extscan_operation_event_fixed_param *oprn_event;
|
||||
tSirExtScanOnScanEventIndParams *oprn_ind;
|
||||
uint32_t cnt;
|
||||
|
||||
tpAniSirGlobal pMac = cds_get_context(QDF_MODULE_ID_PE);
|
||||
|
||||
if (!pMac) {
|
||||
WMA_LOGE("%s: Invalid pMac", __func__);
|
||||
return -EINVAL;
|
||||
@@ -3513,6 +3503,7 @@ int wma_extscan_table_usage_event_handler(void *handle,
|
||||
wmi_extscan_table_usage_event_fixed_param *event;
|
||||
tSirExtScanResultsAvailableIndParams *tbl_usg_ind;
|
||||
tpAniSirGlobal pMac = cds_get_context(QDF_MODULE_ID_PE);
|
||||
|
||||
if (!pMac) {
|
||||
WMA_LOGE("%s: Invalid pMac", __func__);
|
||||
return -EINVAL;
|
||||
@@ -3535,7 +3526,6 @@ int wma_extscan_table_usage_event_handler(void *handle,
|
||||
}
|
||||
tbl_usg_ind->requestId = event->request_id;
|
||||
tbl_usg_ind->numResultsAvailable = event->entries_in_use;
|
||||
|
||||
pMac->sme.pExtScanIndCb(pMac->hHdd,
|
||||
eSIR_EXTSCAN_SCAN_RES_AVAILABLE_IND,
|
||||
tbl_usg_ind);
|
||||
@@ -3564,9 +3554,9 @@ int wma_extscan_capabilities_event_handler(void *handle,
|
||||
wmi_extscan_cache_capabilities *src_cache;
|
||||
wmi_extscan_hotlist_monitor_capabilities *src_hotlist;
|
||||
wmi_extscan_wlan_change_monitor_capabilities *src_change;
|
||||
|
||||
struct ext_scan_capabilities_response *dest_capab;
|
||||
tpAniSirGlobal pMac = cds_get_context(QDF_MODULE_ID_PE);
|
||||
|
||||
if (!pMac) {
|
||||
WMA_LOGE("%s: Invalid pMac", __func__);
|
||||
return -EINVAL;
|
||||
@@ -3604,7 +3594,8 @@ int wma_extscan_capabilities_event_handler(void *handle,
|
||||
src_cache->max_table_usage_threshold;
|
||||
|
||||
dest_capab->max_hotlist_bssids = src_hotlist->max_hotlist_entries;
|
||||
dest_capab->max_rssi_sample_size = src_change->max_rssi_averaging_samples;
|
||||
dest_capab->max_rssi_sample_size =
|
||||
src_change->max_rssi_averaging_samples;
|
||||
dest_capab->max_bssid_history_entries =
|
||||
src_change->max_rssi_history_entries;
|
||||
dest_capab->max_significant_wifi_change_aps =
|
||||
@@ -3624,28 +3615,22 @@ int wma_extscan_capabilities_event_handler(void *handle,
|
||||
WMA_LOGD("%s: request_id: %u status: %d",
|
||||
__func__, dest_capab->requestId, dest_capab->status);
|
||||
|
||||
WMA_LOGD("%s: Capabilities: max_scan_buckets: %d,"
|
||||
"max_hotlist_bssids: %d, max_scan_cache_size: %d,"
|
||||
"max_ap_cache_per_scan: %d, max_scan_reporting_threshold: %d,"
|
||||
"max_rssi_sample_size: %d, max_bssid_history_entries: %d,"
|
||||
"max_significant_wifi_change_aps: %d",
|
||||
WMA_LOGD("%s: Capabilities: max_scan_buckets: %d, max_hotlist_bssids: %d, max_scan_cache_size: %d, max_ap_cache_per_scan: %d",
|
||||
__func__, dest_capab->max_scan_buckets,
|
||||
dest_capab->max_hotlist_bssids,
|
||||
dest_capab->max_scan_cache_size,
|
||||
dest_capab->max_ap_cache_per_scan,
|
||||
dest_capab->max_scan_reporting_threshold,
|
||||
dest_capab->max_hotlist_bssids, dest_capab->max_scan_cache_size,
|
||||
dest_capab->max_ap_cache_per_scan);
|
||||
WMA_LOGD("%s: max_scan_reporting_threshold: %d, max_rssi_sample_size: %d, max_bssid_history_entries: %d, max_significant_wifi_change_aps: %d",
|
||||
__func__, dest_capab->max_scan_reporting_threshold,
|
||||
dest_capab->max_rssi_sample_size,
|
||||
dest_capab->max_bssid_history_entries,
|
||||
dest_capab->max_significant_wifi_change_aps);
|
||||
|
||||
WMA_LOGD("%s: Capabilities: max_hotlist_ssids: %d,"
|
||||
"max_number_epno_networks: %d, max_number_epno_networks_by_ssid: %d,"
|
||||
"max_number_of_white_listed_ssid: %d,"
|
||||
"max_number_of_black_listed_bssid: %d",
|
||||
WMA_LOGD("%s: Capabilities: max_hotlist_ssids: %d, max_number_epno_networks: %d, max_number_epno_networks_by_ssid: %d",
|
||||
__func__, dest_capab->max_hotlist_ssids,
|
||||
dest_capab->max_number_epno_networks,
|
||||
dest_capab->max_number_epno_networks_by_ssid,
|
||||
dest_capab->max_number_of_white_listed_ssid,
|
||||
dest_capab->max_number_epno_networks_by_ssid);
|
||||
WMA_LOGD("%s: max_number_of_white_listed_ssid: %d, max_number_of_black_listed_bssid: %d",
|
||||
__func__, dest_capab->max_number_of_white_listed_ssid,
|
||||
dest_capab->max_number_of_black_listed_bssid);
|
||||
|
||||
pMac->sme.pExtScanIndCb(pMac->hHdd,
|
||||
@@ -3944,8 +3929,8 @@ int wma_extscan_cached_results_event_handler(void *handle,
|
||||
wmi_extscan_wlan_descriptor *src_hotlist;
|
||||
wmi_extscan_rssi_info *src_rssi;
|
||||
int numap, i, moredata, scan_ids_cnt, buf_len;
|
||||
|
||||
tpAniSirGlobal pMac = cds_get_context(QDF_MODULE_ID_PE);
|
||||
|
||||
if (!pMac) {
|
||||
WMA_LOGE("%s: Invalid pMac", __func__);
|
||||
return -EINVAL;
|
||||
@@ -4053,6 +4038,7 @@ int wma_extscan_change_results_event_handler(void *handle,
|
||||
int moredata;
|
||||
int rssi_num = 0;
|
||||
tpAniSirGlobal pMac = cds_get_context(QDF_MODULE_ID_PE);
|
||||
|
||||
if (!pMac) {
|
||||
WMA_LOGE("%s: Invalid pMac", __func__);
|
||||
return -EINVAL;
|
||||
@@ -4076,9 +4062,9 @@ int wma_extscan_change_results_event_handler(void *handle,
|
||||
WMA_LOGE("%s: Results invalid", __func__);
|
||||
return -EINVAL;
|
||||
}
|
||||
for (i = 0; i < numap; i++) {
|
||||
for (i = 0; i < numap; i++)
|
||||
rssi_num += src_chglist->num_rssi_samples;
|
||||
}
|
||||
|
||||
if (event->first_entry_index +
|
||||
event->num_entries_in_page < event->total_entries) {
|
||||
moredata = 1;
|
||||
@@ -4112,8 +4098,8 @@ int wma_extscan_change_results_event_handler(void *handle,
|
||||
dest_chglist->numResults = event->total_entries;
|
||||
|
||||
pMac->sme.pExtScanIndCb(pMac->hHdd,
|
||||
eSIR_EXTSCAN_SIGNIFICANT_WIFI_CHANGE_RESULTS_IND,
|
||||
dest_chglist);
|
||||
eSIR_EXTSCAN_SIGNIFICANT_WIFI_CHANGE_RESULTS_IND,
|
||||
dest_chglist);
|
||||
WMA_LOGI("%s: sending change monitor results", __func__);
|
||||
qdf_mem_free(dest_chglist);
|
||||
return 0;
|
||||
@@ -4262,8 +4248,8 @@ QDF_STATUS wma_get_buf_extscan_start_cmd(tp_wma_handle wma_handle,
|
||||
/* Allocate the memory */
|
||||
*buf = wmi_buf_alloc(wma_handle->wmi_handle, len);
|
||||
if (!*buf) {
|
||||
WMA_LOGP("%s: failed to allocate memory"
|
||||
" for start extscan cmd", __func__);
|
||||
WMA_LOGP("%s: failed to allocate memory for start extscan cmd",
|
||||
__func__);
|
||||
return QDF_STATUS_E_NOMEM;
|
||||
}
|
||||
buf_ptr = (uint8_t *) wmi_buf_data(*buf);
|
||||
@@ -4393,10 +4379,14 @@ QDF_STATUS wma_get_buf_extscan_start_cmd(tp_wma_handle wma_handle,
|
||||
dest_blist->configuration_flags,
|
||||
dest_blist->forwarding_flags);
|
||||
|
||||
dest_blist->min_dwell_time_active = src_bucket->min_dwell_time_active;
|
||||
dest_blist->max_dwell_time_active = src_bucket->max_dwell_time_active;
|
||||
dest_blist->min_dwell_time_passive = src_bucket->min_dwell_time_passive;
|
||||
dest_blist->max_dwell_time_passive = src_bucket->max_dwell_time_passive;
|
||||
dest_blist->min_dwell_time_active =
|
||||
src_bucket->min_dwell_time_active;
|
||||
dest_blist->max_dwell_time_active =
|
||||
src_bucket->max_dwell_time_active;
|
||||
dest_blist->min_dwell_time_passive =
|
||||
src_bucket->min_dwell_time_passive;
|
||||
dest_blist->max_dwell_time_passive =
|
||||
src_bucket->max_dwell_time_passive;
|
||||
src_channel = src_bucket->channels;
|
||||
|
||||
/* save the channel info to later populate
|
||||
@@ -4603,8 +4593,8 @@ static inline int wma_get_hotlist_entries_per_page(wmi_unified_t wmi_handle,
|
||||
* Return: QDF Status.
|
||||
*/
|
||||
QDF_STATUS wma_get_buf_extscan_hotlist_cmd(tp_wma_handle wma_handle,
|
||||
tSirExtScanSetBssidHotListReqParams *
|
||||
photlist, int *buf_len)
|
||||
tSirExtScanSetBssidHotListReqParams *photlist,
|
||||
int *buf_len)
|
||||
{
|
||||
return wmi_unified_get_buf_extscan_hotlist_cmd(wma_handle->wmi_handle,
|
||||
(struct ext_scan_setbssi_hotlist_params *)photlist,
|
||||
@@ -4621,8 +4611,7 @@ QDF_STATUS wma_get_buf_extscan_hotlist_cmd(tp_wma_handle wma_handle,
|
||||
* Return: QDF status
|
||||
*/
|
||||
QDF_STATUS wma_extscan_start_hotlist_monitor(tp_wma_handle wma,
|
||||
tSirExtScanSetBssidHotListReqParams
|
||||
*photlist)
|
||||
tSirExtScanSetBssidHotListReqParams *photlist)
|
||||
{
|
||||
QDF_STATUS qdf_status = QDF_STATUS_SUCCESS;
|
||||
int len;
|
||||
@@ -4637,8 +4626,8 @@ QDF_STATUS wma_extscan_start_hotlist_monitor(tp_wma_handle wma,
|
||||
*/
|
||||
qdf_status = wma_get_buf_extscan_hotlist_cmd(wma, photlist, &len);
|
||||
if (qdf_status != QDF_STATUS_SUCCESS) {
|
||||
WMA_LOGE("%s: Failed to get buffer"
|
||||
"for hotlist scan cmd", __func__);
|
||||
WMA_LOGE("%s: Failed to get buffer for hotlist scan cmd",
|
||||
__func__);
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
}
|
||||
return QDF_STATUS_SUCCESS;
|
||||
@@ -4654,8 +4643,7 @@ QDF_STATUS wma_extscan_start_hotlist_monitor(tp_wma_handle wma,
|
||||
* Return: QDF status
|
||||
*/
|
||||
QDF_STATUS wma_extscan_stop_hotlist_monitor(tp_wma_handle wma,
|
||||
tSirExtScanResetBssidHotlistReqParams
|
||||
*photlist_reset)
|
||||
tSirExtScanResetBssidHotlistReqParams *photlist_reset)
|
||||
{
|
||||
struct extscan_bssid_hotlist_reset_params params = {0};
|
||||
|
||||
@@ -4692,9 +4680,8 @@ QDF_STATUS wma_extscan_stop_hotlist_monitor(tp_wma_handle wma,
|
||||
* Return: QDF status
|
||||
*/
|
||||
QDF_STATUS wma_get_buf_extscan_change_monitor_cmd(tp_wma_handle wma_handle,
|
||||
tSirExtScanSetSigChangeReqParams
|
||||
*psigchange, wmi_buf_t *buf,
|
||||
int *buf_len)
|
||||
tSirExtScanSetSigChangeReqParams *psigchange,
|
||||
wmi_buf_t *buf, int *buf_len)
|
||||
{
|
||||
wmi_extscan_configure_wlan_change_monitor_cmd_fixed_param *cmd;
|
||||
wmi_extscan_wlan_change_bssid_param *dest_chglist;
|
||||
@@ -4828,8 +4815,7 @@ QDF_STATUS wma_extscan_start_change_monitor(tp_wma_handle wma,
|
||||
* Return: QDF status
|
||||
*/
|
||||
QDF_STATUS wma_extscan_stop_change_monitor(tp_wma_handle wma,
|
||||
tSirExtScanResetSignificantChangeReqParams
|
||||
*pResetReq)
|
||||
tSirExtScanResetSignificantChangeReqParams *pResetReq)
|
||||
{
|
||||
struct extscan_capabilities_reset_params params = {0};
|
||||
|
||||
@@ -4941,9 +4927,8 @@ QDF_STATUS wma_ipa_offload_enable_disable(tp_wma_handle wma,
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
}
|
||||
|
||||
if (ipa_offload->offload_type > STA_RX_DATA_OFFLOAD) {
|
||||
if (ipa_offload->offload_type > STA_RX_DATA_OFFLOAD)
|
||||
return QDF_STATUS_E_INVAL;
|
||||
}
|
||||
|
||||
params.offload_type = ipa_offload->offload_type;
|
||||
params.vdev_id = ipa_offload->vdev_id;
|
||||
@@ -5321,6 +5306,7 @@ void wma_roam_better_ap_handler(tp_wma_handle wma, uint32_t vdev_id)
|
||||
if (params->scan_id != 0 && params->chan_freq == 0 &&
|
||||
params->scan_requestor_id == USER_SCAN_REQUESTOR_ID) {
|
||||
tAbortScanParams abortScan;
|
||||
|
||||
abortScan.SessionId = vdev_id;
|
||||
abortScan.scan_id = params->scan_id;
|
||||
abortScan.scan_requestor_id = params->scan_requestor_id;
|
||||
|
@@ -143,12 +143,11 @@ void wma_swap_bytes(void *pv, uint32_t n)
|
||||
|
||||
no_words = n / sizeof(uint32_t);
|
||||
word_ptr = (uint32_t *) pv;
|
||||
for (i = 0; i < no_words; i++) {
|
||||
for (i = 0; i < no_words; i++)
|
||||
*(word_ptr + i) = __cpu_to_le32(*(word_ptr + i));
|
||||
}
|
||||
}
|
||||
|
||||
#define SWAPME(x, len) wma_swap_bytes(&x, len);
|
||||
#define SWAPME(x, len) wma_swap_bytes(&x, len)
|
||||
#endif /* BIG_ENDIAN_HOST */
|
||||
|
||||
/**
|
||||
@@ -369,14 +368,15 @@ void wma_lost_link_info_handler(tp_wma_handle wma, uint32_t vdev_id,
|
||||
}
|
||||
|
||||
/**
|
||||
* host_map_smps_mode() - map fw smps mode to tSmpsModeValue
|
||||
* host_map_smps_mode() - map fw smps mode to enum eSmpsModeValue
|
||||
* @fw_smps_mode: fw smps mode
|
||||
*
|
||||
* Return: return tSmpsModeValue
|
||||
* Return: return enum eSmpsModeValue
|
||||
*/
|
||||
tSmpsModeValue host_map_smps_mode(A_UINT32 fw_smps_mode)
|
||||
enum eSmpsModeValue host_map_smps_mode(A_UINT32 fw_smps_mode)
|
||||
{
|
||||
tSmpsModeValue smps_mode = SMPS_MODE_DISABLED;
|
||||
enum eSmpsModeValue smps_mode = SMPS_MODE_DISABLED;
|
||||
|
||||
switch (fw_smps_mode) {
|
||||
case WMI_SMPS_FORCED_MODE_STATIC:
|
||||
smps_mode = STATIC_SMPS_MODE;
|
||||
@@ -501,8 +501,8 @@ int wma_profile_data_report_event_handler(void *handle, uint8_t *event_buf,
|
||||
uint32_t entries;
|
||||
uint8_t *buf_ptr;
|
||||
char temp_str[150];
|
||||
param_buf = (WMI_WLAN_PROFILE_DATA_EVENTID_param_tlvs *) event_buf;
|
||||
|
||||
param_buf = (WMI_WLAN_PROFILE_DATA_EVENTID_param_tlvs *) event_buf;
|
||||
if (!param_buf) {
|
||||
WMA_LOGE("%s: Invalid profile data event buf", __func__);
|
||||
return -EINVAL;
|
||||
@@ -1251,7 +1251,8 @@ static int wma_unified_radio_tx_mem_free(void *handle)
|
||||
if (!wma_handle->link_stats_results)
|
||||
return 0;
|
||||
|
||||
rs_results = (tSirWifiRadioStat *)&wma_handle->link_stats_results->results[0];
|
||||
rs_results = (tSirWifiRadioStat *)
|
||||
&wma_handle->link_stats_results->results[0];
|
||||
for (i = 0; i < wma_handle->link_stats_results->num_radio; i++) {
|
||||
rs_results += i;
|
||||
if (rs_results->tx_time_per_power_level) {
|
||||
@@ -1281,7 +1282,7 @@ static int wma_unified_radio_tx_mem_free(void *handle)
|
||||
* power level stats.
|
||||
*
|
||||
* Return: 0 on success, error number otherwise.
|
||||
*/
|
||||
*/
|
||||
static int wma_unified_radio_tx_power_level_stats_event_handler(void *handle,
|
||||
u_int8_t *cmd_param_info, u_int32_t len)
|
||||
{
|
||||
@@ -1304,7 +1305,8 @@ static int wma_unified_radio_tx_power_level_stats_event_handler(void *handle,
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
param_tlvs = (WMI_RADIO_TX_POWER_LEVEL_STATS_EVENTID_param_tlvs *)cmd_param_info;
|
||||
param_tlvs = (WMI_RADIO_TX_POWER_LEVEL_STATS_EVENTID_param_tlvs *)
|
||||
cmd_param_info;
|
||||
if (!param_tlvs) {
|
||||
WMA_LOGA("%s: Invalid tx power level stats event", __func__);
|
||||
return -EINVAL;
|
||||
@@ -1312,7 +1314,8 @@ static int wma_unified_radio_tx_power_level_stats_event_handler(void *handle,
|
||||
|
||||
fixed_param = param_tlvs->fixed_param;
|
||||
if (!fixed_param) {
|
||||
WMA_LOGA("%s: Invalid param_tlvs for Radio tx_power level Stats", __func__);
|
||||
WMA_LOGA("%s:Invalid param_tlvs for Radio tx_power level Stats",
|
||||
__func__);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
@@ -1328,7 +1331,8 @@ static int wma_unified_radio_tx_power_level_stats_event_handler(void *handle,
|
||||
fixed_param->power_level_offset,
|
||||
fixed_param->radio_id);
|
||||
|
||||
rs_results = (tSirWifiRadioStat *) &link_stats_results->results[0] + fixed_param->radio_id;
|
||||
rs_results = (tSirWifiRadioStat *) &link_stats_results->results[0] +
|
||||
fixed_param->radio_id;
|
||||
tx_power_level_values = (uint8_t *) param_tlvs->tx_time_per_power_level;
|
||||
|
||||
rs_results->total_num_tx_power_levels =
|
||||
@@ -1343,7 +1347,8 @@ static int wma_unified_radio_tx_power_level_stats_event_handler(void *handle,
|
||||
sizeof(uint32_t) *
|
||||
rs_results->total_num_tx_power_levels);
|
||||
if (!rs_results->tx_time_per_power_level) {
|
||||
WMA_LOGA("%s: Mem alloc failed for tx power level stats", __func__);
|
||||
WMA_LOGA("%s: Mem alloc fail for tx power level stats",
|
||||
__func__);
|
||||
/* In error case, atleast send the radio stats without
|
||||
* tx_power_level stats */
|
||||
rs_results->total_num_tx_power_levels = 0;
|
||||
@@ -1351,11 +1356,13 @@ static int wma_unified_radio_tx_power_level_stats_event_handler(void *handle,
|
||||
goto post_stats;
|
||||
}
|
||||
}
|
||||
qdf_mem_copy(&rs_results->tx_time_per_power_level[fixed_param->power_level_offset],
|
||||
qdf_mem_copy(&rs_results->tx_time_per_power_level[
|
||||
fixed_param->power_level_offset],
|
||||
tx_power_level_values,
|
||||
sizeof(uint32_t) * fixed_param->num_tx_power_levels);
|
||||
if (rs_results->total_num_tx_power_levels ==
|
||||
(fixed_param->num_tx_power_levels + fixed_param->power_level_offset)) {
|
||||
(fixed_param->num_tx_power_levels +
|
||||
fixed_param->power_level_offset)) {
|
||||
link_stats_results->moreResultToFollow = 0;
|
||||
link_stats_results->nr_received++;
|
||||
}
|
||||
@@ -1452,7 +1459,8 @@ static int wma_unified_link_radio_stats_event_handler(void *handle,
|
||||
fixed_param->num_radio * radio_stats_size;
|
||||
|
||||
if (!wma_handle->link_stats_results) {
|
||||
wma_handle->link_stats_results = qdf_mem_malloc(link_stats_results_size);
|
||||
wma_handle->link_stats_results = qdf_mem_malloc(
|
||||
link_stats_results_size);
|
||||
if (NULL == wma_handle->link_stats_results) {
|
||||
WMA_LOGD("%s: could not allocate mem for stats results-len %zu",
|
||||
__func__, link_stats_results_size);
|
||||
@@ -1466,16 +1474,16 @@ static int wma_unified_link_radio_stats_event_handler(void *handle,
|
||||
fixed_param->request_id, fixed_param->num_radio,
|
||||
fixed_param->more_radio_events);
|
||||
|
||||
WMA_LOGD("Radio Info: radio_id: %u on_time: %u tx_time: %u rx_time: %u on_time_scan: %u "
|
||||
"on_time_nbd: %u on_time_gscan: %u on_time_roam_scan: %u "
|
||||
"on_time_pno_scan: %u on_time_hs20: %u num_channels: %u",
|
||||
radio_stats->radio_id, radio_stats->on_time,
|
||||
radio_stats->tx_time, radio_stats->rx_time,
|
||||
radio_stats->on_time_scan, radio_stats->on_time_nbd,
|
||||
radio_stats->on_time_gscan,
|
||||
radio_stats->on_time_roam_scan,
|
||||
radio_stats->on_time_pno_scan,
|
||||
radio_stats->on_time_hs20, radio_stats->num_channels);
|
||||
WMA_LOGD("Radio Info: radio_id: %u on_time: %u tx_time: %u rx_time: %u on_time_scan: %u",
|
||||
radio_stats->radio_id, radio_stats->on_time,
|
||||
radio_stats->tx_time, radio_stats->rx_time,
|
||||
radio_stats->on_time_scan);
|
||||
WMA_LOGD("on_time_nbd: %u on_time_gscan: %u on_time_roam_scan: %u",
|
||||
radio_stats->on_time_nbd,
|
||||
radio_stats->on_time_gscan, radio_stats->on_time_roam_scan);
|
||||
WMA_LOGD("on_time_pno_scan: %u on_time_hs20: %u num_channels: %u",
|
||||
radio_stats->on_time_pno_scan, radio_stats->on_time_hs20,
|
||||
radio_stats->num_channels);
|
||||
|
||||
link_stats_results->paramId = WMI_LINK_STATS_RADIO;
|
||||
link_stats_results->rspId = fixed_param->request_id;
|
||||
@@ -1528,11 +1536,11 @@ static int wma_unified_link_radio_stats_event_handler(void *handle,
|
||||
next_chan_offset = WMI_TLV_HDR_SIZE;
|
||||
WMA_LOGD("Channel Stats Info");
|
||||
for (count = 0; count < radio_stats->num_channels; count++) {
|
||||
WMA_LOGD("channel_width %u center_freq %u center_freq0 %u "
|
||||
"center_freq1 %u radio_awake_time %u cca_busy_time %u",
|
||||
WMA_LOGD("channel_width %u center_freq %u center_freq0 %u",
|
||||
channel_stats->channel_width,
|
||||
channel_stats->center_freq,
|
||||
channel_stats->center_freq0,
|
||||
channel_stats->center_freq0);
|
||||
WMA_LOGD("center_freq1 %u radio_awake_time %u cca_busy_time %u",
|
||||
channel_stats->center_freq1,
|
||||
channel_stats->radio_awake_time,
|
||||
channel_stats->cca_busy_time);
|
||||
@@ -1549,9 +1557,8 @@ static int wma_unified_link_radio_stats_event_handler(void *handle,
|
||||
if (link_stats_results->moreResultToFollow) {
|
||||
/* More results coming, don't post yet */
|
||||
return 0;
|
||||
} else {
|
||||
link_stats_results->nr_received++;
|
||||
}
|
||||
link_stats_results->nr_received++;
|
||||
|
||||
if (link_stats_results->num_radio != link_stats_results->nr_received) {
|
||||
/* Not received all radio stats yet, don't post yet */
|
||||
@@ -1764,7 +1771,6 @@ void wma_register_ll_stats_event_handler(tp_wma_handle wma_handle)
|
||||
wma_ll_stats_evt_handler,
|
||||
WMA_RX_SERIALIZER_CTX);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -1775,8 +1781,8 @@ void wma_register_ll_stats_event_handler(tp_wma_handle wma_handle)
|
||||
*
|
||||
* Return: QDF_STATUS_SUCCESS for success or error code
|
||||
*/
|
||||
QDF_STATUS wma_process_ll_stats_clear_req
|
||||
(tp_wma_handle wma, const tpSirLLStatsClearReq clearReq)
|
||||
QDF_STATUS wma_process_ll_stats_clear_req(tp_wma_handle wma,
|
||||
const tpSirLLStatsClearReq clearReq)
|
||||
{
|
||||
struct ll_stats_clear_params cmd = {0};
|
||||
int ret;
|
||||
@@ -1807,8 +1813,8 @@ QDF_STATUS wma_process_ll_stats_clear_req
|
||||
*
|
||||
* Return: QDF_STATUS_SUCCESS for success or error code
|
||||
*/
|
||||
QDF_STATUS wma_process_ll_stats_set_req
|
||||
(tp_wma_handle wma, const tpSirLLStatsSetReq setReq)
|
||||
QDF_STATUS wma_process_ll_stats_set_req(tp_wma_handle wma,
|
||||
const tpSirLLStatsSetReq setReq)
|
||||
{
|
||||
struct ll_stats_set_params cmd = {0};
|
||||
int ret;
|
||||
@@ -1839,8 +1845,8 @@ QDF_STATUS wma_process_ll_stats_set_req
|
||||
*
|
||||
* Return: QDF_STATUS_SUCCESS for success or error code
|
||||
*/
|
||||
QDF_STATUS wma_process_ll_stats_get_req
|
||||
(tp_wma_handle wma, const tpSirLLStatsGetReq getReq)
|
||||
QDF_STATUS wma_process_ll_stats_get_req(tp_wma_handle wma,
|
||||
const tpSirLLStatsGetReq getReq)
|
||||
{
|
||||
struct ll_stats_get_params cmd = {0};
|
||||
int ret;
|
||||
@@ -2322,7 +2328,7 @@ static void wma_update_vdev_stats(tp_wma_handle wma,
|
||||
}
|
||||
|
||||
/*
|
||||
* Get the absolute rssi value from the current rssi value
|
||||
* Get the absolute rssi value from current rssi value
|
||||
* the sinr value is hardcoded into 0 in the core stack
|
||||
*/
|
||||
rssi = rssi + WMA_TGT_NOISE_FLOOR_DBM;
|
||||
@@ -2413,8 +2419,9 @@ static void wma_update_peer_stats(tp_wma_handle wma,
|
||||
if (temp_mask & (1 << eCsrGlobalClassAStats)) {
|
||||
classa_stats = (tCsrGlobalClassAStatsInfo *) stats_buf;
|
||||
WMA_LOGD("peer tx rate:%d", peer_stats->peer_tx_rate);
|
||||
/*The linkspeed returned by fw is in kbps so convert
|
||||
*it in to units of 500kbps which is expected by UMAC*/
|
||||
/* The linkspeed returned by fw is in kbps so convert
|
||||
* it in to units of 500kbps which is expected by UMAC
|
||||
*/
|
||||
if (peer_stats->peer_tx_rate) {
|
||||
classa_stats->tx_rate =
|
||||
peer_stats->peer_tx_rate / 500;
|
||||
@@ -2423,14 +2430,16 @@ static void wma_update_peer_stats(tp_wma_handle wma,
|
||||
classa_stats->tx_rate_flags = node->rate_flags;
|
||||
if (!(node->rate_flags & eHAL_TX_RATE_LEGACY)) {
|
||||
classa_stats->mcs_index =
|
||||
wma_get_mcs_idx((peer_stats->peer_tx_rate /
|
||||
100), node->rate_flags,
|
||||
node->nss, &mcsRateFlags);
|
||||
wma_get_mcs_idx(
|
||||
(peer_stats->peer_tx_rate /
|
||||
100), node->rate_flags,
|
||||
node->nss, &mcsRateFlags);
|
||||
classa_stats->nss = node->nss;
|
||||
classa_stats->mcs_rate_flags = mcsRateFlags;
|
||||
}
|
||||
/* FW returns tx power in intervals of 0.5 dBm
|
||||
Convert it back to intervals of 1 dBm */
|
||||
* Convert it back to intervals of 1 dBm
|
||||
*/
|
||||
classa_stats->max_pwr =
|
||||
roundup(classa_stats->max_pwr, 2) >> 1;
|
||||
}
|
||||
@@ -2583,7 +2592,8 @@ int wma_link_status_event_handler(void *handle, uint8_t *cmd_param_info,
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
event = (wmi_vdev_rate_stats_event_fixed_param *) param_buf->fixed_param;
|
||||
event = (wmi_vdev_rate_stats_event_fixed_param *)
|
||||
param_buf->fixed_param;
|
||||
ht_info = (wmi_vdev_rate_ht_info *) param_buf->ht_info;
|
||||
|
||||
WMA_LOGD("num_vdev_stats: %d", event->num_vdev_stats);
|
||||
@@ -2609,8 +2619,9 @@ int wma_link_status_event_handler(void *handle, uint8_t *cmd_param_info,
|
||||
eHAL_TX_RATE_VHT80))
|
||||
link_status |= LINK_SUPPORT_VHT;
|
||||
|
||||
wma_post_link_status(intr[ht_info->vdevid].plink_status_req,
|
||||
link_status);
|
||||
wma_post_link_status(
|
||||
intr[ht_info->vdevid].plink_status_req,
|
||||
link_status);
|
||||
intr[ht_info->vdevid].plink_status_req = NULL;
|
||||
link_status = LINK_STATUS_LEGACY;
|
||||
}
|
||||
@@ -2757,9 +2768,8 @@ int wma_stats_event_handler(void *handle, uint8_t *cmd_param_info,
|
||||
|
||||
for (i = 0; i < wma->max_bssid; i++) {
|
||||
node = &wma->interfaces[i];
|
||||
if (node->fw_stats_set & FW_PEER_STATS_SET) {
|
||||
if (node->fw_stats_set & FW_PEER_STATS_SET)
|
||||
wma_post_stats(wma, node);
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
@@ -2811,17 +2821,16 @@ int wma_link_speed_event_handler(void *handle, uint8_t *cmd_param_info,
|
||||
wmi_peer_estimated_linkspeed_event_fixed_param *event;
|
||||
QDF_STATUS qdf_status;
|
||||
|
||||
param_buf =
|
||||
(WMI_PEER_ESTIMATED_LINKSPEED_EVENTID_param_tlvs *) cmd_param_info;
|
||||
param_buf = (WMI_PEER_ESTIMATED_LINKSPEED_EVENTID_param_tlvs *)
|
||||
cmd_param_info;
|
||||
if (!param_buf) {
|
||||
WMA_LOGE("%s: Invalid linkspeed event", __func__);
|
||||
return -EINVAL;
|
||||
}
|
||||
event = param_buf->fixed_param;
|
||||
qdf_status = wma_send_link_speed(event->est_linkspeed_kbps);
|
||||
if (!QDF_IS_STATUS_SUCCESS(qdf_status)) {
|
||||
if (!QDF_IS_STATUS_SUCCESS(qdf_status))
|
||||
return -EINVAL;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -2876,6 +2885,7 @@ int wma_unified_debug_print_event_handler(void *handle, uint8_t *datap,
|
||||
#ifdef BIG_ENDIAN_HOST
|
||||
{
|
||||
char dbgbuf[500] = { 0 };
|
||||
|
||||
memcpy(dbgbuf, data, datalen);
|
||||
SWAPME(dbgbuf, datalen);
|
||||
WMA_LOGD("FIRMWARE:%s", dbgbuf);
|
||||
@@ -2896,6 +2906,7 @@ int wma_unified_debug_print_event_handler(void *handle, uint8_t *datap,
|
||||
bool wma_check_scan_in_progress(WMA_HANDLE handle)
|
||||
{
|
||||
tp_wma_handle wma = handle;
|
||||
|
||||
return qdf_atomic_read(&wma->num_pending_scans) > 0;
|
||||
}
|
||||
|
||||
@@ -3231,8 +3242,7 @@ void wma_get_stats_req(WMA_HANDLE handle,
|
||||
if (pGetPEStatsRspParams->staId == get_stats_param->staId &&
|
||||
pGetPEStatsRspParams->statsMask ==
|
||||
get_stats_param->statsMask) {
|
||||
WMA_LOGD("Stats for staId %d with stats mask %d "
|
||||
"is pending.... ignore new request",
|
||||
WMA_LOGD("Stats for staId %d with stats mask %d is pending.. ignore new request",
|
||||
get_stats_param->staId,
|
||||
get_stats_param->statsMask);
|
||||
goto end;
|
||||
@@ -3279,7 +3289,6 @@ failed:
|
||||
end:
|
||||
qdf_mem_free(get_stats_param);
|
||||
WMA_LOGD("%s: Exit", __func__);
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -3477,9 +3486,8 @@ static void wma_post_ftm_response(tp_wma_handle wma_handle)
|
||||
|
||||
ret = wma_utf_rsp(wma_handle, &payload, &data_len);
|
||||
|
||||
if (ret) {
|
||||
if (ret)
|
||||
return;
|
||||
}
|
||||
|
||||
sys_build_message_header(SYS_MSG_ID_FTM_RSP, &msg);
|
||||
msg.bodyptr = payload;
|
||||
@@ -3533,8 +3541,7 @@ wma_process_utf_event(WMA_HANDLE handle, uint8_t *datap, uint32_t dataplen)
|
||||
wma_handle->utf_event_info.offset = 0;
|
||||
} else {
|
||||
if (wma_handle->utf_event_info.expectedSeq != currentSeq)
|
||||
WMA_LOGE("Mismatch in expecting seq expected"
|
||||
" Seq %d got seq %d",
|
||||
WMA_LOGE("Mismatch in expecting seq expected Seq %d got seq %d",
|
||||
wma_handle->utf_event_info.expectedSeq,
|
||||
currentSeq);
|
||||
}
|
||||
@@ -3548,8 +3555,7 @@ wma_process_utf_event(WMA_HANDLE handle, uint8_t *datap, uint32_t dataplen)
|
||||
|
||||
if (wma_handle->utf_event_info.expectedSeq == totalNumOfSegments) {
|
||||
if (wma_handle->utf_event_info.offset != segHdrInfo.len)
|
||||
WMA_LOGE("All segs received total len mismatch.."
|
||||
" len %zu total len %d",
|
||||
WMA_LOGE("All segs received total len mismatch.. len %zu total len %d",
|
||||
wma_handle->utf_event_info.offset,
|
||||
segHdrInfo.len);
|
||||
|
||||
@@ -3675,8 +3681,7 @@ QDF_STATUS wma_get_wcnss_software_version(void *p_cds_gctx,
|
||||
uint8_t *pVersion,
|
||||
uint32_t versionBufferSize)
|
||||
{
|
||||
tp_wma_handle wma_handle;
|
||||
wma_handle = cds_get_context(QDF_MODULE_ID_WMA);
|
||||
tp_wma_handle wma_handle = cds_get_context(QDF_MODULE_ID_WMA);
|
||||
|
||||
if (NULL == wma_handle) {
|
||||
WMA_LOGE("%s: Failed to get wma", __func__);
|
||||
@@ -3815,6 +3820,7 @@ wma_config_debug_module_cmd(wmi_unified_t wmi_handle, A_UINT32 param,
|
||||
A_UINT32 bitmap_len)
|
||||
{
|
||||
struct dbglog_params dbg_param;
|
||||
|
||||
dbg_param.param = param;
|
||||
dbg_param.val = val;
|
||||
dbg_param.module_id_bitmap = module_id_bitmap;
|
||||
@@ -3868,7 +3874,6 @@ bool wma_is_vdev_up(uint8_t vdev_id)
|
||||
wlan_vdev_obj_unlock(vdev);
|
||||
wlan_objmgr_vdev_release_ref(vdev, WLAN_LEGACY_WMA_ID);
|
||||
}
|
||||
|
||||
return (state == WLAN_VDEV_S_RUN) ? true : false;
|
||||
}
|
||||
|
||||
|
Referência em uma nova issue
Block a user