mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-13 08:07:32 -04:00
qcacmn: Add support to extract SRP IE in beacon
Added support to extract spatial reuse parameter IE in beacon receive. Change-Id: Ia7ce2a58ae8b65cddd9b3f8d969bd95b459aab3e CRs-Fixed: 2033106
This commit is contained in:
parent
6e7489e3e8
commit
851184b0e4
4 changed files with 95 additions and 0 deletions
|
|
@ -243,6 +243,7 @@ enum ext_chan_offset {
|
|||
* @WLAN_ELEMID_QUIET_CHANNEL: Quiet Channel
|
||||
* @WLAN_ELEMID_OP_MODE_NOTIFY: Operating Mode Notification
|
||||
* @WLAN_ELEMID_VENDOR: vendor private
|
||||
* @WLAN_ELEMID_EXTN_ELEM: extended IE
|
||||
*/
|
||||
enum element_ie {
|
||||
WLAN_ELEMID_SSID = 0,
|
||||
|
|
@ -312,6 +313,15 @@ enum element_ie {
|
|||
WLAN_ELEMID_QUIET_CHANNEL = 198,
|
||||
WLAN_ELEMID_OP_MODE_NOTIFY = 199,
|
||||
WLAN_ELEMID_VENDOR = 221,
|
||||
WLAN_ELEMID_EXTN_ELEM = 255,
|
||||
};
|
||||
|
||||
/**
|
||||
* enum extn_element_ie :- extended management information element
|
||||
* @WLAN_EXTN_ELEMID_SRP: spatial reuse parameter IE
|
||||
*/
|
||||
enum extn_element_ie {
|
||||
WLAN_EXTN_ELEMID_SRP = 39,
|
||||
};
|
||||
|
||||
#define WLAN_OUI_SIZE 4
|
||||
|
|
@ -516,6 +526,19 @@ struct ie_header {
|
|||
uint8_t ie_len;
|
||||
} qdf_packed;
|
||||
|
||||
/**
|
||||
* struct extn_ie_header : Extension IE header
|
||||
* @ie_id: Element Id
|
||||
* @ie_len: IE Length
|
||||
* @ie_extn_id: extension id
|
||||
*/
|
||||
struct extn_ie_header {
|
||||
uint8_t ie_id;
|
||||
uint8_t ie_len;
|
||||
uint8_t ie_extn_id;
|
||||
} qdf_packed;
|
||||
|
||||
|
||||
/**
|
||||
* struct ie_ssid : ssid IE
|
||||
* @ssid_id: SSID Element Id
|
||||
|
|
@ -745,6 +768,43 @@ struct rsn_mdie {
|
|||
uint8_t ft_capab;
|
||||
} qdf_packed;
|
||||
|
||||
/**
|
||||
* struct srp_ie: Spatial reuse parameter IE
|
||||
* @srp_id: SRP IE id
|
||||
* @srp_len: SRP IE len
|
||||
* @srp_id_extn: SRP Extension ID
|
||||
* @sr_control: sr control
|
||||
* @non_srg_obsspd_max_offset: non srg obsspd max offset
|
||||
* @srg_obss_pd_min_offset: srg obss pd min offset
|
||||
* @srg_obss_pd_max_offset: srg obss pd max offset
|
||||
* @srg_bss_color_bitmap: srg bss color bitmap
|
||||
* @srg_partial_bssid_bitmap: srg partial bssid bitmap
|
||||
*/
|
||||
struct wlan_srp_ie {
|
||||
uint8_t srp_id;
|
||||
uint8_t srp_len;
|
||||
uint8_t srp_id_extn;
|
||||
uint8_t sr_control;
|
||||
union {
|
||||
struct {
|
||||
uint8_t non_srg_obsspd_max_offset;
|
||||
uint8_t srg_obss_pd_min_offset;
|
||||
uint8_t srg_obss_pd_max_offset;
|
||||
uint8_t srg_bss_color_bitmap[8];
|
||||
uint8_t srg_partial_bssid_bitmap[8];
|
||||
} qdf_packed nonsrg_srg_info;
|
||||
struct {
|
||||
uint8_t non_srg_obsspd_max_offset;
|
||||
} qdf_packed nonsrg_info;
|
||||
struct {
|
||||
uint8_t srg_obss_pd_min_offset;
|
||||
uint8_t srg_obss_pd_max_offset;
|
||||
uint8_t srg_bss_color_bitmap[8];
|
||||
uint8_t srg_partial_bssid_bitmap[8];
|
||||
} qdf_packed srg_info;
|
||||
};
|
||||
} qdf_packed;
|
||||
|
||||
/**
|
||||
* is_wpa_oui() - If vendor IE is WPA type
|
||||
* @frm: vendor IE pointer
|
||||
|
|
|
|||
|
|
@ -114,6 +114,7 @@ struct element_info {
|
|||
* @cswrp: pointer to channel switch announcement wrapper ie
|
||||
* @widebw: pointer to wide band channel switch sub ie
|
||||
* @txpwrenvlp: pointer to tx power envelop sub ie
|
||||
* @srp: pointer to spatial reuse parameter sub extended ie
|
||||
*/
|
||||
struct ie_list {
|
||||
uint8_t *tim;
|
||||
|
|
@ -154,6 +155,7 @@ struct ie_list {
|
|||
uint8_t *mdie;
|
||||
uint8_t *hecap;
|
||||
uint8_t *heop;
|
||||
uint8_t *srp;
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -1274,6 +1274,21 @@ util_scan_entry_heop(struct scan_cache_entry *scan_entry)
|
|||
return scan_entry->ie_list.heop;
|
||||
}
|
||||
|
||||
/**
|
||||
* util_scan_entry_spatial_reuse_parameter() - function to read spatial reuse
|
||||
* parameter ie
|
||||
* @scan_entry: scan entry
|
||||
*
|
||||
* API, function to read scan_entry reuse parameter ie
|
||||
*
|
||||
* Return, spatial reuse parameter ie or NULL if ie is not present
|
||||
*/
|
||||
static inline uint8_t*
|
||||
util_scan_entry_spatial_reuse_parameter(struct scan_cache_entry *scan_entry)
|
||||
{
|
||||
return scan_entry->ie_list.srp;
|
||||
}
|
||||
|
||||
/**
|
||||
* util_get_last_scan_time() - function to get last scan time on this pdev
|
||||
* @vdev: vdev object
|
||||
|
|
|
|||
|
|
@ -341,6 +341,21 @@ util_scan_is_hidden_ssid(struct ie_ssid *ssid)
|
|||
return true;
|
||||
}
|
||||
|
||||
static void
|
||||
util_scan_parse_extn_ie(struct scan_cache_entry *scan_params,
|
||||
struct ie_header *ie)
|
||||
{
|
||||
struct extn_ie_header *extn_ie = (struct extn_ie_header *) ie;
|
||||
|
||||
switch (extn_ie->ie_extn_id) {
|
||||
case WLAN_EXTN_ELEMID_SRP:
|
||||
scan_params->ie_list.srp = (uint8_t *)ie;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
util_scan_parse_vendor_ie(struct scan_cache_entry *scan_params,
|
||||
struct ie_header *ie)
|
||||
|
|
@ -521,6 +536,9 @@ util_scan_populate_bcn_ie_list(struct scan_cache_entry *scan_params)
|
|||
return status;
|
||||
}
|
||||
break;
|
||||
case WLAN_ELEMID_EXTN_ELEM:
|
||||
util_scan_parse_extn_ie(scan_params, ie);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue