Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 4aa362a8 authored by spuligil's avatar spuligil
Browse files

fw-api: CL 7944886 - update fw common interface files

Change-Id: I64450c65f6774070a4828f87b113ba1253d24b3a
WMI: add scan info for 6 GHz band
CRs-Fixed: 2262693
parent a97a917c
Loading
Loading
Loading
Loading
+16 −0
Original line number Diff line number Diff line
@@ -406,6 +406,7 @@ typedef enum {
    WMI_SERVICE_WPA3_SAE_ROAM_SUPPORT = 221, /* Indicates FW supports WPA3 SAE roaming */
    WMI_SERVICE_WPA3_OWE_ROAM_SUPPORT = 222, /* Indicates FW supports WPA3 OWE roaming */
    WMI_SERVICE_AUDIO_AGGR = 223, /* Indicates FW supports audio frame aggregation */
    WMI_SERVICE_6GHZ_SUPPORT = 224, /* Indicates FW supports 6GHZ (scan, connection and so on) */

    /******* ADD NEW SERVICES HERE *******/

@@ -416,7 +417,22 @@ typedef enum {
#define WMI_SERVICE_BM_SIZE   ((WMI_MAX_SERVICE + sizeof(A_UINT32)- 1)/sizeof(A_UINT32))

#define WMI_NUM_EXT_SERVICES (WMI_MAX_EXT_SERVICE - WMI_MAX_SERVICE)

/*
 * TEMPORARY WORKAROUND
 * Virtually all branches of the target utilize an incorrect check on
 * the value of WMI_SERVICE_EXT_BM_SIZE32, checking that
 * WMI_SERVICE_EXT_BM_SIZE32 < 4, rather than WMI_SERVICE_EXT_BM_SIZE32 <= 4.
 * Until all target branches are fixed, this check is being disabled
 * by artificially setting WMI_SERVICE_EXT_BM_SIZE32 to 0, rather than
 * the number of 4-byte words required for holding the WMI extension
 * service flags.
 */
#if 0
#define WMI_SERVICE_EXT_BM_SIZE32 ((WMI_NUM_EXT_SERVICES + 31) / 32)
#else
#define WMI_SERVICE_EXT_BM_SIZE32 0
#endif

#define WMI_SERVICE_ROAM_OFFLOAD WMI_SERVICE_ROAM_SCAN_OFFLOAD /* depreciated the name WMI_SERVICE_ROAM_OFFLOAD, but here to help compiling with old host driver */

+3 −1
Original line number Diff line number Diff line
@@ -1887,7 +1887,9 @@ WMITLV_CREATE_PARAM_STRUC(WMI_VDEV_PLMREQ_STOP_CMDID);
    WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_ARRAY_FIXED_STRUC, wmi_mac_addr, bssid_list, WMITLV_SIZE_VAR) \
    WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_ARRAY_BYTE, A_UINT8, ie_data, WMITLV_SIZE_VAR)\
    WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_ARRAY_STRUC, wmi_vendor_oui, vendor_oui, WMITLV_SIZE_VAR) \
    WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_ARRAY_BYTE, A_UINT8, phymode_list, WMITLV_SIZE_VAR)
    WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_ARRAY_BYTE, A_UINT8, phymode_list, WMITLV_SIZE_VAR) \
    WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_ARRAY_FIXED_STRUC, wmi_hint_freq_short_ssid, hint_freq_short_ssid_list, WMITLV_SIZE_VAR) \
    WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_ARRAY_FIXED_STRUC, wmi_hint_freq_bssid, hint_freq_bssid_list, WMITLV_SIZE_VAR)
WMITLV_CREATE_PARAM_STRUC(WMI_START_SCAN_CMDID);

