From 876a6931e33eb5edb1e40946f6005b293fbab8a2 Mon Sep 17 00:00:00 2001 From: Amar Singhal Date: Sun, 18 Feb 2018 19:18:20 -0800 Subject: [PATCH] qcacmn: Modify maximum BW only conditionally The maximum BW for edge channels may fall outside the low limit or high limit of channel range for a given pdev. But reduce the maximum BW only if it is less than or equal to 20 MHz. Higher bandwidths are realized using channel bonding and the channel itself may not be center channel. Change-Id: Ifc6bbadf91759fedaf432d162763577ea56bb7b7 CRs-Fixed: 2184724 --- umac/regulatory/core/src/reg_services.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/umac/regulatory/core/src/reg_services.c b/umac/regulatory/core/src/reg_services.c index 1471c743b0e6..e4574b496e70 100644 --- a/umac/regulatory/core/src/reg_services.c +++ b/umac/regulatory/core/src/reg_services.c @@ -2150,7 +2150,9 @@ static void reg_find_low_limit_chan_enum(struct regulatory_channel *chan_list, if ((center_freq - min_bw/2) >= low_freq) { if ((center_freq - max_bw/2) < low_freq) { - max_bw = ((center_freq - low_freq) * 2); + if (max_bw <= 20) + max_bw = ((center_freq - + low_freq) * 2); if (max_bw < min_bw) max_bw = min_bw; chan_list[chan_enum].max_bw = max_bw; @@ -2185,7 +2187,9 @@ static void reg_find_high_limit_chan_enum(struct regulatory_channel *chan_list, if (center_freq + min_bw/2 <= high_freq) { if ((center_freq + max_bw/2) > high_freq) { - max_bw = ((high_freq - center_freq) * 2); + if (max_bw <= 20) + max_bw = ((high_freq - + center_freq) * 2); if (max_bw < min_bw) max_bw = min_bw; chan_list[chan_enum].max_bw = max_bw;