From cfec8138ad3e7b26dbc28bf88b7e4703e0b4a858 Mon Sep 17 00:00:00 2001 From: Amar Singhal Date: Wed, 23 Oct 2019 14:01:39 -0700 Subject: [PATCH] qcacmn: Check 4.9 GHz channel correctly 4.9 GHz channels cannot be checked using channel number since channel number can conflict with 2.4 GHz and 6 Ghz channels. So use frequency to check if channel is 4.9 Ghz. Change-Id: Ie201d2722edbc7f20ee4faa115910d92afaa3414 CRs-Fixed: 2552810 --- umac/regulatory/core/src/reg_services_common.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/umac/regulatory/core/src/reg_services_common.c b/umac/regulatory/core/src/reg_services_common.c index 58d3b2d8accd..fe2c58942ba1 100644 --- a/umac/regulatory/core/src/reg_services_common.c +++ b/umac/regulatory/core/src/reg_services_common.c @@ -1692,7 +1692,7 @@ static uint16_t reg_compute_chan_to_freq(struct wlan_objmgr_pdev *pdev, chan_list = pdev_priv_obj->mas_chan_list; for (count = min_chan_range; count <= max_chan_range; count++) { - if (reg_chan_is_49ghz(pdev, chan_list[count].chan_num)) { + if (REG_IS_49GHZ_FREQ(chan_list[count].center_freq)) { if (chan_list[count].chan_num == chan_num) break; continue; @@ -1715,7 +1715,7 @@ static uint16_t reg_compute_chan_to_freq(struct wlan_objmgr_pdev *pdev, goto end; if ((chan_list[count - 1].chan_num == INVALID_CHANNEL_NUM) || - reg_chan_is_49ghz(pdev, chan_list[count - 1].chan_num) || + REG_IS_49GHZ_FREQ(chan_list[count - 1].center_freq) || (chan_list[count].chan_num == INVALID_CHANNEL_NUM)) { reg_err("Channel %d invalid in current reg domain", chan_num);