summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--drivers/staging/qcacld-3.0/core/mac/src/include/dot11f.h3
-rw-r--r--drivers/staging/qcacld-3.0/core/mac/src/pe/lim/lim_assoc_utils.c92
-rw-r--r--drivers/staging/qcacld-3.0/core/mac/src/sys/legacy/src/utils/src/dot11f.c3
3 files changed, 51 insertions, 47 deletions
diff --git a/drivers/staging/qcacld-3.0/core/mac/src/include/dot11f.h b/drivers/staging/qcacld-3.0/core/mac/src/include/dot11f.h
index 1a603f547d7f..eb7931dd25ad 100644
--- a/drivers/staging/qcacld-3.0/core/mac/src/include/dot11f.h
+++ b/drivers/staging/qcacld-3.0/core/mac/src/include/dot11f.h
@@ -1,5 +1,6 @@
/*
* Copyright (c) 2012-2019, 2021 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2021-2022 Qualcomm Innovation Center, Inc. All rights reserved.
*
* Permission to use, copy, modify, and/or distribute this software for
* any purpose with or without fee is hereby granted, provided that the
@@ -26,7 +27,7 @@
*
*
* This file was automatically generated by 'framesc'
- * Wed Sep 29 13:23:21 2021 from the following file(s):
+ * Tue Jan 4 11:29:43 2022 from the following file(s):
*
* dot11f.frms
*
diff --git a/drivers/staging/qcacld-3.0/core/mac/src/pe/lim/lim_assoc_utils.c b/drivers/staging/qcacld-3.0/core/mac/src/pe/lim/lim_assoc_utils.c
index 027fe51b0fb6..5ac4c6f80577 100644
--- a/drivers/staging/qcacld-3.0/core/mac/src/pe/lim/lim_assoc_utils.c
+++ b/drivers/staging/qcacld-3.0/core/mac/src/pe/lim/lim_assoc_utils.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2011-2018 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2011-2021 The Linux Foundation. All rights reserved.
*
* Permission to use, copy, modify, and/or distribute this software for
* any purpose with or without fee is hereby granted, provided that the
@@ -1653,9 +1653,9 @@ lim_populate_peer_rate_set(tpAniSirGlobal pMac,
{
tSirMacRateSet tempRateSet;
tSirMacRateSet tempRateSet2;
- uint32_t i, j, val, min, isArate;
-
- isArate = 0;
+ uint32_t i, j, val, min, isArate = 0;
+ uint8_t aRateIndex = 0;
+ uint8_t bRateIndex = 0;
/* copy operational rate set from psessionEntry */
if (psessionEntry->rateSet.numRates <= SIR_MAC_RATESET_EID_MAX) {
@@ -1700,51 +1700,53 @@ lim_populate_peer_rate_set(tpAniSirGlobal pMac,
* Sort rates in tempRateSet (they are likely to be already sorted)
* put the result in pSupportedRates
*/
- {
- uint8_t aRateIndex = 0;
- uint8_t bRateIndex = 0;
- qdf_mem_set((uint8_t *) pRates, sizeof(tSirSupportedRates), 0);
- for (i = 0; i < tempRateSet.numRates; i++) {
- min = 0;
- val = 0xff;
- isArate = 0;
- for (j = 0;
- (j < tempRateSet.numRates)
- && (j < SIR_MAC_RATESET_EID_MAX); j++) {
- if ((uint32_t) (tempRateSet.rate[j] & 0x7f) <
- val) {
- val = tempRateSet.rate[j] & 0x7f;
- min = j;
- }
- }
- if (sirIsArate(tempRateSet.rate[min] & 0x7f))
- isArate = 1;
- /*
- * HAL needs to know whether the rate is basic rate or not, as it needs to
- * update the response rate table accordingly. e.g. if one of the 11a rates is
- * basic rate, then that rate can be used for sending control frames.
- * HAL updates the response rate table whenever basic rate set is changed.
- */
- if (basicOnly) {
- if (tempRateSet.rate[min] & 0x80) {
- if (isArate)
- pRates->llaRates[aRateIndex++] =
- tempRateSet.rate[min];
- else
- pRates->llbRates[bRateIndex++] =
- tempRateSet.rate[min];
- }
- } else {
- if (isArate)
- pRates->llaRates[aRateIndex++] =
- tempRateSet.rate[min];
- else
- pRates->llbRates[bRateIndex++] =
- tempRateSet.rate[min];
+ qdf_mem_zero(pRates, sizeof(*pRates));
+ for (i = 0; i < tempRateSet.numRates; i++) {
+ min = 0;
+ val = 0xff;
+ for (j = 0; (j < tempRateSet.numRates) &&
+ (j < SIR_MAC_MAX_NUMBER_OF_RATES); j++) {
+ if ((uint32_t)(tempRateSet.rate[j] & 0x7f) <
+ val) {
+ val = tempRateSet.rate[j] & 0x7f;
+ min = j;
}
+ }
+ if (sirIsArate(tempRateSet.rate[min] & 0x7f)) {
+ isArate = 1;
+ } else if (sirIsBrate(tempRateSet.rate[min] & 0x7f)) {
+ isArate = 0;
+ } else {
+ pe_debug("%d is neither 11a nor 11b rate",
+ tempRateSet.rate[min]);
+ tempRateSet.rate[min] = 0xff;
+ continue;
+ }
+ if (tempRateSet.rate[min] == pRates->llaRates[aRateIndex] ||
+ tempRateSet.rate[min] == pRates->llbRates[bRateIndex]) {
+ pe_debug("Duplicate rate: %d", tempRateSet.rate[min]);
+ tempRateSet.rate[min] = 0xff;
+ continue;
+ }
+ /*
+ * HAL needs to know whether the rate is basic rate or not,
+ * as it needs to update the response rate table accordingly.
+ * e.g. if one of the 11a rates is basic rate, then that rate
+ * can be used for sending control frames. HAL updates the
+ * response rate table whenever basic rate set is changed.
+ */
+ if (basicOnly && !(tempRateSet.rate[min] & 0x80)) {
tempRateSet.rate[min] = 0xff;
+ continue;
}
+ if (isArate && aRateIndex < SIR_NUM_11A_RATES)
+ pRates->llaRates[aRateIndex++] =
+ tempRateSet.rate[min];
+ else if (bRateIndex < SIR_NUM_11B_RATES)
+ pRates->llbRates[bRateIndex++] =
+ tempRateSet.rate[min];
+ tempRateSet.rate[min] = 0xff;
}
if (IS_DOT11_MODE_HT(psessionEntry->dot11mode)) {
diff --git a/drivers/staging/qcacld-3.0/core/mac/src/sys/legacy/src/utils/src/dot11f.c b/drivers/staging/qcacld-3.0/core/mac/src/sys/legacy/src/utils/src/dot11f.c
index 55781cf9a8e0..6c210a11ecda 100644
--- a/drivers/staging/qcacld-3.0/core/mac/src/sys/legacy/src/utils/src/dot11f.c
+++ b/drivers/staging/qcacld-3.0/core/mac/src/sys/legacy/src/utils/src/dot11f.c
@@ -1,5 +1,6 @@
/*
* Copyright (c) 2012-2019, 2021 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2021-2022 Qualcomm Innovation Center, Inc. All rights reserved.
*
* Permission to use, copy, modify, and/or distribute this software for
* any purpose with or without fee is hereby granted, provided that the
@@ -24,7 +25,7 @@
*
*
* This file was automatically generated by 'framesc'
- * Wed Sep 29 13:23:21 2021 from the following file(s):
+ * Tue Jan 4 11:29:43 2022 from the following file(s):
*
* dot11f.frms
*