Browse Source

qcacld-3.0: HS20 indication element support

HS20 Indication element parsing is added to indicate
release number of the HS20 passpoint that is present
in Hotspot configurations.

Change-Id: I8671d569d3809ebe5da7233ec862ae2569f5c109
CRs-Fixed: 1019592
Nitesh Shah 8 years ago
parent
commit
0ddd4f656a

+ 29 - 0
core/mac/src/cfg/cfgUtil/dot11f.frms

@@ -1860,6 +1860,29 @@ IE Vendor3IE (EID_VENDOR_SPECIFIC) OUI (0x00, 0x16, 0x32)
 {
 }
 
+IE hs20vendor_ie (EID_VENDOR_SPECIFIC) OUI (0x50, 0x6F, 0x9A)
+{
+    type,                       1;
+    /* hotspot_configurations */
+    {
+        dgaf_dis:               1;
+        hs_id_present:          2;
+        reserved:               1;
+        release_num:            4;
+    }
+    OPTIONAL UNION hs_id (DISCRIMINATOR hs_id_present)
+    {
+        pps_mo (hs_id_present IS 1)
+        {
+            pps_mo_id,          2;
+        }
+        anqp_domain (hs_id_present IS 2)
+        {
+            anqp_domain_id,     2;
+        }
+    };
+}
+
 IE QComVendorIE (EID_VENDOR_SPECIFIC) OUI (0x00, 0xA0, 0xC6)
 {
     type,      1;
@@ -2924,6 +2947,7 @@ FRAME Beacon                              // C.f. Sec. 7.2.3.1
     OPTIE  Vendor1IE;
     OPTIE  vendor2_ie;
     OPTIE  Vendor3IE;
+    OPTIE  hs20vendor_ie;
     OPTIE  ChannelSwitchWrapper;
     OPTIE  QComVendorIE;
     OPTIE  ESEVersion;
@@ -3011,6 +3035,7 @@ FRAME Beacon2
     OPTIE  Vendor1IE;
     OPTIE  vendor2_ie;
     OPTIE  Vendor3IE;
+    OPTIE  hs20vendor_ie;
     OPTIE  ChannelSwitchWrapper;
     OPTIE  QComVendorIE;
     OPTIE  ESEVersion;
@@ -3075,6 +3100,7 @@ FRAME BeaconIEs
     OPTIE  Vendor1IE;
     OPTIE  vendor2_ie;
     OPTIE  Vendor3IE;
+    OPTIE  hs20vendor_ie;
     OPTIE  ChannelSwitchWrapper;
     OPTIE  QComVendorIE;
 } // End frame BeaconIEs.
@@ -3114,6 +3140,7 @@ FRAME AssocRequest                        // 7.2.3.4
     OPTIE  OperatingMode;
     OPTIE  QosMapSet;
     OPTIE  vendor2_ie;
+    OPTIE  hs20vendor_ie;
 } // End frame AssocRequest.
 
 FRAME AssocResponse                       // 7.2.3.5
@@ -3185,6 +3212,7 @@ FRAME ReAssocRequest                      // 7.2.3.6
     OPTIE  OperatingMode;
     OPTIE  QosMapSet;
     OPTIE  vendor2_ie;
+    OPTIE  hs20vendor_ie;
 } // End frame ReAssocRequest.
 
 FRAME ReAssocResponse                     // 7.2.3.7
@@ -3288,6 +3316,7 @@ FRAME ProbeResponse                       // 7.2.3.9
     OPTIE  Vendor1IE;
     OPTIE  vendor2_ie;
     OPTIE  Vendor3IE;
+    OPTIE  hs20vendor_ie;
     OPTIE  ChannelSwitchWrapper;
     OPTIE  QComVendorIE;
     OPTIE  ESEVersion;

+ 57 - 1
core/mac/src/include/dot11f.h

@@ -35,7 +35,7 @@
  *
  *
  * This file was automatically generated by 'framesc'
- * Wed Mar  2 11:45:36 2016 from the following file(s):
+ * Thu May 26 13:06:28 2016 from the following file(s):
  *
  * dot11f.frms
  *
@@ -7361,6 +7361,56 @@ uint32_t dot11f_get_packed_ie_ext_chan_switch_ann(
 }; /* End extern "C". */
 #endif /* C++ */
 
