qcacld-3.0: Update beacon Tx rate configuration implementation
Update beacon Tx rate configuration implementation for lithium onwards targets Change-Id: I864b7eedb36b8f4a4804baf42f2b4c762d6868dc CRs-Fixed: 3593181
This commit is contained in:

کامیت شده توسط
Rahul Choudhary

والد
0ed9d7c8cc
کامیت
8f12b73f1d
@@ -31,6 +31,25 @@
|
||||
#define ASSEMBLE_RATECODE_V1(_pream, _nss, _rate) \
|
||||
(((1) << 28) | ((_pream) << 8) | ((_nss) << 5) | (_rate))
|
||||
|
||||
/* This macro is used to extract the rate from the rate_code as first four bits
|
||||
* in rate_code represents the rate, next 3 bits represents the nss and
|
||||
* next 2 bits represents preamble.
|
||||
*/
|
||||
#define RATECODE_V1_RIX_MASK 0xf
|
||||
|
||||
/* This macro is used to extract preamble from the rate_code as first 4 bits
|
||||
* in rate_code represents the rate, next 3 bits represents the nss and
|
||||
* next 2 bits represents preamble.
|
||||
*/
|
||||
#define RATECODE_V1_PREAMBLE_OFFSET (4 + 3)
|
||||
|
||||
/* This macro is used to extract NSS from the rate_code as first 4 bits
|
||||
* in rate_code represents the rate, next 3 bits represents the NSS and
|
||||
* next 2 bits represents preamble.
|
||||
*/
|
||||
#define RATECODE_V1_NSS_OFFSET 0x4
|
||||
#define RATECODE_V1_NSS_MASK 0x7
|
||||
|
||||
#ifdef FEATURE_SET
|
||||
/**
|
||||
* wlan_mlme_get_feature_info() - Get mlme features
|
||||
|
@@ -7316,8 +7316,7 @@ static uint16_t hdd_get_data_rate_from_rate_mask(struct wiphy *wiphy,
|
||||
sband_bitrates = sband->bitrates;
|
||||
sband_n_bitrates = sband->n_bitrates;
|
||||
for (i = 0; i < sband_n_bitrates; i++) {
|
||||
if (bit_rate_mask->control[band].legacy ==
|
||||
sband_bitrates[i].hw_value)
|
||||
if (bit_rate_mask->control[band].legacy == (1 << i))
|
||||
return sband_bitrates[i].bitrate;
|
||||
}
|
||||
}
|
||||
|
@@ -3223,6 +3223,33 @@ enum mlme_bcn_tx_rate_code wma_get_bcn_rate_code(uint16_t rate)
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef WLAN_BCN_RATECODE_ENABLE
|
||||
/**
|
||||
* wma_update_beacon_tx_rate_code() - Update bcn_tx_rate_code
|
||||
* @mlme_obj: pointer to mlme object
|
||||
*
|
||||
* Return: none
|
||||
*/
|
||||
static void wma_update_beacon_tx_rate_code(struct vdev_mlme_obj *mlme_obj)
|
||||
{
|
||||
uint8_t preamble, nss, rix;
|
||||
uint32_t rate_code;
|
||||
|
||||
rate_code = mlme_obj->mgmt.rate_info.bcn_tx_rate;
|
||||
|
||||
rix = rate_code & RATECODE_V1_RIX_MASK;
|
||||
nss = (rate_code >> RATECODE_V1_NSS_OFFSET) & RATECODE_V1_NSS_MASK;
|
||||
preamble = rate_code >> RATECODE_V1_PREAMBLE_OFFSET;
|
||||
|
||||
mlme_obj->mgmt.rate_info.bcn_tx_rate_code =
|
||||
wlan_mlme_assemble_rate_code(preamble, nss, rix);
|
||||
}
|
||||
#else
|
||||
static void wma_update_beacon_tx_rate_code(struct vdev_mlme_obj *mlme_obj)
|
||||
{
|
||||
}
|
||||
#endif
|
||||
|
||||
QDF_STATUS wma_vdev_pre_start(uint8_t vdev_id, bool restart)
|
||||
{
|
||||
tp_wma_handle wma = cds_get_context(QDF_MODULE_ID_WMA);
|
||||
@@ -3313,6 +3340,7 @@ QDF_STATUS wma_vdev_pre_start(uint8_t vdev_id, bool restart)
|
||||
*/
|
||||
mlme_obj->mgmt.rate_info.bcn_tx_rate =
|
||||
wma_get_bcn_rate_code(mlme_obj->mgmt.rate_info.bcn_tx_rate);
|
||||
wma_update_beacon_tx_rate_code(mlme_obj);
|
||||
}
|
||||
|
||||
if (!restart) {
|
||||
|
مرجع در شماره جدید
Block a user