qcacld-3.0: Converge on struct mac_ts_info

The driver currently defines two different data structures to hold
a TS Info field:
- tSirMacTSInfo
- struct mac_ts_info

In this case having two different structures to provide the same
functionality is pointless. Furthermore, due to the way in which these
structures are used, there is an implicit requirement that they be
exactly identical. This approach is very fragile. To align with the
converged software architecture and to improve code maintainability
remove the legacy typedef and exclusively use the unified WMI
structure.

Change-Id: I95bcb4364ee7e3108137c8ceeedf05c7a53bc393
CRs-Fixed: 2371910
此提交包含在:
Jeff Johnson
2018-12-22 13:33:54 -08:00
提交者 nshrivas
父節點 92bf60e67a
當前提交 312348f6ff
共有 15 個檔案被更改,包括 48 行新增85 行删除

查看文件

@@ -1641,7 +1641,7 @@ typedef struct sSirAddtsRspInfo {
} tSirAddtsRspInfo, *tpSirAddtsRspInfo;
typedef struct sSirDeltsReqInfo {
tSirMacTSInfo tsinfo;
struct mac_ts_info tsinfo;
tSirMacTspecIE tspec;
uint8_t wmeTspecPresent:1;
uint8_t wsmTspecPresent:1;

查看文件

@@ -1211,55 +1211,10 @@ typedef struct sSirMacQoSParams {
#define SIR_MAC_ACCESSPOLICY_HCCA 2
#define SIR_MAC_ACCESSPOLICY_BOTH 3
typedef struct sSirMacTSInfoTfc {
#ifndef ANI_LITTLE_BIT_ENDIAN
uint8_t burstSizeDefn:1;
uint8_t reserved:7;
#else
uint8_t reserved:7;
uint8_t burstSizeDefn:1;
#endif
#ifndef ANI_LITTLE_BIT_ENDIAN
uint16_t ackPolicy:2;
uint16_t userPrio:3;
uint16_t psb:1;
uint16_t aggregation:1;
uint16_t accessPolicy:2;
uint16_t direction:2;
uint16_t tsid:4;
uint16_t trafficType:1;
#else
uint16_t trafficType:1;
uint16_t tsid:4;
uint16_t direction:2;
uint16_t accessPolicy:2;
uint16_t aggregation:1;
uint16_t psb:1;
uint16_t userPrio:3;
uint16_t ackPolicy:2;
#endif
} qdf_packed tSirMacTSInfoTfc;
typedef struct sSirMacTSInfoSch {
#ifndef ANI_LITTLE_BIT_ENDIAN
uint8_t rsvd:7;
uint8_t schedule:1;
#else
uint8_t schedule:1;
uint8_t rsvd:7;
#endif
} qdf_packed tSirMacTSInfoSch;
typedef struct sSirMacTSInfo {
tSirMacTSInfoTfc traffic;
tSirMacTSInfoSch schedule;
} qdf_packed tSirMacTSInfo;
typedef struct sSirMacTspecIE {
uint8_t type;
uint8_t length;
tSirMacTSInfo tsinfo;
struct mac_ts_info tsinfo;
uint16_t nomMsduSz;
uint16_t maxMsduSz;
uint32_t minSvcInterval;

查看文件

@@ -875,7 +875,8 @@ QDF_STATUS populate_dot11f_tpc_report(struct mac_context *mac,
struct pe_session *pe_session);
/* / Populate a tDot11FfTSInfo */
void populate_dot11f_ts_info(tSirMacTSInfo *pInfo, tDot11fFfTSInfo *pDot11f);
void populate_dot11f_ts_info(struct mac_ts_info *pInfo,
tDot11fFfTSInfo *pDot11f);
void populate_dot11f_wmm(struct mac_context *mac,
tDot11fIEWMMInfoAp *pInfo,

查看文件

@@ -67,7 +67,7 @@ lim_admit_control_delete_sta(struct mac_context *mac, uint16_t assocId);
extern QDF_STATUS
lim_admit_control_delete_ts(struct mac_context *mac,
uint16_t assocId,
tSirMacTSInfo *tsinfo,
struct mac_ts_info *tsinfo,
uint8_t *tsStatus, uint8_t *tspecIdx);
QDF_STATUS lim_admit_control_init(struct mac_context *mac);

查看文件

@@ -471,7 +471,7 @@ lim_tspec_find_by_assoc_id(struct mac_context *mac,
\brief finding a TSPEC entry with assocId, tsinfo.direction and tsinfo.tsid
\param uint16_t assocId
\param struct mac_context * mac
\param tSirMacTSInfo *pTsInfo
\param struct mac_ts_info *pTsInfo
\param tpLimTspecInfo pTspecList
\param tpLimTspecInfo *ppInfo
\return QDF_STATUS - status of the comparison
@@ -480,7 +480,7 @@ lim_tspec_find_by_assoc_id(struct mac_context *mac,
static QDF_STATUS
lim_find_tspec(struct mac_context *mac,
uint16_t assocId,
tSirMacTSInfo *pTsInfo,
struct mac_ts_info *pTsInfo,
tpLimTspecInfo pTspecList, tpLimTspecInfo *ppInfo)
{
int ctspec;
@@ -746,7 +746,7 @@ QDF_STATUS lim_admit_control_add_ts(struct mac_context *mac, uint8_t *pAddr,
\brief Delete the specified Tspec for the specified STA
\param struct mac_context *mac
\param uint16_t assocId
\param tSirMacTSInfo *pTsInfo
\param struct mac_ts_info *pTsInfo
\param uint8_t *pTsStatus
\param uint8_t *ptspecIdx
\return QDF_STATUS - status
@@ -755,7 +755,7 @@ QDF_STATUS lim_admit_control_add_ts(struct mac_context *mac, uint8_t *pAddr,
QDF_STATUS
lim_admit_control_delete_ts(struct mac_context *mac,
uint16_t assocId,
tSirMacTSInfo *pTsInfo,
struct mac_ts_info *pTsInfo,
uint8_t *pTsStatus, uint8_t *ptspecIdx)
{
tpLimTspecInfo pTspecInfo = NULL;

查看文件

@@ -903,7 +903,7 @@ static void __lim_process_del_ts_req(struct mac_context *mac_ctx,
uint16_t aid;
uint8_t *body_ptr;
uint8_t ts_status;
tSirMacTSInfo *tsinfo;
struct mac_ts_info *tsinfo;
uint8_t tspec_idx;
uint8_t ac;
tpDphHashNode sta_ds_ptr = NULL;

查看文件

@@ -3512,7 +3512,7 @@ static void __lim_process_sme_delts_req(struct mac_context *mac, uint32_t *pMsgB
{
tSirMacAddr peerMacAddr;
uint8_t ac;
tSirMacTSInfo *pTsinfo;
struct mac_ts_info *pTsinfo;
tpSirDeltsReq pDeltsReq = (tpSirDeltsReq) pMsgBuf;
tpDphHashNode pStaDs = NULL;
struct pe_session *pe_session;

查看文件

@@ -1387,8 +1387,9 @@ void
lim_send_delts_req_action_frame(struct mac_context *mac,
tSirMacAddr peer,
uint8_t wmmTspecPresent,
tSirMacTSInfo *pTsinfo,
tSirMacTspecIE *pTspecIe, struct pe_session *pe_session)
struct mac_ts_info *pTsinfo,
tSirMacTspecIE *pTspecIe,
struct pe_session *pe_session)
{
uint8_t *pFrame;
tpSirMacMgmtHdr pMacHdr;
@@ -1400,9 +1401,8 @@ lim_send_delts_req_action_frame(struct mac_context *mac,
uint8_t txFlag = 0;
uint8_t smeSessionId = 0;
if (NULL == pe_session) {
if (!pe_session)
return;
}
smeSessionId = pe_session->smeSessionId;
@@ -1415,7 +1415,8 @@ lim_send_delts_req_action_frame(struct mac_context *mac,
nStatus = dot11f_get_packed_del_ts_size(mac, &DelTS, &nPayload);
if (DOT11F_FAILED(nStatus)) {
pe_err("Failed to calculate the packed size for a Del TS (0x%08x)", nStatus);
pe_err("Failed to calculate the packed size for a Del TS (0x%08x)",
nStatus);
/* We'll fall back on the worst case scenario: */
nPayload = sizeof(tDot11fDelTS);
} else if (DOT11F_WARNED(nStatus)) {
@@ -1433,7 +1434,8 @@ lim_send_delts_req_action_frame(struct mac_context *mac,
nStatus =
dot11f_get_packed_wmm_del_ts_size(mac, &WMMDelTS, &nPayload);
if (DOT11F_FAILED(nStatus)) {
pe_err("Failed to calculate the packed size for a WMM Del TS (0x%08x)", nStatus);
pe_err("Failed to calculate the packed size for a WMM Del TS (0x%08x)",
nStatus);
/* We'll fall back on the worst case scenario: */
nPayload = sizeof(tDot11fDelTS);
} else if (DOT11F_WARNED(nStatus)) {

查看文件

@@ -606,7 +606,7 @@ static inline void lim_send_obss_color_collision_cfg(struct mac_context *mac_ctx
#endif
void lim_send_delts_req_action_frame(struct mac_context *mac, tSirMacAddr peer,
uint8_t wmmTspecPresent,
tSirMacTSInfo * pTsinfo,
struct mac_ts_info * pTsinfo,
tSirMacTspecIE * pTspecIe,
struct pe_session *pe_session);
void lim_send_addts_req_action_frame(struct mac_context *mac, tSirMacAddr peerMacAddr,

查看文件

@@ -4225,6 +4225,7 @@ void lim_update_sta_run_time_ht_info(struct mac_context *mac,
* @mac_ctx: pointer to Global Mac structure
* @delts_req: pointer to delete traffic stream structure
* @peer_mac_addr: variable for peer mac address
* @session: pe session entry
*
* Function validates DelTs req originated by SME or by HAL and also
* sends halMsg_DelTs to HAL
@@ -4234,11 +4235,12 @@ void lim_update_sta_run_time_ht_info(struct mac_context *mac,
QDF_STATUS
lim_validate_delts_req(struct mac_context *mac_ctx, tpSirDeltsReq delts_req,
tSirMacAddr peer_mac_addr, struct pe_session *psession_entry)
tSirMacAddr peer_mac_addr,
struct pe_session *session)
{
tpDphHashNode sta;
uint8_t ts_status;
tSirMacTSInfo *tsinfo;
struct mac_ts_info *tsinfo;
uint32_t i;
uint8_t tspec_idx;
@@ -4255,15 +4257,15 @@ lim_validate_delts_req(struct mac_context *mac_ctx, tpSirDeltsReq delts_req,
return QDF_STATUS_E_FAILURE;
}
if (LIM_IS_STA_ROLE(psession_entry)) {
if (LIM_IS_STA_ROLE(session)) {
uint32_t val;
/* station always talks to the AP */
sta = dph_get_hash_entry(mac_ctx, DPH_STA_HASH_INDEX_PEER,
&psession_entry->dph.dphHashTable);
&session->dph.dphHashTable);
val = sizeof(tSirMacAddr);
sir_copy_mac_addr(peer_mac_addr, psession_entry->bssId);
sir_copy_mac_addr(peer_mac_addr, session->bssId);
} else {
uint16_t associd;
@@ -4272,12 +4274,12 @@ lim_validate_delts_req(struct mac_context *mac_ctx, tpSirDeltsReq delts_req,
associd = delts_req->aid;
if (associd != 0)
sta = dph_get_hash_entry(mac_ctx, associd,
&psession_entry->dph.dphHashTable);
&session->dph.dphHashTable);
else
sta = dph_lookup_hash_entry(mac_ctx,
delts_req->macaddr.bytes,
&associd,
&psession_entry->dph.
&session->dph.
dphHashTable);
if (sta != NULL)
@@ -4339,8 +4341,8 @@ lim_validate_delts_req(struct mac_context *mac_ctx, tpSirDeltsReq delts_req,
if (QDF_STATUS_SUCCESS !=
lim_send_hal_msg_del_ts(mac_ctx, sta->staIndex,
tspec_idx, delts_req->req,
psession_entry->peSessionId,
psession_entry->bssId)) {
session->peSessionId,
session->bssId)) {
pe_warn("DelTs with UP: %d failed in lim_send_hal_msg_del_ts - ignoring request",
tsinfo->traffic.userPrio);
return QDF_STATUS_E_FAILURE;
@@ -4705,7 +4707,8 @@ uint8_t lim_get_channel_from_beacon(struct mac_context *mac, tpSchBeaconStruct p
void lim_set_tspec_uapsd_mask_per_session(struct mac_context *mac,
struct pe_session *pe_session,
tSirMacTSInfo *pTsInfo, uint32_t action)
struct mac_ts_info *pTsInfo,
uint32_t action)
{
uint8_t userPrio = (uint8_t) pTsInfo->traffic.userPrio;
uint16_t direction = pTsInfo->traffic.direction;

查看文件

@@ -497,7 +497,7 @@ tSirNwType lim_get_nw_type(struct mac_context *mac, uint8_t channelNum,
void lim_set_tspec_uapsd_mask_per_session(struct mac_context *mac,
struct pe_session *pe_session,
tSirMacTSInfo *pTsInfo, uint32_t action);
struct mac_ts_info *pTsInfo, uint32_t action);
void lim_handle_heart_beat_timeout_for_session(struct mac_context *mac,
struct pe_session *pe_session);

查看文件

@@ -1655,8 +1655,6 @@ populate_dot11f_tpc_report(struct mac_context *mac,
nSirStatus);
return QDF_STATUS_E_FAILURE;
}
/* FramesToDo: This function was "misplaced" in the move to Gen4_TVM... */
/* txPower = halGetRateToPwrValue( mac, staid, mac->lim.gLimCurrentChannelId, isBeacon ); */
tx_power = cfg_get_regulatory_max_transmit_power(mac,
pe_session->currentOperChannel);
pDot11f->tx_power = tx_power;
@@ -1666,7 +1664,8 @@ populate_dot11f_tpc_report(struct mac_context *mac,
return QDF_STATUS_SUCCESS;
} /* End populate_dot11f_tpc_report. */
void populate_dot11f_ts_info(tSirMacTSInfo *pInfo, tDot11fFfTSInfo *pDot11f)
void populate_dot11f_ts_info(struct mac_ts_info *pInfo,
tDot11fFfTSInfo *pDot11f)
{
pDot11f->traffic_type = pInfo->traffic.trafficType;
pDot11f->tsid = pInfo->traffic.tsid;

查看文件

@@ -34,15 +34,17 @@ QDF_STATUS sme_ps_uapsd_enable(mac_handle_t mac_handle, uint32_t session_id);
QDF_STATUS sme_ps_uapsd_disable(mac_handle_t mac_handle, uint32_t session_id);
/* Condition check if driver is ready to enter in PS */
QDF_STATUS sme_enable_sta_ps_check(struct mac_context *mac_ctx, uint32_t session_id);
QDF_STATUS sme_enable_sta_ps_check(struct mac_context *mac_ctx,
uint32_t session_id);
QDF_STATUS sme_ps_process_command(struct mac_context *mac_ctx,
uint32_t session_id,
enum sme_ps_cmd command);
uint32_t session_id,
enum sme_ps_cmd command);
void sme_set_tspec_uapsd_mask_per_session(struct mac_context *mac_ctx,
tSirMacTSInfo *ts_info,
uint8_t session_id);
struct mac_ts_info *ts_info,
uint8_t session_id);
/* Full Power Req Callback */
typedef void (*uapsd_start_indication_cb)(void *callback_context,
uint32_t session_id, QDF_STATUS status);

查看文件

@@ -507,8 +507,8 @@ QDF_STATUS sme_ps_uapsd_disable(mac_handle_t mac_handle, uint32_t session_id)
* Return: QDF_STATUS
*/
void sme_set_tspec_uapsd_mask_per_session(struct mac_context *mac_ctx,
tSirMacTSInfo *ts_info,
uint8_t session_id)
struct mac_ts_info *ts_info,
uint8_t session_id)
{
uint8_t user_prio = (uint8_t) ts_info->traffic.userPrio;
uint16_t direction = ts_info->traffic.direction;

查看文件

@@ -4145,7 +4145,8 @@ static QDF_STATUS sme_qos_process_del_ts_rsp(struct mac_context *mac, void *pMsg
*
* Return QDF_STATUS
*/
static QDF_STATUS sme_qos_process_del_ts_ind(struct mac_context *mac, void *pMsgBuf)
static QDF_STATUS sme_qos_process_del_ts_ind(struct mac_context *mac,
void *pMsgBuf)
{
tpSirDeltsRsp pdeltsind = (tpSirDeltsRsp) pMsgBuf;
struct sme_qos_sessioninfo *pSession;
@@ -4153,7 +4154,7 @@ static QDF_STATUS sme_qos_process_del_ts_ind(struct mac_context *mac, void *pMsg
uint8_t sessionId = pdeltsind->sessionId;
sme_QosEdcaAcType ac;
struct sme_qos_searchinfo search_key;
tSirMacTSInfo *tsinfo;
struct mac_ts_info *tsinfo;
enum sme_qos_wmmuptype up =
(enum sme_qos_wmmuptype)
pdeltsind->rsp.tspec.tsinfo.traffic.userPrio;