Просмотр исходного кода

qcacld-3.0: fix miss CSA IE when band switch

qcacld-2.0 to qcacld-3.0 propagation

Setting CSA IE if not all the STA devices support ECSA while
configure the macro CHANNEL_HOPPING_ALL_BANDS. Otherwise, SAP
will miss CSA IE when switch band from 5G to 2G.

Change-Id: I7aad2bb0d967e73c0ea87acb9820bebdc0455410
CRs-Fixed: 2024425
gaolez 8 лет назад
Родитель
Сommit
5c509f36e8
1 измененных файлов с 19 добавлено и 10 удалено
  1. 19 10
      core/mac/src/pe/sch/sch_beacon_gen.c

+ 19 - 10
core/mac/src/pe/sch/sch_beacon_gen.c

@@ -276,18 +276,28 @@ sch_set_fixed_beacon_fields(tpAniSirGlobal mac_ctx, tpPESession session)
 	/* Initialize the 'new' fields at the end of the beacon */
 
 	if ((session->limSystemRole == eLIM_AP_ROLE) &&
-		session->dfsIncludeChanSwIe == true) {
+	    session->dfsIncludeChanSwIe == true) {
 		if (!CHAN_HOP_ALL_BANDS_ENABLE ||
 		    session->lim_non_ecsa_cap_num == 0) {
+			tDot11fIEext_chan_switch_ann *ext_csa =
+						&bcn_2->ext_chan_switch_ann;
 			populate_dot_11_f_ext_chann_switch_ann(mac_ctx,
-				&bcn_2->ext_chan_switch_ann,
-				session);
+							       ext_csa,
+							       session);
 			pe_info("ecsa: mode:%d reg:%d chan:%d count:%d",
-				bcn_2->ext_chan_switch_ann.switch_mode,
-				bcn_2->ext_chan_switch_ann.new_reg_class,
-				bcn_2->ext_chan_switch_ann.new_channel,
-				bcn_2->ext_chan_switch_ann.switch_count);
-	    }
+				ext_csa->switch_mode,
+				ext_csa->new_reg_class,
+				ext_csa->new_channel,
+				ext_csa->switch_count);
+		} else {
+			populate_dot11f_chan_switch_ann(mac_ctx,
+							&bcn_2->ChanSwitchAnn,
+							session);
+			pe_info("csa: mode:%d chan:%d count:%d",
+				bcn_2->ChanSwitchAnn.switchMode,
+				bcn_2->ChanSwitchAnn.newChannel,
+				bcn_2->ChanSwitchAnn.switchCount);
+		}
 	}
 
 	populate_dot11_supp_operating_classes(mac_ctx,
@@ -310,8 +320,7 @@ sch_set_fixed_beacon_fields(tpAniSirGlobal mac_ctx, tpPESession session)
 			 * and SAP has instructed to announce channel switch IEs
 			 * in beacon and probe responses
 			 */
-			if (!CHAN_HOP_ALL_BANDS_ENABLE ||
-			    session->lim_non_ecsa_cap_num > 0) {
+			if (!CHAN_HOP_ALL_BANDS_ENABLE) {
 				populate_dot11f_chan_switch_ann(mac_ctx,
 						&bcn_2->ChanSwitchAnn, session);
 				pe_debug("csa: mode:%d chan:%d count:%d",