+/* EID 221 (0xdd) {OUI 0x50, 0x6f, 0x9a} */
+typedef struct sDot11fIEhs20vendor_ie {
+	uint8_t             present;
+	uint8_t             type;
+	uint8_t             dgaf_dis:1;
+	uint8_t        hs_id_present:2;
+	uint8_t             reserved:1;
+	uint8_t          release_num:4;
+	union {
+		struct {
+			uint16_t pps_mo_id;
+		} pps_mo; /* hs_id_present = 1 */
+		struct {
+			uint16_t anqp_domain_id;
+		} anqp_domain; /* hs_id_present = 2 */
+	} hs_id;
+} tDot11fIEhs20vendor_ie;
+
+#define DOT11F_EID_HS20VENDOR_IE (221)
+
+/* N.B. These #defines do *not* include the EID & length */
+#define DOT11F_IE_HS20VENDOR_IE_MIN_LEN (5)
+
+#define DOT11F_IE_HS20VENDOR_IE_MAX_LEN (7)
+
+#ifdef __cplusplus
+extern "C" {
+#endif /* C++ */
+uint32_t dot11f_unpack_ie_hs20vendor_ie(
+	tpAniSirGlobal,
+	uint8_t *,
+	uint8_t,
+	tDot11fIEhs20vendor_ie*);
+
+uint32_t dot11f_pack_ie_hs20vendor_ie(
+	tpAniSirGlobal,
+	tDot11fIEhs20vendor_ie *,
+	uint8_t *,
+	uint32_t,
+	uint32_t*);
+
+uint32_t dot11f_get_packed_ie_hs20vendor_ie(
+	tpAniSirGlobal,
+	tDot11fIEhs20vendor_ie *,
+	uint32_t*);
+
+#ifdef __cplusplus
+}; /* End extern "C". */
+#endif /* C++ */
+
 /* EID 72 (0x48) */
 typedef struct sDot11fIEht2040_bss_coexistence {
 	uint8_t             present;
@@ -7629,6 +7679,7 @@ typedef struct sDot11fAssocRequest{
 	tDot11fIEOperatingMode         OperatingMode;
 	tDot11fIEQosMapSet             QosMapSet;
 	tDot11fIEvendor2_ie            vendor2_ie;
+	tDot11fIEhs20vendor_ie         hs20vendor_ie;
 } tDot11fAssocRequest;
 
 #define DOT11F_ASSOCREQUEST (3)
@@ -7791,6 +7842,7 @@ typedef struct sDot11fBeacon{
 	tDot11fIEVendor1IE                   Vendor1IE;
 	tDot11fIEvendor2_ie                  vendor2_ie;
 	tDot11fIEVendor3IE                   Vendor3IE;
+	tDot11fIEhs20vendor_ie               hs20vendor_ie;
 	tDot11fIEChannelSwitchWrapper        ChannelSwitchWrapper;
 	tDot11fIEQComVendorIE                QComVendorIE;
 	tDot11fIEESEVersion                  ESEVersion;
@@ -7884,6 +7936,7 @@ typedef struct sDot11fBeacon2{
 	tDot11fIEVendor1IE                   Vendor1IE;
 	tDot11fIEvendor2_ie                  vendor2_ie;
 	tDot11fIEVendor3IE                   Vendor3IE;
+	tDot11fIEhs20vendor_ie               hs20vendor_ie;
 	tDot11fIEChannelSwitchWrapper        ChannelSwitchWrapper;
 	tDot11fIEQComVendorIE                QComVendorIE;
 	tDot11fIEESEVersion                  ESEVersion;
@@ -7959,6 +8012,7 @@ typedef struct sDot11fBeaconIEs{
 	tDot11fIEVendor1IE                   Vendor1IE;
 	tDot11fIEvendor2_ie                  vendor2_ie;
 	tDot11fIEVendor3IE                   Vendor3IE;
+	tDot11fIEhs20vendor_ie               hs20vendor_ie;
 	tDot11fIEChannelSwitchWrapper        ChannelSwitchWrapper;
 	tDot11fIEQComVendorIE                QComVendorIE;
 } tDot11fBeaconIEs;
@@ -8368,6 +8422,7 @@ typedef struct sDot11fProbeResponse{
 	tDot11fIEVendor1IE                   Vendor1IE;
 	tDot11fIEvendor2_ie                  vendor2_ie;
 	tDot11fIEVendor3IE                   Vendor3IE;
+	tDot11fIEhs20vendor_ie               hs20vendor_ie;
 	tDot11fIEChannelSwitchWrapper        ChannelSwitchWrapper;
 	tDot11fIEQComVendorIE                QComVendorIE;
 	tDot11fIEESEVersion                  ESEVersion;
@@ -8512,6 +8567,7 @@ typedef struct sDot11fReAssocRequest{
 	tDot11fIEOperatingMode             OperatingMode;
 	tDot11fIEQosMapSet                 QosMapSet;
 	tDot11fIEvendor2_ie                vendor2_ie;
+	tDot11fIEhs20vendor_ie             hs20vendor_ie;
 } tDot11fReAssocRequest;
 
 #define DOT11F_REASSOCREQUEST (26)

+ 2 - 0
core/mac/src/include/parser_api.h

@@ -155,6 +155,7 @@ typedef struct sSirProbeRespBeacon {
 	uint8_t Vendor1IEPresent;
 	tDot11fIEvendor2_ie vendor2_ie;
 	uint8_t Vendor3IEPresent;
+	tDot11fIEhs20vendor_ie hs20vendor_ie;
 	tDot11fIEIBSSParams IBSSParams;
 #ifdef FEATURE_AP_MCC_CH_AVOIDANCE
 	tDot11fIEQComVendorIE   AvoidChannelIE;
@@ -229,6 +230,7 @@ typedef struct sSirAssocReq {
 	tDot11fIEVHTCaps VHTCaps;
 	tDot11fIEOperatingMode operMode;
 	tDot11fIEExtCap ExtCap;
+	tDot11fIEhs20vendor_ie hs20vendor_ie;
 } tSirAssocReq, *tpSirAssocReq;
 
 /* / Association Response structure (one day to be replaced by */

+ 2 - 0
core/mac/src/pe/include/lim_session.h

@@ -467,6 +467,8 @@ typedef struct sPESession       /* Added to Support BT-AMP */
 	bool is_vendor_specific_vhtcaps;
 	uint8_t vendor_specific_vht_ie_type;
 	uint8_t vendor_specific_vht_ie_sub_type;
+	/* HS 2.0 Indication */
+	tDot11fIEhs20vendor_ie hs20vendor_ie;
 	/* flag to indicate country code in beacon */
 	uint8_t country_info_present;
 	uint8_t nss;

+ 16 - 0
core/mac/src/pe/lim/lim_assoc_utils.c

@@ -3228,6 +3228,22 @@ lim_check_and_announce_join_success(tpAniSirGlobal mac_ctx,
 		lim_log(mac_ctx, LOG1, FL(
 			"VHT caps are present in vendor specific IE"));
 	}
+
+	/* Update HS 2.0 Information Element */
+	if (beacon_probe_rsp->hs20vendor_ie.present) {
+		lim_log(mac_ctx, LOG1,
+			FL("HS20 Indication Element Present, rel#:%u, id:%u\n"),
+			beacon_probe_rsp->hs20vendor_ie.release_num,
+			beacon_probe_rsp->hs20vendor_ie.hs_id_present);
+		qdf_mem_copy(&session_entry->hs20vendor_ie,
+			&beacon_probe_rsp->hs20vendor_ie,
+			sizeof(tDot11fIEhs20vendor_ie) -
+			sizeof(beacon_probe_rsp->hs20vendor_ie.hs_id));
+		if (beacon_probe_rsp->hs20vendor_ie.hs_id_present)
+			qdf_mem_copy(&session_entry->hs20vendor_ie.hs_id,
+				&beacon_probe_rsp->hs20vendor_ie.hs_id,
+				sizeof(beacon_probe_rsp->hs20vendor_ie.hs_id));
+	}
 }
 
 /**

+ 15 - 0
core/mac/src/pe/lim/lim_prop_exts_utils.c

@@ -216,6 +216,21 @@ lim_extract_ap_capability(tpAniSirGlobal mac_ctx, uint8_t *p_ie,
 	/* Check if Extended caps are present in probe resp or not */
 	if (beacon_struct->ext_cap.present)
 		session->is_ext_caps_present = true;
+	/* Update HS 2.0 Information Element */
+	if (beacon_struct->hs20vendor_ie.present) {
+		lim_log(mac_ctx, LOG1,
+			FL("HS20 Indication Element Present, rel#:%u, id:%u\n"),
+			beacon_struct->hs20vendor_ie.release_num,
+			beacon_struct->hs20vendor_ie.hs_id_present);
+		qdf_mem_copy(&session->hs20vendor_ie,
+			&beacon_struct->hs20vendor_ie,
+			sizeof(tDot11fIEhs20vendor_ie) -
+			sizeof(beacon_struct->hs20vendor_ie.hs_id));
+		if (beacon_struct->hs20vendor_ie.hs_id_present)
+			qdf_mem_copy(&session->hs20vendor_ie.hs_id,
+				&beacon_struct->hs20vendor_ie.hs_id,
+				sizeof(beacon_struct->hs20vendor_ie.hs_id));
+	}
 	qdf_mem_free(beacon_struct);
 	return;
 } /****** end lim_extract_ap_capability() ******/

File diff suppressed because it is too large
+ 372 - 260
core/mac/src/sys/legacy/src/utils/src/dot11f.c


+ 45 - 0
core/mac/src/sys/legacy/src/utils/src/parser_api.c

@@ -2490,6 +2490,21 @@ tSirRetStatus sir_convert_probe_frame2_struct(tpAniSirGlobal pMac,
 				&pr->vendor2_ie.VHTOperation,
 				sizeof(tDot11fIEVHTOperation));
 	}
+	/* Update HS 2.0 Information Element */
+	if (pr->hs20vendor_ie.present) {
+		lim_log(pMac, LOG1,
+			FL("HS20 Indication Element Present, rel#:%u, id:%u\n"),
+			pr->hs20vendor_ie.release_num,
+			pr->hs20vendor_ie.hs_id_present);
+		qdf_mem_copy(&pProbeResp->hs20vendor_ie,
+			&pr->hs20vendor_ie,
+			sizeof(tDot11fIEhs20vendor_ie) -
+			sizeof(pr->hs20vendor_ie.hs_id));
+		if (pr->hs20vendor_ie.hs_id_present)
+			qdf_mem_copy(&pProbeResp->hs20vendor_ie.hs_id,
+				&pr->hs20vendor_ie.hs_id,
+				sizeof(pr->hs20vendor_ie.hs_id));
+	}
 	qdf_mem_free(pr);
 	return eSIR_SUCCESS;
 
@@ -3652,6 +3667,21 @@ sir_parse_beacon_ie(tpAniSirGlobal pMac,
 		qdf_mem_copy(&pBeaconStruct->ext_cap, &pBies->ExtCap,
 				sizeof(tDot11fIEExtCap));
 	}
+	/* Update HS 2.0 Information Element */
+	if (pBies->hs20vendor_ie.present) {
+		lim_log(pMac, LOG1,
+			FL("HS20 Indication Element Present, rel#:%u, id:%u\n"),
+			pBies->hs20vendor_ie.release_num,
+			pBies->hs20vendor_ie.hs_id_present);
+		qdf_mem_copy(&pBeaconStruct->hs20vendor_ie,
+			&pBies->hs20vendor_ie,
+			sizeof(tDot11fIEhs20vendor_ie) -
+			sizeof(pBies->hs20vendor_ie.hs_id));
+		if (pBies->hs20vendor_ie.hs_id_present)
+			qdf_mem_copy(&pBeaconStruct->hs20vendor_ie.hs_id,
+				&pBies->hs20vendor_ie.hs_id,
+				sizeof(pBies->hs20vendor_ie.hs_id));
+	}
 	qdf_mem_free(pBies);
 	return eSIR_SUCCESS;
 } /* End sir_parse_beacon_ie. */
@@ -3982,6 +4012,21 @@ sir_convert_beacon_frame2_struct(tpAniSirGlobal pMac,
 				&pBeacon->VHTOperation,
 				sizeof(tDot11fIEVHTOperation));
 	}
+	/* Update HS 2.0 Information Element */
+	if (pBeacon->hs20vendor_ie.present) {
+		lim_log(pMac, LOG1,
+			FL("HS20 Indication Element Present, rel#:%u, id:%u\n"),
+			pBeacon->hs20vendor_ie.release_num,
+			pBeacon->hs20vendor_ie.hs_id_present);
+		qdf_mem_copy(&pBeaconStruct->hs20vendor_ie,
+			&pBeacon->hs20vendor_ie,
+			sizeof(tDot11fIEhs20vendor_ie) -
+			sizeof(pBeacon->hs20vendor_ie.hs_id));
+		if (pBeacon->hs20vendor_ie.hs_id_present)
+			qdf_mem_copy(&pBeaconStruct->hs20vendor_ie.hs_id,
+				&pBeacon->hs20vendor_ie.hs_id,
+				sizeof(pBeacon->hs20vendor_ie.hs_id));
+	}
 #ifdef FEATURE_AP_MCC_CH_AVOIDANCE
 	if (pBeacon->QComVendorIE.present) {
 		pBeaconStruct->AvoidChannelIE.present =

Some files were not shown because too many files changed in this diff