diff --git a/core/mac/src/cfg/cfgUtil/dot11f.frms b/core/mac/src/cfg/cfgUtil/dot11f.frms index eb7e29c2f771..567492f58582 100644 --- a/core/mac/src/cfg/cfgUtil/dot11f.frms +++ b/core/mac/src/cfg/cfgUtil/dot11f.frms @@ -2413,6 +2413,12 @@ IE TimeAdvertisement (EID_TIME_ADVERTISEMENT) // 8.4.2.63 time_error[5]; } +IE MBO_IE (EID_VENDOR_SPECIFIC) OUI ( 0x50, 0x6F, 0x9A, 0x16 ) +{ + mbo_cap[3]; + assoc_disallowed[0..3]; +} + const EID_RRM_BEACON_REPORTING = 1; const EID_RRM_BCN_REPORTING_DETAIL = 2; @@ -2951,6 +2957,7 @@ FRAME Beacon // C.f. Sec. 7.2.3.1 OPTIE ChannelSwitchWrapper; OPTIE QComVendorIE; OPTIE ESEVersion; + OPTIE MBO_IE; } // End frame Beacon. // Ok, here's the story on Beacon1 & Beacon2. We presumably beacon a lot @@ -3103,6 +3110,7 @@ FRAME BeaconIEs OPTIE hs20vendor_ie; OPTIE ChannelSwitchWrapper; OPTIE QComVendorIE; + OPTIE MBO_IE; } // End frame BeaconIEs. FRAME Disassociation // 7.3.3.3 @@ -3320,6 +3328,7 @@ FRAME ProbeResponse // 7.2.3.9 OPTIE ChannelSwitchWrapper; OPTIE QComVendorIE; OPTIE ESEVersion; + OPTIE MBO_IE; } // End frame ProbeResponse. FRAME Authentication // 7.2.3.10 diff --git a/core/mac/src/include/dot11f.h b/core/mac/src/include/dot11f.h index ef886c502495..f57f4cedc1be 100644 --- a/core/mac/src/include/dot11f.h +++ b/core/mac/src/include/dot11f.h @@ -20,9 +20,9 @@ */ /* - * This file was originally distributed by Qualcomm Atheros, Inc. - * under proprietary terms before Copyright ownership was assigned - * to the Linux Foundation. + * Copyright (c) 2012-2016 Qualcomm Atheros, Inc. + * All Rights Reserved. + * Qualcomm Atheros Confidential and Proprietary. */ #ifndef DOT11F_H @@ -35,7 +35,7 @@ * * * This file was automatically generated by 'framesc' - * Thu May 26 13:06:28 2016 from the following file(s): + * Wed Jul 13 14:24:06 2016 from the following file(s): * * dot11f.frms * @@ -45,6 +45,7 @@ * 'framesc' For more information on 'framesc' & the * frames language, run 'framesc --help'. * + * */ typedef uint32_t tDOT11F_U64[2]; @@ -4668,6 +4669,46 @@ uint32_t dot11f_get_packed_ie_LinkIdentifier( }; /* End extern "C". */ #endif /* C++ */ +/* EID 221 (0xdd) {OUI 0x50, 0x6f, 0x9a, 0x16} */ +typedef struct sDot11fIEMBO_IE { + uint8_t present; + uint8_t mbo_cap[3]; + uint8_t num_assoc_disallowed; + uint8_t assoc_disallowed[3]; +} tDot11fIEMBO_IE; + +#define DOT11F_EID_MBO_IE (221) + +/* N.B. These #defines do *not* include the EID & length */ +#define DOT11F_IE_MBO_IE_MIN_LEN (7) + +#define DOT11F_IE_MBO_IE_MAX_LEN (10) + +#ifdef __cplusplus +extern "C" { +#endif /* C++ */ +uint32_t dot11f_unpack_ie_MBO_IE( + tpAniSirGlobal, + uint8_t *, + uint8_t, + tDot11fIEMBO_IE*); + +uint32_t dot11f_pack_ie_MBO_IE( + tpAniSirGlobal, + tDot11fIEMBO_IE *, + uint8_t *, + uint32_t, + uint32_t*); + +uint32_t dot11f_get_packed_ie_MBO_IE( + tpAniSirGlobal, + tDot11fIEMBO_IE *, + uint32_t*); + +#ifdef __cplusplus +}; /* End extern "C". */ +#endif /* C++ */ + /* EID 39 (0x27) */ typedef struct sDot11fIEMeasurementReport { uint8_t present; @@ -7846,6 +7887,7 @@ typedef struct sDot11fBeacon{ tDot11fIEChannelSwitchWrapper ChannelSwitchWrapper; tDot11fIEQComVendorIE QComVendorIE; tDot11fIEESEVersion ESEVersion; + tDot11fIEMBO_IE MBO_IE; } tDot11fBeacon; #define DOT11F_BEACON (6) @@ -8015,6 +8057,7 @@ typedef struct sDot11fBeaconIEs{ tDot11fIEhs20vendor_ie hs20vendor_ie; tDot11fIEChannelSwitchWrapper ChannelSwitchWrapper; tDot11fIEQComVendorIE QComVendorIE; + tDot11fIEMBO_IE MBO_IE; } tDot11fBeaconIEs; #define DOT11F_BEACONIES (9) @@ -8426,6 +8469,7 @@ typedef struct sDot11fProbeResponse{ tDot11fIEChannelSwitchWrapper ChannelSwitchWrapper; tDot11fIEQComVendorIE QComVendorIE; tDot11fIEESEVersion ESEVersion; + tDot11fIEMBO_IE MBO_IE; } tDot11fProbeResponse; #define DOT11F_PROBERESPONSE (22) diff --git a/core/mac/src/include/parser_api.h b/core/mac/src/include/parser_api.h index 7019d99d319a..495e86a38872 100644 --- a/core/mac/src/include/parser_api.h +++ b/core/mac/src/include/parser_api.h @@ -57,6 +57,7 @@ #define NSS_1x1_MODE 1 #define NSS_2x2_MODE 2 +#define MBO_IE_ASSOC_DISALLOWED_SUBATTR_ID 0x04 #ifdef FEATURE_AP_MCC_CH_AVOIDANCE #define QCOM_VENDOR_IE_MCC_AVOID_CH 0x01 @@ -167,6 +168,10 @@ typedef struct sSirProbeRespBeacon { uint8_t is_ese_ver_ie_present; #endif tDot11fIEOBSSScanParameters obss_scanparams; + bool MBO_IE_present; + uint8_t MBO_capability; + bool assoc_disallowed; + uint8_t assoc_disallowed_reason; } tSirProbeRespBeacon, *tpSirProbeRespBeacon; /* probe Request structure */ diff --git a/core/mac/src/pe/lim/lim_process_beacon_frame.c b/core/mac/src/pe/lim/lim_process_beacon_frame.c index 114e56337969..74220499024e 100644 --- a/core/mac/src/pe/lim/lim_process_beacon_frame.c +++ b/core/mac/src/pe/lim/lim_process_beacon_frame.c @@ -105,6 +105,16 @@ lim_process_beacon_frame(tpAniSirGlobal mac_ctx, uint8_t *rx_pkt_info, qdf_mem_free(bcn_ptr); return; } + + if (bcn_ptr->assoc_disallowed) { + lim_log(mac_ctx, LOG1, + FL("Association disallowed in AP "MAC_ADDRESS_STR " Reason code %d"), + MAC_ADDR_ARRAY(mac_hdr->sa), + bcn_ptr->assoc_disallowed_reason); + qdf_mem_free(bcn_ptr); + return; + } + /* * during scanning, when any session is active, and * beacon/Pr belongs to one of the session, fill up the diff --git a/core/mac/src/pe/lim/lim_process_probe_rsp_frame.c b/core/mac/src/pe/lim/lim_process_probe_rsp_frame.c index 7904cf6e7115..19978be54461 100644 --- a/core/mac/src/pe/lim/lim_process_probe_rsp_frame.c +++ b/core/mac/src/pe/lim/lim_process_probe_rsp_frame.c @@ -141,6 +141,16 @@ lim_process_probe_rsp_frame(tpAniSirGlobal mac_ctx, uint8_t *rx_Packet_info, qdf_mem_free(probe_rsp); return; } + + if (probe_rsp->assoc_disallowed) { + lim_log(mac_ctx, LOG1, + FL("Association disallowed by AP "MAC_ADDRESS_STR " Reason code %d"), + MAC_ADDR_ARRAY(header->bssId), + probe_rsp->assoc_disallowed_reason); + qdf_mem_free(probe_rsp); + return; + } + lim_check_and_add_bss_description(mac_ctx, probe_rsp, rx_Packet_info, false, true); /* To Support BT-AMP */ @@ -363,6 +373,16 @@ lim_process_probe_rsp_frame_no_session(tpAniSirGlobal mac_ctx, qdf_mem_free(probe_rsp); return; } + + if (probe_rsp->assoc_disallowed) { + lim_log(mac_ctx, LOG1, + FL("Association disallowed by AP "MAC_ADDRESS_STR " Reason code %d"), + MAC_ADDR_ARRAY(header->bssId), + probe_rsp->assoc_disallowed_reason); + qdf_mem_free(probe_rsp); + return; + } + lim_log(mac_ctx, LOG2, FL("Save this probe rsp in LFR cache")); lim_check_and_add_bss_description(mac_ctx, probe_rsp, rx_packet_info, false, true); diff --git a/core/mac/src/sys/legacy/src/utils/src/dot11f.c b/core/mac/src/sys/legacy/src/utils/src/dot11f.c index c5e1bf89cdb8..430a562a802e 100644 --- a/core/mac/src/sys/legacy/src/utils/src/dot11f.c +++ b/core/mac/src/sys/legacy/src/utils/src/dot11f.c @@ -20,12 +20,12 @@ */ /* - * This file was originally distributed by Qualcomm Atheros, Inc. - * under proprietary terms before Copyright ownership was assigned - * to the Linux Foundation. + * Copyright (c) 2012-2016 Qualcomm Atheros, Inc. + * All Rights Reserved. + * Qualcomm Atheros Confidential and Proprietary. */ - /* +/* * \file dot11f.c * * \brief Structures, functions & definitions for @@ -33,12 +33,13 @@ * * * This file was automatically generated by 'framesc' - * Thu May 26 13:06:28 2016 from the following file(s): + * Wed Jul 13 14:24:06 2016 from the following file(s): * * dot11f.frms * * PLEASE DON'T EDIT THIS FILE BY HAND! * + * */ #if !defined ANI_OS_TYPE_OSX && !defined ANI_OS_TYPE_LINUX && !defined ANI_OS_TYPE_ANDROID @@ -3336,6 +3337,33 @@ uint32_t dot11f_unpack_ie_link_identifier(tpAniSirGlobal pCtx, #define SigIeLinkIdentifier (0x003c) +uint32_t dot11f_unpack_ie_MBO_IE(tpAniSirGlobal pCtx, + uint8_t *pBuf, + uint8_t ielen, + tDot11fIEMBO_IE *pDst) +{ + uint32_t status = DOT11F_PARSE_SUCCESS; + (void) pBuf; (void)ielen; /* Shutup the compiler */ + if (pDst->present) + status = DOT11F_DUPLICATE_IE; + pDst->present = 1; + DOT11F_MEMCPY(pCtx, pDst->mbo_cap, pBuf, 3); + pBuf += 3; + ielen -= (uint8_t)3; + pDst->num_assoc_disallowed = (uint8_t)(ielen); + if (ielen > 3) { + pDst->present = 0; + return DOT11F_SKIPPED_BAD_IE; + } + + DOT11F_MEMCPY(pCtx, pDst->assoc_disallowed, pBuf, (ielen)); + (void)pCtx; + return status; +} /* End dot11f_unpack_ie_MBO_IE. */ + +#define SigIeMBO_IE (0x003d) + + static const tFFDefn FFS_reportBeacon[] = { { NULL, 0, 0, 0,}, }; @@ -3495,7 +3523,7 @@ uint32_t dot11f_unpack_ie_measurement_report(tpAniSirGlobal pCtx, return status; } /* End dot11f_unpack_ie_measurement_report. */ -#define SigIeMeasurementReport (0x003d) +#define SigIeMeasurementReport (0x003e) static const tFFDefn FFS_measurement_requestBeacon[] = { @@ -3687,7 +3715,7 @@ uint32_t dot11f_unpack_ie_measurement_request(tpAniSirGlobal pCtx, return status; } /* End dot11f_unpack_ie_measurement_request. */ -#define SigIeMeasurementRequest (0x003e) +#define SigIeMeasurementRequest (0x003f) uint32_t dot11f_unpack_ie_mobility_domain(tpAniSirGlobal pCtx, @@ -3712,7 +3740,7 @@ uint32_t dot11f_unpack_ie_mobility_domain(tpAniSirGlobal pCtx, return status; } /* End dot11f_unpack_ie_mobility_domain. */ -#define SigIeMobilityDomain (0x003f) +#define SigIeMobilityDomain (0x0040) static const tFFDefn FFS_NeighborReport[] = { @@ -3797,7 +3825,7 @@ uint32_t dot11f_unpack_ie_neighbor_report(tpAniSirGlobal pCtx, return status; } /* End dot11f_unpack_ie_neighbor_report. */ -#define SigIeNeighborReport (0x0040) +#define SigIeNeighborReport (0x0041) uint32_t dot11f_unpack_ie_obss_scan_parameters(tpAniSirGlobal pCtx, @@ -3833,7 +3861,7 @@ uint32_t dot11f_unpack_ie_obss_scan_parameters(tpAniSirGlobal pCtx, return status; } /* End dot11f_unpack_ie_obss_scan_parameters. */ -#define SigIeOBSSScanParameters (0x0041) +#define SigIeOBSSScanParameters (0x0042) uint32_t dot11f_unpack_ie_operating_mode(tpAniSirGlobal pCtx, @@ -3856,7 +3884,7 @@ uint32_t dot11f_unpack_ie_operating_mode(tpAniSirGlobal pCtx, return status; } /* End dot11f_unpack_ie_operating_mode. */ -#define SigIeOperatingMode (0x0042) +#define SigIeOperatingMode (0x0043) static const tTLVDefn TLVS_P2PAssocReq[] = { @@ -3887,7 +3915,7 @@ uint32_t dot11f_unpack_ie_p2_p_assoc_req(tpAniSirGlobal pCtx, return status; } /* End dot11f_unpack_ie_p2_p_assoc_req. */ -#define SigIeP2PAssocReq (0x0043) +#define SigIeP2PAssocReq (0x0044) static const tTLVDefn TLVS_P2PAssocRes[] = { @@ -3915,7 +3943,7 @@ uint32_t dot11f_unpack_ie_p2_p_assoc_res(tpAniSirGlobal pCtx, return status; } /* End dot11f_unpack_ie_p2_p_assoc_res. */ -#define SigIeP2PAssocRes (0x0044) +#define SigIeP2PAssocRes (0x0045) static const tTLVDefn TLVS_P2PBeacon[] = { @@ -3946,7 +3974,7 @@ uint32_t dot11f_unpack_ie_p2_p_beacon(tpAniSirGlobal pCtx, return status; } /* End dot11f_unpack_ie_p2_p_beacon. */ -#define SigIeP2PBeacon (0x0045) +#define SigIeP2PBeacon (0x0046) static const tTLVDefn TLVS_P2PBeaconProbeRes[] = { @@ -3987,7 +4015,7 @@ uint32_t dot11f_unpack_ie_p2_p_beacon_probe_res(tpAniSirGlobal pCtx, return status; } /* End dot11f_unpack_ie_p2_p_beacon_probe_res. */ -#define SigIeP2PBeaconProbeRes (0x0046) +#define SigIeP2PBeaconProbeRes (0x0047) static const tTLVDefn TLVS_P2PDeAuth[] = { @@ -4012,7 +4040,7 @@ uint32_t dot11f_unpack_ie_p2_p_de_auth(tpAniSirGlobal pCtx, return status; } /* End dot11f_unpack_ie_p2_p_de_auth. */ -#define SigIeP2PDeAuth (0x0047) +#define SigIeP2PDeAuth (0x0048) static const tTLVDefn TLVS_P2PDisAssoc[] = { @@ -4037,7 +4065,7 @@ uint32_t dot11f_unpack_ie_p2_p_dis_assoc(tpAniSirGlobal pCtx, return status; } /* End dot11f_unpack_ie_p2_p_dis_assoc. */ -#define SigIeP2PDisAssoc (0x0048) +#define SigIeP2PDisAssoc (0x0049) uint32_t dot11f_unpack_ie_p2_pie_opaque(tpAniSirGlobal pCtx, @@ -4061,7 +4089,7 @@ uint32_t dot11f_unpack_ie_p2_pie_opaque(tpAniSirGlobal pCtx, return status; } /* End dot11f_unpack_ie_p2_pie_opaque. */ -#define SigIeP2PIEOpaque (0x0049) +#define SigIeP2PIEOpaque (0x004a) static const tTLVDefn TLVS_P2PProbeReq[] = { @@ -4099,7 +4127,7 @@ uint32_t dot11f_unpack_ie_p2_p_probe_req(tpAniSirGlobal pCtx, return status; } /* End dot11f_unpack_ie_p2_p_probe_req. */ -#define SigIeP2PProbeReq (0x004a) +#define SigIeP2PProbeReq (0x004b) static const tTLVDefn TLVS_P2PProbeRes[] = { @@ -4137,7 +4165,7 @@ uint32_t dot11f_unpack_ie_p2_p_probe_res(tpAniSirGlobal pCtx, return status; } /* End dot11f_unpack_ie_p2_p_probe_res. */ -#define SigIeP2PProbeRes (0x004b) +#define SigIeP2PProbeRes (0x004c) uint32_t dot11f_unpack_ie_pti_control(tpAniSirGlobal pCtx, @@ -4158,7 +4186,7 @@ uint32_t dot11f_unpack_ie_pti_control(tpAniSirGlobal pCtx, return status; } /* End dot11f_unpack_ie_pti_control. */ -#define SigIePTIControl (0x004c) +#define SigIePTIControl (0x004d) uint32_t dot11f_unpack_ie_pu_buffer_status(tpAniSirGlobal pCtx, @@ -4182,7 +4210,7 @@ uint32_t dot11f_unpack_ie_pu_buffer_status(tpAniSirGlobal pCtx, return status; } /* End dot11f_unpack_ie_pu_buffer_status. */ -#define SigIePUBufferStatus (0x004d) +#define SigIePUBufferStatus (0x004e) uint32_t dot11f_unpack_ie_power_caps(tpAniSirGlobal pCtx, @@ -4203,7 +4231,7 @@ uint32_t dot11f_unpack_ie_power_caps(tpAniSirGlobal pCtx, return status; } /* End dot11f_unpack_ie_power_caps. */ -#define SigIePowerCaps (0x004e) +#define SigIePowerCaps (0x004f) uint32_t dot11f_unpack_ie_power_constraints(tpAniSirGlobal pCtx, @@ -4221,7 +4249,7 @@ uint32_t dot11f_unpack_ie_power_constraints(tpAniSirGlobal pCtx, return status; } /* End dot11f_unpack_ie_power_constraints. */ -#define SigIePowerConstraints (0x004f) +#define SigIePowerConstraints (0x0050) uint32_t dot11f_unpack_ie_qbss_load(tpAniSirGlobal pCtx, @@ -4245,7 +4273,7 @@ uint32_t dot11f_unpack_ie_qbss_load(tpAniSirGlobal pCtx, return status; } /* End dot11f_unpack_ie_qbss_load. */ -#define SigIeQBSSLoad (0x0050) +#define SigIeQBSSLoad (0x0051) uint32_t dot11f_unpack_ie_QComVendorIE(tpAniSirGlobal pCtx, @@ -4266,7 +4294,7 @@ uint32_t dot11f_unpack_ie_QComVendorIE(tpAniSirGlobal pCtx, return status; } /* End dot11f_unpack_ie_QComVendorIE. */ -#define SigIeQComVendorIE (0x0051) +#define SigIeQComVendorIE (0x0052) uint32_t dot11f_unpack_ie_qos_caps_ap(tpAniSirGlobal pCtx, @@ -4290,7 +4318,7 @@ uint32_t dot11f_unpack_ie_qos_caps_ap(tpAniSirGlobal pCtx, return status; } /* End dot11f_unpack_ie_qos_caps_ap. */ -#define SigIeQOSCapsAp (0x0052) +#define SigIeQOSCapsAp (0x0053) uint32_t dot11f_unpack_ie_qos_caps_station(tpAniSirGlobal pCtx, @@ -4316,7 +4344,7 @@ uint32_t dot11f_unpack_ie_qos_caps_station(tpAniSirGlobal pCtx, return status; } /* End dot11f_unpack_ie_qos_caps_station. */ -#define SigIeQOSCapsStation (0x0053) +#define SigIeQOSCapsStation (0x0054) uint32_t dot11f_unpack_ie_qos_map_set(tpAniSirGlobal pCtx, @@ -4340,7 +4368,7 @@ uint32_t dot11f_unpack_ie_qos_map_set(tpAniSirGlobal pCtx, return status; } /* End dot11f_unpack_ie_qos_map_set. */ -#define SigIeQosMapSet (0x0054) +#define SigIeQosMapSet (0x0055) uint32_t dot11f_unpack_ie_quiet(tpAniSirGlobal pCtx, @@ -4367,7 +4395,7 @@ uint32_t dot11f_unpack_ie_quiet(tpAniSirGlobal pCtx, return status; } /* End dot11f_unpack_ie_quiet. */ -#define SigIeQuiet (0x0055) +#define SigIeQuiet (0x0056) uint32_t dot11f_unpack_ie_rcpiie(tpAniSirGlobal pCtx, @@ -4385,7 +4413,7 @@ uint32_t dot11f_unpack_ie_rcpiie(tpAniSirGlobal pCtx, return status; } /* End dot11f_unpack_ie_rcpiie. */ -#define SigIeRCPIIE (0x0056) +#define SigIeRCPIIE (0x0057) static const tFFDefn FFS_RICDataDesc[] = { @@ -4459,7 +4487,7 @@ uint32_t dot11f_unpack_ie_ric_data_desc(tpAniSirGlobal pCtx, return status; } /* End dot11f_unpack_ie_ric_data_desc. */ -#define SigIeRICDataDesc (0x0057) +#define SigIeRICDataDesc (0x0058) uint32_t dot11f_unpack_ie_rsn(tpAniSirGlobal pCtx, @@ -4550,7 +4578,7 @@ uint32_t dot11f_unpack_ie_rsn(tpAniSirGlobal pCtx, return status; } /* End dot11f_unpack_ie_rsn. */ -#define SigIeRSN (0x0058) +#define SigIeRSN (0x0059) uint32_t dot11f_unpack_ie_rsniie(tpAniSirGlobal pCtx, @@ -4568,7 +4596,7 @@ uint32_t dot11f_unpack_ie_rsniie(tpAniSirGlobal pCtx, return status; } /* End dot11f_unpack_ie_rsniie. */ -#define SigIeRSNIIE (0x0059) +#define SigIeRSNIIE (0x005a) uint32_t dot11f_unpack_ie_rsn_opaque(tpAniSirGlobal pCtx, @@ -4592,7 +4620,7 @@ uint32_t dot11f_unpack_ie_rsn_opaque(tpAniSirGlobal pCtx, return status; } /* End dot11f_unpack_ie_rsn_opaque. */ -#define SigIeRSNOpaque (0x005a) +#define SigIeRSNOpaque (0x005b) uint32_t dot11f_unpack_ie_supp_channels(tpAniSirGlobal pCtx, @@ -4616,7 +4644,7 @@ uint32_t dot11f_unpack_ie_supp_channels(tpAniSirGlobal pCtx, return status; } /* End dot11f_unpack_ie_supp_channels. */ -#define SigIeSuppChannels (0x005b) +#define SigIeSuppChannels (0x005c) uint32_t dot11f_unpack_ie_supp_operating_classes(tpAniSirGlobal pCtx, @@ -4640,7 +4668,7 @@ uint32_t dot11f_unpack_ie_supp_operating_classes(tpAniSirGlobal pCtx, return status; } /* End dot11f_unpack_ie_supp_operating_classes. */ -#define SigIeSuppOperatingClasses (0x005c) +#define SigIeSuppOperatingClasses (0x005d) uint32_t dot11f_unpack_ie_supp_rates(tpAniSirGlobal pCtx, @@ -4672,7 +4700,7 @@ uint32_t dot11f_unpack_ie_supp_rates(tpAniSirGlobal pCtx, return status; } /* End dot11f_unpack_ie_supp_rates. */ -#define SigIeSuppRates (0x005d) +#define SigIeSuppRates (0x005e) uint32_t dot11f_unpack_ie_tim(tpAniSirGlobal pCtx, @@ -4705,7 +4733,7 @@ uint32_t dot11f_unpack_ie_tim(tpAniSirGlobal pCtx, return status; } /* End dot11f_unpack_ie_tim. */ -#define SigIeTIM (0x005e) +#define SigIeTIM (0x005f) uint32_t dot11f_unpack_ie_tpc_report(tpAniSirGlobal pCtx, @@ -4726,7 +4754,7 @@ uint32_t dot11f_unpack_ie_tpc_report(tpAniSirGlobal pCtx, return status; } /* End dot11f_unpack_ie_tpc_report. */ -#define SigIeTPCReport (0x005f) +#define SigIeTPCReport (0x0060) uint32_t dot11f_unpack_ie_tpc_request(tpAniSirGlobal pCtx, @@ -4743,7 +4771,7 @@ uint32_t dot11f_unpack_ie_tpc_request(tpAniSirGlobal pCtx, return status; } /* End dot11f_unpack_ie_tpc_request. */ -#define SigIeTPCRequest (0x0060) +#define SigIeTPCRequest (0x0061) uint32_t dot11f_unpack_ie_time_advertisement(tpAniSirGlobal pCtx, @@ -4767,7 +4795,7 @@ uint32_t dot11f_unpack_ie_time_advertisement(tpAniSirGlobal pCtx, return status; } /* End dot11f_unpack_ie_time_advertisement. */ -#define SigIeTimeAdvertisement (0x0061) +#define SigIeTimeAdvertisement (0x0062) uint32_t dot11f_unpack_ie_timeout_interval(tpAniSirGlobal pCtx, @@ -4788,7 +4816,7 @@ uint32_t dot11f_unpack_ie_timeout_interval(tpAniSirGlobal pCtx, return status; } /* End dot11f_unpack_ie_timeout_interval. */ -#define SigIeTimeoutInterval (0x0062) +#define SigIeTimeoutInterval (0x0063) uint32_t dot11f_unpack_ie_vht_ext_bss_load(tpAniSirGlobal pCtx, @@ -4818,7 +4846,7 @@ uint32_t dot11f_unpack_ie_vht_ext_bss_load(tpAniSirGlobal pCtx, return status; } /* End dot11f_unpack_ie_vht_ext_bss_load. */ -#define SigIeVHTExtBssLoad (0x0063) +#define SigIeVHTExtBssLoad (0x0064) uint32_t dot11f_unpack_ie_vendor1_ie(tpAniSirGlobal pCtx, @@ -4835,7 +4863,7 @@ uint32_t dot11f_unpack_ie_vendor1_ie(tpAniSirGlobal pCtx, return status; } /* End dot11f_unpack_ie_vendor1_ie. */ -#define SigIeVendor1IE (0x0064) +#define SigIeVendor1IE (0x0065) uint32_t dot11f_unpack_ie_vendor3_ie(tpAniSirGlobal pCtx, @@ -4852,7 +4880,7 @@ uint32_t dot11f_unpack_ie_vendor3_ie(tpAniSirGlobal pCtx, return status; } /* End dot11f_unpack_ie_vendor3_ie. */ -#define SigIeVendor3IE (0x0065) +#define SigIeVendor3IE (0x0066) uint32_t dot11f_unpack_ie_wapi(tpAniSirGlobal pCtx, @@ -4921,7 +4949,7 @@ uint32_t dot11f_unpack_ie_wapi(tpAniSirGlobal pCtx, return status; } /* End dot11f_unpack_ie_wapi. */ -#define SigIeWAPI (0x0066) +#define SigIeWAPI (0x0067) uint32_t dot11f_unpack_ie_wapi_opaque(tpAniSirGlobal pCtx, @@ -4945,7 +4973,7 @@ uint32_t dot11f_unpack_ie_wapi_opaque(tpAniSirGlobal pCtx, return status; } /* End dot11f_unpack_ie_wapi_opaque. */ -#define SigIeWAPIOpaque (0x0067) +#define SigIeWAPIOpaque (0x0068) uint32_t dot11f_unpack_ie_wfatpc(tpAniSirGlobal pCtx, @@ -4966,7 +4994,7 @@ uint32_t dot11f_unpack_ie_wfatpc(tpAniSirGlobal pCtx, return status; } /* End dot11f_unpack_ie_wfatpc. */ -#define SigIeWFATPC (0x0068) +#define SigIeWFATPC (0x0069) uint32_t dot11f_unpack_ie_wfdie_opaque(tpAniSirGlobal pCtx, @@ -4990,7 +5018,7 @@ uint32_t dot11f_unpack_ie_wfdie_opaque(tpAniSirGlobal pCtx, return status; } /* End dot11f_unpack_ie_wfdie_opaque. */ -#define SigIeWFDIEOpaque (0x0069) +#define SigIeWFDIEOpaque (0x006a) uint32_t dot11f_unpack_ie_wmm_caps(tpAniSirGlobal pCtx, @@ -5021,7 +5049,7 @@ uint32_t dot11f_unpack_ie_wmm_caps(tpAniSirGlobal pCtx, return status; } /* End dot11f_unpack_ie_wmm_caps. */ -#define SigIeWMMCaps (0x006a) +#define SigIeWMMCaps (0x006b) uint32_t dot11f_unpack_ie_wmm_info_ap(tpAniSirGlobal pCtx, @@ -5046,7 +5074,7 @@ uint32_t dot11f_unpack_ie_wmm_info_ap(tpAniSirGlobal pCtx, return status; } /* End dot11f_unpack_ie_wmm_info_ap. */ -#define SigIeWMMInfoAp (0x006b) +#define SigIeWMMInfoAp (0x006c) uint32_t dot11f_unpack_ie_wmm_info_station(tpAniSirGlobal pCtx, @@ -5075,7 +5103,7 @@ uint32_t dot11f_unpack_ie_wmm_info_station(tpAniSirGlobal pCtx, return status; } /* End dot11f_unpack_ie_wmm_info_station. */ -#define SigIeWMMInfoStation (0x006c) +#define SigIeWMMInfoStation (0x006d) uint32_t dot11f_unpack_ie_wmm_params(tpAniSirGlobal pCtx, @@ -5171,7 +5199,7 @@ uint32_t dot11f_unpack_ie_wmm_params(tpAniSirGlobal pCtx, return status; } /* End dot11f_unpack_ie_wmm_params. */ -#define SigIeWMMParams (0x006d) +#define SigIeWMMParams (0x006e) uint32_t dot11f_unpack_ie_wpa(tpAniSirGlobal pCtx, @@ -5244,7 +5272,7 @@ uint32_t dot11f_unpack_ie_wpa(tpAniSirGlobal pCtx, return status; } /* End dot11f_unpack_ie_wpa. */ -#define SigIeWPA (0x006e) +#define SigIeWPA (0x006f) uint32_t dot11f_unpack_ie_wpa_opaque(tpAniSirGlobal pCtx, @@ -5268,7 +5296,7 @@ uint32_t dot11f_unpack_ie_wpa_opaque(tpAniSirGlobal pCtx, return status; } /* End dot11f_unpack_ie_wpa_opaque. */ -#define SigIeWPAOpaque (0x006f) +#define SigIeWPAOpaque (0x0070) static const tTLVDefn TLVS_WSC[] = { @@ -5358,7 +5386,7 @@ uint32_t dot11f_unpack_ie_wsc(tpAniSirGlobal pCtx, return status; } /* End dot11f_unpack_ie_wsc. */ -#define SigIeWSC (0x0070) +#define SigIeWSC (0x0071) static const tTLVDefn TLVS_WscAssocReq[] = { @@ -5389,7 +5417,7 @@ uint32_t dot11f_unpack_ie_wsc_assoc_req(tpAniSirGlobal pCtx, return status; } /* End dot11f_unpack_ie_wsc_assoc_req. */ -#define SigIeWscAssocReq (0x0071) +#define SigIeWscAssocReq (0x0072) static const tTLVDefn TLVS_WscAssocRes[] = { @@ -5420,7 +5448,7 @@ uint32_t dot11f_unpack_ie_wsc_assoc_res(tpAniSirGlobal pCtx, return status; } /* End dot11f_unpack_ie_wsc_assoc_res. */ -#define SigIeWscAssocRes (0x0072) +#define SigIeWscAssocRes (0x0073) static const tTLVDefn TLVS_WscBeacon[] = { @@ -5472,7 +5500,7 @@ uint32_t dot11f_unpack_ie_wsc_beacon(tpAniSirGlobal pCtx, return status; } /* End dot11f_unpack_ie_wsc_beacon. */ -#define SigIeWscBeacon (0x0073) +#define SigIeWscBeacon (0x0074) static const tTLVDefn TLVS_WscBeaconProbeRes[] = { @@ -5549,7 +5577,7 @@ uint32_t dot11f_unpack_ie_wsc_beacon_probe_res(tpAniSirGlobal pCtx, return status; } /* End dot11f_unpack_ie_wsc_beacon_probe_res. */ -#define SigIeWscBeaconProbeRes (0x0074) +#define SigIeWscBeaconProbeRes (0x0075) uint32_t dot11f_unpack_ie_wsc_ie_opaque(tpAniSirGlobal pCtx, @@ -5573,7 +5601,7 @@ uint32_t dot11f_unpack_ie_wsc_ie_opaque(tpAniSirGlobal pCtx, return status; } /* End dot11f_unpack_ie_wsc_ie_opaque. */ -#define SigIeWscIEOpaque (0x0075) +#define SigIeWscIEOpaque (0x0076) static const tTLVDefn TLVS_WscProbeReq[] = { @@ -5645,7 +5673,7 @@ uint32_t dot11f_unpack_ie_wsc_probe_req(tpAniSirGlobal pCtx, return status; } /* End dot11f_unpack_ie_wsc_probe_req. */ -#define SigIeWscProbeReq (0x0076) +#define SigIeWscProbeReq (0x0077) static const tTLVDefn TLVS_WscProbeRes[] = { @@ -5722,7 +5750,7 @@ uint32_t dot11f_unpack_ie_wsc_probe_res(tpAniSirGlobal pCtx, return status; } /* End dot11f_unpack_ie_wsc_probe_res. */ -#define SigIeWscProbeRes (0x0077) +#define SigIeWscProbeRes (0x0078) static const tTLVDefn TLVS_WscReassocRes[] = { @@ -5753,7 +5781,7 @@ uint32_t dot11f_unpack_ie_wsc_reassoc_res(tpAniSirGlobal pCtx, return status; } /* End dot11f_unpack_ie_wsc_reassoc_res. */ -#define SigIeWscReassocRes (0x0078) +#define SigIeWscReassocRes (0x0079) uint32_t dot11f_unpack_ie_ext_chan_switch_ann(tpAniSirGlobal pCtx, @@ -5780,7 +5808,7 @@ uint32_t dot11f_unpack_ie_ext_chan_switch_ann(tpAniSirGlobal pCtx, return status; } /* End dot11f_unpack_ie_ext_chan_switch_ann. */ -#define SigIeext_chan_switch_ann (0x0079) +#define SigIeext_chan_switch_ann (0x007a) uint32_t dot11f_unpack_ie_hs20vendor_ie(tpAniSirGlobal pCtx, @@ -5809,14 +5837,12 @@ uint32_t dot11f_unpack_ie_hs20vendor_ie(tpAniSirGlobal pCtx, } else { switch (pDst->hs_id_present) { case 1: - framesntohs(pCtx, &pDst->hs_id.pps_mo.pps_mo_id, - pBuf, 0); + framesntohs(pCtx, &pDst->hs_id.pps_mo.pps_mo_id, pBuf, 0); pBuf += 2; ielen -= (uint8_t)2; break; case 2: - framesntohs(pCtx, - &pDst->hs_id.anqp_domain.anqp_domain_id, pBuf, 0); + framesntohs(pCtx, &pDst->hs_id.anqp_domain.anqp_domain_id, pBuf, 0); pBuf += 2; ielen -= (uint8_t)2; break; @@ -5826,7 +5852,7 @@ uint32_t dot11f_unpack_ie_hs20vendor_ie(tpAniSirGlobal pCtx, return status; } /* End dot11f_unpack_ie_hs20vendor_ie. */ -#define SigIehs20vendor_ie (0x007a) +#define SigIehs20vendor_ie (0x007b) uint32_t dot11f_unpack_ie_ht2040_bss_coexistence(tpAniSirGlobal pCtx, @@ -5851,7 +5877,7 @@ uint32_t dot11f_unpack_ie_ht2040_bss_coexistence(tpAniSirGlobal pCtx, return status; } /* End dot11f_unpack_ie_ht2040_bss_coexistence. */ -#define SigIeht2040_bss_coexistence (0x007b) +#define SigIeht2040_bss_coexistence (0x007c) uint32_t dot11f_unpack_ie_ht2040_bss_intolerant_report(tpAniSirGlobal pCtx, @@ -5878,7 +5904,7 @@ uint32_t dot11f_unpack_ie_ht2040_bss_intolerant_report(tpAniSirGlobal pCtx, return status; } /* End dot11f_unpack_ie_ht2040_bss_intolerant_report. */ -#define SigIeht2040_bss_intolerant_report (0x007c) +#define SigIeht2040_bss_intolerant_report (0x007d) uint32_t dot11f_unpack_ie_sec_chan_offset_ele(tpAniSirGlobal pCtx, @@ -5896,7 +5922,7 @@ uint32_t dot11f_unpack_ie_sec_chan_offset_ele(tpAniSirGlobal pCtx, return status; } /* End dot11f_unpack_ie_sec_chan_offset_ele. */ -#define SigIesec_chan_offset_ele (0x007d) +#define SigIesec_chan_offset_ele (0x007e) static const tFFDefn FFS_vendor2_ie[] = { @@ -5941,7 +5967,7 @@ uint32_t dot11f_unpack_ie_vendor2_ie(tpAniSirGlobal pCtx, return status; } /* End dot11f_unpack_ie_vendor2_ie. */ -#define SigIevendor2_ie (0x007e) +#define SigIevendor2_ie (0x007f) static const tFFDefn FFS_AddTSRequest[] = { @@ -6537,6 +6563,9 @@ static const tIEDefn IES_Beacon[] = { { offsetof(tDot11fBeacon, ESEVersion), offsetof(tDot11fIEESEVersion, present), 0, "ESEVersion", 0, 7, 7, SigIeESEVersion, {0, 64, 150, 3, 0}, 4, DOT11F_EID_ESEVERSION, 0, }, + { offsetof(tDot11fBeacon, MBO_IE), offsetof(tDot11fIEMBO_IE, present), 0, + "MBO_IE", 0, 9, 12, SigIeMBO_IE, {80, 111, 154, 22, 0}, + 4, DOT11F_EID_MBO_IE, 0, }, {0, 0, 0, NULL, 0, 0, 0, 0, {0, 0, 0, 0, 0}, 0, 0xff, 0, },}; uint32_t dot11f_unpack_beacon(tpAniSirGlobal pCtx, @@ -6930,6 +6959,9 @@ static const tIEDefn IES_BeaconIEs[] = { offsetof(tDot11fIEQComVendorIE, present), 0, "QComVendorIE", 0, 7, 7, SigIeQComVendorIE, {0, 160, 198, 0, 0}, 3, DOT11F_EID_QCOMVENDORIE, 0, }, + { offsetof(tDot11fBeaconIEs, MBO_IE), offsetof(tDot11fIEMBO_IE, present), + 0, "MBO_IE", 0, 9, 12, SigIeMBO_IE, {80, 111, 154, 22, 0}, + 4, DOT11F_EID_MBO_IE, 0, }, {0, 0, 0, NULL, 0, 0, 0, 0, {0, 0, 0, 0, 0}, 0, 0xff, 0, },}; uint32_t dot11f_unpack_beacon_i_es(tpAniSirGlobal pCtx, @@ -7540,6 +7572,9 @@ static const tIEDefn IES_ProbeResponse[] = { offsetof(tDot11fIEESEVersion, present), 0, "ESEVersion", 0, 7, 7, SigIeESEVersion, {0, 64, 150, 3, 0}, 4, DOT11F_EID_ESEVERSION, 0, }, + { offsetof(tDot11fProbeResponse, MBO_IE), offsetof(tDot11fIEMBO_IE, + present), 0, "MBO_IE", 0, 9, 12, SigIeMBO_IE, {80, 111, 154, 22, 0}, + 4, DOT11F_EID_MBO_IE, 0, }, {0, 0, 0, NULL, 0, 0, 0, 0, {0, 0, 0, 0, 0}, 0, 0xff, 0, },}; uint32_t dot11f_unpack_probe_response(tpAniSirGlobal pCtx, @@ -9597,6 +9632,15 @@ static uint32_t unpack_core(tpAniSirGlobal pCtx, sizeof(tDot11fIELinkIdentifier) * countOffset)); break; + case SigIeMBO_IE: + status |= + dot11f_unpack_ie_MBO_IE( + pCtx, pBufRemaining, len, + (tDot11fIEMBO_IE *) + (pFrm + pIe->offset + + sizeof(tDot11fIEMBO_IE) * + countOffset)); + break; case SigIeMeasurementReport: status |= dot11f_unpack_ie_measurement_report( @@ -12351,6 +12395,15 @@ static uint32_t get_packed_size_core(tpAniSirGlobal pCtx, (pFrm + pIe->offset + offset * i))-> present; break; + case SigIeMBO_IE: + offset = sizeof(tDot11fIEMBO_IE); + byteCount = ((tDot11fIEMBO_IE *) + (pFrm + pIe->offset + offset * i))-> + num_assoc_disallowed + 3; + pIePresent = ((tDot11fIEMBO_IE *) + (pFrm + pIe->offset + offset * i))-> + present; + break; case SigIeMeasurementReport: offset = sizeof(tDot11fIEMeasurementReport); status |= @@ -17253,6 +17306,46 @@ uint32_t dot11f_pack_ie_link_identifier(tpAniSirGlobal pCtx, return DOT11F_PARSE_SUCCESS; } /* End dot11f_pack_ie_link_identifier. */ +uint32_t dot11f_pack_ie_MBO_IE(tpAniSirGlobal pCtx, + tDot11fIEMBO_IE *pSrc, + uint8_t *pBuf, + uint32_t nBuf, + uint32_t *pnConsumed) +{ + uint8_t *pIeLen = 0; + uint32_t nConsumedOnEntry = *pnConsumed; + uint32_t nNeeded = 0U; + nNeeded += (pSrc->num_assoc_disallowed + 3); + while (pSrc->present) { + if (nNeeded > nBuf) + return DOT11F_BUFFER_OVERFLOW; + *pBuf = 221; + ++pBuf; ++(*pnConsumed); + pIeLen = pBuf; + ++pBuf; ++(*pnConsumed); + *pBuf = 0x50; + ++pBuf; ++(*pnConsumed); + *pBuf = 0x6f; + ++pBuf; ++(*pnConsumed); + *pBuf = 0x9a; + ++pBuf; ++(*pnConsumed); + *pBuf = 0x16; + ++pBuf; ++(*pnConsumed); + DOT11F_MEMCPY(pCtx, pBuf, pSrc->mbo_cap, 3); + *pnConsumed += 3; + pBuf += 3; + DOT11F_MEMCPY(pCtx, pBuf, &(pSrc->assoc_disallowed), pSrc->num_assoc_disallowed); + *pnConsumed += pSrc->num_assoc_disallowed; + /* fieldsEndFlag = 1 */ + break; + } + (void)pCtx; + if (pIeLen) { + *pIeLen = *pnConsumed - nConsumedOnEntry - 2; + } + return DOT11F_PARSE_SUCCESS; +} /* End dot11f_pack_ie_MBO_IE. */ + uint32_t dot11f_pack_ie_measurement_report(tpAniSirGlobal pCtx, tDot11fIEMeasurementReport *pSrc, uint8_t *pBuf, @@ -21704,6 +21797,14 @@ static uint32_t pack_core(tpAniSirGlobal pCtx, sizeof(tDot11fIELinkIdentifier) * i), pBufRemaining, nBufRemaining, &len); break; + case SigIeMBO_IE: + status |= + dot11f_pack_ie_MBO_IE( + pCtx, (tDot11fIEMBO_IE *) + (pSrc + pIe->offset + + sizeof(tDot11fIEMBO_IE) * i), + pBufRemaining, nBufRemaining, &len); + break; case SigIeMeasurementReport: status |= dot11f_pack_ie_measurement_report( diff --git a/core/mac/src/sys/legacy/src/utils/src/parser_api.c b/core/mac/src/sys/legacy/src/utils/src/parser_api.c index b586c0f3308e..927216ae268c 100644 --- a/core/mac/src/sys/legacy/src/utils/src/parser_api.c +++ b/core/mac/src/sys/legacy/src/utils/src/parser_api.c @@ -2518,6 +2518,19 @@ tSirRetStatus sir_convert_probe_frame2_struct(tpAniSirGlobal pMac, &pr->hs20vendor_ie.hs_id, sizeof(pr->hs20vendor_ie.hs_id)); } + if (pr->MBO_IE.present) { + pProbeResp->MBO_IE_present = true; + pProbeResp->MBO_capability = pr->MBO_IE.mbo_cap[2]; + + if (pr->MBO_IE.num_assoc_disallowed && + (pr->MBO_IE.assoc_disallowed[0] == + MBO_IE_ASSOC_DISALLOWED_SUBATTR_ID)) { + pProbeResp->assoc_disallowed = true; + pProbeResp->assoc_disallowed_reason = + pr->MBO_IE.assoc_disallowed[2]; + } + } + qdf_mem_free(pr); return eSIR_SUCCESS; @@ -3695,6 +3708,20 @@ sir_parse_beacon_ie(tpAniSirGlobal pMac, &pBies->hs20vendor_ie.hs_id, sizeof(pBies->hs20vendor_ie.hs_id)); } + + if (pBies->MBO_IE.present) { + pBeaconStruct->MBO_IE_present = true; + pBeaconStruct->MBO_capability = pBies->MBO_IE.mbo_cap[2]; + + if (pBies->MBO_IE.num_assoc_disallowed && + (pBies->MBO_IE.assoc_disallowed[0] == + MBO_IE_ASSOC_DISALLOWED_SUBATTR_ID)) { + pBeaconStruct->assoc_disallowed = true; + pBeaconStruct->assoc_disallowed_reason = + pBies->MBO_IE.assoc_disallowed[2]; + } + } + qdf_mem_free(pBies); return eSIR_SUCCESS; } /* End sir_parse_beacon_ie. */ @@ -4055,6 +4082,18 @@ sir_convert_beacon_frame2_struct(tpAniSirGlobal pMac, &pBeacon->OBSSScanParameters, sizeof(struct sDot11fIEOBSSScanParameters)); } + if (pBeacon->MBO_IE.present) { + pBeaconStruct->MBO_IE_present = true; + pBeaconStruct->MBO_capability = pBeacon->MBO_IE.mbo_cap[2]; + + if (pBeacon->MBO_IE.num_assoc_disallowed && + (pBeacon->MBO_IE.assoc_disallowed[0] == + MBO_IE_ASSOC_DISALLOWED_SUBATTR_ID)) { + pBeaconStruct->assoc_disallowed = true; + pBeaconStruct->assoc_disallowed_reason = + pBeacon->MBO_IE.assoc_disallowed[2]; + } + } qdf_mem_free(pBeacon); return eSIR_SUCCESS;