Эх сурвалжийг харах

qcacmn: Peer sta connects in HE20 for SAP HE160

SAP secondary channel offset of HT info in beacon is set wrongly.
When STA connects it, channel bonding mode check fails, falls back to
20 MHz width.

SAP secondary channel offset of HT info in beacon is decided by checking
40 MHz bonded frequency list. If primary frequency is start frequency of a
bonded frequency, then secondary channel is above the primary channel,
secondary channel offset should be set to 1, else set to 3.
For example, if SAP primary frequency is 5220 MHz, {5220, 5240} is 40 MHz
bonded frequency, secondary channel offset only can be 1, can't be 3.

Change-Id: Ife56e3d039f3fcf1912bedf696b1703a0e8f194f
CRs-Fixed: 3302759
Divyajyothi Goparaju 2 жил өмнө
parent
commit
8cafea036b

+ 10 - 2
umac/regulatory/core/src/reg_services_common.c

@@ -5715,9 +5715,17 @@ static void reg_set_5g_channel_params_for_pwrmode(
 						 ch_params->mhz_freq_seg0);
 			break;
 		} else if (ch_params->ch_width >= CH_WIDTH_40MHZ) {
-			if (!bonded_chan_ptr)
+			const struct bonded_channel_freq *bonded_chan_ptr2;
+
+			bonded_chan_ptr2 =
+					reg_get_bonded_chan_entry(
+								freq,
+								CH_WIDTH_40MHZ,
+								0);
+
+			if (!bonded_chan_ptr || !bonded_chan_ptr2)
 				goto update_bw;
-			if (freq == bonded_chan_ptr->start_freq)
+			if (freq == bonded_chan_ptr2->start_freq)
 				ch_params->sec_ch_offset = LOW_PRIMARY_CH;
 			else
 				ch_params->sec_ch_offset = HIGH_PRIMARY_CH;