/* Scan adaptive dwell mode configuration */
+89 −3
Original line number Diff line number Diff line
@@ -1945,6 +1945,7 @@ typedef enum {
#define WMI_CHAN_FLAG_QUARTER_RATE  15  /* Indicates quarter rate channel */
#define WMI_CHAN_FLAG_DFS_CFREQ2  16 /* Enable radar event reporting for sec80 in VHT80p80 */
#define WMI_CHAN_FLAG_ALLOW_HE    17 /* HE (11ax) is allowed on this channel */
#define WMI_CHAN_FLAG_PSC         18 /* Indicate it is a PSC (preferred scanning channel) */
#define WMI_SET_CHANNEL_FLAG(pwmi_channel,flag) do { \
        (pwmi_channel)->info |=  (1 << flag);      \
@@ -3708,6 +3709,55 @@ typedef struct {
#define WMI_SCAN_CHAN_GET_MODE(_c) ((_c) - 1)
#define WMI_SCAN_CHAN_MODE_IS_SET(_c) (_c)
typedef struct {
    /*
     * freq unit: MHz (upper 16bits -- value)
     * flags (lower 16bits -- bitfield): valid for the freq short ssid
     *     The flags bitfield contains a bitmask of WMI_SCAN_HINT_FLAG_ values.
     */
    A_UINT32 freq_flags;
    /* per spec, only 4 bytes*/
    A_UINT32 short_ssid;
} wmi_hint_freq_short_ssid;
/** following bssid mac address same as wmi_mac_addr
 *  one example: freq -- 5980(0x175c), flags -- 0x1, mac -- 00:03:7f:12:34:56
 *  freq_flags     will be: 0x175c0001
 *  macaddr31to00 will be: 0x127f0300
 *  macaddr47to32 will be: 0x00005634
 */
typedef struct {
    /*
     * freq unit: MHz (upper 16bits -- value)
     * flags (lower 16bits -- bitfield): valid for the freq bssid
     *     The flags bitfield contains a bitmask of WMI_SCAN_HINT_FLAG_ values.
     */
    A_UINT32 freq_flags;
    /* legacy bssid addr, use same macro to convert: WMI_MAC_ADDR_TO_CHAR_ARRAY, WMI_CHAR_ARRAY_TO_MAC_ADDR */
    wmi_mac_addr bssid;
} wmi_hint_freq_bssid;
/** macro to get freq and corresponding flags from wmi_hint_freq_short_ssid */
#define WMI_GET_FREQ_FROM_HINT_FREQ_SHORT_SSID(pwmi_hint_freq_short_ssid_addr) ((((pwmi_hint_freq_short_ssid_addr)->freq_flags) >> 16) & 0xffff)
#define WMI_GET_FLAGS_FROM_HINT_FREQ_SHORT_SSID(pwmi_hint_freq_short_ssid_addr) (((pwmi_hint_freq_short_ssid_addr)->freq_flags) & 0xffff)
/** macro to set freq and corresponding flags in wmi_hint_freq_short_ssid */
#define WMI_SET_FREQ_IN_HINT_FREQ_SHORT_SSID(freq, pwmi_hint_freq_short_ssid_addr) (((pwmi_hint_freq_short_ssid_addr)->freq_flags) |= ((freq) << 16))
#define WMI_SET_FLAGS_IN_HINT_FREQ_SHORT_SSID(flags, pwmi_hint_freq_short_ssid_addr) (((pwmi_hint_freq_short_ssid_addr)->freq_flags) |= (flags))
/** macro to get freq and corresponding flags from wmi_hint_freq_bssid */
#define WMI_GET_FREQ_FROM_HINT_FREQ_BSSID(pwmi_hint_freq_bssid_addr) ((((pwmi_hint_freq_bssid_addr)->freq_flags) >> 16) & 0xffff)
#define WMI_GET_FLAGS_FROM_HINT_FREQ_BSSID(pwmi_hint_freq_bssid_addr) (((pwmi_hint_freq_bssid_addr)->freq_flags) & 0xffff)
/** macro to set freq and corresponding flags in wmi_hint_freq_bssid */
#define WMI_SET_FREQ_IN_HINT_FREQ_BSSID(freq, pwmi_hint_freq_bssid_addr) (((pwmi_hint_freq_bssid_addr)->freq_flags) |= ((freq) << 16))
#define WMI_SET_FLAGS_IN_HINT_FREQ_BSSID(flags, pwmi_hint_freq_bssid_addr) (((pwmi_hint_freq_bssid_addr)->freq_flags) |= (flags))
/** other macro for 6GHZ, TU(time unit), 20TU normally it is 20ms */
#define MAX_NUM_20TU_EACH_CH      4
#define MAX_NUM_S_SSID_EACH_20TU  1
#define MAX_NUM_BSSID_EACH_20TU   3
/* prefix used by scan requestor ids on the host */
#define WMI_HOST_SCAN_REQUESTOR_ID_PREFIX 0xA000
/* prefix used by scan request ids generated on the host */
@@ -3787,6 +3837,16 @@ typedef struct {
    A_UINT32 scan_ctrl_flags_ext;
    /** dwell time in msec on active 2G channels, if it's not zero */
    A_UINT32 dwell_time_active_2g;
    /**
     * dwell time in msec when 6 GHz channel (PSC or non-PSC) is marked
     * as an active channel
     */
    A_UINT32 dwell_time_active_6ghz;
    /**
     * dwell time in msec when 6 GHz channel (PSC or non-PSC) is marked
     * as a passive channel
     */
    A_UINT32 dwell_time_passive_6ghz;
/**
 * TLV (tag length value) parameters follow the scan_cmd
@@ -3797,6 +3857,12 @@ typedef struct {
 *     A_UINT8 ie_data[ie_len];
 *     wmi_vendor_oui vendor_oui[num_vendor_oui];
 *     A_UINT8 phymode_list[0 or num_chan]; // see WMI_SCAN_CHAN_MODE macros
 *     wmi_hint_freq_short_ssid hint_freq_short_ssid[num]; // the num can be calculated by TLV len
 *     wmi_hint_freq_bssid hint_freq_bssid[num]; // the num can be calculated by TLV len
 *     *** NOTE:
 *     *** Use caution when using further TLVs, in case the additional
 *     *** TLVs cause the message size to exceed the of the buffer to
 *     *** hold the message.
 */
} wmi_start_scan_cmd_fixed_param;
@@ -3894,10 +3960,30 @@ typedef enum {
#define WMI_SCAN_DBS_POLICY_RESERVED            0x3
#define WMI_SCAN_DBS_POLICY_MAX                 0x3
/** Enable Reception of Public Action frame with this flag
 * (inside scan_ctrl_flags_ext field of wmi_start_scan_cmd_fixed_param)
/* Enable Reception of Public Action frame with this flag */
#define WMI_SCAN_FLAG_EXT_FILTER_PUBLIC_ACTION_FRAME  0x00000004
/* Indicate to scan all PSC channel */
#define WMI_SCAN_FLAG_EXT_6GHZ_SCAN_ALL_PSC_CH        0x00000008
/* Indicate to scan all NON-PSC channel */
#define WMI_SCAN_FLAG_EXT_6GHZ_SCAN_ALL_NON_PSC_CH    0x00000010
/* Indicate to save scan result matching hint from scan client */
#define WMI_SCAN_FLAG_EXT_6GHZ_MATCH_HINT             0x00000020
/* Skip any ch on which no any RNR had been received */
#define WMI_SCAN_FLAG_EXT_6GHZ_SKIP_NON_RNR_CH        0x00000040
/* Indicate client hint req is high priority than fw rnr or FILS disc */
#define WMI_SCAN_FLAG_EXT_6GHZ_CLIENT_HIGH_PRIORITY   0x00000080
/**
 * new 6 GHz flags per chan (short ssid or bssid) in struct
 * wmi_hint_freq_short_ssid or wmi_hint_freq_bssid
 */
#define WMI_SCAN_FLAG_EXT_FILTER_PUBLIC_ACTION_FRAME      0x4
/* Indicate not to send probe req for short_ssid or bssid on that channel */
#define WMI_SCAN_HINT_FLAG_SKIP_TX_PROBE_REQ    0x00000001
typedef struct {
    A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_stop_scan_cmd_fixed_param */
+1 −1
Original line number Diff line number Diff line
@@ -36,7 +36,7 @@
#define __WMI_VER_MINOR_    0
/** WMI revision number has to be incremented when there is a
 *  change that may or may not break compatibility. */
#define __WMI_REVISION_ 714
#define __WMI_REVISION_ 715

/** The Version Namespace should not be normally changed. Only
 *  host and firmware of the same WMI namespace will work