summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPixelBot AutoMerger <android-nexus-securitybot@system.gserviceaccount.com>2021-01-01 14:08:39 -0800
committerSecurityBot <android-nexus-securitybot@system.gserviceaccount.com>2021-01-01 14:08:39 -0800
commit7d3856ef91419c9c33aa37452e01a583960c9329 (patch)
tree5e378a42bc382505a7657e112d1bcdb797cd31b4
parentd6aa033713ffc6ff2286a4d22cba45e063cb7638 (diff)
parenta3331ddb5258d6dc8cb6726256f5f762ec4c7fd2 (diff)
downloadqca-wfi-host-cmn-7d3856ef91419c9c33aa37452e01a583960c9329.tar.gz
SBMerger: 325904710 Change-Id: Iac77794ab873a4355f9c0831ed7ee3ac234f65d2 Signed-off-by: SecurityBot <android-nexus-securitybot@system.gserviceaccount.com>
-rw-r--r--umac/regulatory/core/src/reg_services.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/umac/regulatory/core/src/reg_services.c b/umac/regulatory/core/src/reg_services.c
index a530faa7d..533eb80f7 100644
--- a/umac/regulatory/core/src/reg_services.c
+++ b/umac/regulatory/core/src/reg_services.c
@@ -1160,8 +1160,6 @@ static void reg_set_5g_channel_params(struct wlan_objmgr_pdev *pdev,
* Set channel parameters like center frequency for a bonded channel
* state. Also return the maximum bandwidth supported by the channel.
*/
-
- enum phy_ch_width next_lower_bw;
enum channel_state chan_state = CHANNEL_STATE_ENABLE;
enum channel_state chan_state2 = CHANNEL_STATE_ENABLE;
const struct bonded_channel *bonded_chan_ptr = NULL;
@@ -1178,11 +1176,8 @@ static void reg_set_5g_channel_params(struct wlan_objmgr_pdev *pdev,
else
ch_params->ch_width = CH_WIDTH_160MHZ;
}
- next_lower_bw = ch_params->ch_width;
while (ch_params->ch_width != CH_WIDTH_INVALID) {
- ch_params->ch_width = next_lower_bw;
- next_lower_bw = get_next_lower_bw[ch_params->ch_width];
bonded_chan_ptr = NULL;
bonded_chan_ptr2 = NULL;
chan_state = reg_get_5g_bonded_channel(pdev, ch,
@@ -1202,7 +1197,7 @@ static void reg_set_5g_channel_params(struct wlan_objmgr_pdev *pdev,
if ((CHANNEL_STATE_ENABLE != chan_state) &&
(CHANNEL_STATE_DFS != chan_state))
- continue;
+ goto update_bw;
if (CH_WIDTH_20MHZ >= ch_params->ch_width) {
ch_params->sec_ch_offset = NO_SEC_CH;
ch_params->center_freq_seg0 = ch;
@@ -1213,7 +1208,7 @@ static void reg_set_5g_channel_params(struct wlan_objmgr_pdev *pdev,
QDF_ARRAY_SIZE(bonded_chan_40mhz_list),
&bonded_chan_ptr2);
if (!bonded_chan_ptr || !bonded_chan_ptr2)
- continue;
+ goto update_bw;
if (ch == bonded_chan_ptr2->start_ch)
ch_params->sec_ch_offset = LOW_PRIMARY_CH;
else
@@ -1224,6 +1219,8 @@ static void reg_set_5g_channel_params(struct wlan_objmgr_pdev *pdev,
bonded_chan_ptr->end_ch)/2;
break;
}
+update_bw:
+ ch_params->ch_width = get_next_lower_bw[ch_params->ch_width];
}
if (CH_WIDTH_160MHZ == ch_params->ch_width) {