qcacmn: Add support to extract Extender IE in beacon

Added support to extract extender IE in beacon receive.

Change-Id: I04ee63a6c1280e2e3858eb665c549de800d672f4
CRs-Fixed: 2258771
This commit is contained in:
Rathees kumar Chinannan 2018-07-04 15:51:51 +05:30 • committed by nshrivas
commit b8f2d083bd
4 changed files with 36 additions and 0 deletions

View file

@ -66,6 +66,9 @@
#define QCA_OUI 0xf0fd8c
#define QCA_OUI_WHC_TYPE 0x00
/* Extender vendor specific IE */
#define QCA_OUI_EXTENDER_TYPE 0x03
/* Temporary vendor specific IE for 11n pre-standard interoperability */
#define VENDOR_HT_OUI 0x00904c
#define VENDOR_HT_CAP_ID 51
@ -1353,6 +1356,21 @@ is_he_op_oui(uint8_t *frm)
((ATH_HE_OP_SUBTYPE << 24) | ATH_HE_OUI));
}
/**
* is_extender_oui() - If vendor IE is EXTENDER OUI
* @frm: vendor IE pointer
*
* API to check if vendor IE is EXTENDER OUI
*
* Return: true if its EXTENDER OUI
*/
static inline bool
is_extender_oui(uint8_t *frm)
{
return (frm[1] > 4) && (LE_READ_4(frm + 2) ==
((QCA_OUI_EXTENDER_TYPE << 24) | QCA_OUI));
}
/**
* wlan_parse_rsn_ie() - parse rsn ie
* @rsn_ie: rsn ie ptr

View file

@ -197,6 +197,7 @@ struct ie_list {
uint8_t *esp;
uint8_t *mbo_oce;
uint8_t *muedca;
uint8_t *extender;
};
enum scan_entry_connection_state {

View file

@ -655,6 +655,7 @@ util_scan_copy_beacon_data(struct scan_cache_entry *new_entry,
old_ptr, new_ptr);
ie_lst->esp = conv_ptr(ie_lst->esp, old_ptr, new_ptr);
ie_lst->mbo_oce = conv_ptr(ie_lst->mbo_oce, old_ptr, new_ptr);
ie_lst->extender = conv_ptr(ie_lst->extender, old_ptr, new_ptr);
return QDF_STATUS_SUCCESS;
}
@ -1479,4 +1480,18 @@ enum wlan_band util_scan_scm_freq_to_band(uint16_t freq);
*/
bool util_is_scan_completed(struct scan_event *event, bool *success);
/**
* util_scan_entry_extenderie() - function to read extender IE
* @scan_entry: scan entry
*
* API, function to read extender IE
*
* Return: extenderie or NULL if ie is not present
*/
static inline uint8_t*
util_scan_entry_extenderie(struct scan_cache_entry *scan_entry)
{
return scan_entry->ie_list.extender;
}
#endif

View file

@ -462,6 +462,8 @@ util_scan_parse_vendor_ie(struct scan_cache_entry *scan_params,
scan_params->ie_list.bwnss_map = (((uint8_t *)ie) + 8);
} else if (is_mbo_oce_oui((uint8_t *)ie)) {
scan_params->ie_list.mbo_oce = (uint8_t *)ie;
} else if (is_extender_oui((uint8_t *)ie)) {
scan_params->ie_list.extender = (uint8_t *)ie;
}
return QDF_STATUS_SUCCESS;
}