소스 검색

qcacld-3.0: Strip OMN IE from additional IEs for NSS update

As part of nss update request, operating mode is updated
in beacon template. OMN IE can also present in additional
IEs which will result in OMN IE included twice in beacon.

Fix is to strip OMN IE from additional IEs if beacon
template is updated as part of nss update request.

Change-Id: Ic0cd6b76738e16eb73de7a7ba406cd727c2f8dc4
CRs-Fixed: 2274027
Yeshwanth Sriram Guntuka 7 년 전
부모
커밋
45eb08feb9
2개의 변경된 파일10개의 추가작업 그리고 3개의 파일을 삭제
  1. 2 0
      core/mac/inc/sir_mac_prot_def.h
  2. 8 3
      core/mac/src/pe/sch/sch_beacon_gen.c

+ 2 - 0
core/mac/inc/sir_mac_prot_def.h

@@ -199,6 +199,8 @@
 #define SIR_MAC_VHT_GID_NOTIFICATION           1
 #define SIR_MAC_VHT_OPMODE_NOTIFICATION        2
 
+#define SIR_MAC_VHT_OPMODE_SIZE                3
+
 #define NUM_OF_SOUNDING_DIMENSIONS	1 /*Nss - 1, (Nss = 2 for 2x2)*/
 /* HT Action Field Codes */
 #define SIR_MAC_SM_POWER_SAVE       1

+ 8 - 3
core/mac/src/pe/sch/sch_beacon_gen.c

@@ -457,9 +457,6 @@ sch_set_fixed_beacon_fields(tpAniSirGlobal mac_ctx, tpPESession session)
 		/*
 		populate_dot11f_vht_ext_bss_load( mac_ctx, &bcn2.VHTExtBssLoad);
 		*/
-		if (session->gLimOperatingMode.present)
-			populate_dot11f_operating_mode(mac_ctx,
-						&bcn_2->OperatingMode, session);
 	}
 
 	if (lim_is_session_he_capable(session)) {
@@ -583,6 +580,14 @@ sch_set_fixed_beacon_fields(tpAniSirGlobal mac_ctx, tpPESession session)
 
 	}
 
+	if (session->vhtCapability && session->gLimOperatingMode.present) {
+		populate_dot11f_operating_mode(mac_ctx, &bcn_2->OperatingMode,
+					       session);
+		lim_strip_ie(mac_ctx, addn_ie, &addn_ielen,
+			     SIR_MAC_VHT_OPMODE_EID, ONE_BYTE, NULL, 0,
+			     NULL, SIR_MAC_VHT_OPMODE_SIZE - 2);
+	}
+
 	n_status = dot11f_pack_beacon2(mac_ctx, bcn_2,
 				      session->pSchBeaconFrameEnd,
 				      SCH_MAX_BEACON_SIZE, &n_bytes);