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

Commit 735ab6bf authored by Zhaoyang Liu's avatar Zhaoyang Liu Committed by Kalle Valo
Browse files

mwifiex: complete usb tx data with multi endpoints



This patch do the work to TX data with specific USB
endpoint. At the same time, update data_sent flag
according to multi port status. And is_port_ready
API is added for BSS interface to check if current
used usb data endpoint is available or not.

Signed-off-by: default avatarZhaoyang Liu <liuzy@marvell.com>
Signed-off-by: default avatarCathy Luo <cluo@marvell.com>
Signed-off-by: default avatarAmitkumar Karwar <akarwar@marvell.com>
Signed-off-by: default avatarKalle Valo <kvalo@codeaurora.org>
parent 7e4e5d2c
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -259,7 +259,7 @@ mwifiex_11n_aggregate_pkt(struct mwifiex_private *priv,
	}

	if (adapter->iface_type == MWIFIEX_USB) {
		ret = adapter->if_ops.host_to_card(adapter, MWIFIEX_USB_EP_DATA,
		ret = adapter->if_ops.host_to_card(adapter, priv->usb_port,
						   skb_aggr, NULL);
	} else {
		if (skb_src)
+1 −0
Original line number Diff line number Diff line
@@ -817,6 +817,7 @@ struct mwifiex_if_ops {
	void (*submit_rem_rx_urbs)(struct mwifiex_adapter *adapter);
	void (*deaggr_pkt)(struct mwifiex_adapter *, struct sk_buff *);
	void (*multi_port_resync)(struct mwifiex_adapter *);
	bool (*is_port_ready)(struct mwifiex_private *);
};

struct mwifiex_adapter {
+3 −1
Original line number Diff line number Diff line
@@ -616,7 +616,9 @@ int mwifiex_process_sta_event(struct mwifiex_private *priv)
		adapter->tx_lock_flag = false;
		if (adapter->pps_uapsd_mode && adapter->gen_null_pkt) {
			if (mwifiex_check_last_packet_indication(priv)) {
				if (adapter->data_sent) {
				if (adapter->data_sent ||
				    (adapter->if_ops.is_port_ready &&
				     !adapter->if_ops.is_port_ready(priv))) {
					adapter->ps_state = PS_STATE_AWAKE;
					adapter->pm_wakeup_card_req = false;
					adapter->pm_wakeup_fw_try = false;
+5 −1
Original line number Diff line number Diff line
@@ -153,6 +153,10 @@ int mwifiex_send_null_packet(struct mwifiex_private *priv, u8 flags)
	if (adapter->data_sent)
		return -1;

	if (adapter->if_ops.is_port_ready &&
	    !adapter->if_ops.is_port_ready(priv))
		return -1;

	skb = dev_alloc_skb(data_len);
	if (!skb)
		return -1;
@@ -174,7 +178,7 @@ int mwifiex_send_null_packet(struct mwifiex_private *priv, u8 flags)
	local_tx_pd->bss_type = priv->bss_type;

	if (adapter->iface_type == MWIFIEX_USB) {
		ret = adapter->if_ops.host_to_card(adapter, MWIFIEX_USB_EP_DATA,
		ret = adapter->if_ops.host_to_card(adapter, priv->usb_port,
						   skb, NULL);
	} else {
		skb_push(skb, INTF_HEADER_LEN);
+2 −2
Original line number Diff line number Diff line
@@ -116,7 +116,7 @@ int mwifiex_process_tx(struct mwifiex_private *priv, struct sk_buff *skb,
			local_tx_pd = (struct txpd *)(head_ptr + hroom);
		if (adapter->iface_type == MWIFIEX_USB) {
			ret = adapter->if_ops.host_to_card(adapter,
							   MWIFIEX_USB_EP_DATA,
							   priv->usb_port,
							   skb, NULL);
		} else {
			ret = adapter->if_ops.host_to_card(adapter,
@@ -189,7 +189,7 @@ static int mwifiex_host_to_card(struct mwifiex_adapter *adapter,

	if (adapter->iface_type == MWIFIEX_USB) {
		ret = adapter->if_ops.host_to_card(adapter,
						   MWIFIEX_USB_EP_DATA,
						   priv->usb_port,
						   skb, NULL);
	} else {
		ret = adapter->if_ops.host_to_card(adapter,
Loading