mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-13 00:00:00 -04:00
qcacmn: Add support for 6g scan hint
Add support for 6Ghz short ssid and bssid hint mechanism as part of scan command. Change-Id: I53a787d2a1406ffd658dc0765bae1e632b870b36 CRs-Fixed: 2559877
This commit is contained in:
parent
aba2b0c42b
commit
b4b955e93c
2 changed files with 72 additions and 1 deletions
|
|
@ -33,9 +33,11 @@
|
|||
typedef uint16_t wlan_scan_requester;
|
||||
typedef uint32_t wlan_scan_id;
|
||||
|
||||
#define WLAN_SCAN_MAX_HINT_S_SSID 10
|
||||
#define WLAN_SCAN_MAX_HINT_BSSID 10
|
||||
#define MAX_RNR_BSS 5
|
||||
#define WLAN_SCAN_MAX_NUM_SSID 16
|
||||
#define WLAN_SCAN_MAX_NUM_BSSID 4
|
||||
#define MAX_RNR_BSS 5
|
||||
|
||||
#define SCM_CANCEL_SCAN_WAIT_TIME 50
|
||||
#define SCM_CANCEL_SCAN_WAIT_ITERATION 600
|
||||
|
|
@ -859,6 +861,30 @@ struct chan_list {
|
|||
struct chan_info chan[NUM_CHANNELS];
|
||||
};
|
||||
|
||||
/**
|
||||
* struct hint_short_ssid - short SSID hint
|
||||
* and their phymode
|
||||
* @freq_flags: freq unit: MHz (upper 16bits)
|
||||
* flags (lower 16bits)
|
||||
* @short_ssid: short SSID
|
||||
*/
|
||||
struct hint_short_ssid {
|
||||
uint32_t freq_flags;
|
||||
uint32_t short_ssid;
|
||||
};
|
||||
|
||||
/**
|
||||
* struct hint_bssid - BSSID hint
|
||||
* and their phymode
|
||||
* @freq_flags: freq unit: MHz (upper 16bits)
|
||||
* flags (lower 16bits)
|
||||
* @bssid: BSSID
|
||||
*/
|
||||
struct hint_bssid {
|
||||
uint32_t freq_flags;
|
||||
struct qdf_mac_addr bssid;
|
||||
};
|
||||
|
||||
/**
|
||||
* enum scan_request_type: scan type
|
||||
* @SCAN_TYPE_DEFAULT: Def scan
|
||||
|
|
@ -949,6 +975,10 @@ enum scan_request_type {
|
|||
* @htcap: htcap ie
|
||||
* @vhtcap: vhtcap ie
|
||||
* @scan_ctrl_flags_ext: scan control flag extended
|
||||
* @num_hint_s_ssid: number of short SSID hints
|
||||
* @num_hint_bssid: number of BSSID hints
|
||||
* @hint_s_ssid: short SSID hints
|
||||
* @hint_bssid: BSSID hints
|
||||
*/
|
||||
|
||||
struct scan_req_params {
|
||||
|
|
@ -1042,6 +1072,10 @@ struct scan_req_params {
|
|||
struct element_info htcap;
|
||||
struct element_info vhtcap;
|
||||
uint32_t scan_ctrl_flags_ext;
|
||||
uint32_t num_hint_s_ssid;
|
||||
uint32_t num_hint_bssid;
|
||||
struct hint_short_ssid hint_s_ssid[WLAN_SCAN_MAX_HINT_S_SSID];
|
||||
struct hint_bssid hint_bssid[WLAN_SCAN_MAX_HINT_BSSID];
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -2802,6 +2802,8 @@ static QDF_STATUS send_scan_start_cmd_tlv(wmi_unified_t wmi_handle,
|
|||
uint16_t extraie_len_with_pad = 0;
|
||||
uint8_t phymode_roundup = 0;
|
||||
struct probe_req_whitelist_attr *ie_whitelist = ¶ms->ie_whitelist;
|
||||
wmi_hint_freq_short_ssid *s_ssid = NULL;
|
||||
wmi_hint_freq_bssid *hint_bssid = NULL;
|
||||
|
||||
/* Length TLV placeholder for array of uint32_t */
|
||||
len += WMI_TLV_HDR_SIZE;
|
||||
|
|
@ -2837,6 +2839,14 @@ static QDF_STATUS send_scan_start_cmd_tlv(wmi_unified_t wmi_handle,
|
|||
sizeof(uint32_t));
|
||||
len += phymode_roundup;
|
||||
|
||||
len += WMI_TLV_HDR_SIZE;
|
||||
if (params->num_hint_bssid)
|
||||
len += params->num_hint_bssid * sizeof(wmi_hint_freq_bssid);
|
||||
|
||||
len += WMI_TLV_HDR_SIZE;
|
||||
if (params->num_hint_s_ssid)
|
||||
len += params->num_hint_s_ssid * sizeof(wmi_hint_freq_short_ssid);
|
||||
|
||||
/* Allocate the memory */
|
||||
wmi_buf = wmi_buf_alloc(wmi_handle, len);
|
||||
if (!wmi_buf)
|
||||
|
|
@ -2964,6 +2974,33 @@ static QDF_STATUS send_scan_start_cmd_tlv(wmi_unified_t wmi_handle,
|
|||
} else {
|
||||
/* Add ZERO legth phy mode TLV */
|
||||
WMITLV_SET_HDR(buf_ptr, WMITLV_TAG_ARRAY_BYTE, 0);
|
||||
buf_ptr += WMI_TLV_HDR_SIZE;
|
||||
}
|
||||
|
||||
WMITLV_SET_HDR(buf_ptr, WMITLV_TAG_ARRAY_FIXED_STRUC,
|
||||
(params->num_hint_s_ssid * sizeof(wmi_hint_freq_short_ssid)));
|
||||
if (params->num_hint_s_ssid) {
|
||||
s_ssid = (wmi_hint_freq_short_ssid *)(buf_ptr + WMI_TLV_HDR_SIZE);
|
||||
for (i = 0; i < params->num_hint_s_ssid; ++i) {
|
||||
s_ssid->freq_flags = params->hint_s_ssid[i].freq_flags;
|
||||
s_ssid->short_ssid = params->hint_s_ssid[i].short_ssid;
|
||||
s_ssid++;
|
||||
}
|
||||
}
|
||||
buf_ptr += WMI_TLV_HDR_SIZE +
|
||||
(params->num_hint_s_ssid * sizeof(wmi_hint_freq_short_ssid));
|
||||
|
||||
WMITLV_SET_HDR(buf_ptr, WMITLV_TAG_ARRAY_FIXED_STRUC,
|
||||
(params->num_hint_bssid * sizeof(wmi_hint_freq_bssid)));
|
||||
if (params->num_hint_bssid) {
|
||||
hint_bssid = (wmi_hint_freq_bssid *)(buf_ptr + WMI_TLV_HDR_SIZE);
|
||||
for (i = 0; i < params->num_hint_bssid; ++i) {
|
||||
hint_bssid->freq_flags =
|
||||
params->hint_bssid[i].freq_flags;
|
||||
WMI_CHAR_ARRAY_TO_MAC_ADDR(¶ms->hint_bssid[i].bssid.bytes[0],
|
||||
&hint_bssid->bssid);
|
||||
hint_bssid++;
|
||||
}
|
||||
}
|
||||
|
||||
wmi_mtrace(WMI_START_SCAN_CMDID, cmd->vdev_id, 0);
|
||||
|
|
|
|||
Loading…
Reference in a new issue