Selaa lähdekoodia

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
Amar Singhal 7 vuotta sitten
vanhempi
sitoutus
876a6931e3
1 muutettua tiedostoa jossa 6 lisäystä ja 2 poistoa
  1. 6 2
      umac/regulatory/core/src/reg_services.c

+ 6 - 2
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;