qcacld-3.0: Add support for attributes in MBO-OCE IE

Currently MBO-OCE IE doesn't support different attributes and
consider the IE as fixed IE with only cellular data and assoc
disallowed attributes.

To fix this added support for parsing of different attributes of
MBO-OCE IE

Change-Id: Ia7eb38cec3dbb4022acbcc06588004b5bf4ca87f
CRs-Fixed: 2063865
This commit is contained in:
Abhishek Singh
2017-07-06 16:53:19 +05:30
committad av snandini
förälder 6f0ced5627
incheckning 951eed897f
4 ändrade filer med 2661 tillägg och 1401 borttagningar

Visa fil

@@ -224,6 +224,29 @@ const TLV_OPERATING_CHANNEL = 17;
const TLV_INVITATION_FLAGS = 18;
const TLV_P2P_VENDOR_SPECIFIC = 221;
/////////////////////////////////////////////////////////////////////////////
// MBO-OCE Attributes (0, 151-255: Reserved) //
/////////////////////////////////////////////////////////////////////////////
const TLV_MBO_AP_CAP_ATTR = 1;
const TLV_NON_PREFERRED_CHAN_REPORT_ATTR = 2;
const TLV_CELLULAR_DATA_CAP_ATTR = 3;
const TLV_ASSOC_DISSALLOWED_ATTR = 4;
const TLV_CELLULAR_DATA_CON_PREF_ATTR = 5;
const TLV_TRANSITION_REASON_CODE_ATTR = 6;
const TLV_TRANSITION_REJECT_REASON_CODE_ATTR = 7;
const TLV_ASSOC_RETRY_DELAY_ATTR = 8;
// 9-100 : Reserved for MBO //
// OCE ATTRIBUTES //
const TLV_OCE_CAP_IND_ATTR = 101;
const TLV_RSSI_ASSOC_REJ_ATTR = 102;
const TLV_REDUCED_WAN_METRICS_ATTR = 103;
// 104-150 : Reserved for OCE
/////////////////////////////////////////////////////////////////////////////
// Fixed Fields
@@ -1063,6 +1086,76 @@ TLV OperatingChannel ( TLV_OPERATING_CHANNEL ) ( 1 : 2 ) LSB
channel, 1;
}
///////////////////////////////////////////////////////////////////////////
// MBO-OCE ATTR TLVs //
///////////////////////////////////////////////////////////////////////////
TLV mbo_ap_cap ( TLV_MBO_AP_CAP_ATTR ) ( 1 : 1 ) LSB
{
mbo_cap_ind, 1;
}
TLV non_prefferd_chan_rep ( TLV_NON_PREFERRED_CHAN_REPORT_ATTR ) ( 1 : 1 ) LSB
{
oper_class, 1;
channel_report[3..254];
}
TLV cellular_data_cap ( TLV_CELLULAR_DATA_CAP_ATTR ) ( 1 : 1 ) LSB
{
cellular_connectivity, 1;
}
TLV assoc_disallowed ( TLV_ASSOC_DISSALLOWED_ATTR ) ( 1 : 1 ) LSB
{
reason_code, 1;
}
TLV cellular_data_con_pref ( TLV_CELLULAR_DATA_CON_PREF_ATTR ) ( 1 : 1 ) LSB
{
cellular_preference, 1;
}
TLV transition_reason ( TLV_TRANSITION_REASON_CODE_ATTR ) ( 1 : 1 ) LSB
{
transition_reason_code, 1;
}
TLV transition_reject_reason ( TLV_TRANSITION_REJECT_REASON_CODE_ATTR ) ( 1 : 1 ) LSB
{
transition_reject_code, 1;
}
TLV assoc_retry_delay ( TLV_ASSOC_RETRY_DELAY_ATTR ) ( 1 : 1 ) LSB
{
delay, 2;
}
// OCE Attributes //
TLV oce_cap ( TLV_OCE_CAP_IND_ATTR ) ( 1 : 1 ) LSB
{
{
oce_release: 3;
is_sta_cfon : 1;
non_oce_ap_present : 1;
reserved: 3;
}
}
TLV rssi_assoc_rej ( TLV_RSSI_ASSOC_REJ_ATTR ) ( 1 : 1 ) LSB
{
delta_rssi, 1;
retry_delay, 1;
}
TLV reduced_wan_metrics ( TLV_REDUCED_WAN_METRICS_ATTR ) ( 1 : 1 ) LSB
{
{
downlink_av_cap: 4;
uplink_av_cap : 4;
}
}
/**
* \brief Vendor Extension
@@ -2483,12 +2576,6 @@ 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];
}
IE QCN_IE (EID_VENDOR_SPECIFIC) OUI ( 0x8C, 0xFD, 0xF0, 0x01 )
{
version[4];
@@ -3200,6 +3287,21 @@ MULTIIE P2PDisAssoc ( EID_VENDOR_SPECIFIC ) OUI( 0x50, 0x6F, 0x9A, 0x09 )
MANDATORYTLV MinorReasonCode;
}
MULTIIE MBO_IE (EID_VENDOR_SPECIFIC) OUI ( 0x50, 0x6F, 0x9A, 0x16 )
{
OPTIONALTLV mbo_ap_cap;
OPTIONALTLV non_prefferd_chan_rep;
OPTIONALTLV cellular_data_cap ;
OPTIONALTLV assoc_disallowed;
OPTIONALTLV cellular_data_con_pref;
OPTIONALTLV transition_reason;
OPTIONALTLV transition_reject_reason;
OPTIONALTLV assoc_retry_delay;
OPTIONALTLV oce_cap;
OPTIONALTLV rssi_assoc_rej;
OPTIONALTLV reduced_wan_metrics;
}
IE vendor_vht_ie (EID_VENDOR_SPECIFIC) OUI (0x00, 0x90, 0x4c)
{
type, 1;

Visa fil

@@ -35,7 +35,7 @@
*
*
* This file was automatically generated by 'framesc'
* Thu Jun 22 10:47:16 2017 from the following file(s):
* Thu Jul 6 16:41:06 2017 from the following file(s):
*
* dot11f.frms
*
@@ -2035,6 +2035,431 @@ uint32_t dot11f_get_packed_tlv_WPSState(
}; /* End extern "C". */
#endif /* C++ */
/* ID 4 (0x0004) */
typedef struct sDot11fTLVassoc_disallowed {
uint8_t present;
uint8_t reason_code;
} tDot11fTLVassoc_disallowed;
#define DOT11F_TLV_ASSOC_DISALLOWED (4)
/* N.B. These #defines do *not* include the ID & length */
#define DOT11F_TLV_ASSOC_DISALLOWED_MIN_LEN (1)
#define DOT11F_TLV_ASSOC_DISALLOWED_MAX_LEN (1)
#ifdef __cplusplus
extern "C" {
#endif /* C++ */
uint32_t dot11f_unpack_tlv_assoc_disallowed(
tpAniSirGlobal,
uint8_t *,
uint16_t,
tDot11fTLVassoc_disallowed*);
uint32_t dot11f_pack_tlv_assoc_disallowed(
tpAniSirGlobal,
tDot11fTLVassoc_disallowed *,
uint8_t *,
uint32_t,
uint32_t*);
uint32_t dot11f_get_packed_tlv_assoc_disallowed(
tpAniSirGlobal,
tDot11fTLVassoc_disallowed *,
uint32_t*);
#ifdef __cplusplus
}; /* End extern "C". */
#endif /* C++ */
/* ID 8 (0x0008) */
typedef struct sDot11fTLVassoc_retry_delay {
uint8_t present;
uint16_t delay;
} tDot11fTLVassoc_retry_delay;
#define DOT11F_TLV_ASSOC_RETRY_DELAY (8)
/* N.B. These #defines do *not* include the ID & length */
#define DOT11F_TLV_ASSOC_RETRY_DELAY_MIN_LEN (2)
#define DOT11F_TLV_ASSOC_RETRY_DELAY_MAX_LEN (2)
#ifdef __cplusplus
extern "C" {
#endif /* C++ */
uint32_t dot11f_unpack_tlv_assoc_retry_delay(
tpAniSirGlobal,
uint8_t *,
uint16_t,
tDot11fTLVassoc_retry_delay*);
uint32_t dot11f_pack_tlv_assoc_retry_delay(
tpAniSirGlobal,
tDot11fTLVassoc_retry_delay *,
uint8_t *,
uint32_t,
uint32_t*);
uint32_t dot11f_get_packed_tlv_assoc_retry_delay(
tpAniSirGlobal,
tDot11fTLVassoc_retry_delay *,
uint32_t*);
#ifdef __cplusplus
}; /* End extern "C". */
#endif /* C++ */
/* ID 3 (0x0003) */
typedef struct sDot11fTLVcellular_data_cap {
uint8_t present;
uint8_t cellular_connectivity;
} tDot11fTLVcellular_data_cap;
#define DOT11F_TLV_CELLULAR_DATA_CAP (3)
/* N.B. These #defines do *not* include the ID & length */
#define DOT11F_TLV_CELLULAR_DATA_CAP_MIN_LEN (1)
#define DOT11F_TLV_CELLULAR_DATA_CAP_MAX_LEN (1)
#ifdef __cplusplus
extern "C" {
#endif /* C++ */
uint32_t dot11f_unpack_tlv_cellular_data_cap(
tpAniSirGlobal,
uint8_t *,
uint16_t,
tDot11fTLVcellular_data_cap*);
uint32_t dot11f_pack_tlv_cellular_data_cap(
tpAniSirGlobal,
tDot11fTLVcellular_data_cap *,
uint8_t *,
uint32_t,
uint32_t*);
uint32_t dot11f_get_packed_tlv_cellular_data_cap(
tpAniSirGlobal,
tDot11fTLVcellular_data_cap *,
uint32_t*);
#ifdef __cplusplus
}; /* End extern "C". */
#endif /* C++ */
/* ID 5 (0x0005) */
typedef struct sDot11fTLVcellular_data_con_pref {
uint8_t present;
uint8_t cellular_preference;
} tDot11fTLVcellular_data_con_pref;
#define DOT11F_TLV_CELLULAR_DATA_CON_PREF (5)
/* N.B. These #defines do *not* include the ID & length */
#define DOT11F_TLV_CELLULAR_DATA_CON_PREF_MIN_LEN (1)
#define DOT11F_TLV_CELLULAR_DATA_CON_PREF_MAX_LEN (1)
#ifdef __cplusplus
extern "C" {
#endif /* C++ */
uint32_t dot11f_unpack_tlv_cellular_data_con_pref(
tpAniSirGlobal,
uint8_t *,
uint16_t,
tDot11fTLVcellular_data_con_pref*);
uint32_t dot11f_pack_tlv_cellular_data_con_pref(
tpAniSirGlobal,
tDot11fTLVcellular_data_con_pref *,
uint8_t *,
uint32_t,
uint32_t*);
uint32_t dot11f_get_packed_tlv_cellular_data_con_pref(
tpAniSirGlobal,
tDot11fTLVcellular_data_con_pref *,
uint32_t*);
#ifdef __cplusplus
}; /* End extern "C". */
#endif /* C++ */
/* ID 1 (0x0001) */
typedef struct sDot11fTLVmbo_ap_cap {
uint8_t present;
uint8_t mbo_cap_ind;
} tDot11fTLVmbo_ap_cap;
#define DOT11F_TLV_MBO_AP_CAP (1)
/* N.B. These #defines do *not* include the ID & length */
#define DOT11F_TLV_MBO_AP_CAP_MIN_LEN (1)
#define DOT11F_TLV_MBO_AP_CAP_MAX_LEN (1)
#ifdef __cplusplus
extern "C" {
#endif /* C++ */
uint32_t dot11f_unpack_tlv_mbo_ap_cap(
tpAniSirGlobal,
uint8_t *,
uint16_t,
tDot11fTLVmbo_ap_cap*);
uint32_t dot11f_pack_tlv_mbo_ap_cap(
tpAniSirGlobal,
tDot11fTLVmbo_ap_cap *,
uint8_t *,
uint32_t,
uint32_t*);
uint32_t dot11f_get_packed_tlv_mbo_ap_cap(
tpAniSirGlobal,
tDot11fTLVmbo_ap_cap *,
uint32_t*);
#ifdef __cplusplus
}; /* End extern "C". */
#endif /* C++ */
/* ID 2 (0x0002) */
typedef struct sDot11fTLVnon_prefferd_chan_rep {
uint8_t present;
uint8_t oper_class;
uint8_t num_channel_report;
uint8_t channel_report[254];
} tDot11fTLVnon_prefferd_chan_rep;
#define DOT11F_TLV_NON_PREFFERD_CHAN_REP (2)
/* N.B. These #defines do *not* include the ID & length */
#define DOT11F_TLV_NON_PREFFERD_CHAN_REP_MIN_LEN (4)
#define DOT11F_TLV_NON_PREFFERD_CHAN_REP_MAX_LEN (255)
#ifdef __cplusplus
extern "C" {
#endif /* C++ */
uint32_t dot11f_unpack_tlv_non_prefferd_chan_rep(
tpAniSirGlobal,
uint8_t *,
uint16_t,
tDot11fTLVnon_prefferd_chan_rep*);
uint32_t dot11f_pack_tlv_non_prefferd_chan_rep(
tpAniSirGlobal,
tDot11fTLVnon_prefferd_chan_rep *,
uint8_t *,
uint32_t,
uint32_t*);
uint32_t dot11f_get_packed_tlv_non_prefferd_chan_rep(
tpAniSirGlobal,
tDot11fTLVnon_prefferd_chan_rep *,
uint32_t*);
#ifdef __cplusplus
}; /* End extern "C". */
#endif /* C++ */
/* ID 101 (0x0065) */
typedef struct sDot11fTLVoce_cap {
uint8_t present;
uint8_t oce_release:3;
uint8_t is_sta_cfon:1;
uint8_t non_oce_ap_present:1;
uint8_t reserved:3;
} tDot11fTLVoce_cap;
#define DOT11F_TLV_OCE_CAP (101)
/* N.B. These #defines do *not* include the ID & length */
#define DOT11F_TLV_OCE_CAP_MIN_LEN (1)
#define DOT11F_TLV_OCE_CAP_MAX_LEN (1)
#ifdef __cplusplus
extern "C" {
#endif /* C++ */
uint32_t dot11f_unpack_tlv_oce_cap(
tpAniSirGlobal,
uint8_t *,
uint16_t,
tDot11fTLVoce_cap*);
uint32_t dot11f_pack_tlv_oce_cap(
tpAniSirGlobal,
tDot11fTLVoce_cap *,
uint8_t *,
uint32_t,
uint32_t*);
uint32_t dot11f_get_packed_tlv_oce_cap(
tpAniSirGlobal,
tDot11fTLVoce_cap *,
uint32_t*);
#ifdef __cplusplus
}; /* End extern "C". */
#endif /* C++ */
/* ID 103 (0x0067) */
typedef struct sDot11fTLVreduced_wan_metrics {
uint8_t present;
uint8_t downlink_av_cap:4;
uint8_t uplink_av_cap:4;
} tDot11fTLVreduced_wan_metrics;
#define DOT11F_TLV_REDUCED_WAN_METRICS (103)
/* N.B. These #defines do *not* include the ID & length */
#define DOT11F_TLV_REDUCED_WAN_METRICS_MIN_LEN (1)
#define DOT11F_TLV_REDUCED_WAN_METRICS_MAX_LEN (1)
#ifdef __cplusplus
extern "C" {
#endif /* C++ */
uint32_t dot11f_unpack_tlv_reduced_wan_metrics(
tpAniSirGlobal,
uint8_t *,
uint16_t,
tDot11fTLVreduced_wan_metrics*);
uint32_t dot11f_pack_tlv_reduced_wan_metrics(
tpAniSirGlobal,
tDot11fTLVreduced_wan_metrics *,
uint8_t *,
uint32_t,
uint32_t*);
uint32_t dot11f_get_packed_tlv_reduced_wan_metrics(
tpAniSirGlobal,
tDot11fTLVreduced_wan_metrics *,
uint32_t*);
#ifdef __cplusplus
}; /* End extern "C". */
#endif /* C++ */
/* ID 102 (0x0066) */
typedef struct sDot11fTLVrssi_assoc_rej {
uint8_t present;
uint8_t delta_rssi;
uint8_t retry_delay;
} tDot11fTLVrssi_assoc_rej;
#define DOT11F_TLV_RSSI_ASSOC_REJ (102)
/* N.B. These #defines do *not* include the ID & length */
#define DOT11F_TLV_RSSI_ASSOC_REJ_MIN_LEN (2)
#define DOT11F_TLV_RSSI_ASSOC_REJ_MAX_LEN (2)
#ifdef __cplusplus
extern "C" {
#endif /* C++ */
uint32_t dot11f_unpack_tlv_rssi_assoc_rej(
tpAniSirGlobal,
uint8_t *,
uint16_t,
tDot11fTLVrssi_assoc_rej*);
uint32_t dot11f_pack_tlv_rssi_assoc_rej(
tpAniSirGlobal,
tDot11fTLVrssi_assoc_rej *,
uint8_t *,
uint32_t,
uint32_t*);
uint32_t dot11f_get_packed_tlv_rssi_assoc_rej(
tpAniSirGlobal,
tDot11fTLVrssi_assoc_rej *,
uint32_t*);
#ifdef __cplusplus
}; /* End extern "C". */
#endif /* C++ */
/* ID 6 (0x0006) */
typedef struct sDot11fTLVtransition_reason {
uint8_t present;
uint8_t transition_reason_code;
} tDot11fTLVtransition_reason;
#define DOT11F_TLV_TRANSITION_REASON (6)
/* N.B. These #defines do *not* include the ID & length */
#define DOT11F_TLV_TRANSITION_REASON_MIN_LEN (1)
#define DOT11F_TLV_TRANSITION_REASON_MAX_LEN (1)
#ifdef __cplusplus
extern "C" {
#endif /* C++ */
uint32_t dot11f_unpack_tlv_transition_reason(
tpAniSirGlobal,
uint8_t *,
uint16_t,
tDot11fTLVtransition_reason*);
uint32_t dot11f_pack_tlv_transition_reason(
tpAniSirGlobal,
tDot11fTLVtransition_reason *,
uint8_t *,
uint32_t,
uint32_t*);
uint32_t dot11f_get_packed_tlv_transition_reason(
tpAniSirGlobal,
tDot11fTLVtransition_reason *,
uint32_t*);
#ifdef __cplusplus
}; /* End extern "C". */
#endif /* C++ */
/* ID 7 (0x0007) */
typedef struct sDot11fTLVtransition_reject_reason {
uint8_t present;
uint8_t transition_reject_code;
} tDot11fTLVtransition_reject_reason;
#define DOT11F_TLV_TRANSITION_REJECT_REASON (7)
/* N.B. These #defines do *not* include the ID & length */
#define DOT11F_TLV_TRANSITION_REJECT_REASON_MIN_LEN (1)
#define DOT11F_TLV_TRANSITION_REJECT_REASON_MAX_LEN (1)
#ifdef __cplusplus
extern "C" {
#endif /* C++ */
uint32_t dot11f_unpack_tlv_transition_reject_reason(
tpAniSirGlobal,
uint8_t *,
uint16_t,
tDot11fTLVtransition_reject_reason*);
uint32_t dot11f_pack_tlv_transition_reject_reason(
tpAniSirGlobal,
tDot11fTLVtransition_reject_reason *,
uint8_t *,
uint32_t,
uint32_t*);
uint32_t dot11f_get_packed_tlv_transition_reject_reason(
tpAniSirGlobal,
tDot11fTLVtransition_reject_reason *,
uint32_t*);
#ifdef __cplusplus
}; /* End extern "C". */
#endif /* C++ */
/* ID 16 (0x0010) */
typedef struct sDot11fTLVP2PInterface {
uint8_t present;
@@ -4956,20 +5381,28 @@ uint32_t dot11f_get_packed_ie_LinkIdentifier(
}; /* End extern "C". */
#endif /* C++ */
/* EID 221 (0xdd) {OUI 0x50, 0x6f, 0x9a, 0x16} */
/* EID 221 (0xdd) {OUI 0x50, 0x6f, 0x9a, 0x16} (Multi-IE) */
typedef struct sDot11fIEMBO_IE {
uint8_t present;
uint8_t mbo_cap[3];
uint8_t num_assoc_disallowed;
uint8_t assoc_disallowed[3];
tDot11fTLVmbo_ap_cap mbo_ap_cap;
tDot11fTLVnon_prefferd_chan_rep non_prefferd_chan_rep;
tDot11fTLVcellular_data_cap cellular_data_cap;
tDot11fTLVassoc_disallowed assoc_disallowed;
tDot11fTLVcellular_data_con_pref cellular_data_con_pref;
tDot11fTLVtransition_reason transition_reason;
tDot11fTLVtransition_reject_reason transition_reject_reason;
tDot11fTLVassoc_retry_delay assoc_retry_delay;
tDot11fTLVoce_cap oce_cap;
tDot11fTLVrssi_assoc_rej rssi_assoc_rej;
tDot11fTLVreduced_wan_metrics reduced_wan_metrics;
} 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_MIN_LEN (4)
#define DOT11F_IE_MBO_IE_MAX_LEN (10)
#define DOT11F_IE_MBO_IE_MAX_LEN (293)
#ifdef __cplusplus
extern "C" {

Filskillnaden har hållits tillbaka eftersom den är för stor Load Diff

Visa fil

@@ -2521,14 +2521,14 @@ tSirRetStatus sir_convert_probe_frame2_struct(tpAniSirGlobal pMac,
}
if (pr->MBO_IE.present) {
pProbeResp->MBO_IE_present = true;
pProbeResp->MBO_capability = pr->MBO_IE.mbo_cap[2];
if (pr->MBO_IE.cellular_data_cap.present)
pProbeResp->MBO_capability =
pr->MBO_IE.cellular_data_cap.cellular_connectivity;
if (pr->MBO_IE.num_assoc_disallowed &&
(pr->MBO_IE.assoc_disallowed[0] ==
MBO_IE_ASSOC_DISALLOWED_SUBATTR_ID)) {
if (pr->MBO_IE.assoc_disallowed.present) {
pProbeResp->assoc_disallowed = true;
pProbeResp->assoc_disallowed_reason =
pr->MBO_IE.assoc_disallowed[2];
pr->MBO_IE.assoc_disallowed.reason_code;
}
}
@@ -3705,14 +3705,14 @@ sir_parse_beacon_ie(tpAniSirGlobal pMac,
if (pBies->MBO_IE.present) {
pBeaconStruct->MBO_IE_present = true;
pBeaconStruct->MBO_capability = pBies->MBO_IE.mbo_cap[2];
if (pBies->MBO_IE.cellular_data_cap.present)
pBeaconStruct->MBO_capability =
pBies->MBO_IE.cellular_data_cap.cellular_connectivity;
if (pBies->MBO_IE.num_assoc_disallowed &&
(pBies->MBO_IE.assoc_disallowed[0] ==
MBO_IE_ASSOC_DISALLOWED_SUBATTR_ID)) {
if (pBies->MBO_IE.assoc_disallowed.present) {
pBeaconStruct->assoc_disallowed = true;
pBeaconStruct->assoc_disallowed_reason =
pBies->MBO_IE.assoc_disallowed[2];
pBies->MBO_IE.assoc_disallowed.reason_code;
}
}
@@ -4078,14 +4078,14 @@ sir_convert_beacon_frame2_struct(tpAniSirGlobal pMac,
}
if (pBeacon->MBO_IE.present) {
pBeaconStruct->MBO_IE_present = true;
pBeaconStruct->MBO_capability = pBeacon->MBO_IE.mbo_cap[2];
if (pBeacon->MBO_IE.cellular_data_cap.present)
pBeaconStruct->MBO_capability =
pBeacon->MBO_IE.cellular_data_cap.cellular_connectivity;
if (pBeacon->MBO_IE.num_assoc_disallowed &&
(pBeacon->MBO_IE.assoc_disallowed[0] ==
MBO_IE_ASSOC_DISALLOWED_SUBATTR_ID)) {
if (pBeacon->MBO_IE.assoc_disallowed.present) {
pBeaconStruct->assoc_disallowed = true;
pBeaconStruct->assoc_disallowed_reason =
pBeacon->MBO_IE.assoc_disallowed[2];
pBeacon->MBO_IE.assoc_disallowed.reason_code;
}
}