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

Commit 75fa0e4d authored by qctecmdr's avatar qctecmdr Committed by Gerrit - the friendly Code Review server
Browse files

Merge "msm: ipa: add support for WDS"

parents 50e706ca 907c311c
Loading
Loading
Loading
Loading
+50 −0
Original line number Diff line number Diff line
@@ -34,12 +34,45 @@ enum ipa_wdi_version {
#define IPA_WDI3_RX_DIR 3
#define IPA_WDI_INST_MAX (2)

/*
 * <28 bytes of rx_msdu_end_tlv> + <16 bytes of attn_tlv> +
 * <52 bytes of rx_msdu_start tlv>.
 */
#define IPA_WDI_RX_TLV_SIZE 96

/** struct ipa_ast_info_type - structure used for updating the AST table.
 * @mac_addr_ad4_valid: bool to indicate whethere peer supports 4 address
 * scheme or not.
 * @sa_valid: bool to indicate whether SA has a valid entry in AST table.
 * @first_msdu_in_mpdu_flag: bool to indicate whether current packet is first
 * frame in mpdu aggregation or not.
 * @sa_idx: Index to AST table.
 * @sa_peer_id: TA peer id associated with SA.
 * @ta_peer_id: TA peer id for the current frame.
 * @skb: Packet pointer.
 */
struct ipa_ast_info_type {
	bool mac_addr_ad4_valid;
	bool sa_valid;
	bool first_msdu_in_mpdu_flag;
	u16 sa_idx;
	u16 sa_peer_id;
	u16 ta_peer_id;
	struct sk_buff *skb;
};

typedef void (*ipa_wdi_mesh_ast_notifier_cb)(void *priv, unsigned long data);


/**
 * struct ipa_wdi_init_in_params - wdi init input parameters
 *
 * @wdi_version: wdi version
 * @notify: uc ready callback
 * @priv: uc ready callback cookie
 * @wdi_notify: bw notification cb
 * inst_id: Instance ID
 * @ast_update: AST update needed or not.
 */
struct ipa_wdi_init_in_params {
	enum ipa_wdi_version wdi_version;
@@ -49,6 +82,7 @@ struct ipa_wdi_init_in_params {
	ipa_wdi_meter_notifier_cb wdi_notify;
#endif
	int inst_id;
	bool ast_update;
};

/**
@@ -91,6 +125,8 @@ struct ipa_wdi_hdr_info {
 * @meta_data: meta data if any
 * @meta_data_mask: meta data mask
 * @is_tx1_used: to indicate whether 2.4g or 5g iface
 * @is_rx1_used: to indicate whether additional RX pipe for
 * tagged traffic is needed
 */
struct ipa_wdi_reg_intf_in_params {
	const char *netdev_name;
@@ -101,6 +137,7 @@ struct ipa_wdi_reg_intf_in_params {
	u32 meta_data_mask;
	u8 is_tx1_used;
	ipa_wdi_hdl_t hdl;
	u8 is_rx1_used;
};

/**
@@ -185,6 +222,7 @@ struct ipa_wdi_pipe_setup_info_smmu {
 * struct  ipa_wdi_conn_in_params - information provided by
 *		uC offload client
 * @notify: client callback function
 * @ast_notify: ast notification cb
 * @priv: client cookie
 * @is_smmu_enabled: if smmu is enabled
 * @num_sys_pipe_needed: number of sys pipe needed
@@ -196,9 +234,14 @@ struct ipa_wdi_pipe_setup_info_smmu {
 * @is_tx1_used: to notify extra pipe required/not
 * @tx1: parameters to connect TX1 pipe(from IPA to WLAN second pipe)
 * @tx1_smmu: smmu parameters to connect TX1 pipe(from IPA to WLAN second pipe)
 * @hdl: handle associated with this instance.
 * @is_rx1_used: bool to indicate if additional rx pipe required or not
 * @rx1: parameters to connect RX1 pipe(from WLAN to IPA second pipe)
 * @rx1_smmu: smmu parameters to connect RX1 pipe(WLAN to IPA second pipe)
 */
struct ipa_wdi_conn_in_params {
	ipa_notify_cb notify;
	ipa_wdi_mesh_ast_notifier_cb ast_notify;
	void *priv;
	bool is_smmu_enabled;
	u8 num_sys_pipe_needed;
@@ -217,6 +260,11 @@ struct ipa_wdi_conn_in_params {
		struct ipa_wdi_pipe_setup_info_smmu tx_smmu;
	} u_tx1;
	ipa_wdi_hdl_t hdl;
	bool is_rx1_used;
	union {
		struct ipa_wdi_pipe_setup_info rx;
		struct ipa_wdi_pipe_setup_info_smmu rx_smmu;
	} u_rx1;
};

/**
@@ -226,12 +274,14 @@ struct ipa_wdi_conn_in_params {
 * @rx_uc_db_pa: physical address of IPA uC doorbell for RX
 * @tx1_uc_db_pa: physical address of IPA uC doorbell for TX1
 * @is_ddr_mapped: flag set to true if address is from DDR
 * @rx1_uc_db_pa: physical address of IPA uC doorbell for RX1
 */
struct ipa_wdi_conn_out_params {
	phys_addr_t tx_uc_db_pa;
	phys_addr_t rx_uc_db_pa;
	phys_addr_t tx1_uc_db_pa;
	bool is_ddr_mapped;
	phys_addr_t rx1_uc_db_pa;
};

/**
+23 −5
Original line number Diff line number Diff line
@@ -347,7 +347,7 @@ enum ipa_client_type {
	IPA_CLIENT_WLAN3_PROD			= 14,
	IPA_CLIENT_WLAN3_CONS			= 15,

	/* RESERVED PROD			= 16, */
	IPA_CLIENT_WLAN2_PROD1			= 16,
	IPA_CLIENT_WLAN4_CONS			= 17,

	IPA_CLIENT_USB_PROD			= 18,
@@ -384,7 +384,7 @@ enum ipa_client_type {
	IPA_CLIENT_ODU_PROD			= 38,
	IPA_CLIENT_ODU_EMB_CONS			= 39,

	/* RESERVED PROD			= 40, */
	IPA_CLIENT_WLAN3_PROD1			= 40,
	IPA_CLIENT_ODU_TETH_CONS		= 41,

	IPA_CLIENT_MHI_PROD			= 42,
@@ -542,6 +542,8 @@ enum ipa_client_type {
#define IPA_CLIENT_APPS_WAN_LOW_LAT_DATA_PROD IPA_CLIENT_APPS_WAN_LOW_LAT_DATA_PROD
#define IPA_CLIENT_APPS_WAN_LOW_LAT_DATA_CONS IPA_CLIENT_APPS_WAN_LOW_LAT_DATA_CONS
#define IPA_CLIENT_Q6_DL_NLO_LL_DATA_PROD IPA_CLIENT_Q6_DL_NLO_LL_DATA_PROD
#define IPA_CLIENT_WLAN2_PROD1 IPA_CLIENT_WLAN2_PROD1
#define IPA_CLIENT_WLAN3_PROD1 IPA_CLIENT_WLAN3_PROD1

#define IPA_CLIENT_IS_APPS_CONS(client) \
	((client) == IPA_CLIENT_APPS_LAN_CONS || \
@@ -1348,17 +1350,25 @@ struct ipa_flt_rule_v2 {
 * IPA_HDR_L2_ETHERNET_II: L2 header of type Ethernet II
 * IPA_HDR_L2_802_3: L2 header of type 802_3
 * IPA_HDR_L2_802_1Q: L2 header of type 802_1Q
 * IPA_HDR_L2_ETHERNET_II_AST: L2 header of type ETHERNET with AST update
 * IPA_HDR_L2_802_1Q_AST: L2 header of type 802_1Q with AST update
 */
enum ipa_hdr_l2_type {
	IPA_HDR_L2_NONE,
	IPA_HDR_L2_ETHERNET_II,
	IPA_HDR_L2_802_3,
	IPA_HDR_L2_802_1Q,
	IPA_HDR_L2_ETHERNET_II_AST,
	IPA_HDR_L2_802_1Q_AST,
};
#define IPA_HDR_L2_MAX (IPA_HDR_L2_802_1Q + 1)
#define IPA_HDR_L2_MAX (IPA_HDR_L2_802_1Q_AST + 1)

#define IPA_HDR_L2_802_1Q IPA_HDR_L2_802_1Q

#define IPA_HDR_L2_ETHERNET_II_AST IPA_HDR_L2_ETHERNET_II_AST

#define IPA_HDR_L2_802_1Q_AST IPA_HDR_L2_802_1Q_AST

/**
 * enum ipa_hdr_l2_type - Processing context type
 *
@@ -2749,6 +2759,7 @@ struct ipa_msg_meta {
 * @name: name of the wlan interface
 * @mac_addr: mac address of wlan client
 * @if_index: netdev interface index
 * @ast_update: Boolean to indicate whether AST update is required or not
 *
 * wlan drivers need to pass name of wlan iface and mac address of
 * wlan client along with ipa_wlan_event, whenever a wlan client is
@@ -2758,6 +2769,8 @@ struct ipa_wlan_msg {
	char name[IPA_RESOURCE_NAME_MAX];
	uint8_t mac_addr[IPA_MAC_ADDR_SIZE];
	int16_t if_index;
#define IPA_WDI_AST_UPDATE
	uint8_t ast_update;
};

/**
@@ -2766,11 +2779,14 @@ struct ipa_wlan_msg {
 *
 * WLAN_HDR_ATTRIB_MAC_ADDR: attrib type mac address
 * WLAN_HDR_ATTRIB_STA_ID: attrib type station id
 * WLAN_HDR_ATTRIB_TA_PEER_ID: ta peer id associated with mac
 */
enum ipa_wlan_hdr_attrib_type {
	WLAN_HDR_ATTRIB_MAC_ADDR,
	WLAN_HDR_ATTRIB_STA_ID
	WLAN_HDR_ATTRIB_STA_ID,
	WLAN_HDR_ATTRIB_TA_PEER_ID
};
#define WLAN_HDR_ATTRIB_TA_PEER_ID WLAN_HDR_ATTRIB_TA_PEER_ID

/**
 * struct ipa_wlan_hdr_attrib_val - header attribute value
@@ -2778,6 +2794,7 @@ enum ipa_wlan_hdr_attrib_type {
 * @offset: offset of attribute within header
 * @u.mac_addr: mac address
 * @u.sta_id: station id
 * @u.ta_peer_id: ta peer id
 */
struct ipa_wlan_hdr_attrib_val {
	enum ipa_wlan_hdr_attrib_type attrib_type;
@@ -2785,6 +2802,7 @@ struct ipa_wlan_hdr_attrib_val {
	union {
		uint8_t mac_addr[IPA_MAC_ADDR_SIZE];
		uint8_t sta_id;
		uint16_t ta_peer_id;
	} u;
};