diff options
| -rw-r--r-- | CORE/MAC/inc/sirApi.h | 2 | ||||
| -rw-r--r-- | CORE/MAC/src/pe/include/limSession.h | 2 | ||||
| -rw-r--r-- | CORE/MAC/src/pe/lim/limSerDesUtils.c | 6 | ||||
| -rw-r--r-- | CORE/MAC/src/pe/lim/limTypes.h | 2 | ||||
| -rw-r--r-- | CORE/SAP/inc/sapApi.h | 2 | ||||
| -rw-r--r-- | CORE/SAP/src/sapInternal.h | 2 | ||||
| -rw-r--r-- | CORE/SERVICES/WMA/wma.c | 44 | ||||
| -rw-r--r-- | CORE/SERVICES/WMA/wma.h | 29 | ||||
| -rw-r--r-- | CORE/SME/inc/csrApi.h | 2 | ||||
| -rw-r--r-- | CORE/SME/inc/csrInternal.h | 3 | ||||
| -rw-r--r-- | CORE/SME/src/csr/csrApiRoam.c | 4 | ||||
| -rw-r--r-- | CORE/WDA/inc/legacy/halMsgApi.h | 2 |
12 files changed, 84 insertions, 16 deletions
diff --git a/CORE/MAC/inc/sirApi.h b/CORE/MAC/inc/sirApi.h index c4b2bfcd456d..311f5d805810 100644 --- a/CORE/MAC/inc/sirApi.h +++ b/CORE/MAC/inc/sirApi.h @@ -694,7 +694,7 @@ typedef struct sSirSmeStartBssReq tANI_BOOLEAN obssEnabled; uint8_t sap_dot11mc; bool vendor_vht_for_24ghz_sap; - uint8_t beacon_tx_rate; + uint16_t beacon_tx_rate; } tSirSmeStartBssReq, *tpSirSmeStartBssReq; #define GET_IE_LEN_IN_BSS(lenInBss) ( lenInBss + sizeof(lenInBss) - \ diff --git a/CORE/MAC/src/pe/include/limSession.h b/CORE/MAC/src/pe/include/limSession.h index 73b5eebbf7bf..b59f3dc5dd9e 100644 --- a/CORE/MAC/src/pe/include/limSession.h +++ b/CORE/MAC/src/pe/include/limSession.h @@ -505,7 +505,7 @@ typedef struct sPESession // Added to Support BT-AMP uint8_t vendor_specific_vht_ie_type; uint8_t vendor_specific_vht_ie_sub_type; bool vendor_vht_for_24ghz_sap; - uint8_t beacon_tx_rate; + uint16_t beacon_tx_rate; uint8_t *vendor_ie; uint8_t access_policy; diff --git a/CORE/MAC/src/pe/lim/limSerDesUtils.c b/CORE/MAC/src/pe/lim/limSerDesUtils.c index 7658b03e853a..c911c50d0f3f 100644 --- a/CORE/MAC/src/pe/lim/limSerDesUtils.c +++ b/CORE/MAC/src/pe/lim/limSerDesUtils.c @@ -699,8 +699,10 @@ limStartBssReqSerDes(tpAniSirGlobal pMac, tpSirSmeStartBssReq pStartBssReq, tANI len -= sizeof(pStartBssReq->vendor_vht_for_24ghz_sap); pBuf += sizeof(pStartBssReq->vendor_vht_for_24ghz_sap); - pStartBssReq->beacon_tx_rate = *pBuf++; - len--; + vos_mem_copy(&(pStartBssReq->beacon_tx_rate), pBuf, + sizeof(pStartBssReq->beacon_tx_rate)); + len -= sizeof(pStartBssReq->beacon_tx_rate); + pBuf += sizeof(pStartBssReq->beacon_tx_rate); if (len) { diff --git a/CORE/MAC/src/pe/lim/limTypes.h b/CORE/MAC/src/pe/lim/limTypes.h index fd2d640a95e9..42bc2ffbac2c 100644 --- a/CORE/MAC/src/pe/lim/limTypes.h +++ b/CORE/MAC/src/pe/lim/limTypes.h @@ -193,7 +193,7 @@ typedef struct sLimMlmStartReq tANI_U8 ssidHidden; tANI_U8 wps_state; tANI_U8 obssProtEnabled; - uint8_t beacon_tx_rate; + uint16_t beacon_tx_rate; } tLimMlmStartReq, *tpLimMlmStartReq; typedef struct sLimMlmStartCnf diff --git a/CORE/SAP/inc/sapApi.h b/CORE/SAP/inc/sapApi.h index eec577d5c3c0..c64cb1bf7b79 100644 --- a/CORE/SAP/inc/sapApi.h +++ b/CORE/SAP/inc/sapApi.h @@ -544,7 +544,7 @@ typedef struct sap_Config { uint8_t sap_dot11mc; /* Specify if 11MC is enabled or disabled*/ enum sap_acs_dfs_mode acs_dfs_mode; - uint8_t beacon_tx_rate; + uint16_t beacon_tx_rate; uint8_t *vendor_ie; enum vendor_ie_access_policy vendor_ie_access_policy; uint16_t sta_inactivity_timeout; diff --git a/CORE/SAP/src/sapInternal.h b/CORE/SAP/src/sapInternal.h index 7a7d7aedbd2e..b90046f583ef 100644 --- a/CORE/SAP/src/sapInternal.h +++ b/CORE/SAP/src/sapInternal.h @@ -296,7 +296,7 @@ typedef struct sSapContext { #endif /* FEATURE_AP_MCC_CH_AVOIDANCE */ enum sap_acs_dfs_mode dfs_mode; - uint8_t beacon_tx_rate; + uint16_t beacon_tx_rate; tSirMacRateSet supp_rate_set; tSirMacRateSet extended_rate_set; diff --git a/CORE/SERVICES/WMA/wma.c b/CORE/SERVICES/WMA/wma.c index b0bde956b718..e079d3d288f6 100644 --- a/CORE/SERVICES/WMA/wma.c +++ b/CORE/SERVICES/WMA/wma.c @@ -12340,6 +12340,40 @@ VOS_STATUS wma_switch_channel(tp_wma_handle wma, struct wma_vdev_start_req *req) return VOS_STATUS_SUCCESS; } + +uint32_t wma_get_bcn_rate_code(uint16_t rate) +{ + /* rate in multiples of 100 Kbps */ + switch (rate) { + case WMA_BEACON_TX_RATE_1_M: + return WMA_BEACON_TX_RATE_HW_CODE_1_M; + case WMA_BEACON_TX_RATE_2_M: + return WMA_BEACON_TX_RATE_HW_CODE_2_M; + case WMA_BEACON_TX_RATE_5_5_M: + return WMA_BEACON_TX_RATE_HW_CODE_5_5_M; + case WMA_BEACON_TX_RATE_11_M: + return WMA_BEACON_TX_RATE_HW_CODE_11M; + case WMA_BEACON_TX_RATE_6_M: + return WMA_BEACON_TX_RATE_HW_CODE_6_M; + case WMA_BEACON_TX_RATE_9_M: + return WMA_BEACON_TX_RATE_HW_CODE_9_M; + case WMA_BEACON_TX_RATE_12_M: + return WMA_BEACON_TX_RATE_HW_CODE_12_M; + case WMA_BEACON_TX_RATE_18_M: + return WMA_BEACON_TX_RATE_HW_CODE_18_M; + case WMA_BEACON_TX_RATE_24_M: + return WMA_BEACON_TX_RATE_HW_CODE_24_M; + case WMA_BEACON_TX_RATE_36_M: + return WMA_BEACON_TX_RATE_HW_CODE_36_M; + case WMA_BEACON_TX_RATE_48_M: + return WMA_BEACON_TX_RATE_HW_CODE_48_M; + case WMA_BEACON_TX_RATE_54_M: + return WMA_BEACON_TX_RATE_HW_CODE_54_M; + default: + return WMA_BEACON_TX_RATE_HW_CODE_1_M; + } +} + VOS_STATUS wma_vdev_start(tp_wma_handle wma, struct wma_vdev_start_req *req, v_BOOL_t isRestart) { @@ -12511,11 +12545,15 @@ VOS_STATUS wma_vdev_start(tp_wma_handle wma, cmd->beacon_interval = req->beacon_intval; cmd->dtim_period = req->dtim_period; + cmd->flags &= ~WMI_UNIFIED_VDEV_START_BCN_TX_RATE_PRESENT; if (req->beacon_tx_rate) { - WMA_LOGI("%s[%d]: beacon_tx_rate present [%hu]", - __func__, __LINE__, req->beacon_tx_rate); + WMA_LOGI("%s: beacon_tx_rate present. beacon tx rate [%hu * 100 Kbps]", + __func__, req->beacon_tx_rate); cmd->flags |= WMI_UNIFIED_VDEV_START_BCN_TX_RATE_PRESENT; - cmd->bcn_tx_rate = req->beacon_tx_rate; + /* beacon_tx_rate is in multiples of 100 Kbps. Convert the + * data rate to hw rate code */ + cmd->bcn_tx_rate = wma_get_bcn_rate_code(req->beacon_tx_rate); + WMA_LOGI("bcn rate code %02x", cmd->bcn_tx_rate); } /* FIXME: Find out min, max and regulatory power levels */ diff --git a/CORE/SERVICES/WMA/wma.h b/CORE/SERVICES/WMA/wma.h index 990ecf5f4259..5baee7588daf 100644 --- a/CORE/SERVICES/WMA/wma.h +++ b/CORE/SERVICES/WMA/wma.h @@ -197,6 +197,33 @@ #define WMA_IPV6_PKT_INFO_GET_MIN_LEN 62 #define WMA_ICMPV6_SUBTYPE_GET_MIN_LEN 55 +/* Beacon data rate changes */ +#define WMA_BEACON_TX_RATE_HW_CODE_1_M 0x43 +#define WMA_BEACON_TX_RATE_HW_CODE_2_M 0x42 +#define WMA_BEACON_TX_RATE_HW_CODE_5_5_M 0x41 +#define WMA_BEACON_TX_RATE_HW_CODE_11M 0x40 +#define WMA_BEACON_TX_RATE_HW_CODE_6_M 0x03 +#define WMA_BEACON_TX_RATE_HW_CODE_9_M 0x07 +#define WMA_BEACON_TX_RATE_HW_CODE_12_M 0x02 +#define WMA_BEACON_TX_RATE_HW_CODE_18_M 0x06 +#define WMA_BEACON_TX_RATE_HW_CODE_24_M 0x01 +#define WMA_BEACON_TX_RATE_HW_CODE_36_M 0x05 +#define WMA_BEACON_TX_RATE_HW_CODE_48_M 0x00 +#define WMA_BEACON_TX_RATE_HW_CODE_54_M 0x04 + +#define WMA_BEACON_TX_RATE_1_M 10 +#define WMA_BEACON_TX_RATE_2_M 20 +#define WMA_BEACON_TX_RATE_5_5_M 55 +#define WMA_BEACON_TX_RATE_11_M 110 +#define WMA_BEACON_TX_RATE_6_M 60 +#define WMA_BEACON_TX_RATE_9_M 90 +#define WMA_BEACON_TX_RATE_12_M 120 +#define WMA_BEACON_TX_RATE_18_M 180 +#define WMA_BEACON_TX_RATE_24_M 240 +#define WMA_BEACON_TX_RATE_36_M 360 +#define WMA_BEACON_TX_RATE_48_M 480 +#define WMA_BEACON_TX_RATE_54_M 540 + /* * ds_mode: distribution system mode * @IEEE80211_NO_DS: NO DS at either side @@ -1340,7 +1367,7 @@ struct wma_vdev_start_req { u_int8_t dot11_mode; bool is_half_rate; bool is_quarter_rate; - u_int8_t beacon_tx_rate; + u_int16_t beacon_tx_rate; }; struct wma_set_key_params { diff --git a/CORE/SME/inc/csrApi.h b/CORE/SME/inc/csrApi.h index 06965b4b713c..df54359ea5dc 100644 --- a/CORE/SME/inc/csrApi.h +++ b/CORE/SME/inc/csrApi.h @@ -1015,7 +1015,7 @@ typedef struct tagCsrRoamProfile tSirAddIeParams addIeParams; uint8_t sap_dot11mc; bool do_not_roam; - uint8_t beacon_tx_rate; + uint16_t beacon_tx_rate; tSirMacRateSet supp_rate_set; tSirMacRateSet extended_rate_set; }tCsrRoamProfile; diff --git a/CORE/SME/inc/csrInternal.h b/CORE/SME/inc/csrInternal.h index 57a960ab838d..5fb4365db965 100644 --- a/CORE/SME/inc/csrInternal.h +++ b/CORE/SME/inc/csrInternal.h @@ -387,8 +387,7 @@ typedef struct tagCsrRoamStartBssParams tSirAddIeParams addIeParams; uint8_t sap_dot11mc; - uint8_t beacon_tx_rate; - + uint16_t beacon_tx_rate; }tCsrRoamStartBssParams; diff --git a/CORE/SME/src/csr/csrApiRoam.c b/CORE/SME/src/csr/csrApiRoam.c index cee45d62034e..9873b8884de3 100644 --- a/CORE/SME/src/csr/csrApiRoam.c +++ b/CORE/SME/src/csr/csrApiRoam.c @@ -15388,7 +15388,9 @@ eHalStatus csrSendMBStartBssReqMsg( tpAniSirGlobal pMac, tANI_U32 sessionId, eCs sizeof(pMac->roam.configParam.vendor_vht_for_24ghz_sap)); pBuf += sizeof(pMac->roam.configParam.vendor_vht_for_24ghz_sap); - *pBuf++ = (tANI_U8)pParam->beacon_tx_rate; + vos_mem_copy(pBuf, &pParam->beacon_tx_rate, + sizeof(pParam->beacon_tx_rate)); + pBuf += sizeof(pParam->beacon_tx_rate); msgLen = (tANI_U16)(sizeof(tANI_U32 ) + (pBuf - wTmpBuf)); //msg_header + msg pMsg->length = pal_cpu_to_be16(msgLen); diff --git a/CORE/WDA/inc/legacy/halMsgApi.h b/CORE/WDA/inc/legacy/halMsgApi.h index 6b3bea85fdb4..618c0316ffe5 100644 --- a/CORE/WDA/inc/legacy/halMsgApi.h +++ b/CORE/WDA/inc/legacy/halMsgApi.h @@ -544,7 +544,7 @@ typedef struct uint8_t nss_5g; uint32_t tx_aggregation_size; uint32_t rx_aggregation_size; - uint8_t beacon_tx_rate; + uint16_t beacon_tx_rate; } tAddBssParams, * tpAddBssParams; typedef struct |
